Set theory is, alas, going to need to take a break. I left my books on the train on friday. $200 worth of textbooks down the tubes, unless one of the conductors happened to hang on to them. At least I've got a pre-order already placed for a copy of the new addition of Ferreirós book; between that, and a new copy of Quine, I should be OK. But in the meantime, we'll look at something else. Since I mentioned graph theory on friday, and I've been promising forever to write about it, I figured this is a good time.
My favorite introduction to graph theory is stolen from one of my grad school professors. It's the first major use of what became graph theory, which is a proof by Euler.
Here's the problem. Back in the 18th century, Euler lived in the city of Königsberg in Prussia. Königsberg is a city built around a fork in a river: it's got parts of the city on the banks of the river, and parts on two islands. To get around
the city, there were seven bridges connecting the parts of the city. Is it possible to
take a trip through the city of Königsberg, crossing each bridge exactly once? More generally, given a city like Königsberg, how can you figure out whether it's possible to tour the city crossing each bridge exactly once?
Over to the right is a schematic map of Königsberg when Euler lived there. For Königsberg, you can show that it's impossible, by exhaustively listing all paths. It's a lot of possible paths, but not so many as to make it effectively impossible. But there's a better way of figuring it out. It's a property of the
structure of the city and how the graphs connect different parts of the city. And that's the key to the problem: analyzing the structure. And the structure is a graph.
For this problem, you can look at the city as a simple structure. Each land-mass - the two banks, and the two islands - can be viewed as points (vertices). Each of the bridges are lines (edges) connecting the points - like in the image to the right. The question becomes: given a collection of vertices connected by edges, when is it possible to cross every edge exactly once? If there's a way to do it, then the path is called an Eulerian path. If there's a way to do it so that the Eulerian path ends at the same vertex as where it started, then the path is called an Eulerian cycle, and the graph is called an Eulerian graph.
The answer to this problem is, as I said, in the structure of the graph.
If we want an Eulerian path, then we can easily show that there is an
Eulerian cycle if and only if the graph has the property that you can partition its edges into a collection of disjoint loops (cycles). Look at the graph of Königsberg above: you can form cycles with 1/3 and 2/4, or 3/5/6 and 2/4, or 1/2/7/6, or... But you can't partition all of the edges into disjoint cycles.
Studying graph structure using some combinatoric techniques, you can show the more general result about Eulerian paths: if every vertex in the graph has an even number of edges, or it has exactly two vertices with an odd number of edges, then
the graph has an Eulerian path. Again, look at the example: there are three nodes with 3 edges, and one node with 5 edges. So there are 4 nodes with odd numbers of edges. Therefore, there is no way to make an Eulerian path through Königsberg.
How many bridges would you need to add to make a graph with an Eulerian path? You need to make two of the four nodes have even numbers of edges. We can do that by adding one edge. For example, if you add an edge from A to D, then you have one node with 5 edges, one with three edges, and two with four edges.