n people and capacity 3
A recurrence for a bridge for two, a search for a wider one
For a bridge for two, Rote's recurrence works for any number of people: sort the times and keep moving the two slowest in the cheaper way. The table on the left shows every step. The count takes only a handful of operations even for a thousand people.
If the bridge holds three, no simple formula is in sight, and the page searches for the shortest path in the graph of states. For 1, 2, 5, 10 the answer is 13 minutes: 1, 5 and 10 go together (10), 1 comes back (1), 1 and 2 cross (2). Same idea: the slow walkers hide their minutes in one crossing.