wu :: forums
« wu :: forums - Three Locks »

Welcome, Guest. Please Login or Register.
May 2nd, 2024, 9:13pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   hard
(Moderators: Icarus, william wu, SMQ, towr, Eigenray, Grimbal, ThudnBlunder)
   Three Locks
« Previous topic | Next topic »
Pages: 1  Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Three Locks  (Read 801 times)
Nerde
Guest

Email

Three Locks  
« on: Mar 30th, 2003, 10:14am »

Grin
 
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
*





   
Email

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
****





   
Email

Gender: male
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
Pages: 1  Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board