In: Computer Science
Construct a 4 * 4 addition table of binary 2-bit strings modulo 2. For example, 01 + 11 = 10 and 11 + 11 = 00. Replace each element in the table by its decimal equivalent plus 1. For example, 11 is replaced by 4. Is the resulting table a Latin square? Generalize this method for constructing Latin squares of order n
I am providing the handwritten answer
To generalize let us see how 3-bit string addition modulo 2 and then addition of 1 to decimal value looks
Also we can see there is a swapping of all the 8 elemants in the middle from row 4 to row 5. So, we can write the swapping in following numbers for 3-bit string
2, 4, 2, 8, 2, 4, 2
Now, in order to generalize it for n we can say the swapping needs to take place in the following numbers from left
2, 4, 2, 8, 2, ......2^(n-1) ,2, 2^n, 2, 2^(n-1),.........,2, 8, 2, 4, 2
Comment if you need any clarification and do upvote if you like the answer