Author |
Topic: Three Locks (Read 801 times) |
|
Nerde
Guest
|
|
Three Locks
« on: Mar 30th, 2003, 10:14am » |
|
Here, each theif will select 2 locks at random and toggle them. He will then inform the next theif such that at the end each one knows about the sequence exactly one other theif. Then, when 2 get together its just about making sure each lock is toggles twice. Howz it!! Nerd
|
|
IP Logged |
|
|
|
steveo
Newbie
Posts: 1
|
|
Re: Three Locks
« Reply #1 on: Apr 2nd, 2003, 8:13am » |
|
The 1st criminal picks activate/deactivate states for the 3 locks and tells the 2nd. The 2nd does the same and tells the 3rd. The 3rd tells the 1st. So, #1 knows 1,3 #2 knows 1,2 #3 knows 2,3 Any combination of 2 prisoners has all 3 on/off states and no one has all 3. To determine which locks are activated, 2 prisoners get together and XOR (Exclusive OR) the 3 states. e.g. #1 set locks 1,0,1 #2 set locks 1,0,0 #3 set locks 0,1,1 ----------------- XOR result 0,1,0 In this case only the 2nd lock is activated. Toggle it off and open the door. steveo
|
|
IP Logged |
|
|
|
aero_guy
Senior Riddler
Gender:
Posts: 513
|
|
Re: Three Locks
« Reply #2 on: Apr 2nd, 2003, 11:53am » |
|
Original post: here Be sure to search, welcome to the board.
|
|
IP Logged |
|
|
|
|