A bit of extra knowledge, and you will know how to always win football bets. Get to Know Different Kinds of Bets. How about the different kinds of bet you can make on a football match? There are many, some of them with great value to the smart bettor, others proving a bit of a distraction from the top prizes. Find the best information and most relevant links on all topics related toThis domain may be for sale!

  1. Wait A Bit For A Bet Offer Program
  2. Wait A Bit For A Bet Offer Free
  3. Wait A Bit For A Bet Offering

6.02 Quiz #3 Review Problems

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

  1. Sender and receiver are separated by two 1-Gigabit/s links and asingle switch. The packet size is 5000 bits, and each link introducesa propagation delay of 10 microseconds. Assume that the switch beginsforwarding immediately after it has received the last bit of thepacket and the queues are empty.For each link, it takes 1 Gigabits/5Kb = 5 micro seconds to transmit thepacket on the link, after which it takes an additional 10 microseconds for the last bit to propagate across the link. Thus, with onlyone switch that starts forwarding only after receiving the wholepacket, the total transfer delay is two transmit delays + twopropagation delays = 30 microseconds.
  2. Same as (A) with three switchesand four links.For three switched and thus four links, the total delta is fourtransmit delays + four propagation delays = 60 microseconds.

Problem . Little's Law.

  1. At the supermarket a checkout operator has on average 4customers and customers arrive every 2 minutes. How long must eachcustomer wait in line on average?Throughput time = 4 customers / 1/2 customer/minute = 8 minutes
  2. A restaurant holds about 60 people, and the average person willbe in there about 2 hours. On average, how many customers arrive perhour? If the restaurant queue has 30 people waiting to be seated, howlong does each person have to wait for a table?Rate = 60 customers / 2 hrs = 30 customers / hr
    Waiting time = 1 hour
  3. A fast-food restaurant uses 3,500 kilograms ofhamburger each week. The manager of the restaurant wants to ensurethat the meat is always fresh, i.e., the meat should be no more than twodays old on average when used. How much hamburger should be kept inthe refrigerator as inventory?Rate = 3,500 kilograms per week (= 500 kilograms per day)
    Average flow time = 2 days
    Average inventory = Rate x Average flow time = 500 x 2 = 1,000 kilograms
    (Note that the variables are all in the same time frame i.e. days)
  4. A hardware vendor manufactures $300 million worth of PCs peryear. On average, the company has $45 million in accounts receivable.How much time elapses between invoicing and payment?Rate= $300 million per year
    Average 'inventory' = $45 million
    Average 'flow time' = 45 / 300 per year = .15 years = 1.8 months = 54 days

Problem .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 bothnetworks. Assume advertisements are sent every 5 time steps, alllinks are fully functional and there is no delay in the links. Nodestake zero time to process advertisements once they receive them. TheHELLO protocol runs in the background every time step in a way thatany changes in link connectivity are reflected in the next DVadvertisement. 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
    A's routing table has an entry for B: 5 time steps
    A's routing table has an entry for C: 10 time steps
    D's routing table has an entry for E: 5 time steps
    F's routing table has an entry for D: 5 time steps

  2. Now assume the link B-C fails at t = 51 and link D-E failsat 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
    B's advertisements reflect that C is unreachable: 55 time steps
    A's routing table reflects C is unreachable: 55 time steps
    D's routing table reflects a new route for E: 75 time steps

Problem .Alyssa P. Hacker manages MIT's internal network that runs link-staterouting. She wants to experiment with a few possible routingstrategies. Of all possible paths available to a particulardestination at a node, a routing strategy specifies the path that mustbe picked to create a routing table entry. Below is the name Alyssahas for each strategy and a brief description of how it works.

    MinCost: Every node picks the path that has the smallest sum of linkcosts along the path. (This is the minimum cost routing youimplemented in the lab).

    MinHop: Every node picks the path with the smallest number of hops(irrespective of what the cost on the links is).

    SecondMinCost: Every node picks the path with the second lowest sumof link costs. That is, every node picks the second best path withrespect to path costs.

    MinCostSquared: Every node picks the path that has the smallest sum ofsquares of link costs along the path.

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

  1. Help Alyssa figure out which of these strategies will workcorrectly, and which will result in routing with loops. In case ofstrategies that do result in routing loops, come up with an examplenetwork topology with a routing loop to convince Alyssa.Answer: All except SecondMinCost will work fine.

    To see why SecondMinCost will not work: consider the triangle topologywith 3 nodes A, B, D, and equal cost on all the links. The secondroute at A to D is via B, and the second best route at B to D is viaA, resulting in a routing loop.

  2. How would you implement MinCostSquared in a distance-vectorprotocol?To implement MinCostSquared, your integrate_announcement routinewould add the square of the link cost (instead of just the link cost)to any route costs advertised over that link.

Problem .Consider the following chain topology:

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

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

  1. What is the RTT between A and E?8 seconds
  2. What is the throughput of a stop-and-wait protocol at A in theabsence of any losses at the nodes?1/8 pkts/s
  3. If A decides to run a sliding window protocol, what is the optimumwindow size it must use? What is the throughput achieved when usingthis optimum window size?optimum window = 8 pkts, optimum throughput = 1 pkt/s
  4. Suppose A is running a sliding window protocol with a window sizeof four. In the absence of any losses, what is the throughput at E?What is the utilization of link B-C?throughput=0.5 pkts/s, utilization=0.5
  5. Consider a sliding window protocol running at the optimum windowsize found in part 3 above. Suppose nodes in the network getinfected by a virus that causes them to drop packets when oddsequence numbers. The sliding window protocol startsnumbering packets from sequence number 1. Assume that the senderuses a timeout of 40 seconds. The receiver buffers out-of-orderpackets until it can deliver them in order to the application. Whatis the number of packets in this buffer 35 seconds after the senderstarts sending the first packet? Answer: 7.

    With a window size of 8, the sender sends out packets 1--8 in thefirst 8 seconds. But it gets back only 4 ACKs because packets 1,3,5,7are dropped. Therefore, the sender transmits 4 more packets (9--12) inthe next 8 seconds, 2 packets (13--14) in the next 8 seconds, and 1(sequence number 15) packet in the next 8 seconds. Note that 32seconds have elapsed so far. Now the sender gets no more ACKs becausepacket 15 is dropped, and it stalls till the first packet times out attime step 40. Therefore, at time 35, the sender would have transmitted15 packets, 7 of which would have reached the receiver. But becauseall of these packets are out of order, the receiver's buffer wouldhave 7 packets.

Problem .

Which of these statements are true for correctly implementedversions of stabilized unslotted Aloha, stabilized slotted Aloha, andTime Division Multiple Access (TDMA)? Assume that the slotted andunslotted versions of Aloha use the same stabilization method andparameters.

  1. When the number of nodes is large, unslotted Aloha has a lowermaximum throughput than slotted Aloha.True. By a factor of 2: 1/2e instead of 1/e.
  2. When the number of nodes is large and nodes transmit data accordingto a Poisson process, there exists some offered load for whichthe throughput of unslotted Aloha is higher than the throughput ofslotted Aloha.False.
  3. TDMA has no packet collisions.True. TDMA eliminates collisions by explicitly allotting time slots.
  4. There exists some offered load pattern for which TDMA has lower throughput than slotted Aloha.True. For example, a skewed workload in which some nodes have muchmore traffic to send than others.

Problem .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 atime slot will never collide with each other when they eachretry that packet.

B. It ensures that two or more nodes that experience a collision in atime slot will experience a lower probability of colliding with eachther 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 thethroughput achieved by different nodes compared to not using themechanism.B is true. The others are false.

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

  1. If the sending probability is p, what is the waste? What arethe smallest and largest possible values of the waste?(1-p)N. 0 and 1.
  2. If the Aloha sending probability, p, for each node is picked soas to maximize the utilization, what is the corresponding waste?1/e --> same as the utlization!

Problem .Alyssa and Ben are all on a shared medium wireless network running avariant of slotted Aloha. Their computers are configured such that Alyssa is1.5 times as likely to send a packet as Ben. Assume that both computers arebacklogged.

  1. For Alyssa and Ben, what is their probability of transmissionsuch that the utilization of their network is maximized?With just two nodes U = (A's throughput + B's throughput)/max rate.

    max rate is 1 packet per time step (slotted Aloha)

    U = (1.5p)(1-p) + (p)(1 - 1.5p) # A's thruput + B's thruput
    = 2.5p - 3p**2

    find max U by differentiating and setting to 0, solving for p
    0 = 2.5 - 6p => p = 2.5/6 = 5/12

    So P_a = 5/8, P_b = 5/12.

  2. What is the maximum utilization? Determine Umax by substituting 5/12 for p in equation for U in part A.
    Umax = (2.5)(5/12) - (3)(25/144) = 25/48 = 0.5208

Problem .True or false?

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

  1. In a slotted Aloha MAC protocol using binary exponential backoff,the probability of transmission will always eventually converge to somevalue p, and all nodes will eventually transmit with probability p.False - In a binary exponential backoff, the probability oftransmission constantly changes. If the a transmission succeeds, thenthe probability goes up. If the transmission fails, the probabilitygoes down.
  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 packetin the next time slot with probability 1.False - The node should not transmit at time t+1 with 100%probability. Other nodes may have also 'heard' that the channel isbusy and would want to send a packet at time t+1. So the node shouldsend with a probability less than 100% to reduce the possibility of acollision.
  3. There is some workload for which an unslotted Aloha withperfect CSMA will not achieve 100% utilization.True - Multiple nodes may think that the channel is idle and send apacket at the same time, resulting in a collision. Thus, theutilization can never reach 100%.

Problem . Time-domain multiplexing.

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

    1) Core-to-core streaming setup: Assume each core has the same stream bandwidth requirement.

    2) Random loads setup: core 1 load = 20%, core 2 load = 30%, core 3load = 10%, core 4 = 5%, core 5 = 1%, core 6 = 3%, core 7 = 1%, core 8load = 30%

Help Ben out by evaluating the effectiveness (bus utilization) ofTDM under these two traffic scenarios.1) All cores have same bandwidth requirements during streaming, so,bus utilization is 100%

2) Each core is given 12.5% of bus bandwidth, but not all cores canuse 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 .Circuit switching and packet switching are two different ways ofsharing links in a communication network. Indicate True or False foreach choice.

  1. Switches in a circuit-switched network process connection establishment and tear-down messages, whereas switches in a packet-switched network do not. True.
  2. Under some circumstances, a circuit-switched network may prevent some senders from starting new conversations. True.
  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. True.
  4. Unlike in packet switching, switches in circuit-switched networks do not need any information about the network topology to function correctly. False.

Problem .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. True.
  2. R sends out a HELLO packet or a routing protocol advertisement to its neighbors. False.
  3. R calculates the minimum-cost route to destination D. False.
  4. R may discard the packet. True.

Problem .Over many months, you and your friends have painstakingly collected a1,000 Gigabytes (aka 1 Terabyte) worth of movies on computers in yourdorm (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 ofyour 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 100Megabytes per second (thank you, firewire!). Then rely on the USPostal 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 .Alice and Bob are responsible for implementing Dijkstra'salgorithm at the nodes in a net- work running a link-stateprotocol. On her nodes, Alice implements a minimum-cost algorithm. Onhis nodes, Bob implements a 'shortest number of hops'algorithm. Give an example of a network topology with 4 or more nodesin which a routing loop occurs with Alice and Bob'simplementations running simultaneously in the same network. Assumethat there are no failures.

(Note: A routing loop occurs when a groupof k ≥ 1 distinct nodes, n_0 , n_1 , n_2 , …, n_(k-1) have routessuch that n_i's next-hop (route) to a destination is n_(i+1 mod k).In the picture below, the grey nodes (A in particular) runBob's algorithm (shortest number of hops), while the whitenodes (B in particular) run Alice's (minimum-cost).

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

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

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

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

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

Note: Not all the cases above may have a feasible example. Here is an example topology for part A (left) and B (right).

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

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

Offer

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

To help you get started, we've labeled the first couple of nodes: Shas a label (Order: 0, Cost: 0) and A has the label (Order: 1, Cost:2).A: order = 1, cost = 2
E: order = 2, cost = 3
B: order = 3, cost = 4
C: order = 4, cost = 5
D: order = 5, cost = 6

Problem .Consider any two graphs(networks) G and G' that are identical exceptfor 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 ofthe same link l in Graph G' is k*c_l, where k > 0 is a constantand the same scaling relationship holds for all the links.Are the shortest paths between any two nodes in the two graphsidentical? Justify your answer.Yes, they're identical. Scaling all the costs by a constant factor doesn'tchange their relative size.
  2. Now suppose that the cost of a link l in G'is k*c_l + h, where k > 0 and h > 0 areconstants. Are the shortest paths between any two nodes in the twographs identical? Justify your answer.No, they're not necessarily identical. Consider two paths between nodes A andB in graph G. One path takes 3 hops, each of cost 1, for a total cost of 3. Theother path takes 1 hop, with a cost of 4. In this case, the shortest path betweennodes A and B is the first one.

    Consider k=1 and h=1 and compute the costs and shortest paths in G'. Now the3-hop path has cost 6 and the 1-hop path has cost 5. In G' the shortest path isthe second path.

Wait A Bit For A Bet Offer Program

Problem .Ben Bitdiddle implements a reliable data transport protocol intendedto provide 'exactly once' semantics. Each packet has an 8-bitincrementing sequence number, starting at 0. As the connectionprogresses, the sender 'wraps around' the sequence number once itreaches 255, going back to 0 and incrementing it for successivepackets. Each packet size is S = 1000 bytes long (including all packetheaders).

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

  1. What is the highest throughput achievable if Ben'simplementation is stop-and-wait?The highest throughput for stop-and-wait is (1000 bytes)/(100ms) =10 Kbytes/s.
  2. To improve performance, Ben implements a sliding windowprotocol. Assuming no packet losses, what should Ben set the windowsize to in order to saturate the link capacity?Set the window size to the bandwidth-delay product of the link, 1 Mbyte/s * 0.1 s = 100 Kbytes.
  3. Ben runs his protocol on increasingly higher-speed bottlenecklinks. At a certain link speed, he finds that his implementation stopsworking properly. Can you explain what might be happening? Whatthreshold link speed causes this protocol to stop functioningproperly?Sequence number wraparound causes his protocol to stop functioningproperly. When this happens, two packets with different content butthe same sequence number are in-flight at once, and so an ack for thefirstt spuriously acknowledges the second as well, possibly causingdata loss in Ben's 'reliable' protocol. This happens when

    (255 packets)(1000 bytes/1 packet) = (C bytes/s)(0.1 s)

    Therefore C = 2.55 Mbytes/s.

Problem .A sender S and receiver R are connected over a network that has klinks that can each lose packets. Link i has a packet loss rate of p_iin one direction (on the path from S to R) and q_i in the other (on thepath from R to S). Assume that each packet on a link is received orlost independent of other packets, and that each packet's lossprobability is the same as any other's (i.e., the random processcausing packet losses is indepedent and identically distributed).

  1. Suppose that the probability that a data packet does not reachR when sent by S is p and the probability that an ACK packet sent by Rdoes not reach S is q. Write expressions for p and q in terms of thep_i's and q_i's.p = 1 - (1 - p_1)(1 - p_2)…(1 - p_k) and
    q = 1 - (1 - q_1)(1 - q_2)…(1 - q_k)
  2. If all p's are equal to some value α << 1 (much smallerthan 1), then what is p (defined above) approximately equal to?p = 1 - (1 - &alpha)k ≈1 - (1 - kα) = kα
  3. Suppose S and R use a stop-and-wait protocol tocommunicate. What is the expected number of transmissions of a packetbefore S can send the next packet in sequence? Write your answer interms of p and q (both defined above).The probability of a packet reception from S to R is 1-p and the probability of an ACK reaching S given that R sent an ACK is 1-q. The sender moves from sequence number k to k + 1 if the packet reaches and the ACK arrives. That happens with probability (1-p)(1-q). The expected number of transmissions for such an event is therefore equal to 1/((1-p)(1-q)).

Problem .On the Internet, TCP checksums all the data it sends even when eachlink on the path has its own CRC-based checksum. Should TCP save thenetwork bandwidth consumed by its checksums over such paths and getrid of it?No. Errors in the switch or the end point's network layercould cause the data to be corrupted even though each link has gooderror detection.

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

  1. 1 Kbyte packets are sent over this link using a stop-and-waitprotocol for reliable delivery, what data transfer rate can beachieved? What is the utilization of the link?Stop-and-wait sends 1 packet per round-trip-time so the datatransfer rate is 1 Kbyte/3 seconds = 333 bytes/s = 2.6 Kbit/s.The utilization is 2.6/40 = 6.5%.
  2. If a sliding-window protocol is used instead, what is thesmallest window size that achieves the maximum data rate? Assume thaterror are infrequent. Assume that the window size is set to achievethe maximum data transfer rate.Achieving full rate requires a send window of at least

    bandwidth-delay product = 5 packets/s * 3 s = 15 packets.

  3. Consider a sliding-window protocol for this link with a windowsize of 10 packets. If the receiver has a buffer for only 30 undeliveredpackets (the receiver discards packets it has no room for, and sendsno ACK for discarded packets), how bits of sequence number are needed?The window size determines the number of unacknowledged packets thetransmitter will send before stalling, but there can be arbitrarilymany acknowledged but undelivered (because of one lost packet) packetsat the receiver. But if only 30 packets are held at the receiver,after which it stops acknowledging packets except the one it'swaiting for, the total number of packets in transit or sitting inthe receivers buffer is at most 40.

    So a 6-bit sequence number will be sufficent to ensure that allunack'ed and undelivered packets have a unique sequence number (avoidingthe sequence number wrap-around problem).

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

    (A) symbols carrying the most information
    (B) symbols carrying the least information
    (C) symbols that are likely to be repeated consecutively
    (D) symbols containing redundant information
Wait A Bit For A Bet OfferAnswer is (A). Symbols carrying the most information, i.e., the symbols that are less likely to occur. This makes sense: to keep messages as short as possible, frequently occurring symbols should be encoded with fewer bits and infrequent symbols with more bits.

Problem .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'. Starting at the root of the decoding tree, use the bits of the messageto traverse the tree until a leaf node is reached; output that symbol.Repeat until all the bits in the message are consumed.

    0 = A
    100 = B
    0 = A
    111 = E
    101 = C

  2. Suppose we were encoding messages with the followingprobabilities 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 orTree #2) would yield the shortest encoded messages averaged over manymessages? Using Tree #1, the expected length of the encoding for one symbol is:

    1*p(A) + 3*p(B) + 3*p(C) + 3*p(D) + 3*p(E) = 2.0

    Using Tree #2, the expected length of the encoding for one symbol is:

    2*p(A) + 2*p(B) + 2*p(C) + 3*p(D) + 3*p(E) = 2.25

    So using the encoding represented by Tree #1 would yield shorter messages on the average.

  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?bits of info received = log2(1/p) = log2(1/.125) = 3
  4. Using the probabilities of part (B), If Tree #2 is used to encode messages what is the averagelength of 100-symbol messages, averaged over many messages?In part (B) we calculated that the expected length of the encoding forone symbol using Tree #2 was 2.25 bits, so for 100-symbol messages theexpected length is 225 bits.

Problem .Huffman coding is used to compactly encode the species of fish taggedby a game warden. If 50% of the fish are bass and the rest are evenlydivided among 15 other species, how many bits would be used to encodethe species when a bass is tagged? If a symbol has a probability of ≥ .5, it will be incorporated into theHuffman tree on the final step of the algorithm, and will become a childof the final root of the decoding tree. This means it will have a 1-bitencoding.

Problem .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 aparticular grade is 'C', give an expression for the number of bits ofinformation you have received. # of bits for 'C' = log(1/pC) = log(1/.25) = log(4) = 2
  2. Ben is interested in storing a sequence of grades using as fewbits as possible. Help him out by creating a variable-length encodingthat minimizes the average number of bits stored for a sequence ofgrades. Use the table above to determine how often a particular gradeappears in the sequence.using Huffman algorithm:
    - since D,F are least probable, make a subtree of them, p(D/F) = 30%
    - now A,C are least probable, make a subtree of them, P(A/C) = 43%
    - now B,DF are least probable, make a subtree of them P(B/(D/F)) = 55%
    - just AC,BDF are left, make a subtree of them (A/C)/(B/(D/F))
    - so A = 00, B = 10, C = 01, D = 110, F = 111

Problem .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 avariable-length Huffman code for encoding these four values. p(00)=.0668 p(01)=.4334 p(10)=.4327 p(11)=.0671
    Huffman tree = 01 / (10 / (00 / 11))
    Code: 01='0' 10='10' 00='110' 11='111'
  2. If we transmit the 2-bit values as is, it takes 2 bits to sendeach value (doh!). If we use the Huffman code from part (A) what isthe average number of bits used to send a value? What compressionratio do we achieve by using the Huffman code? sum(pi*len(code for pi)) = 1.7005, which is 85% of the original 2- bit per symbol encoding.
  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)? sum(pi*log2(1/pi)) = 1.568, so the code of part(B) isn't quite as efficient aswe can achieve by using an encoding that codes multiple pairs as in one codesymbol.

Problem .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? N = 8 choices for a 3-bit number
Alice: odd = {001, 011, 101, 111} M=4, info = log2(8/4) = 1 bit
Bob: not a multiple of 3 = {001, 010, 100, 101, 111} M=5, info = log2(8/5) = .6781 bits
Charlie: two 1's = {011, 101, 110} M=3, info = log2(8/3) = 1.4150
Deb: odd, not a multiple of 3, two 1's = {101}, M=1, info = log(8/1) = 3 bits

Problem .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? p(E or O) = .31 + .19 = .5, log2(1/pi) = 1 bit
  2. Nervous about the electric bill for the transmitter at Arecibo,the organizers have asked you to design a variable length code thatwill minimize the number of bits needed to send the message of1,000,000 randomly chosen characters. Please draw a Huffman decodingtree for your code, clearly labeling each leaf with the appropriateletter and each arc with either a '0' or a '1'. Huffman algorithm:
    choose X,D: X/D, p = .13
    choose S,XD: S/(X/D), p = .29
    choose R,0: R/O, p = .40
    choose E,SXD: E/(S/(X/D)), p = .6
    choose RO,ESXD: (R/O) / (E/(S/(X/D)))
    code: R=00 O=01 E=10 S=110 X=1110 D=1111
  3. Using your code, what bit string would they send for 'REDSOX'? 00 10 1111 110 01 1110

Problem .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 hasbeen drawn during the current round? information received = log2(1/p(Queen)) = log2(1/.25) = 2 bits
  2. Give a numeric expression for the average information content received when learning about the outcome of a round. (.03)log2(1/.03) + (.07)log2(1/.07) + (.25)log2(1/.25) + (.31)log2(1/.31) + (.34)log2(1/.34)= 1.97 bits
  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 yourencoding for each of A, K, Q, J and X.

    Encoding for A: 001
    Encoding for K: 000
    Encoding for Q: 01
    Encoding for J: 11
    Encoding for X: 10

  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)? (.07+.03)(3 bits) + (.25+.31+.34)(2 bits) = 2.1 bits average symbol length using Huffman code.So expected length of 1000-symbol message is 2100 bits.
  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. In order to achieve such a dramatic compression ratio, the originalmessages much have exhibited a very regular pattern - regular patternswould be very rare if the outcomes were truly random, hence theconclusion that the game was rigged. LZW should exhibit someimprovement over Huffman since it will compactly encode pairs,triples, etc. But for messages of only 1000 symbols that processwould not achieve an almost 10-to-1 improvement over Huffman.

Problem .X is an unknown 8-bit binary number. You are given another 8-bitbinary number, Y, and told that the Hamming distance between X (theunknown number) and Y (the number you know) is one.How many bits of information about X have you been given?You've learned that X differs in exactly 1 of its 8 bits from the known numberY. So that means that knowing Y, we've narrowed down the value ofX to one of 8 choices. Bits of information = log2(256/8) = 5 bits.

Problem .In Blackjack the dealer starts by dealing 2 cards each to himself andhis opponent: one face down, one face up. After you look at yourface-down card, you know a total of three cards. Assuming this wasthe first hand played from a new deck, how many bits of information doyou now have about the dealer's face down card?We've narrowed down the choices for the dealer's face-down card from52 (any card in the deck) to one of 49 cards (since we know it can'tbe one of three visible cards. bits of information = log2(52/49).

Problem .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 youget some number of bits of information. For which student departmentdo you get the least amount of information? We'll get the smallest value for log2(1/p) by choosing the choicewith the largest p => EECS.
  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. step 1 = {(I,.07) (II,.23) (III,.07) (VI,.38) (X,.13) (XVI,.12)}
    step 2 = {([I,III],.14) (II,.23) (VI,.38) (X,.13) (XVI,.12)}
    step 3 = {([I,III],.14) (II,.23) (VI,.38) ([X,XVI],.25)}
    step 4 = {([II,[I,III]],.37) (VI,.38) ([X,XVI],.25)}
    step 5 = {([[X,XVI],[II,[I,III]]]),.62) (VI,.38)}
    step 6 = {([[[X,XVI,[II,[I,III]],VI],1.0)}

    code for course I: 0 1 1 0
    code for course II: 0 1 0
    code for course III: 0 1 1 1
    code for course VI: 1
    code for course X: 0 0 0
    code for course XVI: 0 0 1

    There are of course many equivalent codes derived by swapping the'0' and '1' labels for the children of any interior node of the decodingtree. So any code that meets the following constraints would be fine:

    code for VI = length 1
    code for II, X, XVI = length 3
    code for I, III = length 4

  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. 100*[(.38)(1) + (.23 + .13 + .12)*(3) + (.07 + .07)*(4)] = 238 bits

Problem . 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 andindicate the order that each node was added and its associatedcost. 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 withlinks L1, L2 and L3.

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

Problem . MAC protocol

Randomized exponential backoff is a mechanism used to stabilizecontention MAC protocols. Which of the following statements iscorrect?

  1. It ensures that two nodes that experience a collision in atime-slot will never collide with each other when they eachretry that packet.False. They might get unlucky and back-off the same amount.
  2. It ensures that two or more nodes that experience a collisionn a time-slot will experience a lower probability of colliding withach other when they each retry that packet.True. The probability of a repeat collision is a smaller in eachsubsequent backoff.
  3. It can be used with slotted Aloha but not with CSMA.False. It can be used in any contention protocol.

Problem .

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

  1. Determine the bandwidth of router-to-router links to support1TFlop/s computation under uniform random traffic assumption (i.e.assume that each core wants to communicate to all other cores withsame probability).Half of the generated traffic in one half of the cores will go to theother half of the cores, hence the router to router links in themiddle of the chip have to support the traffic.

    (1/2)*(Ncores/2)*Rcore = sqrt(Ncores)*B (where B is the router-to-routerlink bandwidth)

    Rcore = 1TFlop/s * 1 Byte/Flop / Ncores

    B = sqrt(Ncores)*Rcore/ 4 = 1 TB/s / (4*sqrt(Ncores)) = 1 TB/s / 32 = 32 GB/s

  2. What would be the router-to-router link size needed to supportthe same computation provided that a communication pattern is onlybetween neighboring cores (e.g in chain/ring like core (1,1) to core(1,2), core(1,2) to core (1,3), etc).B' = Rcore = 1TFlop/s*1Byte/Flop / Ncores = 16 GB/s
  3. What is the diameter of this mesh network (assuming x-yrouting)?Diameter of the network is 14 (7 x hops and 7 y hops).
  4. A message between two cores is usually a cache line (512 b). Itis divided into packets (flits) that are as wide as therouter-to-router link. Assuming 2GHz processor frequency androuter-to-router link frequency, determine the flit size (i.e. howmany wires there are per link), to support link bandwidth in a). Howmany flits per message?B = 32 GB/s, nb = 32 GB/s / 2 GHz = 16 B = 128 b, so flit size is 128 bits.There are 4 flits per message.
  5. Assuming that link latency is 1 cycle, router latency is 2cycles (without queue delay), determine the worst-case latency that amessage experiences in the lightly loaded network (so called zero-loadlatency, ZLL).Since diameter of the network is 14, zero load latency consists of 14link traversals, 15 router traversals, and serialization latency atthe source.

    Since message has 4 flits, and link bandwidth is flit per cycle,serialization latency is 4 cycles.

    ZLL = 4+ 14*1+15*2 = 48 cycles.

Problem . 'Information, please'

  1. You're given a standard deck of 52 playing cards that you startto turn face up, card by card. So far as you know, they're incompletely random order. How many new bits of information do you getwhen the first car is flipped over? The fifth card? The last card?First card: log2(52/1)

    Fifth card: log2(48/1)

    Last card: log2(1/1) = 0 (no information since, knowing the other51 cards, one can predict with certainty the last card)

  2. Suppose there three alternatives ('A', 'B' and 'C') with thefollowing 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 choiceof 'B' with the bit string '10' and the choice of 'C' with the bitstring '11'.

    If we record the results of making a sequence of choices by concatenating in left-to-right order the bit strings that encodeeach choice, what sequence of choices is represented by the bitstring '00101001100000'?AABBACAAAAA

  3. Using the encoding of the previous part, what is the expectedlength of the bit string that encodes the results of making 1000choices? What is the length in the worst case? How do these numberscompare with 1000*log2(3/1), which is the information content of1000 equally-probable choices?Expected length = 1000[(0.8)(1) + (0.1)(2) + (0.1)(2)] = 1200 bits

    In the worst case, each choice would take 2 bits to encode = 2000 bits.

    1000*log2(3/1) = 1585. In general, a variable-length encoding of sequencesof N choices with differing probabilities gets better compression than canbe achieved if the choices are equally probable.

  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 whatthe sum is since some sums are more likely than others, as shown inthe following figure:

    What is the average number of bits of information provided by the sumof 2 dice? Suppose we want to transmit the sums resulting from rollingthe dice 1000 times. How many bits should we expect that transmissionto take?Average number of bits = sum (p_i)log2(1/p_i) for i = 2 through12. Using the probabilities given in the figure above the averagenumber of bits of information provided by the sum of two dice is3.2744.

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

  5. Suppose we want to transmit the sums resulting from rolling thedice 1000 times. If we use 4 bits to encode each sum, we'll need 4000bits to transmit the result of 1000 rolls. If we use a variable-lengthbinary code which uses shorter sequences to encode more likely sumsthen the expected number of bits need to encode 1000 sums should beless than 4000. Construct a variable-length encoding for the sum oftwo dice whose expected number of bits per sum is less than3.5. (Hint: It's possible to find an encoding for the sum of two dicewith an expected number of bits = 3.306.)Using Huffman's algorithm, we arrive at the following encoding whichhas 3.3056 as the expected number of bits for each sum.
  6. Can we make an encoding for transmitting 1000 sums that has anexpected length smaller than that achieved by the previous part?Yes, but we have to look at encoding more than one sum at a time,e.g., by applying the construction algorithm to pairs of sums, orultimately to all 1000 sums at once. Many of the more sophisticatedcompression algorithms consider sequences of symbols when constructingthe appropriate encoding scheme.

Problem . MAC protocols

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

  • TDMA: equal slots of 0.1 seconds.
  • 'Taking turns': adds a latency of 0.05 seconds before taking theturn. The user can then use the link for as long as it has data tosend. A user requests the link only when it has data to send.

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.TDMA. Why: Each of the users generate a load of 40KB/s = 0.32Mbps,which can be fully transmitted given the share of 0.33Mbps availableper user when partitioning the channel with TDMA. Taking turns on theother hand does not offer enough capacity for all the files to betransmitted: 3*0.32 + 3*0.05 = 1.11s > 1s, and would incur extraoverhead.
  2. X sends 80KBytes files every 1sec, while Y and Z send 10KBytesfiles every 1sec.Taking Turns Why: First, by using TDMA, X does not have enoughcapacity to transmit, 80KB/s = 0.640Mbps > 0.33Mbps. Second, withTDMA, Y and Z waste 3 out of 4 slots. On the other hand, when takingturns, there is enough capacity to transmit all the data:

    0.64+0.05+0.08+0.05+0.08+0.05=0.95s.

Problem . Reliable transport protocols

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

  • 'timeout': S retransmits a packet if it has not received an ackfor it within T seconds after sending the packet, where T > RTT.
  • 'out-of-order ack': S retransmits an unacknowledged packet pwhen it receives an ack with a sequence number higher than p. Forexample, if packet 3 hasn't been acknowledged, and S receives ack 4,then S assumes that R hasn't received packet 3 and retransmits itimmediately.

Assume S wants to transfer a file that spawns exactly 8 packets toR 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 andRTT.

  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 thefirst packet and the moment it receives the last ack.3*RTT: No packet or ack is lost.
  2. What is the maximum possible file transfer time assuming S usesonly the 'timeout' retransmission mechanism? Please give a scenariowhich achieves the maximum transfer time. This scenario shouldindicate which packet (or ack) is dropped, if any.3*RTT + T: A packet in the last window is lost.
  3. Repeat question (b) but now assume that S uses both the'timeout' and 'out-of-order ack' retransmission mechanisms.Same as (b), if the last packet is lost.

Problem . Reliable data delivery

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

  1. Give a numeric expression for the throughput A can achieve intransmitting to B using Stop-and-Wait. You can treat a 500-byte datapacket as transferring 500 bytes of useful data (that is, ignore thatit’s a bit less due to the headers).The transmission time of a data packet from A to B is (500 B)/(5 KB/s)= 100msec.

    The transmission time of an acknowledgment from B to A is (100B)/(10 KB/s) = 10 msec.

    The total propagation time is 80+120 = 200 msec. Thus an RTT forsending a data packet and receiving an acknowledgment for it is200+100+10 = 310 msec.

    With Stop-and-Wait, A sends one data packet per RTT, so thethroughput it can achieve is (500 B)/(310 msec) = 500/0.310 B/s =1613 B/s.

  2. Give a numeric expression for the size of the window, in termsof number of data packets, that A must use in order to transfer itsdata as fast as possible, if A instead uses Sliding Window.To go as fast as possible, A must use a window that is at least aslarge as the bandwidth-delay product, which is (5 KB/s)(310 msec) =1,550 bytes.

    The question asks for how many data packets, which is given by:

    Ceiling[ 1550 B / (500 B/pkt) ] = 4 pkts

  3. What is the maximum rate A can achieve?When using a window greater or equal to the bandwidth-delay product, asender can achieve a rate -- i.e., how fast it can transmit overtime -- equal to the bandwidth of the path. Therefore, the window of 4pkts suffices for A to achieve a rate of 5 KB/s.
  4. If the bandwidth of the path from B to A drops to 100bytes/sec, can A still achieve this rate? If so, roughly how muchsmaller or bigger is the new window size? If not, what is the newlimit on the rate A can achieve?When the bandwidth in the reverse direction drops so drastically, notonly does the transmission time of the acknowledgments go way up (to1000 msec), but even more critically, the window can only advance onceper 1000 msec, since that's the minimum spacing between twoacknowledgments. Therefore A can only send one data packet per second,and has its maximum rate reduced to 500 B / 1000 msec = 500 B/s.

Problem . Reliable data delivery

Consider a sliding window protocol between hosts A and B. Supposethe link propagation delay is 1 time unit, the retransmission timeoutis 3 time units, and the window size is 3. Assume the link dropsevery third packet, i.e., the link drops the 1st, 4th, 7th, ... datapackets. (Note that here 'kth' packet means the kth packettransmitted on the link, and NOT the sequence number of the packet.)How long does it take to successfully transmit 6 packets between A andB? Ignore the transmission times and the queuing delay, and assumethat no acknowledgments are lost.
timeAB
1 send #1 [lost]
2 send #2
3 send #3 ACK #2
4 resend #1 [lost] ACK #3
5 send #4
6 send #5 ACK #4
7 resend #1 [lost] ACK #5
8 send #6
9 ACK #6
10 resend #1
11 ACK #1

Problem . MAC protocols -- token passing

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

  1. If s of the N nodes in the network have data to send when theyget the token, what is the utilization of the channel?The easiest way to solve this problem is to observe that the systemmay be viewed as operating in 'rounds', where in one round each nodegets one chance to send data. The total time of a round is:

    N*Tk + s*Tf

    because each node must broadcast the token and in addition s nodessend data frames. Now, in this round, the amount of useful (payload)time spent by the system is s*Tf . Therefore, the utilization is

    [s*Tf] / [s*Tf + N*Tk]

    There's a slightly longer way to solve this problem too, startingfrom the basic definition of utilization. The channel utilization isthe rate at which data frames are sent divided by the channel rate(i.e., data load / rate). The channel rate is 1 frame every Tfseconds. The rate at which data frames are sent is s frames every'round', or s frames every s*Tf + N*Tk seconds. The answer follows.

    Both approaches are actually the same; a useful trick for quickcalculations of utilization is to just take the ratio of the timespent on the channel doing actual work (sending useful data).

  2. In theory, token passing seems like a good way of avoidingpacket collisions. However, in practice, there are a few significantcomplicating issues that such a scheme must handle in wirelessbroadcast networks. State one of them.There are many problems that need to be solved. The loss of a tokenpacket could bring the system to a halt unless we have a plan forcoping with it and restarting operation. Also, a node that has thetoken might crash or be powered off. And last but not least, we need away to handle nodes joining and leaving the network dynamically, so weneed a way to assign identifiers to nodes to produce a round-robinorder. Of these, the most important reason is the first: coping withtoken loss.

Problem . MAC protocols: Aloha

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

Consider a network with four nodes, where each node has a dedicatedchannel to each other node. The probability that any node transmits isp. Each node can only send OR receive one packet at a time. What isthe utilization of the network? Assume each packet takes 1 timeslot. Assume each node has 3 queues -- one for each other node -- andthat each is backlogged.Utilization is the expected number of packets that get through in eachslot divided by the maximum (2, i.e. when A always transmits to B andC always transmits to D).

For

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)4Expected 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 are27 combinations of destinations that they can transmit to (each canchoose one of 3). Of these, only 3 result in the successfultransmission of one packet (e.g. A->D,B->C,C->B) or(B->D,A<->C) or (C->D,A<->B)

Wait A Bit For A Bet Offer Free

Expected packets through if 2 nodes transmit = 2*(2/9) = 4/9
Similar to above, assume that A and B transmit. There are 9combinations of destinations. Of these, only 2 result in thesuccessful 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 . MAC protocols: Aloha

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

Wait A Bit For A Bet Offering

p_1 = 2(p_2) and p_2 = p_3

  1. What is the utilization of the shared medium?U = (p_1)(1 - p_2)(1 - p_3) + (1 - p_1)(p_2)(1 - p_3) + (1 - p_1)(1 - p_2)(p3)

    If p = p3

    U = 2p(1-p)2 + 2(1 - 2p)p(1 - p) = 4p - 10p2 + 6p3

  2. What are the probabilities that maximize the utilization andthe corresponding utilization?Differentiating U and sett the result equal to zero we obtain

    dU/dp = 4 - 20p + 18p2 = 0

    has two roots at p=0.2616 and 0.8495. However, only the root at 0.2616 isfeasible since the other leads to a value of p_1 that is greater than 1. Thus,

    p_1 = 0.5232, p_2 = 0.2616 and p_3 = 0.2616.

    The corresponding utilization is 0.4695.

Problem . MAC protocols: Aloha

Suppose that two nodes are seeking access to a shared medium usingslotted Aloha with binary exponential backoff subject to maximum andminimum limits of the probability pmax = 0.8 and pmin = 0.1. Supposethat both nodes are backlogged, and at slot n, the probabilities thetwo 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? Whatare the probabilities assocated with each possible value?

    p_1 increases to 0.8 if node 1 transmits a packet and node 2 does nottransmit a packet. Probability of this event:

    (p_1)(1 - p_2) = 0.5*0.7 = 0.35

    p_1 decreases to 0.25 if node 1 transmits a packeet and node 2 alsotransmits a packet. Probability of this event:

    (p_1)(p_2) = 0.15

    Otherwise p_1 stays the same with probability 1 - 0.35 - 0.15 = 0.5.

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

    p_2 increases to 0.6 if node 2 transmits a packet and node 1 does nottransmit a packet. Probability of this event:

    (p_2)(1 - p_1) = 0.3*0.5 = 0.15

    p_2 decreases to 0.15 if node 2 transmits a packeet and node 1 alsotransmits a packet. Probability of this event:

    (p_1)(p_2) = 0.15

    Otherwise p_2 stays the same with probability 1 - 0.15 - 0.15 = 0.7.

Coments are closed
Scroll to top