Author |
Topic: one thousand rooms (Read 3690 times) |
|
tony123
Junior Member
Posts: 61
|
|
one thousand rooms
« on: Nov 24th, 2007, 11:15am » |
Quote Modify
|
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?
|
|
IP Logged |
|
|
|
gotit
Uberpuzzler
Gender:
Posts: 804
|
|
Re: one thousand rooms
« Reply #1 on: Nov 24th, 2007, 12:25pm » |
Quote Modify
|
I think 1,4,9,16,25,36,49,64,81,100,121,144,169,196,225,256,289,324,361,400,441 and 484.
|
|
IP Logged |
All signatures are false.
|
|
|
cool_joh
Guest
|
What was the initial condition? I think we can't solve it without knowing the initial condition.
|
|
IP Logged |
|
|
|
FiBsTeR
Senior Riddler
Gender:
Posts: 581
|
|
Re: one thousand rooms
« Reply #3 on: Nov 24th, 2007, 8:23pm » |
Quote Modify
|
on Nov 24th, 2007, 7:18pm, cool_joh wrote:What was the initial condition? |
| on Nov 24th, 2007, 11:15am, tony123 wrote:[...] When the lamps were on in each room [...] |
|
|
« Last Edit: Nov 24th, 2007, 8:23pm by FiBsTeR » |
IP Logged |
|
|
|
cool_joh
Guest
|
on Nov 24th, 2007, 8:23pm, FiBsTeR wrote: Oops, lol! So, I think Gotit is correct!
|
|
IP Logged |
|
|
|
Barukh
Uberpuzzler
Gender:
Posts: 2276
|
|
Re: one thousand rooms
« Reply #5 on: Nov 24th, 2007, 11:24pm » |
Quote Modify
|
Maybe I am missing something, but I don't understand gotit's answer. What about room number 503?
|
|
IP Logged |
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: one thousand rooms
« Reply #6 on: Nov 25th, 2007, 6:03am » |
Quote Modify
|
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?
|
|
IP Logged |
|
|
|
ThudnBlunder
wu::riddles Moderator Uberpuzzler
The dewdrop slides into the shining Sea
Gender:
Posts: 4489
|
|
Re: one thousand rooms
« Reply #7 on: Nov 25th, 2007, 6:13am » |
Quote Modify
|
on Nov 25th, 2007, 6:03am, Grimbal wrote:And what kind of sultan would enter a dark room, put on his pajamas and go to bed witout turning the light on? |
| Depends what his wife looks like.
|
|
IP Logged |
THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
|
|
|
gotit
Uberpuzzler
Gender:
Posts: 804
|
|
Re: one thousand rooms
« Reply #8 on: Nov 25th, 2007, 11:38am » |
Quote Modify
|
on Nov 25th, 2007, 6:03am, Grimbal wrote: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. |
| Yup. You are right. I missed that part. So, the final solution is: all perfect squares less than 500 and all numbers greater than 500 that are not perfect squares.
|
|
IP Logged |
All signatures are false.
|
|
|
inquisitive
Newbie
Posts: 5
|
|
Re: one thousand rooms
« Reply #9 on: Dec 5th, 2007, 1:03am » |
Quote Modify
|
Can anybody explain how to get to the answer (except for writing a C program )
|
|
IP Logged |
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: one thousand rooms
« Reply #10 on: Dec 5th, 2007, 3:34am » |
Quote Modify
|
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.
|
|
IP Logged |
|
|
|
temporary
Full Member
Posts: 255
|
|
Re: one thousand rooms
« Reply #12 on: Jan 27th, 2008, 7:42pm » |
Quote Modify
|
Correct me if I'm wrong, but Every perfect square from 1-500 or every non perfect square from 501 to 1000.
|
|
IP Logged |
My goal is to find what my goal is, once I find what my goal is, my goal will be complete.
|
|
|
mikedagr8
Uberpuzzler
A rich man is one who is content; not wealthy.
Gender:
Posts: 1105
|
|
Re: one thousand rooms
« Reply #13 on: Jan 27th, 2008, 7:44pm » |
Quote Modify
|
on Jan 27th, 2008, 7:42pm, temporary wrote:Correct me if I'm wrong, but Every perfect square from 1-500 or every non perfect square from 501 to 1000. |
| Quote:So, the final solution is: all perfect squares less than 500 and all numbers greater than 500 that are not perfect squares. |
|
|
|
IP Logged |
"It's not that I'm correct, it's that you're just not correct, and so; I am right." - M.P.E.
|
|
|
temporary
Full Member
Posts: 255
|
|
Re: one thousand rooms
« Reply #14 on: Jan 27th, 2008, 7:49pm » |
Quote Modify
|
A comment with no comment, just quotes is not very informative, no offense. Anyway, so we both got the right answer?
|
|
IP Logged |
My goal is to find what my goal is, once I find what my goal is, my goal will be complete.
|
|
|
mikedagr8
Uberpuzzler
A rich man is one who is content; not wealthy.
Gender:
Posts: 1105
|
|
Re: one thousand rooms
« Reply #15 on: Jan 27th, 2008, 7:51pm » |
Quote Modify
|
on Jan 27th, 2008, 7:49pm, temporary wrote:A comment with no comment, just quotes is not very informative, no offense. Anyway, so we both got the right answer? |
| 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.
|
« Last Edit: Jan 27th, 2008, 8:15pm by mikedagr8 » |
IP Logged |
"It's not that I'm correct, it's that you're just not correct, and so; I am right." - M.P.E.
|
|
|
temporary
Full Member
Posts: 255
|
|
Re: one thousand rooms
« Reply #16 on: Jan 27th, 2008, 7:58pm » |
Quote Modify
|
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.
|
|
IP Logged |
My goal is to find what my goal is, once I find what my goal is, my goal will be complete.
|
|
|
|