This question already has an answer here:

We have a 1 dimensional street (straight) where people can either walk left or right. They all walk with the same speed. If two people meet they instantly change their direction (without loss of speed). It takes 10 minutes to walk the entire street with this speed. The people can start at anny point on the street. How long will it take until they are all out of the street?

It seems that the answer depends on the starting configuration, but the question implies there is a universal answer. Annyone an idea?


marked as duplicate by Ross Millikan, Community May 9 at 13:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Hint: think about worst case scenario for 2 people $\endgroup$ – Elad May 9 at 13:47
  • 2
    $\begingroup$ Hint: imagine all the people are identical. $\endgroup$ – Michael Lugo May 9 at 13:48
  • $\begingroup$ I tried both but what does the 2 people scenario say about the 20 case. And if all people are identical it depends on their starting position right? $\endgroup$ – Keep_On_Cruising May 9 at 13:52
  • $\begingroup$ Possible duplicate of Interesting Question on Ants This is usually asked about ants on a stick. $\endgroup$ – Ross Millikan May 9 at 13:54

Give each person a hat, and instruct them to swap hats with everyone they meet. Each hat will then move in a straight line at constant speed. Therefore each hat will reach the end of the street in at most ten minutes.


Not the answer you're looking for? Browse other questions tagged or ask your own question.