Prepare for your Next Interview
This is a discussion on 100 doors n 100 students problem within the Brainteasers forums, part of the Brain Gym category; There r 100 doors and 100 students. intially all doors r closed. first student no 1 comes n toggles(open if close/close if open) the door no 1 and ...
|
|||
|
There r 100 doors and 100 students. intially all doors r closed. first student no 1 comes n toggles(open if close/close if open) the door no 1 and its multiples, next comes student no 2 and toggles door no 2 and its multiples i.e. door no 2,4,6,8........,student no 3 toggles door no 3 and its multiples i.e.3,6,9,12........., and so on till 100 students complete. at the end how many r open n how many r closed.?
|
| Sponsored Links |
|
|||
|
Re: 100 doors n 100 students problem
I guess there will be 84 doors closed and 16 doors opened. I have not done it through formula, but tried manually. Have a check on the attached excel and tell if the answer is correct.
|
|
|||
|
Re: 100 doors n 100 students problem
Hi Friends,
Here is the answer for your question... Opened 10 doors Closed 90 doors All those doors with door number equal to a perfect square will remain open, i.e 1, 4, 9, 16, 25, 36, 49, 64, 81, 100 For a door to remain open it has to be toggled an odd number of times. e.g open or open-close-open or open-close-open-close-open and so on. Since the perfect squares have odd number of factors, the door number equal to perfect square will remain open. Like door number 36. On first whistle it will get open. On second whistle it will get closed. On third whistle it will get open. On fourth whistle it will get close. On sixth whistle it will get open. On ninth whistle it will get closed. On twelth whistle it will get open. On eighteenth whistle it will get closed. On thirtysixth whistle it will get open. ----------------------- suresh |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MagicScore School 5.0 is notation software for music aficionados, students, teachers, | JobHelper | Geeks Lounge | 0 | 04-14-2007 06:11 AM |
| Problem with awk | sharifhere | Unix/Linux | 12 | 01-17-2007 05:12 AM |
| howmany students are there in a department ? | psuresh1982 | Brainteasers | 3 | 01-03-2007 04:42 AM |
| Free Books for Engineering Students - Chennai | Lokesh M | Geeks Lounge | 0 | 12-31-2006 06:35 AM |
| Online College Students - Avoid Common Mistakes | Lokesh M | Online Degree Programs | 1 | 06-18-2006 08:09 AM |