Welcome to Gaia! ::

The Physics and Mathematics Guild

Back to Guilds

 

Tags: physics, mathematics, science, universe 

Reply Mathematics
Problem solving question

Quick Reply

Enter both words below, separated by a space:

Can't read the text? Click here

Submit

Is this hard and/or confusing?
  Yes
  No
View Results

seichinoyami

PostPosted: 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
PostPosted: 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?

zz1000zz


seichinoyami

PostPosted: 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.
PostPosted: 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?

Layra-chan
Crew


Morberticus

PostPosted: 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

User Image - Blocked by "Display Image" Settings. Click to show.

where User Image - Blocked by "Display Image" Settings. Click to show. 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

User Image - Blocked by "Display Image" Settings. Click to show.
or
User Image - Blocked by "Display Image" Settings. Click to show.

for even User Image - Blocked by "Display Image" Settings. Click to show.

and

User Image - Blocked by "Display Image" Settings. Click to show.
or
User Image - Blocked by "Display Image" Settings. Click to show.

for odd User Image - Blocked by "Display Image" Settings. Click to show.

So for 1000 lockers, you have 499 open lockers.

As for which function any specific value of User Image - Blocked by "Display Image" Settings. Click to show. 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
PostPosted: 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.

Layra-chan
Crew


Morberticus

PostPosted: 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

User Image - Blocked by "Display Image" Settings. Click to show.

when User Image - Blocked by "Display Image" Settings. Click to show. is in the interval

User Image - Blocked by "Display Image" Settings. Click to show.

Again, not sure if that's how you mathematicians would express it.

But you get a lovely graph

User Image - Blocked by "Display Image" Settings. Click to show.
PostPosted: 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

User Image - Blocked by "Display Image" Settings. Click to show.

when User Image - Blocked by "Display Image" Settings. Click to show. is in the interval

User Image - Blocked by "Display Image" Settings. Click to show.

Again, not sure if that's how you mathematicians would express it.

But you get a lovely graph

User Image - Blocked by "Display Image" Settings. Click to show.


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.

Layra-chan
Crew


Morberticus

PostPosted: 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

User Image - Blocked by "Display Image" Settings. Click to show.

when User Image - Blocked by "Display Image" Settings. Click to show. is in the interval

User Image - Blocked by "Display Image" Settings. Click to show.

Again, not sure if that's how you mathematicians would express it.

But you get a lovely graph

User Image - Blocked by "Display Image" Settings. Click to show.


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?
PostPosted: 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.

Layra-chan
Crew

Reply
Mathematics

 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum