Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

There are 100 windows, all closed initially. Then comes the 1st person and opens all the windows that are multiples of 1. Then comes the second person and flips the state of all the windows (opens the closed windows and closes the open ones) for all the windows that are a multiple of 2. Then comes the third person and this process i repeated for 100 persons. Tell me the number of windows which will remain opened in the end and their numbers (e.g. 5 windows, no. 6, 8, 12, 45 and 77).

My sincerest apologies if this question has been asked already.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

At the end, only the square windows will be open, the rest will be closed.

So the open ones are 1, 4, 9, 16, 25, 36, 49, 64, 81, 100.

The reason is that primes will all be closed, as they start open and are only divisible by themselves and 1, so they close.

Of the remaining nonprimes, only the squares have an odd number of divisors, every other nonprime is divisible by 1 and itself, to close it, and also by at least 2 other numbers, since to be divisible by another number means that number must by multiplied by yet another number, hence divisors are always in pairs with the exception of squares, which are multiplied by themselves. Thus only squares have odd number of divisors and only they end up open in the end.

Link to comment
Share on other sites

  • 0

Whether a window will be open or closed depends on the number of times the locker is accessed. If assessed odd number of times, it will be open,i.e., odd number of factors and vice versa.

1=1

2=1,2

3=1,3

4=1,4,2

5=1,5

6=1,2,3,6

7=1,7

8=1,2,4,8

9=1,3,9

10=1,2,5,10..........................

From this we see that, perfect squares are having odd number of factors. Thus, the answer is:

10 windows: 1,4,9,16,25,36,49,64,81,100

the reason for this observation is that if we consider a composite number then the number of factors is even bcoz the factors are always in pairs. But, in perfect squares, all factors are in pairs but, as in case of 25: 1,5,25: 1 and 25 are in pair and 5 and 5 are in pair, but the second pair represents just one quantity, 5.

Link to comment
Share on other sites

  • 0

I am still trying to prove the solution and generalise it for any no. of windows. Anybody, any idea?

What more generalization do you need apart from the fact that windows having their numbers as full squares will be part of the solution?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...