Serving the Quantitative Finance Community

 
User avatar
frenchX
Topic Author
Posts: 11
Joined: March 29th, 2010, 6:54 pm

Windows problem

December 12th, 2010, 9:09 am

Here a small brainteaser I found on the Net. There are 100 closed windows and 100 people. The first person opens every window. The second person closes every 2nd window. The third person visits every 3rd window; if the window is closed, he opens it; if it is open, he closes it. So on and so forth. After the 100th person, how many windows are open?Additionnal question find a formula for N windows with N people
Last edited by frenchX on December 11th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
ruairih
Posts: 0
Joined: April 27th, 2008, 9:58 am

Windows problem

December 12th, 2010, 10:39 pm

The pattern is of perfect squares (even number of factors). eg 4, 9, 16 etc
Last edited by ruairih on December 11th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
DevonFangs
Posts: 0
Joined: November 9th, 2009, 1:49 pm

Windows problem

December 14th, 2010, 11:08 am

It sounds right. For every number you have to take the divisors, but only with square numbers you are sure that 2 people visit every window.So the answer is: the number of perfect squares lower than N (so the floor of \sqrt{N})
 
User avatar
anilmag
Posts: 0
Joined: May 13th, 2010, 11:30 am

Windows problem

April 12th, 2011, 1:33 pm

You missed window #1 in your answer. Plus those windows which are open has odd number of factors, e.g., 1 (1), 4 (1 2 4), 9 (1 3 9), 16 (1 2 4 8 16), ... so that they would be open at the end (they were closed to start with)
 
User avatar
animeshsaxena
Posts: 18
Joined: June 19th, 2008, 2:56 pm

Windows problem

April 13th, 2011, 2:27 pm

10 windows closed...as per divisors...logic 90 windows open
Last edited by animeshsaxena on April 12th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
anilmag
Posts: 0
Joined: May 13th, 2010, 11:30 am

Windows problem

April 13th, 2011, 2:51 pm

QuoteOriginally posted by: animeshsaxena10 windows closed...as per divisors...logic 90 windows openNope, 10 windows open, 90 windows closed. Think of Window #1, only the 1st person 'touches' this window and opens it, so it would be open at the end (it was closed to start with).
 
User avatar
Cuchulainn
Posts: 22928
Joined: July 16th, 2004, 7:38 am

Re: Windows problem

March 26th, 2025, 12:34 pm

Apology over inside-out windows on tower blocks

https://www.bbc.com/news/articles/cgm107x2wexo

They are obviously not members of this forum.