All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Two sensors (Posted on 2014-07-15) Difficulty: 3 of 5
You have two 3-bit sensors, A and B, that measure the same thing, whatever it is -- temperature of the room, radioactivity levels, whatever.
Both sensors are hooked up to the same CPU, which takes in the sensor readings.
You know that the sensors are designed so that their readings can be off by at most one bit.

We claim that if B knows that A has sent the CPU a 3-bit sequence, then B only needs to send 2 bits, and the CPU will be able to reconstruct B's 3-bit measurement, thereby conserving bandwidth.

How is this so?

Credit goes to RMMMM of Berkeley.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution Comment 2 of 2 |
A's reading {a,b,c}
B's reading {p,q,r}
d = a XOR b
e = b XOR c
s = p XOR q
t = q XOR r
x = d XOR s
y = e XOR t

A's message is the same as its reading: {a,b,c}
B first computes s and t, then sends the message {s,t}

The CPU takes the 5 bits {a,b,c,s,t}, computes d, e, x and y and then generates B's original reading which is {p,q,r} from the following table:

If xy is 00 then {p,q,r} is {a,b,c}
If xy is 01 then {p,q,r} is {a,b,!c}
If xy is 10 then {p,q,r} is {!a,b,c}
If xy is 11 then {p,q,r} is {a,!b,c}
  Posted by Larry on 2014-07-21 10:52:37
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2020 by Animus Pactum Consulting. All rights reserved. Privacy Information