Information sharing

Alice randomly chooses an 8-bit integer X X , and gives Bob another 8-bit integer Y Y . Alice then tells Bob that the Hamming distance between X X and Y Y is 1. How much information has Bob been given about X X ?

log 2 5 \log_25 8 5 3

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.

4 solutions

Paul Moggridge
Aug 13, 2018

Imagine that Y given to Bob is 00000000 (0).

Then, as we are told it is 1 hamming distance away (number of different bits is 1), so X could be:

10000000 (128), 01000000 (64), 00100000 (32), 00010000 (16), 00001000 (8), 00000100 (4), 00000010 (2) and 00000001 (1).

So now X could be one of 8 different combinations out of the 256 possible combinations in 8 bit. So we are now guessing from a 32th of the original set: 8 combinations / 256 combinations.

Then as per the formula above the question.

log 2 ( 1 8 256 ) \log_{2}\left ( \frac{1}{\frac{8}{256}} \right )

log 2 ( 1 0.03125 ) \log_{2}\left ( \frac{1}{0.03125} \right )

log 2 ( 32 ) = 5 \log_{2}\left ( 32 \right ) = 5

Though I got the answer, the route I took may not be correct, of course.

Hi, can you tell me about this "So now X could be one of 8 different combinations out of the 256 possible combinations in 8 bit. So we are now guessing from a 32th of the original set: 8 combinations / 256 combinations = 32." not understanding this part.... Thanks in advance.

Kankana Sarkar - 2 years, 10 months ago

Log in to reply

Edited my answer to clarify that part, thanks for your question :)

Paul Moggridge - 2 years, 9 months ago
Ramón Martins
May 27, 2016

The information content of X is 8. When Alice tells Bob that the Hamming distance of X and Y is equal to 1, all the information that Bob needs in order to know X is the position of the 'wrong' bit in Y. The needed information content is therefore 3, as just 3 bits of information are necessary to locate the 'wrong' bit in the 8-bit word Y. Information given to Bob about X is therefore 8 - 3 = 5.

Total information content of X is 8, as X is an 8-bit number. The Hamming distance between two numbers is the number of different bits they have. As Bob has Y and the information that the Hamming distance between X and Y is 1, all he needs is the position of the differing bit. This information is given by another 3-bit number that identifies what bit is the 'wrong' one in the 2^3=8 bits of Y. As the total information content of Y is 8 and 3 bits of information are still needed, information already given to Bob about X is 8-3 = 5 bits.

Ramón Martins - 3 years, 8 months ago

This solution is not clear to me. Why should you subtract 3 ? How is alice communicating those 3 bits ?

srinivas bakki - 3 years, 9 months ago

Log in to reply

The given information that the Hamming distance between X and y is 1 leaves out the possibility that it can be in any of the 8 bits. So, if we know the position of this 'wrong' bit, we can figure out what X is. Now, because the 'wrong' bit can be any of 8 bits and we need 2^3 bits to specify the position in the 8 bits, it says 3 bits is required. Does that make any sense?

pramesh shakya - 2 years, 11 months ago

Thanks, understood

srinivas bakki - 1 year, 7 months ago
Sudhanshu Mittal
Sep 4, 2018

previous possibilities = 2^{8}
new possibilities = 8 = 2^ {3} ( because, hamming distance is 1)
information = log(previous possibilities/ new possibilities) = 5

Harry Tuttles
Jan 3, 2020

sdsdsdsdsd

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...