 In the 18th century, the people of Koenigsberg-Prussia, now Koenigrad-Russia, had a problem. A number of bridges spanned the river, connecting different parts of the city. The problem was, could you find a path crossing all seven bridges exactly once? No, you can't swim across the river. This brings us to the most prolific mathematician in history, Leonard Euler, who published more than 800 books and papers. He, in fact, wrote so many that about 300 of these were published after his death. Euler investigated the problem and created a new area of mathematics known as graph theory. So, while you might have seen graphs before, maybe they look like this, or this, or this, the graphs we're talking about look completely different. And an important idea to remember in mathematics and life is that there are only so many words we have to recycle. So, a graph consists of vertices, some of which are connected by edges. For example, we might have something like this where the vertices of the points and the edges are the lines between some of the points, usually. One way to measure the importance of a topic is the number of different terms for its basic object. So, in graph theory, a graph might be called a web. Vertices are also known as nodes or points or actors. And edges are also known as links. And, in fact, there are other terms, but these are probably the most common. The problem is that graph theory is so useful that many different people have come up with the basic ideas. And so a computer scientist might talk about a web with nodes and links. Well, a mathematician might talk about a graph with vertices and edges. And a sociologist might talk about a circle of friends with actors and links. Since you might run into the ideas of graph theory in other contexts, we'll try to be inconsistent. So, you'll get used to seeing the different types of notation for the same object. So, Euler answered the Königsberg bridge problem with a no it's not possible to cross all the bridges exactly once. Now, Euler's solution is very different from the modern approach, though it contains the basic ideas. So, to begin with, since it doesn't matter where on the land masses you are, we can, and Euler did, treat them as points. The bridges then become edges joining the nodes. And this produces a graph with four points, A, B, C, and D, and a number of edges. So, in modern graph theory, we introduce the following idea. The degree of A node is the number of edges that meet it. For example, let's try to find the degree of all the nodes of the graph shown. So, we see that A has two edges coming into it, this one, and this one. So, A has degree two, B has three edges coming into it. So, B has degree three, and we can find the degree of C, D, and E. Or, let's take a look at the graph corresponding to the Königsberg bridge problems in the graph shown. We see node A has degree five, and node B, C, and D have degree three. In modern graph theory, A path is a walk that doesn't reuse edges. A circuit is a path that returns to its starting point. The problem posed by the people of Königsberg is to find a path that crosses all the edges. And this type of path is now called an Euler path. Incidentally, many modern descriptions of the Königsberg problem make it into a circuit, an Euler circuit. Euler proved a result we would state as follows. If a graph has any nodes of an odd degree, they must be the beginning or the end of any Euler path. Since the Königsberg bridge problem has four nodes of an odd degree, we can make one of them the beginning, a second the end, but then we'll have two nodes that can't be placed. We can't have two beginnings or two endings to an Euler path, and this means it's impossible to complete an Euler path. So let's take a look at this graph and see if an Euler path is possible, and if it is, where must it begin and end? So the nodes of odd degree are important, so let's find them. And if we look at the graph, we see there are four nodes of odd degree, and so an Euler path is impossible. What if we have this graph? So let's look for our nodes of odd degree, and here there's only two. So if there is an Euler path, it must begin at one of the nodes of odd degree, and maybe this one, and end at the other, this one.