
CPSC 5157 Computer Networks Summer 2007
Homework Assignment 5 Due Tuesday, July 24, 2007
1. Problem P1 (page 503 of the fourth edition), the same as
problem 1 (page 494 of the third edition)
Suppose the information content of a packet is the bit pattern
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1.
What would be the value of the checksum field for the case of a two–dimensional
parity scheme? Minimize the length of the checksum field.
Answer. This is a string of 16 bits. One could make either 8 rows of 2 bits each, 4 rows of 4
bits each, or 2 rows of 8 bits each. The corresponding checksum sizes are 10, 8, and 10.
The rightmost column and bottom row are for parity bits.
1 0 1 0 | 0
1 0 1 0 | 0
1 0 1 0 | 0
1 0 1 1 | 1 Note: The answer giving just 0001 and 0001 as the two fields is OK.
0 0 0 1 | 1
2. Problem P2 (page 503 of the fourth edition), the same as
problem 2 (page 494 of the third edition)
Show (give an example other than the one in Figure 5.6) that two dimensional
parity bits can correct and detect a single bit error. Show (give an example) a
double–bit error that can be detected but not corrected.
Answer: Any reasonable 2–D scheme can detect and correct a single–bit error.
Any reasonable 2–D scheme can detect all two–bit errors.
It appears that no combination of two–bit errors can be corrected.
For a specific example, considerthe book’s example.
Correct 1–bit error 2–bit error 2–bit error 2–bit error
1 0 1 0 | 0 1 0 1 0 | 0 1 0 1 0 | 0 1 0 1 0 | 0 1 0 1 0 | 0
1 0 1 0 | 0 1 0 1 0 | 11 1 1 1 | 0 1 1 1 0 | 0 1 0 1 1 | 0
1 0 1 0 | 0 1 0 1 0 | 0 1 0 1 0 | 0 1 0 1 0 | 0 1 0 1 0 | 0
1 0 1 1 | 1 1 0 1 1 | 1 1 0 1 1 | 1 1 0 1 0 | 1 1 1 1 1 | 1
0 0 0 1 | 1 0 0 0 1 | 1 0 0 0 1 | 1 0 0 0 1 | 1 0 0 0 1 | 1
In the one–bit error, we see that the row 2 parity does not add up and that the parity column
parity does not add up. The error must be in the parity column of row 2; the data are OK.
In the first 2–error variant, we see that two columns have bad checksums, but that no row has
a bad checksum. We know that one of the rows has bits 2 and 4 bad, but cannot say which.
In the last two 2–bit error scenarios, be have ideas as to the bad rows and columns. The
difficulty is that the last two scenarios present identically.