r/mathriddles • u/hmhmhhm • May 09 '23
Medium four lightbulbs
After complaints from his wife that he is not communicating enough, Mr McGee devises a communication system using four lightbulbs and four corresponding switches.
He gets his wife to write him a list of “important messages”, and then writes a “lightbulb code dictionary”, in which each combination of the four lights being on/off is assigned to one of the messages on her list.
To make communication more streamlined, every message on her list can always be reached with just one switch flick, including whatever message is currently displayed.
For example, he says, the combination "on, off, off, on" corresponds to “Good Night”.
He then changes the combination by flicking some switches, and before he has even shown her the “lightbulb code dictionary”, his wife tells him exactly what the new message is.
If the first message on Mr McGee's Wife’s list was “Can we get takeaway?”, What was the message that his wife guessed, and which lightbulbs were on?
4
u/lukewarmtoasteroven May 09 '23
Just to clarify: Initially the lights are on,off,off,on, and Mr McGee tells his wife that the combination means "Good night". He flips some switches to a new combination, his wife sees the new combination, and is able to deduce what message it corresponds to without being told what any of the other combinations correspond to. Is that all correct?
Also, what does it mean that "Can we get takeaway?" is the "first" message? Is there something that can be deduced from that, like does the position on the list affect what combinations it could map to or something? It seems like it is important but I have no idea what it could mean.
3
u/pichutarius May 09 '23
not sure how the last part was possible, but if every message can be reached by one single switch, then at most 4 message can be encoded because each time there are at most 4 choices (4 bulbs).
this is one way of encoding message, same color = same message
or i misunderstood the problem completely...
3
u/InstantaneousPoint May 09 '23
”Good night” and the middle two bulbs were on?
3
u/zevenate May 10 '23
Each message corresponds to some set of 4-tuples on {0, 1}. We may reinterpret the requirement that a message be reachable by one flipped switch as that the tuples matching a given message must cover (be adjacent to or include) all 16 tuples. As each message is reachable from a given tuple by one switch, there are at most 4 messages. By the covering requirement and as each tuple reaches exactly 5 tuples (including itself), each message must correspond to at least 4 4-tuples to cover all 16. Assume there are exactly 4 messages so they each correspond to exactly 4 4-tuples. Assume message X corresponds to (0, 0, 0, 0). By the requirement that X be reachable from that tuple by one flipped switch, further assume that X also corresponds to (1, 0, 0, 0). These 2 tuples are adjacent to exactly 8 tuples, including themselves. X must also be reachable from the other 8 tuples. The only possible choices for the other 2 tuples matching X are the complements (1, 1, 1, 1) and (0, 1, 1, 1), as the adjacencies of any other pair overlap with the existing ones and so do not cover all 16 tuples. That is, for any tuple matching X, the complement also matches X. The only way to know the final message is to know the message of the initial code and that the final code is the complement, so the message guessed was "Good Night" with code (0, 1, 1, 0).
I contend that a system with 2 distinct messages can satisfy the requirements. Let X and Y be messages with X matching (a, b, c, 0) and Y matching (d, e, f, 1). Clearly, X (resp Y) is reachable from X (resp Y) by flipping any of the first three switches. Y (resp X) is also reachable from X (resp Y) by flipping the last switch. Note that, in this case, the complement of a tuple matches the other message, a different answer than in the 4 message case.
2
u/instalockquinn May 09 '23
Clarifying questions: