Posts

Showing posts with the label prison

A Warden Killing The Boredom

A warden oversees an empty prison with 100 cells, all closed. Bored one day, he walks through the prison and opens every cell. Then he walks through it again and closes the even-numbered cells. On the third trip he stops at every third cell and closes the door if it’s open or opens it if it’s closed. And so on: On the nth trip he stops at every nth cell, closing an open door or opening a closed one. At the end of the 100th trip, which doors are open?

A Warden Killing The Boredom



Open Doors in an Empty Prison!


Read the story behind the title!

Let's take few cells into consideration as representatives.

The warden visits cell no. 5 twice - 1st & 5th trip.1 & 5 are only divisors of 5.

He visits cell no. 10, on 1st, 2nd, 5th, 10th trips i.e. 4 times. Here, divisors of 10 are 1,2,5,10.

He stops cell no. 31 only twice i.e. on 1st and 31st trip.

He visits cell no.25 on 1st, 5th, 25th trips that is thrice.

In short, number of divisors that cell number has, decides the number of visits by warden.

For example, above, cell no.5 has 2 divisors hence warden visits it 2 times while 10 has 4 divisors which is why warden visits it 4 times.

But when cell number is perfect square like 16 (1,2,4,8,16) or 25 (1,5,25) he visits respective cells odd number of times. Otherwise for all other integers like 10 (1,2,5,10) or like 18 (1,2,3,6,9,18)  or like 27 (1,3,9,27) he visits even number of time.

For prime numbers, like 1,3,5,....31,...97 he visits only twice as each of them have only 2 divisors. Again, number of visits is even.

Obviously, the doors of cells to which he visits even number of times will remain closed while those cells to which he visits odd number of time will remain open.

So the cells having numbers that are perfect square would have doors open. That means cells 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100 would be having their doors open.

Open Doors in an Empty Prison!

Wish Of Cigarette Smoking

Bruce is an inmate at a large prison, and like most of the other prisoners, he smokes cigarettes. During his time in the prison, Bruce finds that if he has 3 cigarette butts, he can cram them together and turn them into 1 full cigarette. Whenever he smokes a cigarette, it turns into a cigarette butt.

One day, Bruce is in his cell talking to one of his cellmates, Steve.

“I really want to smoke 5 cigarettes today, but all I have are these 10 cigarette butts,” Bruce tells Steve. “I’m not sure that will be enough.”

“Why don’t you borrow some of Tom’s cigarette butts?” asks Steve, pointing over to a small pile of cigarette butts on the bed of their third cellmate, Tom, who is out for the day on a community service project.

“I can’t,” Bruce says. “Tom always counts exactly how many cigarette butts are in his pile, and he’d probably kill me if he noticed that I had taken any.”

However, after thinking for a while, Bruce figures out a way that he can smoke 5 cigarettes without angering Tom. What is his plan?



Wish Of 5 Cigarettes Smoking - Logical Puzzles

That's his master plan!

Fulfilling The Wish Of Cigarette Smoking


What was the challenge? 

Bruce takes 9 of his 10 cigarette butts and make 3 cigarettes using those 9 (9/3=3). Now, he smokes all 3 cigarettes. At this point, he has 3 + 1 = 4 cigarette butts.

Using 3 out of 4 cigarette butts, he make one another cigarette and smokes it. Now he has 1 + 1 = 2 cigarette butts & till now has smoked 4 cigarettes.

Now he borrows 1 Tom's cigarette butts making total number of cigarette butts equal to 3. Using these 3 butts he makes one more cigarette and this way he smokes 5th cigarette. 


After smoking this 5th, he puts back the cigarette butt left in Tom's pile so that Tom won't find anything missing.

Plan For Fulfilling The Wish Of Cigarette Smoking - Logical Puzzles
Follow me on Blogarama