Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

A Simple Logic Puzzle....

This is a discussion on A Simple Logic Puzzle.... within the Challenging puzzles forums, part of the Brain Gym category; Hi Friends, 100 prisoners are locked up in individual cells, unable to see, speak or communicate in any way with each other. There is a central living room with a ...

Go Back   Geeks Talk > Brain Gym > Challenging puzzles
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 08-05-2009
Expert Member
 
Join Date: May 2009
Location: Bangalore
Posts: 991
Thanks: 155
Thanked 420 Times in 201 Posts
rijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nice
Smile A Simple Logic Puzzle....

Hi Friends,

100 prisoners are locked up in individual cells, unable to see, speak or communicate in any way with each other.

There is a central living room with a single light bulb, the bulb is initially off and no prisoner can see the light bulb from their own cell.

Every day, the warden picks a prisoner at random, and that prisoner goes to the central living room.

While there, the prisoner can toggle the bulb if they wish (off to on, or on to off).

At any point, any prisoner can claim that all 100 prisoners have been to the living room. If they are wrong then all 100 prisoners will locked up forever! However, if they are correct all of the prisoners are set free.


Before the random picking begins, the prisoners are allowed to discuss a plan.

Then guys.......

The Question........

What is their best plan to determine when all 100 prisoners have visited the living room?

Thanks,
Riju
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2 Weeks Ago
Junior Member
 
Join Date: Nov 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
lupus is on a distinguished road
Re: A Simple Logic Puzzle....

A sufficient condition for all of the 100 prisoners having been to the CLR would be that 100 days go by without any prisoner having been there twice. This results in the following plan for a prisoner visiting the CLR:
- If the light is off, turn it on and start counting the days, this day being day zero.
- If the light is on, and your counter is 0, start counting the days, this day being day zero.
- If the light is on, and your counter is greater than zero, but < 100, turn the light off and stop counting days.
- If the light is on, and your counter is 100: inform warden that the liberating condition has been met!
- If the light is on, and your counter is >100, reset the counter to 0, but keep counting.

On a day where you don't visit CRL and are counting days, then increment the counter.

For a truly random selection sequence of prisoners, chances for success are extremely small!
Reply With Quote
Reply

  Geeks Talk > Brain Gym > Challenging puzzles

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
simple puzzle......... rijus Brainteasers 12 3 Weeks Ago 04:07 AM
simple Puzzle.... rijus Challenging puzzles 2 08-04-2009 12:44 PM
Simple Logic Puzzle........... rijus Challenging puzzles 2 07-05-2009 11:30 AM
very very simple puzzle rijus Mathematical Puzzles 2 06-14-2009 06:27 AM
simple puzzle deepasree Brainteasers 1 05-26-2009 05:48 AM


All times are GMT -4. The time now is 05:01 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved