计算机网路基础第三章习题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
2.The following character encoding is used in a data link protocol:
A: 01000111 B: 11100011 FLAG: 01111110 ESC: 11100000
Show the bit sequence transmitted(in binary) for the four-character frame A B ESC FLAG when each of the following framing methods is used:
(a) Byte count.
(b) Flag bytes with byte stuffing.
(c) Starting and ending flag bytes with bit stuffing.
(a)00000100 01000111 11100011 1110000 01111110
(b) 01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110
(c) 01111110 01000111 110100011 111000000 011111010 01111110
7. In the textbook, the authors show that for a channel with error rate 10^-6, error detecting based retransmission is more efficient than error correcting (see 27th slide). Please give ranges of the channel error rate in which error correcting is more efficient, considering only for blocks (1000 bits) with at most 1 bit error. Suppose the error rate is x. N=1/(x*1000);
For error correcting, it need 10*N bit of checkbits.
For error detecting it need 2001bit
10*N<2001, 10/(x*1000)<2001, x=4.9*10^-6
8. Hamming code is an effective way for error correcting. Show that the number of check bits(i.e. r) in the Hamming codes described in the textbook(e.g., Fig.3-6) (almost) achieves the low bound of Eq (3-1).
Eq(3-1): (m+r+1)≤2^r
In figure 3-6, m+r = 11
So 12≤2^r, r=4.
So the number of check bits is 4.
9. Suppose you have the following 12-bit message: 010*********
(a) Numbering bits from right to left (ie least-significant bit on the right), insert check bits according to to Hamming’s 1-bit error correction system. Indicate which bits are check bits and which are message bits.
(b) Hamming’s scheme only corrects 1-bit errors. Since it’ s a distance 3 code, it could also be used to detect 2-bit errors. Describe a 3-bit error (3 *1-bit errors) in the above codeword affecting only message bits (not check bits) that would be undetected (and of course uncorrected). Be sure to describe how and why the algorithm fails.
(a)cherk bits will be insert in the 1 2 4 8 16. message bits are 3 5 6 7 9 10 11 12 13 14
15 17.
(b)to detect 3-bit error,the hamming distance need to be 4.to correct 3-bit error,the hamming distance need to be 7. So the algorithm fails.
16.Consider an original frame 110111011011. The generator polynomial
x^4+x+1, show the converted frame after appending the CRC.
The remainder is x^2 + x + 1.
22.A 3000-km-long T1 trunk is used to transmit 64-byte frames. How many bits should the sequence numbers be for protocol 5 and protocol 6 respectively? The propagation speed is 6usec/km.
T1:1.536Mbps. So transmit 64-byte frames need 0.3ms.
The propogation time is 3000*6 = 18000usec = 18ms.
Start ->Arrive:18+0.3=18.3ms
Acknowledgement:18 ms
Time=18+18.3=36.3ms
36.3/0.3=121 frames [ to fill the pipe ]
So 7-bit sequence numbers are needed.