How many wagons would you need to create a route network in the board game *Ticket to Ride – Europe* so that every city is connected to every other city through the network? If you could do this you could potentially earn every destination ticket in the game.

To answer this question, we first need to make a graph out of the *Ticket to Ride – Europe* map. We need to represent each city by a vertex, and we need to represent each city-to-city route by an arc with weight equal to the number of wagons it takes to claim that particular route. Then the question entails finding a minimum spanning tree that connects all the vertices in this graph. The total weight of the minimum spanning tree will be the answer to our question.

Fortunately, there are some fast algorithms for finding minimum spanning trees, and some of them are simple enough that we can easily perform them by hand. For this post we’ll use Prim’s algorithm, which involves the following steps:

- Start at any vertex to initialize the tree.
- Select a minimum-weight arc that is not in the tree but that connects a vertex in the tree with one not in the tree. Add that arc and the new vertex to the tree.
- Repeat Step 2 until all vertices are in the tree.

Edinburgh is a logical city in which to start, since from there the only choice for arc is the 4-wagon route to London. Add London and the route from Edinburgh to London to our tree.

Now, there are two minimum-weight arcs out of Edinburgh or London to new cities. These are the two-wagon routes from London to Amsterdam and from London to Dieppe. It actually doesn’t matter which one we pick; the proof of correctness for Prim’s algorithm tells us that either would lead to a minimum spanning tree, even if we don’t eventually choose the other route for our tree. Let’s take alphabetical order as the tiebreaker and choose the London to Amsterdam route for two wagons.

In the next iteration the shortest route available to us isn’t the two-wagon route from London to Dieppe; it’s the one-wagon route from Amsterdam to Bruxelles. So we must take that one.

Next iteration: There are multiple two-wagon routes available now: London to Dieppe, Bruxelles to Dieppe, Bruxelles to Paris, Bruxelles to Frankfurt, and Amsterdam to Frankfurt. Alphabetical order for the new city gives us Dieppe, and alphabetical order again would select Bruxelles over London as the city to connect Dieppe to. (Again, any of these choices would give us a minimum spanning tree at the end, so all we need is *some* tiebreaker criterion.)

Next choice is Dieppe to Paris for one wagon.

In the next iteration there are multiple two-wagon routes available again: Dieppe to Brest, Bruxelles to Frankfurt, and Amsterdam to Frankfurt. We do not include the London-to-Dieppe route or the Bruxelles-to-Paris route because we only consider arcs from cities already in our tree to new cities. Alphabetical order as the tiebreaker criterion means we select Dieppe to Brest as our new arc.

From here, I’ll just list the remaining arcs that are added, in order of selection (again using our alphabetical order tiebreaker). For completeness I’ll include the arcs and vertices we’ve already selected.

- Edinburgh (start)
- Edinburgh to London (4 wagons)
- London to Amsterdam (2)
- Amsterdam to Bruxelles (1)
- Bruxelles to Dieppe (2)
- Dieppe to Paris (1)
- Dieppe to Brest (2)
- Amsterdam to Frankfurt (2)
- Frankfurt to Essen (2)
- Essen to Berlin (2)
- Frankfurt to Munchen (2)
- Munchen to Venezia (2)
- Venezia to Roma (2)
- Roma to Brindisi (2)
- Venezia to Zagrab (2)
- Zagrab to Budapest (2)
- Budapest to Wien (1)
- Munchen to Zurich (2)
- Zurich to Marseille (2)
- Essen to Kobenhavn (3)
- Brindisi to Palermo (3)
- Budapest to Sarajevo (3)
- Sarajevo to Sofia (2)
- Sofia to Bucuresti (2)
- Sofia to Athina (3)
- Athina to Smyrna (2)
- Smyrna to Constantinople (2)
- Constantinople to Angora (2)
- Angora to Erzurum (3)
- Erzurum to Sochi (3)
- Sochi to Rostov (2)
- Rostov to Kharkov (2)
- Sochi to Sevastopol (2)
- Kobenhavn to Stockholm (3)
- Marseille to Barcelona (4)
- Barcelona to Madrid (2)
- Barcelona to Pamplona (2)
- Madrid to Cadiz (3)
- Cadiz to Lisbon (2)
- Berlin to Danzig (4)
- Danzig to Warszawa (2)
- Danzig to Riga (3)
- Warszawa to Wilno (3)
- Wilno to Kyiv (2)
- Kyiv to Smolensk (3)
- Smolensk to Moskva (2)
- Moskva to Petrograd (4)

This gives us a total of 108 required wagons. Since you only have 45 wagons you can play in a game of *Ticket to Ride – Europe*, you can’t get anywhere close to connecting all of the cities in this game. Even two complete sets (i.e., 90 wagons) wouldn’t be enough. (We haven’t considered stations in this analysis, but even if you play all three of your stations to substitute for the three four-wagon routes required in the minimum spanning tree, you still need 96 wagons to complete the rest of the tree.)

So, even if it were possible in the game to hold all the destination tickets, you cannot actually earn them all. (That should not surprise anyone who has played *Ticket to Ride – Europe*, I imagine.) What may be a bit more surprising is what our answer of 108 implies about just how far from possible it is to earn every destination ticket.

A couple of fun observations: (1) At one point Zagrab actually wins the alphabetical order criterion! This is because the alternative choice is Zurich. (2) For quite a long time after selecting Edinburgh to London we can avoid choosing a route that requires more than two wagons. This is because many of the cities in northwestern and central Europe on the map are connected by only one- or two-wagon routes.