Docsity

CSMS 417: Exam Solutions for CRC, Routing, and Multicast - Prof. A.U. Shankar, Exams of Computer Systems Networking and Telecommunications

Toggle sidebar
bg1
cmsc 417-F04 Exam 2 SOLUTION name:
Total points 30. Total time 70 mins. 4 problems over 4 pages. No book, no notes, no calculator.
1. [6 pts] Consider an error-detecting CRC with the generator 110110. The CRC bits follow the data bits in any transmission.
Compute the transmitted bit sequence for the data bit sequence 111110111.
SOLUTION
G = 110110
So r=5
101110100
110110 ) 11111011100000
110110
010001
000000
100011
110110
101011
110110
111010
110110
011000
000000
110000
110110
11000 = Remainder
Tx sequence (= data followed by remainder) = 11111011111000
Grading:
•4 points for the division, 2 points for the transmitted sequence.
•Max 2 points for not appending “00000” before dividing.
•Max 3 points for transmitting dividend instead of remainder.
1
pf3
pf4

Partial preview of the text

Download CSMS 417: Exam Solutions for CRC, Routing, and Multicast - Prof. A.U. Shankar and more Exams Computer Systems Networking and Telecommunications in PDF only on Docsity!

cmsc 417-F04 Exam 2 SOLUTION name:

Total points 30. Total time 70 mins. 4 problems over 4 pages. No book, no notes, no calculator.

1. [6 pts] Consider an error-detecting CRC with the generator 110110. The CRC bits follow the data bits in any transmission. Compute the transmitted bit sequence for the data bit sequence 111110111.

SOLUTION

G = 110110

So r=

101110100 110110 ) 11111011100000 110110 010001 000000 100011 110110 101011 110110 111010 110110 011000 000000 110000 110110 11000 = Remainder

Tx sequence (= data followed by remainder) = 11111011111000

Grading:

  • 4 points for the division, 2 points for the transmitted sequence.
  • Max 2 points for not appending “00000” before dividing.
  • Max 3 points for transmitting dividend instead of remainder.

2. [10 pts]

C D

B

The above network uses the distance-vector routing algorithm. Assume the following:

  • Links are bidirectional, and a link has the same cost in each direction.
  • If several neighbors of a node can serve as the node’s next hop to a destination, the node chooses the neighbor with the smallest id (A<B<C< · · · <Z).
  • Nodes exchange their routing info once every second, in perfect synchrony and with negligible transmission delays. Specifically, at every time i, i = 0, 1 , 2 , 3 , · · ·, each node sends its routing info, then receives routing info and updates its routing table; the update is completed by time i + 0. 1.
  • At time 0, the link costs are as shown above and the routing tables are stable. At time 0.5, the cost of the link between B and D becomes 8. There is no further change in the link costs.

Give the evolution of the routing table entry at nodes B and C for destination D, at times 0.1, 1.1, 2.1, · · ·, until they stabilize. Point out when they stabilize. Present your final answer in the format given below, where the entry for node C at time 0.1 has already been filled. Do your rough work elsewhere.

SOLUTION

Time At B, dist to D At C, dist to D via C via D via B via D

0.1 3 1* 2* 5

1.0 3* 8 2* 5

1.1 3* 8 4* 5

2.1 5* 8 4* 5

3.1 5* 8 6 5*

4.1 6* 8 6 5*

5.1 6* 8 7 5*

6.1 6* 8 7 5*

‘*’ indicates minimum entry

System stabilizes at time 5.

Grading:

  • Lose 3 points for invalid initial entry for B (e.g., starting with distance to D via C equal to 6).
  • Max 2 points for stating that stable by time 2.1.
  • Lose 1 point if everything correct but stabilization time.
  • Lose 2 points if everything correct but started at 2.1 instead of 1.1.
  • Lose 2 points if everything correct but one line.

4. [4 pts] 2 N nodes share a wireless medium using slotted ALOHA with the following twist. The 2 N nodes are divided into two groups of N nodes each. Each node in group 1 transmits with a probability p in each slot. Each node in group 2 transmits with a probability 2 p in each slot. Assume that p < 0. 5 and that every node always has packets to send.

a. Obtain the throughput (i.e., average number of packets successfully transmitted per slot). Your answer should be a formula in N and p. b. Obtain the value of p for which group 2 gets three times the throughput of group 1. Your answer should be a number.

SOLUTION

Part a

Prob[successful transmission in a slot] = Prob[exactly one node transmits] = Prob[ (exactly one group 1 node transmits AND no group 2 node transmits) OR (exactly one group 2 node transmits AND no group 1 node transmits)] = N p (1 − p)N^ −^1 (1 − 2 p)N^ + N 2 p (1 − 2 p)N^ −^1 (1 − p)N = N p (1 − p)N^ −^1 (1 − 2 p)N^ −^1 [ (1 − 2 p) + 2(1 − p) ] = N p (1 − p)N^ −^1 (1 − 2 p)N^ −^1 [ 3 − 4 p ]

Part b From expression for part a, we want 3(1 − 2 p) = 2(1 − p) which simplifies to 3 − 6 p = 2 − 2 p, or p = 1/ 4

Grading:

  • Part a: 2 points. 1 point for expression of the form N p(1 − p)N^ −^1 + N 2 p(1 − 2 p)N^ −^1.
  • Part b: 2 points (all or nothing).