|
|
| Is this hard and/or confusing? |
| Yes |
|
40% |
[ 2 ] |
| No |
|
60% |
[ 3 ] |
|
| Total Votes : 5 |
|
|
|
|
|
|
|
|
Posted: Tue Aug 21, 2007 6:42 pm
There are 1,000 lockers and the 1st student goes to open all of the lockers and the 2nd student closes all of them. The 3rd student goes to open all of the lockers with the multiples of 3, the 4th student goes to open all of the lockers with the multiples of 4 and so on. When the 1,000th student opens the last locker, how many lockers are open and how many are closed?
Please forgive me for this confusing question. sad
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Tue Aug 21, 2007 9:36 pm
Before i answer it, i need a little clarification. You say "the second student closes all of them." Is this an intentional deviation from the pattern, or just a typo?
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Fri Aug 24, 2007 5:25 pm
zz1000zz Before i answer it, i need a little clarification. You say "the second student closes all of them." Is this an intentional deviation from the pattern, or just a typo? It's an intentional deviation because after the 2nd student, no one will ever open up the #2 locker ever again.
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Sat Aug 25, 2007 1:10 pm
What about when two students try to open the same locker? Say, what happens when the 4th student gets to the 12th locker, which the 3rd student has already opened? Does he leave it open? Does he close it?
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Tue Sep 11, 2007 11:05 am
seichinoyami There are 1,000 lockers and the 1st student goes to open all of the lockers and the 2nd student closes all of them. The 3rd student goes to open all of the lockers with the multiples of 3, the 4th student goes to open all of the lockers with the multiples of 4 and so on. When the 1,000th student opens the last locker, how many lockers are open and how many are closed? Please forgive me for this confusing question. sad Well if no student closes lockers after the 2nd student, then the answer is simple. The number of lockers open is  where  is the total number of lockers. If students close lockers they find open, then it's slightly trickier. I've taped together an algorithm that shows us the number of open lockers will be  or  for even and  or  for odd  So for 1000 lockers, you have 499 open lockers. As for which function any specific value of  follows: Blah I can visualise the pattern of how the function alternates but I don't know how to express it mathematically. [edit]-Removed image. Damn pasting/deleting sk1||z
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Tue Sep 11, 2007 11:15 pm
If we assume that the students close lockers that they find open, the pattern (which ought to be simpler but isn't due to a change in the problem) is that for even n, locker n is open for n a square, and for odd n, if n is not a square. So if n is even and the last square was even (counting n) then f(n) = n/2 If n is even and the last square was odd, then f(n) = n/2-1 If n is odd and the last square was even, then f(n) = (n+1)/2 If n is odd and the last square was odd (counting n) then f(n) = (n-1)/2.
Personally, I think the original problem, where the second student closed only every other locker and students toggled the state of the lockers rather than just opening them, was more interesting.
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Wed Sep 12, 2007 6:58 am
Layra-chan Personally, I think the original problem, where the second student closed only every other locker and students toggled the state of the lockers rather than just opening them, was more interesting. Hmm, then I get a function  when  is in the interval  Again, not sure if that's how you mathematicians would express it. But you get a lovely graph
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Thu Sep 13, 2007 1:25 am
Morberticus Layra-chan Personally, I think the original problem, where the second student closed only every other locker and students toggled the state of the lockers rather than just opening them, was more interesting. Hmm, then I get a function  when  is in the interval  Again, not sure if that's how you mathematicians would express it. But you get a lovely graph  We usually say that it's the number of perfect squares less or equal to n. But that works too. The trick is to understand why it's all the perfect squares.
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Thu Sep 13, 2007 6:21 am
Layra-chan Morberticus Layra-chan Personally, I think the original problem, where the second student closed only every other locker and students toggled the state of the lockers rather than just opening them, was more interesting. Hmm, then I get a function  when  is in the interval  Again, not sure if that's how you mathematicians would express it. But you get a lovely graph  We usually say that it's the number of perfect squares less or equal to n. But that works too. The trick is to understand why it's all the perfect squares. Well my algorithm works by counting the factors of each locker postion. Lockers with an odd number of factors are opened (as they have an odd number of students fiddling with them). So if all these open lockers are perfect squares as you say, then one of the conditions of perfect squares must be that they (and only they) have an odd number of factors. Perhaps?
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Thu Sep 13, 2007 6:23 pm
Morberticus Layra-chan We usually say that it's the number of perfect squares less or equal to n. But that works too. The trick is to understand why it's all the perfect squares. Well my algorithm works by counting the factors of each locker postion. Lockers with an odd number of factors are opened (as they have an odd number of students fiddling with them). So if all these open lockers are perfect squares as you say, then one of the conditions of perfect squares must be that they (and only they) have an odd number of factors. Perhaps? Well, think of it this way: Take a number n. If d is a factor of n, then n/d is a factor of n. Thus we get two factors, and thus n has an even number of factors, unless there is some factor k such that n/k = k, i.e. n = k^2, in which case k doesn't have a distinct counterpart, and thus n = k^2 has an odd number of factors.
|
 |
 |
|
|
|
|
|
|
|
|
|
 |
|
|
|
|
|
|