Ran into the first one in an interview, second one from a friend. As always, don't say anything if you've seen the answers before. So here we go:
1) There are 100 inmates (numbered 1..100) each with his own locker. Each locker has a number, 1 to 100 inclusive, inside. The warden poses the following challenge. Each inmate is allowed to open 50 lockers. If he finds his own number, he passes. If EVERY inmate passes, then they all live. If ANY inmate fails, then they all die.
The numbers in the lockers are randomized before the first inmate opens a door; after that, no further changes. The inmates can discuss a strategy beforehand, but they cannot communicate with each other once the process begins. Once the games starts, each inmate can use NO INFORMATION about other inmates--no communication, no deduction, etc. In particular, the strategy must work if each inmate does not know who goes before/after him. (So if you want to assume a particular order, you cannot have the inmates deduce things about locker contents based on who has already gone. For example, it would be ok to say have every inmate agree to only look in lockers 1-99. If the inmates know their line-up order, then if the last inmate in the line gets to go, he will die. He "knows" that his number is in the 100th locker, but he cannot act on this information by the rules of the game.)
What is the probability that they live? What is their strategy?
Also, if it helps, feel free to relax the constraints, develop a solution, and then try to fix it to conform to the constraints (but of course post what extra assumptions you're making). I'm not saying that this will help though.
2) Alice is sending Bob a 31-bit message. You want to send Bob a message via the following process:
a) intercept Alice's message
b) flip at most *one* bit
c) send the modified message on to Bob
Bob has no idea what Alice's original message is; he only received your (possibly) edited version. You and Bob can communicate beforehand to work out a strategy.
How many bits of information* can you transmit to Bob with this method? How do you do it? Note: I want a worst-case result, but feel free to explore "expected" results.
*To clarify: If you claim to be able to send 2 bits of information (00, 10, 01, 11), then Bob must be able to understand these 2 bits regardless of what Alice's original message is. For example, it is always possible to send 1 bit of information. Pre-arrange with Bob to have him only look at the first bit of Alice's message. After interception, you can ensure that bit is either 0 or 1 with only 1 bit flip, always.
1) There are 100 inmates (numbered 1..100) each with his own locker. Each locker has a number, 1 to 100 inclusive, inside. The warden poses the following challenge. Each inmate is allowed to open 50 lockers. If he finds his own number, he passes. If EVERY inmate passes, then they all live. If ANY inmate fails, then they all die.
The numbers in the lockers are randomized before the first inmate opens a door; after that, no further changes. The inmates can discuss a strategy beforehand, but they cannot communicate with each other once the process begins. Once the games starts, each inmate can use NO INFORMATION about other inmates--no communication, no deduction, etc. In particular, the strategy must work if each inmate does not know who goes before/after him. (So if you want to assume a particular order, you cannot have the inmates deduce things about locker contents based on who has already gone. For example, it would be ok to say have every inmate agree to only look in lockers 1-99. If the inmates know their line-up order, then if the last inmate in the line gets to go, he will die. He "knows" that his number is in the 100th locker, but he cannot act on this information by the rules of the game.)
What is the probability that they live? What is their strategy?
Also, if it helps, feel free to relax the constraints, develop a solution, and then try to fix it to conform to the constraints (but of course post what extra assumptions you're making). I'm not saying that this will help though.
2) Alice is sending Bob a 31-bit message. You want to send Bob a message via the following process:
a) intercept Alice's message
b) flip at most *one* bit
c) send the modified message on to Bob
Bob has no idea what Alice's original message is; he only received your (possibly) edited version. You and Bob can communicate beforehand to work out a strategy.
How many bits of information* can you transmit to Bob with this method? How do you do it? Note: I want a worst-case result, but feel free to explore "expected" results.
*To clarify: If you claim to be able to send 2 bits of information (00, 10, 01, 11), then Bob must be able to understand these 2 bits regardless of what Alice's original message is. For example, it is always possible to send 1 bit of information. Pre-arrange with Bob to have him only look at the first bit of Alice's message. After interception, you can ensure that bit is either 0 or 1 with only 1 bit flip, always.
Last edited: