6.02 Quiz #3 Review Problems


Problem 1. Calculate the latency (total delay from first bit sent to last bit received) for the following:

  1. Sender and receiver are separated by two 1-Gigabit/s links and a single switch. The packet size is 5000 bits, and each link introduces a propagation delay of 10 microseconds. Assume that the switch begins forwarding immediately after it has received the last bit of the packet and the queues are empty.

  2. Same as (A) with three switches and four links.


Problem 2. Little's Law.

  1. At the supermarket a checkout operator has on average 4 customers and customers arrive every 2 minutes. How long must each customer wait in line on average?

  2. A restaurant holds about 60 people, and the average person will be in there about 2 hours. On average, how many customers arrive per hour? If the restaurant queue has 30 people waiting to be seated, how long does each person have to wait for a table?

  3. A fast-food restaurant uses 3,500 kilograms of hamburger each week. The manager of the restaurant wants to ensure that the meat is always fresh, i.e., the meat should be no more than two days old on average when used. How much hamburger should be kept in the refrigerator as inventory?

  4. A hardware vendor manufactures $300 million worth of PCs per year. On average, the company has $45 million in accounts receivable. How much time elapses between invoicing and payment?


Problem 3. Consider the following networks: network I (containing nodes A, B, C) and network II (containing nodes D, E, F).

  1. The Distance Vector Protocol described in class is used in both networks. Assume advertisements are sent every 5 time steps, all links are fully functional and there is no delay in the links. Nodes take zero time to process advertisements once they receive them. The HELLO protocol runs in the background every time step in a way that any changes in link connectivity are reflected in the next DV advertisement. We count time steps from t=0 time steps.

    Please fill in the following table:

    EventNumber of time steps
    A's routing table has an entry for B 
    A's routing table has an entry for C 
    D's routing table has an entry for E 
    F's routing table has an entry for D 

  2. Now assume the link B-C fails at t = 51 and link D-E fails at t = 71 time steps. Please fill in this table:

    EventNumber of time steps
    B's advertisements reflect that C is unreachable 
    A's routing table reflects C is unreachable 
    D's routing table reflects a new route for E 


Problem 4. Alyssa P. Hacker manages MIT's internal network that runs link-state routing. She wants to experiment with a few possible routing strategies. Of all possible paths available to a particular destination at a node, a routing strategy specifies the path that must be picked to create a routing table entry. Below is the name Alyssa has for each strategy and a brief description of how it works.

Assume that sufficient information (e.g., costs, delays, bandwidths, and loss probabilities of the various links) is exchanged in the link state advertisements, so that every node has complete information about the entire network and can correctly implement the strategies above. You can also assume that a link's properties don't change, e.g., it doesn't fail.

  1. Help Alyssa figure out which of these strategies will work correctly, and which will result in routing with loops. In case of strategies that do result in routing loops, come up with an example network topology with a routing loop to convince Alyssa.

  2. How would you implement MinCostSquared in a distance-vector protocol?


Problem 5. Consider the following chain topology:

A ---- B ----- C ---- D ---- E

A is sending packets to E using a reliable transport protocol. Each link above can transmit one packet per second. There are no queues or other sources of delays at the nodes (except the transmission delay of course).

  1. What is the RTT between A and E?

  2. What is the throughput of a stop-and-wait protocol at A in the absence of any losses at the nodes?

  3. If A decides to run a sliding window protocol, what is the optimum window size it must use? What is the throughput achieved when using this optimum window size?

  4. Suppose A is running a sliding window protocol with a window size of four. In the absence of any losses, what is the throughput at E? What is the utilization of link B-C?

  5. Consider a sliding window protocol running at the optimum window size found in part 3 above. Suppose nodes in the network get infected by a virus that causes them to drop packets when odd sequence numbers. The sliding window protocol starts numbering packets from sequence number 1. Assume that the sender uses a timeout of 40 seconds. The receiver buffers out-of-order packets until it can deliver them in order to the application. What is the number of packets in this buffer 35 seconds after the sender starts sending the first packet?


Problem 6.

Which of these statements are true for correctly implemented versions of stabilized unslotted Aloha, stabilized slotted Aloha, and Time Division Multiple Access (TDMA)? Assume that the slotted and unslotted versions of Aloha use the same stabilization method and parameters.

  1. When the number of nodes is large, unslotted Aloha has a lower maximum throughput than slotted Aloha.

  2. When the number of nodes is large and nodes transmit data according to a Poisson process, there exists some offered load for which the throughput of unslotted Aloha is higher than the throughput of slotted Aloha.

  3. TDMA has no packet collisions.

  4. There exists some offered load pattern for which TDMA has lower throughput than slotted Aloha.


Problem 7. Binary exponential backoff is a mechanism used in some MAC protocols. Which of the following statements is correct?

A. It ensures that two nodes that experience a collision in a time slot will never collide with each other when they each retry that packet.

B. It ensures that two or more nodes that experience a collision in a time slot will experience a lower probability of colliding with each ther when they each retry that packet.

C. It can be used with slotted Aloha but not with carrier sense multiple access.

D. Over short time scales, it improves the fairness of the throughput achieved by different nodes compared to not using the mechanism.


Problem 8. Consider a shared medium with N nodes running the slotted Aloha MAC protocol without any backoffs. A "wasted slot" is one in which no node sends data. The fraction of time during which no node uses the medium is the "waste" of the protocol.

  1. If the sending probability is p, what is the waste? What are the smallest and largest possible values of the waste?

  2. If the Aloha sending probability, p, for each node is picked so as to maximize the utilization, what is the corresponding waste?


Problem 9. Alyssa and Ben are all on a shared medium wireless network running a variant of slotted Aloha. Their computers are configured such that Alyssa is 1.5 times as likely to send a packet as Ben. Assume that both computers are backlogged.

  1. For Alyssa and Ben, what is their probability of transmission such that the utilization of their network is maximized?

  2. What is the maximum utilization?


Problem 10. True or false?

Assume that the shared medium has N nodes and they are always backlogged.

  1. In a slotted Aloha MAC protocol using binary exponential backoff, the probability of transmission will always eventually converge to some value p, and all nodes will eventually transmit with probability p.

  2. Using carrier sense multiple access (CSMA), suppose that a node "hears" that the channel is busy at time slot t. To maximize utilization, the node should not transmit in slot t and instead transmit the packet in the next time slot with probability 1.

  3. There is some workload for which an unslotted Aloha with perfect CSMA will not achieve 100% utilization.


Problem 11. Time-domain multiplexing.

Eight Cell Processor cores are connected together with a shared bus. To simplify bus arbitration, Ben Bittdidle, young IBM engineer, suggested time-domain multiplexing (TDM) as an arbitration mechanism. Using TDM each of the processors is allocated a equal-sized time slots on the common bus in a round-robin fashion. He's been asked to evaluate the proposed scheme on two types of applications: 1) core-to-core streaming, 2) random loads.

Help Ben out by evaluating the effectiveness (bus utilization) of TDM under these two traffic scenarios.

2) Each core is given 12.5% of bus bandwidth, but not all cores can use it, and some need more than that. So bus utilization is: 12.5% + 12.5% + 10% + 5% + 1% + 3% + 1% + 12.5% = 57.5%


Problem 12. Circuit switching and packet switching are two different ways of sharing links in a communication network. Indicate True or False for each choice.

  1. Switches in a circuit-switched network process connection establishment and tear-down messages, whereas switches in a packet-switched network do not.

  2. Under some circumstances, a circuit-switched network may prevent some senders from starting new conversations.

  3. Once a connection is correctly established, a switch in a circuit-switched network can forward data correctly without requiring data frames to include a destination address.

  4. Unlike in packet switching, switches in circuit-switched networks do not need any information about the network topology to function correctly.


Problem 13. Which of the following tasks does a router R in a packet-switched network perform when it gets a packet with destination address D? Indicate True or False for each choice.

  1. R looks up D in its routing table to determine the outgoing link.

  2. R sends out a HELLO packet or a routing protocol advertisement to its neighbors.

  3. R calculates the minimum-cost route to destination D.

  4. R may discard the packet.


Problem 14. Over many months, you and your friends have painstakingly collected a 1,000 Gigabytes (aka 1 Terabyte) worth of movies on computers in your dorm (we won't ask where the movies came from). To avoid losing it, you'd like to back the data up on to a computer belonging to one of your friends in New York.

You have two options:

A. Send the data over the Internet to the computer in New York. The data rate for transmitting information across the Internet from your dorm to New York is 1 Megabyte per second.

B. Copy the data over to a set of disks, which you can do at 100 Megabytes per second (thank you, firewire!). Then rely on the US Postal Service to send the disks by mail, which takes 7 days.

Which of these two options (A or B) is faster? And by how much?

Method A takes (1000 * 109 bytes)/(106 bytes/s) = 11.5 days

Method B takes (1000 * 109 bytes)/(100 * 106 bytes/s) + 7 days = 7.1 days

Method B is 4.4 days faster than Method A!


Problem 15. Alice and Bob are responsible for implementing Dijkstra's algorithm at the nodes in a net- work running a link-state protocol. On her nodes, Alice implements a minimum-cost algorithm. On his nodes, Bob implements a "shortest number of hops" algorithm. Give an example of a network topology with 4 or more nodes in which a routing loop occurs with Alice and Bob's implementations running simultaneously in the same network. Assume that there are no failures.

(Note: A routing loop occurs when a group of k ≥ 1 distinct nodes, n_0 , n_1 , n_2 , …, n_(k-1) have routes such that n_i's next-hop (route) to a destination is n_(i+1 mod k).

Suppose the destination is E. A will pick B as its next hop because ABE is the shortest path. B will pick A as its next hop because BACDE is the minimum-cost path (cost of 4, compared to 11 for the ABE path). The result is a routing loop ABABAB...


Problem 16. Network designers generally attempt to deploy networks that don't have single points of failure, though they don't always succeed. Network topologies that employ redundancy are of much interest.

A. Draw an example of a six-node network in which the failure of a single link does not disconnect the entire network (that is, any node can still reach any other node).

B. Draw an example of a six-node network in which the failure of any single link cannot disconnect the entire network, but the failure of some single node does disconnect it.

C. Draw an example of a six-node network in which the failure of any single node cannot disconnect the entire network, but the failure of some single link does disconnect it.

Note: Not all the cases above may have a feasible example.

C. Impossible. If the failure of some link disconnects the network, then pick a node adjacent to that link and fail it. The link in question will fail, and the network will be disconnected, violating the condition that the failure of any single node cannot disconnect the network.


Problem 17. Consider the network shown below. The number near each link is its cost.

We're interested in finding the shortest paths (taking costs into account) from S to every other node in the network. What is the result of running Dijkstra's shortest path algorithm on this network? To answer this question, near each node, list a pair of numbers: The first element of the pair should be the order, or the iteration of the algorithm in which the node is picked. The second element of each pair should be the shortest path cost from S to that node.

To help you get started, we've labeled the first couple of nodes: S has a label (Order: 0, Cost: 0) and A has the label (Order: 1, Cost: 2).


Problem 18. Consider any two graphs(networks) G and G' that are identical except for the costs of the links. Please answer these questions.

  1. The cost of link l in graph G is c_l > 0, and the cost of the same link l in Graph G' is k*c_l, where k > 0 is a constant and the same scaling relationship holds for all the links. Are the shortest paths between any two nodes in the two graphs identical? Justify your answer.

  2. Now suppose that the cost of a link l in G' is k*c_l + h, where k > 0 and h > 0 are constants. Are the shortest paths between any two nodes in the two graphs identical? Justify your answer.


Problem 19. Ben Bitdiddle implements a reliable data transport protocol intended to provide "exactly once" semantics. Each packet has an 8-bit incrementing sequence number, starting at 0. As the connection progresses, the sender "wraps around" the sequence number once it reaches 255, going back to 0 and incrementing it for successive packets. Each packet size is S = 1000 bytes long (including all packet headers).

Suppose the link capacity between sender and receiver is C = 1 Mbyte per second and the round-trip time is R = 100 milliseconds.

  1. What is the highest throughput achievable if Ben's implementation is stop-and-wait?

  2. To improve performance, Ben implements a sliding window protocol. Assuming no packet losses, what should Ben set the window size to in order to saturate the link capacity?

  3. Ben runs his protocol on increasingly higher-speed bottleneck links. At a certain link speed, he finds that his implementation stops working properly. Can you explain what might be happening? What threshold link speed causes this protocol to stop functioning properly?


Problem 20. A sender S and receiver R are connected over a network that has k links that can each lose packets. Link i has a packet loss rate of p_i in one direction (on the path from S to R) and q_i in the other (on the path from R to S). Assume that each packet on a link is received or lost independent of other packets, and that each packet's loss probability is the same as any other's (i.e., the random process causing packet losses is indepedent and identically distributed).

  1. Suppose that the probability that a data packet does not reach R when sent by S is p and the probability that an ACK packet sent by R does not reach S is q. Write expressions for p and q in terms of the p_i's and q_i's.

  2. If all p's are equal to some value α << 1 (much smaller than 1), then what is p (defined above) approximately equal to?

  3. Suppose S and R use a stop-and-wait protocol to communicate. What is the expected number of transmissions of a packet before S can send the next packet in sequence? Write your answer in terms of p and q (both defined above).


Problem 21. On the Internet, TCP checksums all the data it sends even when each link on the path has its own CRC-based checksum. Should TCP save the network bandwidth consumed by its checksums over such paths and get rid of it?


Problem 22. Consider a 40 kbit/s network link connecting the earth to the moon. The moon is about 1.5 light-seconds from earth.

  1. 1 Kbyte packets are sent over this link using a stop-and-wait protocol for reliable delivery, what data transfer rate can be achieved? What is the utilization of the link?

  2. If a sliding-window protocol is used instead, what is the smallest window size that achieves the maximum data rate? Assume that error are infrequent. Assume that the window size is set to achieve the maximum data transfer rate.

  3. Consider a sliding-window protocol for this link with a window size of 10 packets. If the receiver has a buffer for only 30 undelivered packets (the receiver discards packets it has no room for, and sends no ACK for discarded packets), how bits of sequence number are needed?


Problem 23. Huffman and other coding schemes tend to devote more bits to the coding of


Problem 24. Consider the following two Huffman decoding tress for a variable-length code involving 5 symbols: A, B, C, D and E.

  1. Using Tree #1, decode the following encoded message: "01000111101".

  2. Suppose we were encoding messages with the following probabilities for each of the 5 symbols: p(A) = 0.5, p(B) = p(C) = p(D) = p(E) = 0.125. Which of the two encodings above (Tree #1 or Tree #2) would yield the shortest encoded messages averaged over many messages?

  3. Using the probabilities of part (B), if you learn that the first symbol in a message is "B", how many bits of information have you received?

  4. Using the probabilities of part (B), If Tree #2 is used to encode messages what is the average length of 100-symbol messages, averaged over many messages?


Problem 25. Huffman coding is used to compactly encode the species of fish tagged by a game warden. If 50% of the fish are bass and the rest are evenly divided among 15 other species, how many bits would be used to encode the species when a bass is tagged?


Problem 26. Ben Bitdiddle has been hired by the Registrar to help redesign the grades database for WebSIS. Ben is told that the database only needs to store one of five possible grades (A, B, C, D, F). A survey of the current WebSIS repository reveals the following probabilities for each grade:

GradeProbability of occurrence
Ap(A) = 18%
Bp(B) = 27%
Cp(C) = 25%
Dp(D) = 15%
Fp(E) = 15%

  1. Given the probabilities above, if you are told that a particular grade is "C", give an expression for the number of bits of information you have received.

  2. Ben is interested in storing a sequence of grades using as few bits as possible. Help him out by creating a variable-length encoding that minimizes the average number of bits stored for a sequence of grades. Use the table above to determine how often a particular grade appears in the sequence.


Problem 27. Consider a sigma-delta modulator used to convert a particular analog waveform into a sequence of 2-bit values. Building a histogram from the 2-bit values we get the following information:

Modulator value# of occurrences
0025875
01167836
10167540
1125974

  1. Using probabilities computed from the histogram, construct a variable-length Huffman code for encoding these four values.

  2. If we transmit the 2-bit values as is, it takes 2 bits to send each value (doh!). If we use the Huffman code from part (A) what is the average number of bits used to send a value? What compression ratio do we achieve by using the Huffman code?

  3. Using Shannon's entropy formula, what is the average information content associated with each of the 2-bit values output by the modulator? How does this compare to the answers for part (B)?


Problem 28. Several people at a party are trying to guess a 3-bit binary number. Alice is told that the number is odd; Bob is told that it is not a multiple of 3 (i.e., not 0, 3, or 6); Charlie is told that the number contains exactly two 1's; and Deb is given all three of these clues. How much information (in bits) did each player get about the number?


Problem 29. In honor of Daisuke Matsuzaka's first game pitching for the Redsox, the Boston-based members of the Search for Extraterrestrial Intelligence (SETI) have decided to broadcast a 1,000,000 character message made up of the letters "R", "E", "D", "S", "O", "X". The characters are chosen at random according the probabilities given in the table below:

Letterp(Letter)
R.21
E.31
D.11
S.16
O.19
X.02

  1. If you learn that one of the randomly chosen letters is a vowel (i.e., "E" or "O") how many bits of information have you received?

  2. Nervous about the electric bill for the transmitter at Arecibo, the organizers have asked you to design a variable length code that will minimize the number of bits needed to send the message of 1,000,000 randomly chosen characters. Please draw a Huffman decoding tree for your code, clearly labeling each leaf with the appropriate letter and each arc with either a "0" or a "1".

  3. Using your code, what bit string would they send for "REDSOX"?


Problem 30. You're playing an on-line card game that uses a deck of 100 cards containing 3 Aces, 7 Kings, 25 Queens, 31 Jacks and 34 Tens. In each round of the game the cards are shuffled, you make a bet about what type of card will be drawn, then a single card is drawn and the winners are paid off. The drawn card is reinserted into the deck before the next round begins.

  1. How much information do you receive when told that a Queen has been drawn during the current round?

  2. Give a numeric expression for the average information content received when learning about the outcome of a round.

  3. Construct a variable-length Huffman encoding that minimizes the length of messages that report the outcome of a sequence of rounds. The outcome of a single round is encoded as A (ace), K (king), Q (queen), J (jack) or X (ten). Specify your encoding for each of A, K, Q, J and X.

  4. Using your code from part (C) what is the expected length of a message reporting the outcome of 1000 rounds (i.e., a message that contains 1000 symbols)?

  5. The Nevada Gaming Commission regularly receives messages in which the outcome for each round is encoded using the symbols A, K, Q, J and X. They discover that a large number of messages describing the outcome of 1000 rounds (i.e. messages with 1000 symbols) can be compressed by the LZW algorithm into files each containing 43 bytes in total. They immediately issue an indictment for running a crooked game. Briefly explain their reasoning.


Problem 31. X is an unknown 8-bit binary number. You are given another 8-bit binary number, Y, and told that the Hamming distance between X (the unknown number) and Y (the number you know) is one. How many bits of information about X have you been given?


Problem 32. In Blackjack the dealer starts by dealing 2 cards each to himself and his opponent: one face down, one face up. After you look at your face-down card, you know a total of three cards. Assuming this was the first hand played from a new deck, how many bits of information do you now have about the dealer's face down card?


Problem 33. The following table shows the current undergraduate and MEng enrollments for the School of Engineering (SOE).

Course (Department)# of studentsProb.
I (Civil & Env.)121.07
II (Mech. Eng.)389.23
III (Mat. Sci.)127.07
VI (EECS)645.38
X (Chem. Eng.)237.13
XVI (Aero & Astro)198.12
Total17171.0

  1. When you learn a randomly chosen SOE student's department you get some number of bits of information. For which student department do you get the least amount of information?

  2. Design a variable length Huffman code that minimizes the average number of bits in messages encoding the departments of randomly chosen groups of students. Show your Huffman tree and give the code for each course.

  3. If your code is used to send messages containing only the encodings of the departments for each student in groups of 100 randomly chosen students, what's the average length of such messages? Write an expression if you wish.


Problem 34. Dijkstra's algorithm

  1. For the following network

    an empty routing tree generated by Dijkstra's algorithm for node A (to every other node) is shown below. Fill in the missing nodes and indicate the order that each node was added and its associated cost. For reference, node C's completed routing tree is shown as well.

  2. Now assume that node F has been added to the network along with links L1, L2 and L3.

    What are the constraints on L1, L2 and L3 such that node A's routing tree matches the topology shown below, and it is known that node F is not the last node added when using Dijkstra's algorithm?


Problem 35. MAC protocol

Randomized exponential backoff is a mechanism used to stabilize contention MAC protocols. Which of the following statements is correct?

  1. It ensures that two nodes that experience a collision in a time-slot will never collide with each other when they each retry that packet.

  2. It ensures that two or more nodes that experience a collision n a time-slot will experience a lower probability of colliding with ach other when they each retry that packet.

  3. It can be used with slotted Aloha but not with CSMA.


Problem 36.

Next generation Ntel processor will contain 64 cores and have an on-chip network with one router per core. Router has 5 ports (north, south, east, west and a local port to core). Ntel engineers would like to size the network so it supports data traffic for 1TFlop/s computation. Assume that roughly 1Byte of traffic is needed for each floating point operation.

  1. Determine the bandwidth of router-to-router links to support 1TFlop/s computation under uniform random traffic assumption (i.e. assume that each core wants to communicate to all other cores with same probability).

  2. What would be the router-to-router link size needed to support the same computation provided that a communication pattern is only between neighboring cores (e.g in chain/ring like core (1,1) to core (1,2), core(1,2) to core (1,3), etc).

  3. What is the diameter of this mesh network (assuming x-y routing)?

  4. A message between two cores is usually a cache line (512 b). It is divided into packets (flits) that are as wide as the router-to-router link. Assuming 2GHz processor frequency and router-to-router link frequency, determine the flit size (i.e. how many wires there are per link), to support link bandwidth in a). How many flits per message?

  5. Assuming that link latency is 1 cycle, router latency is 2 cycles (without queue delay), determine the worst-case latency that a message experiences in the lightly loaded network (so called zero-load latency, ZLL).


Problem 37. "Information, please"

  1. You're given a standard deck of 52 playing cards that you start to turn face up, card by card. So far as you know, they're in completely random order. How many new bits of information do you get when the first car is flipped over? The fifth card? The last card?

  2. Suppose there three alternatives ("A", "B" and "C") with the following probabilities of being chosen:

    p("A") = 0.8
    p("B") = 0.1
    p("C") = 0.1

    We might encode the of "A" with the bit string "0", the choice of "B" with the bit string "10" and the choice of "C" with the bit string "11".

    If we record the results of making a sequence of choices by concatenating in left-to-right order the bit strings that encode each choice, what sequence of choices is represented by the bit string "00101001100000"?

  3. Using the encoding of the previous part, what is the expected length of the bit string that encodes the results of making 1000 choices? What is the length in the worst case? How do these numbers compare with 1000*log2(3/1), which is the information content of 1000 equally-probable choices?

  4. Consider the sum of two six-sided dice. Even when the dice are "fair" the amount information conveyed by a single sum depends on what the sum is since some sums are more likely than others, as shown in the following figure:

    What is the average number of bits of information provided by the sum of 2 dice? Suppose we want to transmit the sums resulting from rolling the dice 1000 times. How many bits should we expect that transmission to take?

    So if we had the perfect encoding, the expected length of the transmission would be 3274.4 bits. If we encode each sum separately we can't quite achieve this lower bound -- see the next question for details.

  5. Suppose we want to transmit the sums resulting from rolling the dice 1000 times. If we use 4 bits to encode each sum, we'll need 4000 bits to transmit the result of 1000 rolls. If we use a variable-length binary code which uses shorter sequences to encode more likely sums then the expected number of bits need to encode 1000 sums should be less than 4000. Construct a variable-length encoding for the sum of two dice whose expected number of bits per sum is less than 3.5. (Hint: It's possible to find an encoding for the sum of two dice with an expected number of bits = 3.306.)

  6. Can we make an encoding for transmitting 1000 sums that has an expected length smaller than that achieved by the previous part?


Problem 38. MAC protocols

Three users X, Y and Z use a shared link to connect to the Internet. Only one of X, Y or Z can use the link at a given time. The link has a capacity of 1Mbps. There are two possible strategies for accessing the shared link:

In each of the following two cases, which strategy would you pick and why?

  1. X, Y and Z send a 40KBytes file every 1sec.

  2. X sends 80KBytes files every 1sec, while Y and Z send 10KBytes files every 1sec.


Problem 39. Reliable transport protocols

Sender S communicates with receiver R using a flow control protocol with a window of 3 packets. This means that S can send at most 3 unacknowledged packets at a time. Each packet has a sequence number starting from 1. R always acknowledges a packet by sending back to A the sequence number of that packet (i.e., when R receives a packet with sequence number 2 it sends an acknowledgement (ack) containing 2 to S.) Ignore packet transmission times, and assume that neither the packets nor the ack are reordered in the network. Let RTT denote the round-trip time between S and R. S uses two mechanisms to retransmit a packet:

Assume S wants to transfer a file that spawns exactly 8 packets to R as fast as possible. During the transfer at most one packet (or ack) is lost. For all questions below express your answer in terms of T and RTT.

  1. What is the minimum time it could take to transfer the file? The file transfer time is the time between the moment S sends the first packet and the moment it receives the last ack.

  2. What is the maximum possible file transfer time assuming S uses only the "timeout" retransmission mechanism? Please give a scenario which achieves the maximum transfer time. This scenario should indicate which packet (or ack) is dropped, if any.

  3. Repeat question (b) but now assume that S uses both the "timeout" and "out-of-order ack" retransmission mechanisms.


Problem 40. Reliable data delivery

Consider two nodes, A and B. Suppose the network path from A to B has a bandwidth of 5 KB/s (5,000 bytes per second) and a propagation time of 120 msec. The path in the reverse direction, from B to A, has a bandwidth of 10 KB/s and a propagation time of 80 msec. Let data packets have a size (including all headers) of 500 bytes and acknowledgment packets a size of 100 bytes.

  1. Give a numeric expression for the throughput A can achieve in transmitting to B using Stop-and-Wait. You can treat a 500-byte data packet as transferring 500 bytes of useful data (that is, ignore that it’s a bit less due to the headers).

  2. Give a numeric expression for the size of the window, in terms of number of data packets, that A must use in order to transfer its data as fast as possible, if A instead uses Sliding Window.

  3. What is the maximum rate A can achieve?

  4. If the bandwidth of the path from B to A drops to 100 bytes/sec, can A still achieve this rate? If so, roughly how much smaller or bigger is the new window size? If not, what is the new limit on the rate A can achieve?


Problem 41. Reliable data delivery

Consider a sliding window protocol between hosts A and B. Suppose the link propagation delay is 1 time unit, the retransmission timeout is 3 time units, and the window size is 3. Assume the link drops every third packet, i.e., the link drops the 1st, 4th, 7th, ... data packets. (Note that here "kth" packet means the kth packet transmitted on the link, and NOT the sequence number of the packet.) How long does it take to successfully transmit 6 packets between A and B? Ignore the transmission times and the queuing delay, and assume that no acknowledgments are lost.


Problem 42. MAC protocols -- token passing

Token-passing is an alternative to contention-based channel access protocols like ALOHA. Here, the N nodes in the broadcast network are numbered 0, 1, ..., N-1. The token starts at node 0. A node can send a frame if, and only if, it has the token. When node i with the token has a frame to send, it sends the frame and then passes the token to node (i + 1) mod N. If node i with the token does not have a frame to send, it passes the token to node (i+1) mod N. To pass the token, a node broadcasts a token frame on the radio channel. A data frame occupies the channel for time Tf and a token frame occupies the channel for time Tk.

  1. If s of the N nodes in the network have data to send when they get the token, what is the utilization of the channel?

  2. In theory, token passing seems like a good way of avoiding packet collisions. However, in practice, there are a few significant complicating issues that such a scheme must handle in wireless broadcast networks. State one of them.


Problem 43. MAC protocols: Aloha

Note: this problem is useful to review how to set up and solve problems related to Aloha-like access protocols, but the calculations shown in the answer are more complex than we would ask on a quiz.

Consider a network with four nodes, where each node has a dedicated channel to each other node. The probability that any node transmits is p. Each node can only send OR receive one packet at a time. What is the utilization of the network? Assume each packet takes 1 time slot. Assume each node has 3 queues -- one for each other node -- and that each is backlogged.

P[4 nodes transmit] = p4
P[3 nodes transmit] = 4p3(1-p)
P[2 nodes transmit] = 6p2(1-p)2
P[1 node transmits] = 4p(1-p)3
p[0 nodes transmit] = (1-p)4 Expected packets through if 4 nodes transmit = 0
No one is free to receive a packet.

Expected packets through if 3 nodes transmit = 1*(3/27) = 1/9
Without loss of generality, assume that A,B and C transmit. There are 27 combinations of destinations that they can transmit to (each can choose one of 3). Of these, only 3 result in the successful transmission of one packet (e.g. A->D,B->C,C->B) or (B->D,A<->C) or (C->D,A<->B)

Expected packets through if 2 nodes transmit = 2*(2/9) = 4/9
Similar to above, assume that A and B transmit. There are 9 combinations of destinations. Of these, only 2 result in the successful transmission of 2 packets (A->D,B->C) or (A->C,B->D).

Expected packets through if 1 node transmits = 1
No matter who the node transmits to, it will get through.

Expected packets through if 0 nodes transmit = 0
No packets sent.

Thus, the expected number of packets through is

(1/9)*4p3(1-p) + (4/9)*6p2(1-p)2 + (1)*4p(1-p)3 = 4/9*p3(1-p) + (4/3)p2(1-p)2 + 4p(1-p)3

The utilization is half of that.


Problem 44. MAC protocols: Aloha

Suppose that there are three nodes seeking access to a shared medium using slotted Aloha, where each packet takes one slot to transmit. Assume that the nodes are always backlogged, and that each has probability p_i of sending a packet in each slot, where i = 1, 2 and 3 indexes the node. Suppose that we assign more the sending probabilities so that

p_1 = 2(p_2) and p_2 = p_3

  1. What is the utilization of the shared medium?

  2. What are the probabilities that maximize the utilization and the corresponding utilization?


Problem 45. MAC protocols: Aloha

Suppose that two nodes are seeking access to a shared medium using slotted Aloha with binary exponential backoff subject to maximum and minimum limits of the probability pmax = 0.8 and pmin = 0.1. Suppose that both nodes are backlogged, and at slot n, the probabilities the two nodes transmit packets are p_1 = 0.5 and p_2 = 0.3.

  1. What are the possible values of p_1 at slot n+1? What are the probabilities assocated with each possible value?

  2. What are the possible values of p_2 at slot n+1? What are the probabilities associated with each possible value?