|
||||
Title: one thousand rooms Post by tony123 on Nov 24th, 2007, 11:15am There are one thousand rooms in the sultan's palace. In each room there is a switch that switches all the lamps in the room on or off. When the lamps were on in each room and the sultan was bored, he walked through all his rooms one by one and repeated his walk again and again, always starting with the first room. During the first walk, he turned all the switches. The second time he turned the switch in every second room. The third time he turned the switch in every third room, and so on. (He turned the light on if it was off, and he turned it off if it was on). When he had walked through his room 500 times, he got tired of the game and decided to go to bed. He needed a room in which the lights were off. Which rooms did he have to choose from? |
||||
Title: Re: one thousand rooms Post by gotit on Nov 24th, 2007, 12:25pm I think [hide]1,4,9,16,25,36,49,64,81,100,121,144,169,196,225,256,289,324,361,400,441 and 484.[/hide] |
||||
Title: Re: one thousand rooms Post by cool_joh on Nov 24th, 2007, 7:18pm What was the initial condition? I think we can't solve it without knowing the initial condition. |
||||
Title: Re: one thousand rooms Post by FiBsTeR on Nov 24th, 2007, 8:23pm on 11/24/07 at 19:18:03, cool_joh wrote:
on 11/24/07 at 11:15:40, tony123 wrote:
|
||||
Title: Re: one thousand rooms Post by cool_joh on Nov 24th, 2007, 9:45pm on 11/24/07 at 20:23:05, FiBsTeR wrote: Oops, lol! :-[ So, I think Gotit is correct! |
||||
Title: Re: one thousand rooms Post by Barukh on Nov 24th, 2007, 11:24pm Maybe I am missing something, but I don't understand gotit's answer. What about room number 503? |
||||
Title: Re: one thousand rooms Post by Grimbal on Nov 25th, 2007, 6:03am I also think the sultan was a bit lazy. If he stopped after 500 turns, then all room over 500 except 529, 576, 625, 676, 729, 784, 841, 900, 961 would be dark. Side notes: Frankly, after turning 6569 switches, can't he just enter a room at random and switch off the light if necessary? And what kind of sultan would enter a dark room, put on his pajamas and go to bed witout turning the light on? |
||||
Title: Re: one thousand rooms Post by ThudanBlunder on Nov 25th, 2007, 6:13am on 11/25/07 at 06:03:49, Grimbal wrote:
Depends what his wife looks like. |
||||
Title: Re: one thousand rooms Post by gotit on Nov 25th, 2007, 11:38am on 11/25/07 at 06:03:49, Grimbal wrote:
Yup. You are right. I missed that part. :P So, the final solution is: all perfect squares less than 500 and all numbers greater than 500 that are not perfect squares. |
||||
Title: Re: one thousand rooms Post by inquisitive on Dec 5th, 2007, 1:03am Can anybody explain how to get to the answer (except for writing a C program :) ) |
||||
Title: Re: one thousand rooms Post by Grimbal on Dec 5th, 2007, 3:34am Well, there is Java, VB, C#, ... OK, well. The point is to realize that the end state of a door depends on the number of divisors of the door number. And the number of divisors is odd only for perfect squares. |
||||
Title: Re: one thousand rooms Post by Hippo on Dec 5th, 2007, 4:34am See http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_hard;action=display;num=1107492595 |
||||
Title: Re: one thousand rooms Post by temporary on Jan 27th, 2008, 7:42pm Correct me if I'm wrong, but [hide]Every perfect square from 1-500 or every non perfect square from 501 to 1000.[/hide] |
||||
Title: Re: one thousand rooms Post by mikedagr8 on Jan 27th, 2008, 7:44pm on 01/27/08 at 19:42:51, temporary wrote:
Quote:
|
||||
Title: Re: one thousand rooms Post by temporary on Jan 27th, 2008, 7:49pm A comment with no comment, just quotes is not very informative, no offense. Anyway, so we both got the right answer? |
||||
Title: Re: one thousand rooms Post by mikedagr8 on Jan 27th, 2008, 7:51pm on 01/27/08 at 19:49:13, temporary wrote:
Not informative? If you view this forum from afar, you should be able to do a few basic things. I provided you with the results that you asked for. Correct me if I am wrong. I never stated you were wrong, I was allowing you to see something. Open your eyes to the world if you will. |
||||
Title: Re: one thousand rooms Post by temporary on Jan 27th, 2008, 7:58pm I already knew he posted that. I saw it right after posting my answer. If i would look at the answer before answering, it would be pointless to answer because I would not be doing it myself. |
||||
Powered by YaBB 1 Gold - SP 1.4! Forum software copyright © 2000-2004 Yet another Bulletin Board |