Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2008-03-31 01:43:13

chetah
Member
Registered: 2008-02-15
Posts: 32

Discrete Math

Ten students enter a locker room that contains 10 lockers.  The first student opens all the lockers.  The second student changes the status (from close to open or vice versa) of every other locker, starting with the second locker.  The third student then changes the status of every third locker.  In general, 1<k<=10, the kth student changes the status of every kth locker.  After the tenth student has gone through the lockers, which lockers are left open?

My solution is lockers 1, 4 and 9.

Offline

#2 2008-03-31 02:31:28

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Discrete Math

Your solution is correct.

The lockers that are open after all students have finished are the ones that have been changed an odd number of times. The number of times a locker is changed is equal to the number of factors that the locker's number has.

Hence, the lockers that finish open are the ones with an odd number of factors.
(Otherwise known as the square numbers)


Why did the vector cross the road?
It wanted to be normal.

Offline

Board footer

Powered by FluxBB