Yesterday I traveled from one end station to the other underground. The journey took 17 minutes and during this time, I encountered 5 oncoming trains.

What can we say about the headway of the trains, if we know that the trains are dispatched at equal intervals?
Let's assume that not only the train we are traveling on has a total travel time of 17 minutes, but all the others do as well. Consider that we departed from the terminal station exactly at 12:00. The first train we encountered would have had to depart 11:43 minutes after we started, otherwise it would have already arrived at the terminal station before our departure. The last train we encountered would have had to depart 17 minutes before 12:00. We met all the trains that departed between 11:43 and 12:17 somewhere along the way, so within this 34-minute period, exactly 5 trains were dispatched.

What could the dispatch interval be if 5 trains were dispatched within 34 minutes? It cannot be more than $34 / 4$ minutes $=8^{\mathrm{m}} 30^{\mathrm{s}}$, because otherwise the time between the first and the fifth dispatch would exceed $\left(8^{\mathrm{m}} 30^{\mathrm{s}}\right) \cdot 4=34$ minutes. But even $8^{\mathrm{m}} 30^{\mathrm{s}}$ is only possible if the first train we encountered stopped exactly at the moment of our departure, and the fifth train started exactly at the moment of our arrival.

Similarly, the time between the "zeroth" dispatch preceding the first train we encountered and the sixth dispatch must be more than 34 minutes, so the trains are definitely dispatched less frequently than $34 / 6$ minutes $=5^{\mathrm{m}} 40^{\mathrm{s}}$.

In summary, the interval between trains is definitely more than $5^{\mathrm{m}} 40^{\mathrm{s}}$, but no more than $8^{\mathrm{m}} 30^{\mathrm{s}}$. Within these limits, any dispatch interval in the schedule for that part of the day could result in us encountering exactly 5 oncoming trains.

Note. We can precisely determine the dispatch interval if we assume that the trains do not wait at the terminal stations. In this case, the entire service is handled by six trains: the five we saw and the one we traveled on. A complete round trip for each train takes 34 minutes, during which all six trains are dispatched from one terminal station, so the dispatch interval is exactly $34 / 6$ minutes $=5^{\mathrm{m}} 40^{\mathrm{s}}$.