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?