1. since this thread has started .... a little puzzle from my side

problem: you have 100 doors in a row that are all initially closed. you make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the second time you only visit every 2nd door (door #2, #4, #6). the third time, every 3rd door (door #3, #6, #9), etc, until you only visit the 100th door.
question: what state are the doors in after the last pass? which are open which are closed?

reps for anyone who gets it absolutely correct first

Ats

PS: if anyone knows the solution before hand .. plzz donot tell

2. 1st open rest closed :-s ???

3. nopes ... think a bit harder ... its mathematical .. no tricks involved

4. For getting the last state of door number 'N'. Apply the following algo...

1. Represent N in its factors including 1. e.g. 10 = 1*2*5, 21 = 1*3*7
2. Count the number of factors 'X'. e.g. 10's X = 3, 21's X = 3

If X == ODD, Door state = OPEN
if X == EVEN, Door state = CLOSE

5. Originally Posted by amit82cse
For getting the last state of door number 'N'. Apply the following algo...

1. Represent N in its factors including 1. e.g. 10 = 1*2*5, 21 = 1*3*7
2. Count the number of factors 'X'. e.g. 10's X = 3, 21's X = 3

If X == ODD, Door state = OPEN
if X == EVEN, Door state = CLOSE

if 'X' is equal for 10 (even) and 21 (odd) .. how do you conclude that when X is odd door is open and when X is even door is closed ????

your answer is not right but you are on the right track ..... i'll give you a hint ..

number of factors of 10: 1, 2, 5, 10 (he will visit #10 for #10, #20, #30 ..... ) == 4

number of factors of 21: 1, 3, 7, 21 (he will visit #21 for #21, #42, #63 ..... ) == 4

now proceed ... i have told you enough

ats

6. Boss, X represents the NUMBER OF FACTORS so for 10 its 1*2*5 = 3, it means that (s)he will visit the door for numbers #1, #2, #5 and then in last #10, i can not make 10 = 1*2*5*10.

And hence keep altering the doors till you last visit.

7. ok ... i got what u are saying ... still .. its too general an answer .... u have to give me a specific answer as to which doors will be open and which will be closed .... in other words .. for what numbers the X is odd and for what numbers it is even

8. mere main itna dimaag nahi hai :help :

9. will someone plz post an esy way and precise answer lol

10. The solution:

you can figure out that for any given door, say door #42, you will visit it for every divisor it has. so 42 has 1 & 42, 2 & 21, 3 & 14, 6 & 7. so on pass 1 i will open the door, pass 2 i will close it, pass 3 open, pass 6 close, pass 7 open, pass 14 close, pass 21 open, pass 42 close. for every pair of divisors the door will just end up back in its initial state. so you might think that every door will end up closed? well what about door #9. 9 has the divisors 1 & 9, 3 & 3. but 3 is repeated because 9 is a perfect square, so you will only visit door #9, on pass 1, 3, and 9... leaving it open at the end. only perfect square doors will be open at the end.

Cheers

Ats

11. hey i knew that one -perfect squares
ats 100 points for u
and everyone is welcome to post any riddles they might have

12. On each line place a three letter word which can be attached to the end of the word to the left and to the beginning of the word to the right to give two other words.

FORE (...) PAGE

FOND (...) HEM

13. foresee - seepage
fondant - anthem

14. sahi jawab

next one-
why cant micheal schumacher do any good for his motherland?

15. you want a serious answer ? or som kinda fun ????

Page 4 of 5 First ... 2345 Last

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Single Sign On provided by vBSSO