Discrete Mathematics: Elementary and Beyond

(John Hannent) #1

284 16. Answers to Exercises


Latin squares we can choose at mostn−1 squares pairwise orthogonal to
each other.)


14.5.7. If we had a square orthogonal to (14.13), then using the same
argument as in the solution of Exercise 14.5.6, we may suppose that the
first row is 0 1 2 3. Then the pairs (0,0), (1,1), (2,2), and (3,3) occur in
the first row, which implies that in the other rows, the two squares cannot
have the same number in the same position.


In particular, the first entry of the second row cannot be 1, and it cannot
be 0 (because the entry above it is 0). So it is 2 or 3.


Suppose it is 2. Then the second entry in this row cannot be 1 or 2 (there
is a 1 above it and a 2 before it), and it cannot be 3, so it is 0. The fourth
entry cannot be 2, 0 or 3, so it must be 1; it follows that the second row
is2031(the same as the third row in (14.13)). Next we can figure out
the last row: Each entry is different from the two above it in the first and
second row, and also from the last row of (14.13), which implies that this
row must be the same as the second row of (14.13): 1 3 0 2. Hence the third
row must be 3 2 1 0; but now the pair (3,1) occurs twice when the last two
rows are overlaid.


The case where the second row starts with a 3 can be argued in the same
way.


14.6 Codes


14.6.1. Suppose that a code isd-error-correcting. We claim that for any
two codewords we must flip at least 2d+1 bits to get from one to the other.
Indeed, if we could get from codeworduto codewordvby flipping only 2d
bits, then consider the codewordwobtained fromuby flippingdof these
bits. We could receivewinstead ofu, but also instead ofv, so the code is
notd-error-correcting.


Now if we receive any message that has at most 2derrors, then this message
is not another codeword, so we can detect up to 2derrors.


The converse is proved similarly.


14.6.2. If the string has no 1’s, then it is a codeword. If it contains one 1,
this can be flipped to get a codeword. If it has two 1’s, then there is a line
through the corresponding two points of the Fano plane, and flipping the
0 in the position corresponding to the third point gives a codeword. If it
has three 1’s, and these are collinear, then it is a codeword. If it has three
1’s, and these are not collinear, then there is a unique point not on any of
the three lines determined by them, and flipping this we get a codeword.
If it contains at least four 1’s, then we can argue similarly, interchanging
the role of 1’s and 0’s.

Free download pdf