Let's say there are 10 cars, each numbered 1 to 10. Each car travels at a speed equal to its index * 10mph. For example, car number 3 goes 30mph, and car 10 goes 100mph. Now, assume they are traveling in a single lane road and no passing is allowed. Each car still prefers to go at the speeds described above unless a slower car is ahead and forces the faster car to go at the speed of the slower car. So if car 3 is behind car 1, then they both travel at 10mph since car 3 cannot pass 1.
For any random distribution of cars, if someone looks at the road from above they will see different pockets of cars going together. For example, assume the cars are going in order: 5 (back), 3, 1, 7, 8, 10, 4, 2, 6, 9 (front). We have 4 pockets. 5, 3, 1 travel at 10mph. 7, 8, 10, 4, 2 travel at 20mph. 6 travels at 60mph and 9 is speeding ahead of everyone at 90mph.
Now, assume we have N cars and consider all random distributions.
Question 1) On average, how many pockets are formed?
Question 2) What's the average size of pocket?
In the example above, it's (3 + 5 + 1 + 1)/4 = 2.5
I'll reply with possible answers and also a funny story about this puzzle.