Numeric Investors LLC Interview Question: Suppose there is a series of ... | Glassdoor

Interview Question

Quantitative Research Analyst Interview Boston, MA

Suppose there is a series of 100 light bulbs labeled

  1 through 100 that all start in the off position. Person 1 walks in the room and turns on every light bulb. Person 2 walks in the room and flips the switch on every 2nd light bulb (i.e. he turns off all even numbered light bulbs). Person 3 walks in the room and flips the switch on every 3rd light bulb (turning some on and some off). This process continues until person 100 goes through and flips the switch on the 100th light bulb. Which light bulbs will be lit up at the end?
Answer

Interview Answer

1 Answer

9

For a light bulb to be left on, it must be flipped an odd number of times and in order to be flipped an odd number of times, it must have an odd number of factors. The only numbers that have an odd number of factors are the perfect squares so light bulbs 1,4,9,16,25,36,49,64,81,100 will be on.

Interview Candidate on Aug 4, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.