3 ms·
If they decide the guy at the back indicates an odd number of black hats by saying white or an even number of black hats by saying black. Now the remaining pris
by ssfermoy 13y ago
If they decide the guy at the back indicates an odd number of black hats by saying white or an even number of black hats by saying black. Now the remaining prisoners all live and the back guy has a 50/50 shot.
- Ellipsis753 13y agoThat's awesome. To me it seems like a parity bit for RAID or an error-correcting code.
- mikeash 13y agoVery nice. It took me a while to see why that works, so I wonder how long it would have taken me to come up with it. Now that I get it, it seems almost obvious. It's basically the same as my solution, except I'm essentially using this technique on 50 separate lines of 2 people each.
- ssfermoy 13y agoGlad you like it. Heard this as an interview question at a trading company. Gave something similar to your solution and was asked for a better one, eventually work my way to the solution above but was given no indication if it was what they wanted. It wasn't a pleasant experience.