07-06-2022, 09:09 PM
|
#24
|
Franchise Player
Join Date: Aug 2008
Location: California
|
Quote:
Originally Posted by psyang
Ok, another puzzle.
You have a meter stick placed so that the 0cm marker is on the left, and the 100cm marker is on the right.
99 ants are placed on every cm marker from 1 to 99.
The ant at cm 1 is facing to the right. The ant at cm 99 is facing left.
For the 97 ants in between, a coin is flipped to determine if that ant is facing left or right: heads, the ant faces left, tails the ant faces right.
Ants only walk in a straight line at 1cm/s in the direction they are heading. If an ant bumps into another ant, both ants immediately turn around and start walking in the opposite direction.
If an ant walks to either end of the meter stick, it falls off.
1) Prove that, eventually, all ants will fall off?
2) What is the maximum time it will take for all ants to fall off?
|
Spoiler!
1 is easy an end ant will either colide turn around and walk off or continue to walk off the other side and each ant will eventually become an end ant
My gut feel for 2 is that the answer should be 99 or 100 seconds as at some point in time all of the ants will be facing the same direction so the maximum distance the first any can travel is 99 and a colliding ant can travel is all the way the other way. So .5 seconds to create a collision and 98.5 seconds back off the other side. That leaves the collisions in middle but I don’t think they matter as they will resolve themselves faster than the time it takes for mr 98.5. And any colloidions with 98.5 will occur before it gets to half way. So I think 99 is correct But I can’t prove the internal collisions don’t matter.
Thinking about collisions further each ant hitting another ant will be deflected and each other returning to its original position and will take 1 second so you have in the opposite order with 2 less ants. Then it would take 49 seconds to eliminate ants + 50 seconds to walk off. I think this is correct so the general solution is (N-1) seconds for eliminating / sorting ants and then (N+1)/2 to walk off in whatever direction so N seconds where N is the number of ants
So if we have a 4cm/3ants. 1R 2L 3L you get 1 second and you have 1L 2L 2R and then everyone falls off in 2 seconds. 3 seconds total.
With 5 we have 8 scenarios to look at 1R 2L 3L 4L 5L and 1R 2L 3R 4L 5L and 1R 2L 3R 4R 5L and 1R 2L 3L 4R 5L but half are symmetrical.
With 1 you have after 1 second 1L 2R 2L 3L 4L after 2 seconds 1L, 2L, 3R,3L after 3 seconds you have 1L, 2L, 4R and in two more seconds everyone dies for 5.
The second case after 1 second 1L, 2R, 3L, 4L, 5R after 2 seconds 2L, 3R,3L after 3 seconds you have 1L, 2L 4R and death in 5 tot
The 3rd you have 1L, 2R, 4R,4L, 5R then 3R,3L, 5R and 3 seconds to death.
Pretty sure I’m right
Each collision sets two ants on their final death path and these collisions occur every second. The maximum distance is being in the Center.
Also I think maximum is the wrong word I believe in all conditions it will take N seconds to clear the ruler provided the two outer ants face in. Without that condition there would be an N/2 seconds case.
And there’s an easier way, collisions don’t occur the ants just walking past is indistinguishable from a deflection. You can see 1R and 5L walk through every time.
Last edited by GGG; 07-06-2022 at 09:12 PM.
|
|
|