Skip to main content
deleted 12 characters in body
Source Link
Oray
  • 30.4k
  • 6
  • 61
  • 217

P6: he will tell to P7 about P1,P2,P3,P4,P5 and his location with 6! information to P7.

P7: he will tell to P1 about P2,P3,P4,P5,P6 and his location with 6! information to P7 at the end.

P6: he will tell to P7 about P1,P2,P3,P4,P5 and his location with 6! information to P7.

P7: he will tell to P1 about P2,P3,P4,P5,P6 and his location with 6! information to P7 at the end.

P6: he will tell to P7 about P1,P2,P3,P4,P5 and his location with 6! information.

P7: he will tell to P1 about P2,P3,P4,P5,P6 and his location with 6! information at the end.

Source Link
Oray
  • 30.4k
  • 6
  • 61
  • 217

Disclaimer: I am sharing my method, which I believe is straightforward to comprehend, and I have not reviewed any previous responses so it could be duplicate.

When faced with a complex problem, I typically begin by simplifying it into smaller versions. For instance, I may consider a scenario involving only three people and determine how much information is necessary for them to communicate effectively.

Let's all prisons as J1, J2, J3..., people who passes the room with clock as P1,P2,P3... and clock location as 0,1,2...

What mathematicians know?

1- Each person can observe who is going to be sent to jail sequentially, and they are all aware that they have the ability to manipulate the clock, but it is also possible that they may choose not to do so.

2: Ultimately, they will all pass by the room containing the clock, affording each person the opportunity to view the outcome.

3: However, since we are uncertain about the order in which the king will select prisoners to be sent to jail, we designate the first prisoner chosen as P1, and so on in ascending order.

4: At present, the clock is operational, but the prisoners have the option to halt its function if they so choose.

These hints are significant because they imply that each time a person passes by the clock, they can transmit a signal to the previous person, and as a result, everyone will witness a signal at the end while going back to the king.


Let's play this game with 3 people only first;

First person goes, it could be A,B or C; what information does he has? he knows which jail he is taken! he is missing

the location of 2nd and 3rd person.

But at least he can give information about himself to others somehow...

1- if P1 is going to J1, he can give information to the next person by adjusting the clock to 0 by damaging the clock, so the P2 will know that P1 will go to J1 jail, likewise, 1 -> J2, if it is J3, then he would not damage the clock so P2 will know that he is going for the J3. So 0 or 1 would be enough for P2 to figure it out.

Second person: since he knows the location of 1st person and himself, he knows P3's location as well. At the moment he knows everything so he should say P3 their location. making the lock 0 or 1 only. 0 means (low,high), 1 mean (high, low). So two information is enough to figure out the rest for him.

For example, if P3 goes to 2 and

  • P1 goes to 1 and P2 goes to 3 then P2 will leave the clock to 0, otherwise
  • P1 goes to 3 and P2 goes to 1 then P2 will leave the clock to 1.

So only P1 does not know the order, P3 will use the same principle as P2 have done for him.

As a result when they are going back to the king, they will all know their locations and 0 and 1 was enough for this!

With the same logic we can solve every kind of size of the people and prisons;

P1: he will just tell his location to P2

P2: he will tell to the P3 about his and P1's location with two information (0,1)

P3: he will tell to the P4 his prison, P1 and P2's location with four information (0,1,2,3)

...

P6: he will tell to P7 about P1,P2,P3,P4,P5 and his location with 6! information to P7.

P7: he will tell to P1 about P2,P3,P4,P5,P6 and his location with 6! information to P7 at the end.