View Single Post
  #23  
Old 11-19-2005, 07:01 PM
Guest
 
Posts: n/a
Default Re: math riddle: King and His Prisoners (no content, long)

Sorry to clog this thread -- this will be my last addition. If A has flipped the chalice between NK - 2K + N - 1 and NK - K + N - 1 times and he returns to the room 5 times and the chalice is still up, he can flip the chalice sideways to the left. Then, each of the non-counting prisoners, when they see the chalice is sidways to the left AND they have already flipped the chalice face down K + 1 times, can flip the chalice sideways to the right the first to K+1 times they find it pointing left and not touch it again. This way, the counter will start a new count (number of toggles from left to right). If he started the sideways signal prematurely, he will be faced with a chalice moved down, which he can toggle up and add to his original count. If not, he will count to NK - K + N number of left toggles before telling the king they've all been to the room.

Example: (K = 2; N = 1)

B enters and flips down. (1)
K enters flips up. (1)
B enters and flips down. (2)
K enters and flips up (2)
B enters and flips down (3)
A enters and flips up (1)
C enters and flips down (1)
A enters and flips up (2)
C enters and flips down (2)
A enters and flips up (3)
C enters and flips down (3)
A enters and flips up (4) -- equal to the lower bound of NK - 2K + N - 1.
C, B, A, B, A, C, C, A, B, C, B, A, B, and A enter and do nothing. Chalice still up.
After reaching a count between NK - 2K + N -1 and NK - K + N, AND seeing the chalice still up after 5 visits, A flips the chalice sideways to the left and starts a new count to NK - K + N sideways flips. If the chalice were to be flipped down (meaning one of the prisoners hadn't reached their K + 1 quota of down flips), then the counter will erase his new count and resume the first count.

One possible sequence:

B enters flips down (1).
A enters flips up (1).
B enters flips down (2)
A enters flips up (2)
B enters flips down (3)
A enters flips up (3)
C enters flips down (1)
A enters flips up (4)
A enters 5 times in a row seeing the up-facing chalice.
A flips chalice left (1)
K flips chalice right (1)
A flips chalice left (2)
K flips chalice right (2)
A flips chalice left (3)
C flips chalice down (2)
A flips chalice up, resumes count (5)
C flips down (3)
A flips up (6) --- (upper bound of the uncertainty zone of counter's flips (F), such that NK - 2K + N - 1 <= F <= NK - K + N - 1)
A visits 5 times, seeing up chalice. Resumes sideways count left (1)
B flips right (1)
A left (2)
B right (2)
A left (3)
B right (3)
A left (4)
C right (1)
A left (5)
C right (2)
A left (6)
C right (3)
A right (7) -- tells king they've all been there, as he reached NK - K + N sideways "all clear" left flips.
Reply With Quote