Posts

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!

The Little Johnny's Dilemma

Little Johnny is walking home. He has $300 he has to bring home to his mom. While he is walking a man stops him and gives him a chance to double his money. 

The man says -

 "I'll give you $600 if you can roll 1 die and get a 4 or above, you can roll 2 dice and get a 5 or 6 on at least one of them, or you can roll 3 dice and get a 6 on at least on die. If you don't I get your $300."
 
What does Johnny do to have the best chance of getting home with the money?


The Little Johnny's Dilemma


THIS is the BEST he can do! 

The Loss Making Deal !


What was the deal?


The little Johnny should not accept the deal.

The problem is actually finding the probability of winning in each case dice throw.

---------------------------------------------

CASE 1 :  

Condition - Roll a die and get 4 or above.

The probability in the case is 3/6 = 1/2 (getting 4,5,6 from 6 possible outcomes). 

That is only 50% chances of winning the deal.

---------------------------------------------

CASE 2 :

Condition - Roll 2 dice and a 5 or 6 on at least one of them.

Let's find the probability that none get a 5 or 6. 

Probability that single die doesn't get a 5 or 6 is 4/6 = 2/3 by getting 1,2,3,4 in possible 6 outcomes.

Since, these 2 results are independent, the probability that neither dice gets a 5 or 6 is 2/3 x 2/3 = 4/9.

So, the probability that at least one of them gets a 5 or 6 is 1 - 4/9 = 5/9.

That is, about 56% chances of winning the deal.

By other approach, there are 36 possible combinations in 2 dice throw.

(1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6)

(2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6)

(3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6)

(4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6)

(5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6)

(6, 1) (6, 2) (6, 3) (6, 4) (6, 5) (6, 6) 

There are total 20 combinations (last 2 rows and 2 columns) where at least one die gets a 5 or 6.

Hence, the probability in the case is 20/36 = 5/9 i.e. about 56% of winning chances.

----------------------------------------

CASE 3 : 

Condition - Roll three dice and get a 6 on at least on die.  

Again finding probability that none gets a 6.

Probability that single die doesn't get a 6 is 5/6 by getting 1,2,3,4,5 out of 6 possible outcomes.

Hence, the probability that three dices doesn't get a 6 = 5/6 x 5/6 x 5/6 = 125/216.

Then the probability that at least one of them get a 6 = 1 - 125/216 = 91/216 

That is only 42% chances of winning the deal.

--------------------------------------------

On the other hand Johnny can be 100% sure that he will take $300 to home if he doesn't accept the man's deal. 

The Loss Making Deal !

The Challenge Ahead of New Manager

In a wood-cutting factory, five large sawing machines stand in a windowless room. Each machine has an on/off switch attached, there being no doubt as to which switch controls which machine.

Outside the door to the room are five back-up on/off switches, one for each machine inside. The power for each machine must first pass through the back-up switch, and then the machine switch before reaching the saw.

The problem is, the new manager cannot decide how these back-up switches match with the machines inside the room. One day, the manager's brother visits. The manager takes him inside the sawing room where all five machines are at work and explains the problem. The brother announces that he intends to leave the room and that when he returns he will be able to match correctly the five switches outside the room to the five machines inside. The brother works alone, cannot see the machines from outside the room and solves the problem purely by operating switches. 

How is it possible?

The Challenge Ahead of New Manager


Read how brother managed to do it! 

Genius Moves by Brother of Manager!


What was the challenge?

Suppose you are the brother of that manager & have accepted the challenge. 

For sake of convenience, we will name switches inside the room operating machines as an 'operating switches' & those which are outside the room as a 'back up switches'.

Though windowless, we assume that operating sound of machine(s) can be heard from outside room but can't see which machine(s) is (are) in operating condition. 

Here is what you should do!

1. Let's label the machines which we are going to keep ON as ACTIVE & others as INACTIVE. 

2. Turn off operating switches of 2 machines so that there are three machine ACTIVE and two are INACTIVE inside the room.

3. Go outside and now your task is to find the 3 back up switches controlling 3 active machines inside the room.

4. You have to switch off three switches in all possible combinations. There are 10 such possible combinations (5C3) of 3 controlling switches out of 5.

5. If 0 represents OFF position and 1 represents ON position then you should try all possible below combination. 

11000
10100
10010
10001
01100
01010
01001
00110
00101
00011

6. There will be exactly one combination in which all three ACTIVE machines  will be OFF & there will be no sound coming out of the room. The three switches having value of 0 are controlling ACTIVE machines while other 2 must be controlling INACTIVE machines.

7. Still we don't know the exact switch operating the each machine. Label 3 switches controlling ACTIVE machines as A, B and C & those controlling INACTIVE machines as D & E

Allow some time to cool down all those ACTIVE machines.

8. Now, turn on 2 switches A & B and keep switch E ON. Machines connected to A and B will start working.

9. After a while, turn off the switch B and go inside the room. 

10. The machine which is still operating must be controlled by back up switch A.

11. Touch other 2 which were labelled as ACTIVE & check which has got warmer.

12. The machine which is warmer must be controlled by back up switch B.

13. And since we didn't turn on the switch C (after giving time all to cool down), the machine having normal temperature must be controlled by the switch C.

14. Remember, we had turned off operating switches of INACTIVE machines initially. And before entering into room again we have turned on switch E. 

15. Now, turn on operating switch of one of the INACTIVE labelled machine. 

If the machine starts working it must be connected to the switch E & other to the switch D. And if the machine doesn't start working it must be connected to D & other to E. 

This way, you will find every back up switch located outside the room controlling operating switch of each machine inside the room.

Genius Moves by Brother of Manager!
 

How much does each container weigh?

There are five containers of oil of different weight. They are weighed in pairs of two with all possibilities. The weights in kgs are 165, 168, 169.5, 171, 172.5, 174, 175.5, 177, 180, and 181.5 . 

How much does each container weigh?

How much does each container weigh?

Weight Calculation of each container is here! 

Follow me on Blogarama