Wednesday, 30 March 2016

1000 doors problem world famous puzzle

This is my second post today I am going to discuss 1000 doors problem it is world famous puzzle asked in many aptitude exams like CAT/E LITMUS/GRE/GMAT and interviews the puzzle is
There are 1000 doors in a high school with 1000 students. The problem begins with the first student opening all 1000 doors next the second student closes doors 2,4,6,8,10 and so on to door 1000 the third student changes the state (opens doors closed, closes doors s open) on doors 3,6,9,12,15 and so on the fourth student Changes the state of doors 4, 8, 12, 16 and so on. This goes on until every student has had a turn. How many doors will be open at the end?
before  discussing this puzzle I want to clear your basic concepts to understand this puzzle

if you list the factors of 24, you get (1, 24), (2, 12), (3, 8), (4, 6).  thing to notice here are Since the factors are listed in pairs, there are an even number of them.
if you list the factors of 36, you get (1, 36), (2, 18), (3, 12), (4, 9), and (6, 6). The last pair of factors is just the square root of 36 listed twice.
Since 6 only counts once as a factor of 36, 36 has nine  factors, an odd number.


so core funda to solve this puzzle is perfect square hace odd number of factors


initially all the doors are closed
person  1 came  opens all of the doors, they're all open. Now person 2 goes, and all of the even numbered doors means multiples of 2  (see in  below table)  are shut. Now it's 3's turn: door 3 is shut, door  6 is open again, and 9 is shut. but if we continue to solve in this type of manner it will take lot of time to work on 1000 doors and 1000 persons

doors
Door 1(close)
Door 2(close)
Door 3 (close)
 …………………
Door1000(close)
Person 1
Open
Open
Open
 ……………….
open
Person 2
              Open
                Close
  Open    
              ……………….
           Close
Person 3
Open
Open
Close
……………………
close
…………





Person 1000
………………………
………………………..

……………………………





now think in this manner suppose think door number 36 who can change the state of door number 36 yes those persons number that are factor of 36 so see in table person 1 came he will open the closed door person 2 will close person 3 will open person 4 close person 6 open and in last…….person 36 open .as door 36 is a perfect square having odd number of factors the last condition is open so every perfect square door will have open state  in the end .up to 1000 there are 31 perfect squares doors number last one is
312 = 961

DOOR NUMBER 36
FACTORS               
1
OPEN
2
CLOSE
3
OPEN
4
CLOSE
6
OPEN
9
CLOSE
12
OPEN
18
CLOSE
36
OPEN
                          

now think about door number 24 which is not a perfect square number it have even number of factors so will have closed position in the end

DOOR NUMBER 24 FACTORS

1
OPEN
2
CLOSE
3
OPEN
4
CLOSE
6
OPEN
8
CLOSE
12
OPEN
24
CLOSE















so answer of this puzzle is 31 doors will be open in the end 
see video solution of this puzzle 








No comments:

Post a Comment