When delivering binary messages, Chris has a bad habit to turn off some set bits. To ensure that Bob does not receive the wrong message, both Alice and Bob agrees on a checking scheme - Alice will send two messages, one consists of the original message and the other one stores the amount of off bits in binary. For example, the message will be compiled into because the original message has 4 off bits, the check bits will be , which is 4 in decimal.
Now, Bob received the following compiled message
Which option bests describe the compiled message sent to Bob?
Details and Assumptions
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Observe the invariance when we investigate the 3 cases Chris can change the compiled message :
Case 1 : Only the check bits are changed
The check bits will get strictly smaller, thus will not match the amount of off bit in the original message.
Case 2 : Only the original message is changed
The amount of off bit in the original message will get strictly higher, thus the check bits will not match the amount of off bit in the original message.
Case 3 : Both check bits and original message are changed
The amount of off bit will get strictly higher but the check bits will get strictly smaller, thus they will never match.
These three cases tell us that no matter how Chris changes the compiled message, the check bits will not match the amount of off bit in the original message. In other words, since the check bits truly describe the amount of off bit in the original message, we conclude that Chris didn't change any bit and the message is delivered correctly.
This error-detecting method, called Berger Code , is implemented in the real world. As this problem suggests, Berger Code can only detect unidirectional errors. If Chris can change 0 to 1 and vice versa, this method is not going to work.