07-07-2022, 08:58 AM
|
#25
|
Powerplay Quarterback
|
I think we have a winner. GGG, I appreciate you walking through your thought process.
Here's the concise solution:
My comments on your solution in bold:
Quote:
Originally Posted by GGG
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
Yes, 1 is deliberately easy, but how you solve 1 affects how easy 2 is
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.
A good start, but I think the statement "at some point in time all of the ants will be facing the same direction" isn't necessarily true.
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.
I don't think it's guaranteed that you have 2 less ants after a collision causes two ants to return to their original position.
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.
These are great steps! Reduce the problem to a more manageable size so that you can see what is going on.
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.
I used "maximum" in the problem wording deliberately so that I don't reveal that the time taken is the same regardless. That would be too much of a hint.
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.
And this is the elegant solution. Congrats on getting to it!
|
|
|
|