HW3

advertisement
CS 457: Homework 3 Solutions
1. You are hired by Global Outfitters International (a new company that owns
communications satellites and offers mobile phone service) to design a link layer
digital encoding scheme for their uplink. The main requirement is to allow
efficient clock synchronization. Baud rate is not an issue. Which of the following
encoding schemes would you propose?
a) Manchester encoding
2. Stop-and-wait flow control has the highest efficiency on which of the following
links?
b) Very short low-speed links
3. The data pattern 1010001101 is augmented with a 4-bit CRC field based on the
divisor polynomial 10011. What are the contents of this field?
A: 0111 – Since the divisor is of degree 4 (x4 + x + 1), we add 4 0’s to the data
pattern to get 10100011010000 and divide by the divisor polynomial 10011 and
get a remainder of 111, and since we know that the CRC field will be 4-bits, the
field becomes 0111.
4. Your Model-2005 Sony Waffle Iron is using 2-dimensional parity to
communicate temperature information to your wireless PDA. What type of bit
errors can be corrected at the receiver?
c) Only single bit errors – Although all odd-bit errors can be detected at the
receiver, only single bit errors can be corrected.
5. The Stop and Wait protocol is executed on a 10km wire between your modem and
your ISPs edge router. The propagation speed of an electrical signal on the wire
is 200,000 km/sec. The packet size is 1000 bytes. The time to generate an
acknowledgement by the receiver is 4 microseconds. The channel capacity is 100
Mbps (Mbps = megabit per second).
a) What is the propagation delay on the wire?
A: 50 microseconds, or 0.00005 seconds – Propagation delay is equal
to the distance that the data must travel, divided by the speed that
data travels on the wire, which in this case turns out to be 10 km /
200000 km/sec.
b) What is the packet transmission delay?
A: 80 microseconds, or 0.00008 seconds – Transmission delay is equal
to the packet size divided by the channel capacity, which in this case
turns out to be (1000 * 8) / 100,000,000. A common mistake was to
forget to multiply the packet size by 8 because it is in bytes not bits,
and also that 100 Mbps is equivalent to 100,000,000 bits per second.
c) What is the maximum efficiency of the protocol (i.e., what maximum
percentage of time is your modem actually sending data)?
A: 43.48% - The time that the modem is actually sending data is
equivalent to the packet transmission delay. The total time consists of
the transmission delay at the modem plus the propagation delay to get
to the receiver plus the time it takes to create an acknowledgement
plus the propagation delay to get back to the sender, and so we are left
with the equation T / (T + 2P + Ack) = (0.00008) / (0.00008 + 2 *
0.00005 + 0.000004). Many people forgot to include the time for the
acknowledgement message to be generated in their denominator.
6. In HDLC the application wants to transmit the data pattern 0010 1111 1111.
What bit sequence is actually transmitted on the wire in the body of the packet?
d) 0010 1111 1011 1 – HDLC says that if there are five consecutive ones in
the body then a 0 must be inserted after them.
7. You are in 700 BC. Your tribe has developed a communication network of agents
for transmitting smoke signals among neighboring hill-tops. Note that they can
only use smoke to produce one of 5 different signals (or symbols) at a time. Let
us call them symbols A, B, C, D, and E. The symbol A denotes the start of a new
message. Any of the five symbols can also appear in the content (i.e., body) of the
message. If A is encountered in the body of the message, it must be substituted
by some other symbol(s) before transmission so that the receiver does not mistake
it for a new start-of-message symbol.
a) Design the minimum set of symbol substation rules to be used by the
sender (and the corresponding substitution rules used by the receiver) to
ensure that the start-of-message symbol is replaced prior to transmission
whenever it appears in the body of a message, yet the original message
body can be unambiguously reconstructed at the receiver.
A: A  XY and X XZ, where X, Y, and Z = B, C, D, or E, Y does
not equal Z and X does not equal Z. This means that the sender
converts every instance of ‘A’ in the body of the message into ‘XY’,
and every instance of ‘X’ in body is converted into ‘XZ’. The reverse
action is performed by the receiver.
b) Repeat (a) for the case where the start of a message is indicated by the 2symbol sequence AA instead of the single symbol A.
A: A  AX, where X = B, C, D, or E. This means that the sender
replaces every instance of ‘A’ in the body of the message with ‘AX’,
and the receiver performs the opposite action.
Download