# Need help with riddle/puzzle

**URL:** <https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093>\
**Category:** Factual Questions\
**Created:** [September 14, 2009, 9:33pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093 "2009-09-14T21:33:06Z")\
**Posts on this page:** 14\
**Page:** 3

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [September 15, 2009, 8:19pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/41 "2009-09-15T20:19:34Z")

</div>

And on an intuitive level, it makes sense that that algorithm is slower, because it is conveying more information – not just how many prisoners have visited the room, but their identities too. Certainly in the well-known 100 prisoner variant of this puzzle, that algorithm and versions of it proved to be far slower than the single or multiple leader approaches.

---

<div class="post-metadata">

**Author:** ![zut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zut/32/2875_2.png) [@zut](https://boards.straightdope.com/u/zut)\
**Post date:** [September 15, 2009, 8:50pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/42 "2009-09-15T20:50:28Z")

</div>

> [@NajaNivea](#):
>
> I see, so the mechanics of the thing being limited by chance, it’s true that the light might stay off for three years if the leader happens not to be randomly selected (though I understand the probability says they would be, eventually), yaar? I thought there was something I was missing about monitoring the switch. It doesn’t seem like a terribly expeditious solution, but I don’t have a better one.

I suppose you could lop off a little time by gathering some information _before_ the leader arrives on the scene by appointing the prisoner chosen the _third_ month as the 'leader" (rather than the first month).

Have the prisoner chosen in month one flick the light on, and the prisoner chosen in month two flick the light off, _unless_ he’s the same prisoner as was already chosen. Then the prisoner chosen in month three will know for certain if he’s been preceded by exactly two or one prisoners (or, rarely, zero), and the tallying goes on from there, with prosoner #3 as the “leader.” So you’re always farther ahead in the tally than you would be if prisoner #1 was the “leader.”

---

<div class="post-metadata">

**Author:** ![Carmady](https://avatars.discourse-cdn.com/v4/letter/c/f04885/32.png) [@Carmady](https://boards.straightdope.com/u/Carmady)\
**Post date:** [September 15, 2009, 9:25pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/43 "2009-09-15T21:25:53Z")

</div>

> [@zut](#):
>
> I’m not following this either; or, rather, I’m not following how it can possibly be a quicker system. On average, someone’s leaving the light on only every ten months or so, and that bit of information is passed to one other random prisoner. You have to pass along, I’m guessing, something like 60-70 bits of information before any one prisoner fills up his tally sheet, so we’re talking 600ish months.

At the beginning someone leaves the light on only every ten months, but after that anyone who has already crossed off prisoner X can leave the light on that month.

If prisoner 2 already crossed off prisoner 5 and is called on month 35, they leave the light on.

I don’t think this method beats the head-start + single-counter method though.

---

<div class="post-metadata">

**Author:** ![snailboy](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@snailboy](https://boards.straightdope.com/u/snailboy)\
**Post date:** [September 15, 2009, 10:37pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/44 "2009-09-15T22:37:30Z")

</div>

Can the prisoners unscrew the light bulb? That would provide two binary bits. The first person flips off the switch. The second unscrews the light bulb. The third flips the switch back on with the bulb still out. When the leader is selected, he’ll know how many new people have entered the room up to three. You could even change one bit to a base-3 digit by having the light bulb either tight, loose, or completely removed and count up to 5 at once.

---

<div class="post-metadata">

**Author:** ![Fenris](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/fenris/32/498_2.png) [@Fenris](https://boards.straightdope.com/u/Fenris)\
**Post date:** [September 15, 2009, 11:30pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/45 "2009-09-15T23:30:47Z")

</div>

…I’m not getting this. Per the rules of the riddle, none of the methods for the prisoners should work:

> [@](#):
>
> The prisoners can’t see the common area from their cells, can’t be heard by the other prisoners, and have no way of leaving marks for the other prisoners.

So how do they designate a leader? How do they coordinate all this stuff? They can’t see/hear/leave marks. Even if we assume all these prisoners are smart enough to do this, how do they set it up to begin with?

---

<div class="post-metadata">

**Author:** ![SeaDragonTattoo](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@SeaDragonTattoo](https://boards.straightdope.com/u/SeaDragonTattoo)\
**Post date:** [September 16, 2009, 12:57am UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/46 "2009-09-16T00:57:20Z")

</div>

> [@Fenris](#):
>
> So how do they designate a leader? How do they coordinate all this stuff? They can’t see/hear/leave marks. Even if we assume all these prisoners are smart enough to do this, how do they set it up to begin with?

It was corrected later that the prisoners did get a chance to meet together once at the very beginning before going to their individual cells.

I’m not getting how the guards aren’t a factor in turning the light off on the way out after they clean up.

---

<div class="post-metadata">

**Author:** ![zut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zut/32/2875_2.png) [@zut](https://boards.straightdope.com/u/zut)\
**Post date:** [September 16, 2009, 2:07am UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/47 "2009-09-16T02:07:25Z")

</div>

> [@Carmady](#):
>
> At the beginning someone leaves the light on only every ten months, but after that anyone who has already crossed off prisoner X can leave the light on that month.
> 
> If prisoner 2 already crossed off prisoner 5 and is called on month 35, they leave the light on.
> 
> I don’t think this method beats the head-start + single-counter method though.

Oh, I get it. Interesting. I’m guessing, like you, that this would still be a slower method, but since the information transfer speeds up over time that’s not crystal clear.

I’m guessing “head-start + single-counter method” would take ~110 months, and the “mod 10” method would take ~150 months. That’s just a WAG, so I’m interested if anyone does a Monte Carlo.

---

<div class="post-metadata">

**Author:** ![GuiriEnEspana](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@GuiriEnEspana](https://boards.straightdope.com/u/GuiriEnEspana)\
**Post date:** [September 16, 2009, 7:16am UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/48 "2009-09-16T07:16:33Z")

</div>

The guards will leave the common area untouched except remove any markings and left items. So we can assume that the guards don’t interfere with the switch or the bulb anduse a. Binary counting system with 4 variables which would allow the prisioners to count to 10 pretty quickly. Rules could be:

1. When it’s your first visit, add 1
2. When it’s your second or successive visit, do nothing
3. Remember OBLS (Old Boys Love Soccer) which represents the 4 variables: bulb Out, bulb Broken, bulb Loose, Switch on
4. When counting in binary, 1 means Yes (i.e. Switch is on), and 0 means No (i.e. Switch is off)
5. If the switch is already on in the very first month (prisoner will know who s/he is, do nothing)

So, we have:  
1st person: 0001 Switch On (or leave on)  
2nd person: 0010 Loosen bulb and turn Switch off  
3rd person: 0011 Turn switch on  
4th person: 0100 Break bulb, tighten it, switch off  
5th person: 0101 Turn switch on  
6th person: 0110 Loosen bulb, switch off  
7th person: 0111 Switch on  
8th person: 1000 Take bulb out, switch off\*  
9th person: 1001 Switch on\*  
The person who finds the broken bulb on the floor with the switch turned on knows s/he’s the 10th visitor and calls the guards…

- Logic fails a little here as it’s not possible to unbreak the bulb but should be otherwise clear to the prisoners…

---

<div class="post-metadata">

**Author:** ![Serenata67](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/serenata67/32/10646_2.png) [@Serenata67](https://boards.straightdope.com/u/Serenata67)\
**Post date:** [September 16, 2009, 1:05pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/49 "2009-09-16T13:05:03Z")

</div>

> [@GuiriEnEspana](#):
>
> The guards will leave the common area untouched except remove any markings and left items. So we can assume that the guards don’t interfere with the switch or the bulb anduse a. Binary counting system with 4 variables which would allow the prisioners to count to 10 pretty quickly. Rules could be:
> 
> 1. When it’s your first visit, add 1
> 2. When it’s your second or successive visit, do nothing
> 3. Remember OBLS (Old Boys Love Soccer) which represents the 4 variables: bulb Out, bulb Broken, bulb Loose, Switch on
> 4. When counting in binary, 1 means Yes (i.e. Switch is on), and 0 means No (i.e. Switch is off)
> 5. If the switch is already on in the very first month (prisoner will know who s/he is, do nothing)
> 
> So, we have:  
> 1st person: 0001 Switch On (or leave on)  
> 2nd person: 0010 Loosen bulb and turn Switch off  
> 3rd person: 0011 Turn switch on  
> 4th person: 0100 Break bulb, tighten it, switch off  
> 5th person: 0101 Turn switch on  
> 6th person: 0110 Loosen bulb, switch off  
> 7th person: 0111 Switch on  
> 8th person: 1000 Take bulb out, switch off\*  
> 9th person: 1001 Switch on\*  
> The person who finds the broken bulb on the floor with the switch turned on knows s/he’s the 10th visitor and calls the guards…
> 
> - Logic fails a little here as it’s not possible to unbreak the bulb but should be otherwise clear to the prisoners…

I was trying to work out a system like that… but you beat me to it!

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [September 16, 2009, 2:26pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/50 "2009-09-16T14:26:54Z")

</div>

You can count to 9 with just three binary signals: 000, 001, …, 110, 111, and the 9th prisoner will see 111 when finally called to the room.

And in fact, you can make this work for 10 prisoners – any previously-counted prisoner who finds the switches reset to 000 knows that #9 has visited, and sets the signals to something other than 000. Then the 10th prisoner will increment the count (not realising that he is 10th), and on a later visit the other prisoner (or possibly others who observed the out-of-sequence signals) will see the increment and know that the 10th prisoner has visited. In other words, the other prisoner will become a “leader”, just to count the last guy.

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [September 16, 2009, 2:42pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/51 "2009-09-16T14:42:54Z")

</div>

Let me refine that: #9 sees 111 and knows that he is #9. He sets the signals to 000 and waits for #10 to increment them to 001. #10 will not know whether he is #10 or #2, but #9 (and possibly other prisoners) will, and will be able to declare to the warden on his/their next visit.

---

<div class="post-metadata">

**Author:** ![Rhodes](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/rhodes/32/273_2.png) [@Rhodes](https://boards.straightdope.com/u/Rhodes)\
**Post date:** [September 16, 2009, 7:56pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/52 "2009-09-16T19:56:17Z")

</div>

> [@Evil\_Economist](#):
>
> Actually, I do have a follow-up question: how do you measure angular momentum?

Rolling the balls down a ramp would work.

I was also thinking of giving each ball a good spin, then stopping it abruptly. The hollow ball will remain motionless, but the fluid in the other ball will remain in motion so the ball will continue spinning slowly after you release it.

I perform this test every time I crack open a boiled egg, just in case some prankster swapped it for a raw egg.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [September 16, 2009, 8:25pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/53 "2009-09-16T20:25:21Z")

</div>

What fluid? The problem just says “low-density substance”, but that could be balsa wood or aerogel or whatever.

---

<div class="post-metadata">

**Author:** ![leandroc76](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@leandroc76](https://boards.straightdope.com/u/leandroc76)\
**Post date:** [September 16, 2009, 9:07pm UTC](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093/54 "2009-09-16T21:07:00Z")

</div>

No matter the density, the sound will probably be different.

[Previous page](https://boards.straightdope.com/t/need-help-with-riddle-puzzle/510093.md?page=2)
