Besides the two methods mentioned in the problem, another method of making sure the message can be understood includes sending each bit three times and taking the value to be the digit which occurs most, i.e., we'd interpret 111, 011, 101, 110 as 1, and 000, 100, 010, 001 as 0. Using this method means we can cope with one bit altering during transmission, but is less efficient than the 3 check digit method as the message is only 1/3 of the bits sent.
1 check digit:
The messages 01110, 10101, 01000, 11111 and 10011 contain errors as they all have an odd number of 1s.
For each message, there are 5 possible messages with an even number of 1s they could have originally been! For example, the first message may have been originally 11110, 00110, 01010, 01100 or 01111.
3 check digits:
i) Received message: 1010101
xabd = 1111, yacd = 0101, zbcd = 0101. These all contain an even number of 1s, so the message has been transmitted correctly. The message sent by Fred was therefore 1101.
ii) Received message: 0001111
xabd = 0011, yacd = 0011, zbcd = 1111. These all contain an even number of 1s, so the message has been transmitted correctly. The message sent by Fred was therefore 0111.
iii) Received message: 0010011
xabd = 0101, yacd = 0111, zbcd = 0011. xabd and zbcd contain an even number of 1s, but yacd doesn't. Using the Venn diagram, looking at the intersection of y, not-x and not-z, we find that the digit y has been altered during transmission, so the message should be changed to 0110011, which means the message Fred sent was 1011.
iv) Received message: 1110100
xabd = 1110, yacd = 1100, zbcd = 0100. yacd contains an even number of 1s, but xabd and zbcd contain an odd number. The two digits that appear in both of these are b and d. However, we know all the digits in yacd are correct, which means it must be b that's been altered in transmission. Alternatively, we could look at the intersection of x,z and not-y in the Venn diagram, which is b. Therefore, the message should be changed to 1110000, which means the message sent by Fred was 1000.
This method which uses three check digits can detect and correct an error in the message when any 1 digit alters during transmission.
Throughout, we've assumed at most one digit has been altered during tranmission. This is reasonable to assume as it would have to be a very unreliable method of transmission if two digits out of seven were altered!