Is this cycling problem computable? We have a group of $n$ people who must make a journey of length $d$. They are to start together, and their goal is to arrive at the destination at same time. They have a single bicycle, which they ride in turns. Each time a rider dismounts he leaves the bike by the side of the road, and walks on, while one of the other ones eventually arrives at the bike and jumps on it (if a group member sees the bike by the road, she can use the bike, but doesn't have to).
Group member $i$ has constant walking speed $w_i\in\mathbb{Q}$ and constant bicycling speed $b_i\in\mathbb{Q}$ such that $b_i \geq w_i$.
Is there an algorithm that takes $n$, $d$, $(w_i)_{i\in\{1,\ldots,n\}}$ and $(b_i)_{i\in\{1,\ldots,n\}}$ and decides whether it is possible that the $n$ people reach the destination at the same time?
 A: I assume that moving backwards or stopping is forbidden, otherwise the answer is "Yes." for trivial reasons.
Clearly, the time it takes the $i$-th person to reach the end of the track depends only on the 
distance $l_i$ that $i$-th person has spent riding the bike. Moreover, this time is 
$t_i := \dfrac{l_i}{b_i} + \dfrac{d - l_i}{w_i}$. Now, total distance travelled on the bike
does not exceed $d$ (because the bike always moves forward), therefore 
$l_1 + l_2 + \ldots + l_n \leqslant d$. 
On the other hand, it is possible to make $l_i$ arbitrary as long as $0 \leqslant l_i \mbox { for } i = 1, 2, \ldots, n$ and
$l_1 + l_2 + \ldots + l_n \leqslant d$ — first person spends first $l_i$ kilometers
on the bike then drops it and walks for the rest of journey; second person walks for the first $l_1$ kilometers, 
spends second $l_2$ kilometers on the bike, then drops it; et cetera.
So there is a solution to the problem if and only if the following system of linear equations and inequalities over $l_1, l_2, \ldots, l_n$ is satisfiable:
\begin{cases}
\dfrac{l_i}{b_i} + \dfrac{d - l_i}{w_i} = \dfrac{l_1}{b_1} + \dfrac{d - l_1}{w_1} \mbox{ for } i = 1, 2, \ldots, n \\
0 \leqslant l_i \mbox{ for } i = 1, 2, \ldots, n \\ l_1 + l_2 + \ldots + l_n \leqslant d
\end{cases}
This is linear programming problem, therefore it is computable
(even in P, actually). 
