I'm going to ask a very simple practical question, but I believe it has some interesting mathematical properties.
The simple variant is: trains depart every $x$ minutes and take $y$ minutes to arrive at the destination. How long should a rider expect his journey to take (waiting plus travel)?
The more complex variant is: $n$ train lines service the stop. Each of the $i \in \{1, 2, ... n\}$ lines has trains departing every $x_{i}$ minutes and takes $y_{i}$ minutes to arrive at the destination. Assume arrival times are uncorrelated and random across lines. If the rider takes the first train on any line, what is the expected journey time?
The final, most complex variant: it may be the case that taking the first train on any line is not optimal. (For example, if one of the train lines takes $y_{j} = 30$ minutes to arrive at the next stop while others take 20 minutes, and the waiting times are such that it doesn't make sense to take the slower train anyway.) Unfortunately I'm at a total loss for how to compute this, practically speaking. Mathematically it's minimizing the expectation over all subsets of $\{1, 2, ... n\}$, but I need to actually compute it so any tips would be helpful. This is more of a CS question so perhaps I'll cross-post to another site.