königsberg bridge problem

24
Salvador Sanabria History of Mathematics Königsberg Bridge Problem

Upload: others

Post on 16-Mar-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

Salvador Sanabria History of Mathematics

Königsberg Bridge Problem

2

The Problem of the Königsberg Bridge There is a famous story from Konigsberg. The city of Konigsberg,

Northern Germany has a significant role in Euler’s life and in the history of graph

theory.

The River Pregel flowed through Konigsberg, separating it into four land

areas. Seven bridges were built over the river that allowed the citizens of

Konigsberg to travel between these land areas. Back in the 17th century the

citizen of Konigsberg enjoyed going for a walk near the river. Some citizens

wondered whether it was possible to go for a walk in Konigsberg and pass over

each bridge exactly once. This became known as the Konigsberg Bridge

Problem. Evidently this problem was unsolved for some time and became well-

known throughout the region. This problem eventually came to the attention of

Euler (who was believed to be at St. Petersburg at the time). Euler observed that

this situation could be represented in some type of diagram [5].

3

Fig. 1.2

Konigsberg was founded in 1255 and was the capital of German East

Prussia. The Prussian Royal Castle was located in Konigsberg, but it was

destroyed during World War II, as was much of the city. Because of the outcome

of the war, it was decided at the Potsdam Conference in 1945 that a region

located between Poland and Lithuania, containing the city of Konigsberg, should

be made part of Russia. In 1946, Konigsberg was renamed Kaliningrad after

Mikhail Kalinin, the formal leader of the Soviet Union during 1919-1946. After the

fall of the USSR, Lithuania and other former Soviet republics became

4

independent, and Kaliningrad was no longer part of Russia. None of the attempts

to change its name back to Konigsberg have been successful [1].

Return now to Koningsberg Bridge Problem, where there were many

failed attempts of the citizens in traversing the bridges exactly once. It was not

until 1736 that the problem was treated from a mathematical point of view and

the impossibility of finding such a route was proved. In that year, one of the

leading mathematicians of the time, Leonard Euler, wrote an article in which he

not only dealt with this particular problem, but also gave a general method for

other problems of the same type [5]. His article is of great importance, both for

graph theory and for the development of mathematics as a whole. Euler’s article,

Solutio Problematis Ad Goemetriam Situs Pertinetis, is translated as:

The Solution of a problem relating to the geometry of position*

1. In addition to that branch of geometry which is concerned with magnitudes, and which has always received the greatest attention, there is another branch, previously almost unknown, which Leibniz first mentioned, calling it the geometry of position. This branch is concerned only with the determination of the proposition and its properties; it does not involve measurements, nor calculations made with them. It has not

5

yet been satisfactorily determined what kind of problems are relevant to this geometry of position, or what methods should be used in solving them. Hence, a problem was recently mentioned, which seemed geometrical but was so constructed that it did not require the measurement of distances, nor did calculation help at all, I had no doubt that it was concerned with the geometry of position—especially as its solution involved only position, and no calculation was of any use. I have therefore decided to give here the method, which I have found for solving this kind of problem, as an example of the geometry of position.

2. The problem, which I am told is widely known, is as follows: in

Konigsberg in Prussia, there is an island A, called the Kneiphof; the river which surrounds it is divided into two branches, as can be seen in Fig. [1.2],, and these branches are crossed by seven bridges, a, b, c, d, e, f and g. Concerning these bridges, it was asked whether anyone could arrange a route in such a way that he would cross each bridge once and only once. I was told that some people asserted that this was impossible, while others were in doubt; but nobody would actually assert that it could be done. From this, I have formulated the general problem: whatever be the arrangement and division of the river into branches, and however many bridges there be, can one find out whether or not it is possible to cross each bridge exactly once?

3. As far as the problem of the seven bridges of Konigsberg is concerned, it

can be solved by making an exhaustive list of all possible routes, and then finding whether or not any route satisfies the conditions of the problem. Because of the number of possibilities, this method of solution would be too difficult and laborious, and in other problems with more bridges it would be impossible. Moreover, if this method is followed to its conclusion, many irrelevant routes will be found, which is the reason for

6

the difficulty of this method. Hence I rejected it, and looked for another method concerned only with the problem of whether or not the specified route could be found; I considered that such a method would be much simpler.

4. My whole method relies on the particularly convenient way in which the

crossing of a bridge can be represented. For this I use the capital letters A, B, C, D, for each of the land areas separated by the river. If a traveler goes from A to B over bridge a or b, I write this as AB—where the first letter refers to the area the traveler is leaving, and the second refers to the area he arrives at after crossing the bridge. Thus if the traveler leaves B and crosses into D over bridge f, this crossing is represented by BD, and the two crossing AB and BD combined I shall denote by the three letters ABD, where the middle letter B refers both to the area which is entered in the first crossing and to the one which is left in the second crossing.

5. Similarly, if the traveler goes on from D to C over the bridge g, I shall

represent these three successive crossing by the four letter ABDC, which should be taken to mean that the traveler, starting in A, crosses to B, goes on to D, and finally arrives in C. since each land area is separated from every other by a branch of the river, the traveler must have crossed three bridges, Similarly the successive crossing of four bridges would be represented by five letters, and in general, however many bridges the traveler crosses, his journey is denoted by a number of letters one greater than the number of bridges. Thus the crossing of seven bridges requires eight letters to represent it.

6. In this method of representation, I take no account of the bridges by

which the crossing is made, but if the crossing from one area to another

7

can be made by several bridges, then any bridge can be used, so long as the required area is reached. It follows that if a journey across the seven bridges [of Fig. 1.2] can be arranged in such a way that each bridge is crossed once, but none twice, then the route can be represented by eight letters which are arranged so that the letters A and B are next to each other twice, since there are two bridges, a and b, connecting the areas A and B; similarly, A and C must be adjacent twice in the series of eight letters, and the pairs A and D, B and D, and C and D must occur together once each.

7. The problem is therefore reduced to finding a sequence of eight letter,

formed from the four letters A, B, C and D, in which the various pairs of letters occur the require number of times. Before I turn to the problem of finding such of sequence, it would be useful to find out whether or not it is even possible to arrange the letters in this way, for if it were possible to show that there is no such arrangement, then any work directed towards finding it would be wasted. I have therefore tried to find a rule which will be useful in this case, and in others, for determining whether or not such an arrangement can exist.

8. In order to try to find such a rule, I consider a single area A, into which

there lead any number of bridges a, b, c, d, etc. (Fig. [1.3]). Let us take first the single bridge a which leads into A: if a traveler crosses this bridge, he must either have been in A before crossing, or have come into A after crossing, so that in either case the letter A will occur once in the representation described above. If three bridges (a, b and c, say) lead to A, and if the traveler crosses all three, then in the representation of his journey the letter A will occur twice, whether he starts his journey from A or not. Similarly, if five bridges lead to A, the representation of a journey across all of them would have three occurrences of the letter A. And in

8

general, if the number of bridges is any odd number, and if it is increased by one, then the number of occurrences of A is half of the result.

9. In the case of the Konigsberg bridges, therefore, there must be three

occurrences of the letter A in the representation of the route, since five bridges (a, b, c, d, e) lead to the area A, Next, since three bridges lead to B, the letter B must occur twice; similarly, d must occur twice, and C also. So in a series of eight times, and the letters B, C and D twice each—but this cannot happen in a sequence of eight letters. It follows that such a journey cannot be undertaken across the seven bridges of Konigsberg.

10. It is similarly possible to tell whether a journey can be made crossing

each bridge once, for any arrangement of bridges, whenever the number of bridges leading to each area is odd. For if the sum of the number of times each letter must occur is one more than the number of bridges, then the journey can be made; if, however, as happened in our example, the number of occurrences is greater than one more than the number of bridges, then such a journey can never b e accomplished. The rule which I gave for finding the number of occurrences of the letter A from the number of bridges leading to the area A hold equally whether all of the bridges come from another area B, or whether they come from different areas, since I was considering the area A alone, and trying to find out how many times the letter A must occur.

11. If, however, the number of bridges leading to A is even, then in

describing the journey one must consider whether or not the traveler starts his journey from A; for it two bridges lead to A, and the traveler starts from A, then the letter A must occur twice, once to represent his leaving A by one bridge, and once to represent his returning to A by the other. If, however, the traveler starts his journey from another area, then

9

the letter A will only occur once; for this one occurrence will represent both his arrival in A and his departure from there, according to my method of representation.

12. If there are four bridges leading to A, and if the traveler starts from A,

then in the representation of the whole journey, the letter A must occur three times if he is to cross each bridge once; if he begins his walk in another area, then the letter A will occur twice. If there are six bridges leading to A then the letter A will occur four times if the journey starts from A, and if the traveler does not start by leaving A, then it must occur three times. So, in general, if the number of bridges is even, then the number of occurrences of A will be half of this number if the journey is not started from A, and the number of occurrences will be one greater than half the number of bridges if the journey does start at A.

13. Since one can start from only one area in any journey, I shall define,

corresponding to the number of bridges leading to each area, the number of occurrences of the letter denoting that area to be half the number of bridges plus one, if the number of bridges is odd, and if the number of bridges is even, to be half of it. Then, if the total of all the occurrences is equal to the number of bridges with an odd number of bridges leading to it. If, however, the total number of letters is one less than the number of bridges plus one, then the journey is possible starting from an area with an even number of bridges leading to it, since the number of letters will therefore be increased by one.

14. So whatever arrangement of water and bridges is given, the following

method will determine whether or not it is possible to cross each of the bridges: I first denoted by the letters A, B, C etc. the various areas which

10

are separated from one another by the water. I then take the total number of bridges, adds one, and writes the result above the working, which follows. Thirdly, I write the letter A, B, C, etc. in a column, and write the next to each one the number of bridges leading to it. Fourthly, I indicate with an asterisk those letters which have an even number next to them. Fifthly, next to each even one I write half the number, and next to each odd one I write half the number increased by one. Sixthly, I add together these last numbers, and if this sum is one less than, or equal to, the number written above, which is the number of bridges plus one, I conclude that the required journey is possible. It must be remembered that if the sum is one less than the number written above, then the journey must begin from one of the areas marked with an asterisk, and it must begin from an unmarked one if the sum is equal. [5]

After presenting one of the translations to Euler’s first graph theory work,

we must define the terminology employed in his proofs. In Euler’s proofs, he

mentions trails, walks and circuits:

Walks, Paths and Connectedness One of the most elementary properties that any graph can contain is that

of being connected. A Walk of a graph G is an alternating sequence of points

and lines beginning and ending with points, in which each line is incident with the

11

two points immediately preceding and following it. This walk joins 0v and nv , and

may also be denoted 0v 1v 2v . . . nv (the lines being evident by context); it is

sometimes called - walk. In a walk the repetitions of edges and vertices is

allowed. It is closed if 0v = nv which is called (circuit) and is open otherwise. A

path is a walk where edges and vertices are traversed exactly once.

Trail

A Trail in a graph G is a walk where only the repetition of vertices is allowed.

Suppose we have a graph G with vertices { v0 ,v1 , v2 , v3 }εV(G) and with edges

{ v0 v1 , v0 v2 , v1 v2 , v1 v3 , v2 v3}εE(G), then one possible Trail will be 0v , 1v , 2v ,

3v .(see Fig. 1.3)

12

Fig. 1.3

Now, that we know the definitions of Walks, Trails, Circuits and

Paths, we will consider the two theorems by Euler along with their proofs by

using some of the most fundamental principles of graph theory introduced by

him. As Euler mentioned earlier, the Konigsberg problem could be represented

in the form of diagram (see Fig. 1.2). Euler created a point for every land area,

then, he added an edge between the points for every bridge connecting them.

(see Fig. 1.4)

So for us to see that we encounter a problem with this graph, we could

start at point a then go to b, d, c, b, a, b, but now there is no edge to return to

vertex a since d is of odd degree (number of edges connected) vertex. So

13

clearly, it fails, and this led Euler to present his theorems for Eulerian graphs.

This method can also be used for directed connected graphs.

Fig. 1.4

Despite Theorem 1 is credited to Leonard Euler, in which he provided us

with a great contribution to graph theory, Euler’s proof was incomplete. Euler

failed to show that if every vertex of a connected graph G is even, then G is

Eulerian [5]. In the year 1873 the proof was finally polished. This completion of

the proof was completed by Carl Hierholzer [8]. But before he could write and

publish the work, Hierholzer died. The only reason the proof was published was

due to the fact that he told his colleagues of the work he had done. Therefore,

they were the ones who kindly wrote the paper and published it [5].

14

The theorems and proofs contributed by Hierholzer are given below, these

proofs demonstrated a remarkable way of showing why and how the theorems

worked.

Theorem 1 A nontrivial connected graph G is Eulerian if and only if every vertex has even degree.

Proof Assume first that G is Eulerian. Then G contains an Eulerian circuit C. Suppose that C begins at the vertex u (and therefore ends at u). We show that every vertex of G is even degree. Let v be a vertex of G different from u. Since C neither begins nor end at v, each time that u is encountered on C, two edges are accounted for (one to enter v and another to exit v). Thus v has even degree. Since C begins at u, this accounts for one edge. Another edge is accounted for because C ends at u. If u is encountered at other times, two edges are accounted for. So u is even as well. For the converse, assume that G is nontrivial connected graph in which every vertex is even. We show that G contains an Eulerian circuit. Among all trails in G, let T be one of maximum length. Suppose that T is a u – v trail. Suppose we encounter earlier in T. Each such encounter involves two edges of G, one to enter v and another to exit v. Since T ends at v, and odd number of edges at v have been encountered. But v has even degree. This means that there is at least one edge at v, say vw, which does not appear on T. But then T can be extended to w, contradicting the assumption that T has maximum length. Thus T is a u-u

15

trail, that is C=T is a u – u circuit. If C contains all edges of G, then C is an Eulerian circuit and the proof is complete. Suppose then that C does not contain all edges of G, that is, there are some edges of G that do not lie on C. Since G is connected, some edge e = xy not on C is incident with a vertex x that is on C. Let H = G – E(C), that is H is the spanning subgraph of G obtained by deleting the edges of C. Every vertex of C is incident with an even number of edges on C. Since every vertex of G has even degree, every vertex of H has even degree. It is possible, however, that H is disconnected. On the other hand, H has at least one nontrivial component, namely the component H1 has even degree. Consider a trail of maximum length in H1 , beginning at x. As we just saw, this trail must also end at x and is an x – x circuit C’ of H1 . Now if in the circuit C, we were to attach C’ when we arrive at x, we obtain a circuit C’’ in G of greater length than C, which is a contradiction. This implies that C contains all edges of G and is an Eulerian circuit.

Theorem 2 A connected graph G contains an Eulerian trail if and only if exactly two vertices of G have odd degree. Furthermore, each Eulerian trail of G begins at one of these odd vertices and ends at the other. Proof

Assume first that G contains an Eulerian trail T. Thus T is a u - v trail for some distinct vertices u and v. We now construct a new connected graph H from G by adding a new vertex x of degree 2 and joining it to u and v. Then C: T, x, u is an Eulerian circuit in H. By Theorem 1, every vertex of H is even and so only u and v have odd degrees in G= H – x.

16

For the converse, we proceed in a similar manner. Let G be a connected graph containing exactly two vertices u and v of odd degree. We show that G contains an Eulerian trail T, where T is either a u – v trail or a v – u trail. Add a new vertex x of degree 2 to G and join it to u and v, calling the resulting graph H. Therefore, H is a connected graph all of whose vertices are even. By Theorem 1, H is an Eulerian graph containing an Eulerian circuit C. Since it is irrelevant which vertex of C is the initial (and terminal) vertex, we assume one of these first edge of C and the other is the final edge of C. Deleting x from C results in an Eulerian trail T of G that begins either at u or v and ends at the other. [1]

No other work, but Euler’s has been so remarkable in the field of Graph

Theory. With the birth of graph theory many other theorems have been

developed, and there are many applications in which Eulerian graphs can be

used. One of its applications is the Famous Chinese Postman Problem which,

with variations, can be used in many applications. Some of these include the

following: The garbage collection and street sweeping, snow-plowing, line-

painting down the center of each street, police-car patrolling, census taking, and

computer-driven plotting of a network.

Application to Chinese Postman Problem

17

The first to introduce the problem of finding a shortest closed walk to

traverse every edge of a graph at least once was Meigu Guan [6]. Guan

envisioned a letter carrier who wants to deliver the mail through a network of

streets and return to the post office as quickly as possible. Jack Edmonds [7]

called this problem The Chinese Postman Problem.

Definitions:

A postman tour in a graph G is a closed walk that uses each edge of G at least

once.

An optimal postman tour is a postman tour whose total edge-weight is a

minimum.

A matching in a graph G is a subset M of E(G)(edges of a graph) such that no

two edges in M have an end point in common.

A perfect matching in a graph is a matching in which every vertex is an endpoint

of one of the edges.

18

The ultimate goal of the Chinese Postman Problem is to find an optimal

postman tour in a given weighted graph, where the edge-weights represent some

measurable quantity that depends on the application (e.g., distance, time, cost,

etc.). Indeed, if all the vertices of the graph have even degree, then any Eulerian

tour is an optimal postman tour. Otherwise, some edges must be retraced (or

deadheaded). Thus, the goal is to find a postman tour whose deadheaded edges

have minimum total edge-weight.

Edmonds and Johnson were able to solve the Chinese Postman Problem

by using a polynomial-time algorithm (see Table 1) [6].

19

Table 1.

Algorithm 1 Constructing an Optimal Postman Tour Input: a connected weighted graph G. Output: an optimal postman tour W. Find the set S of odd-degree vertices of G. For each pair of odd-degree vertices u and v in S Find shortest path P in G between vertices u and v. Let duv be the length of path P. Form a complete graph K on the vertices of S. For Each edge e of the complete graph K. Assign to edge e the weight duv , where u and v are the endpoints of e. Find a perfect matching M in K whose total edge-weight is minimum. For each edge e in the perfect matching M Let P be the corresponding shortest path in G between the endpoints of edge e. For each edge f of path P Add to graph G a duplicate copy of edge f, including its edge- weight. Let G* be the eulerian graph formed by adding to graph G the edge duplications from the previous step. Construct an eulerian tour W in G*. The eulerian tour W corresponds to an optimal postman tour of the original graph G.

20

The idea behind Edmonds and Johnson algorithm is to retrace the edges

on certain shortest paths between odd-degree vertices, where the edge-weights

are regarded as distances. If the edges of a path between two odd-degree

vertices are duplicated, then vertices on the path remain the same. Below, I will

show an illustrated example of Algorithm 1.

21

Fig. 1.5 Weighted graph for the Chinese Postman Problem [2].

Fig. 1.5 shows the weighted completed graph on the odd-degree vertices in G. The shortest path between odd-degree vertices b and d has length 8. The minimum perfect matching is shown in bold (see Fig. 1.6). Fig. 1.6

G

22

Fig. 1.7 Minimum-weight perfect matching of complete graph K.

G*

23

In this graph each edge in the perfect matching obtained in Algorithm 1

represents a path in G. The edges on this path are the ones that are duplicated

(i.e., to obtain the Eulerian graph G* (see Fig. 1.7). So here the Eulerian tour for

the graph G* is an optimal postman tour for G. The tour is given by the vertex

sequence [2]

<a, b, c, f, e, b, e, d, e, h, i, f, i, h, g, d, a>

After emphasizing one of the applications of Euler’s Theory, I know that

Euler’s work in graph theory has been the key element on many real world

problem solving approaches. The abstraction of his works and all the new

improvements presented serve as the foundation of many existing study fields

and new ones to come.

24

Bibliography 1. Chartrand, Gary (2005), Introduction to Graph Theory, pp, 133-138. 2. Gross, Jonathan (1999), Graph Theory and Its Applications, pp, 208-119. 3. Hartsfield, Nora (1990), Pearls in Graph Theory A comprehensive

introduction, pp, 49-55. 4. Harary, Frank, (1972), Graph Theory, pp, 64-65, 204. 5. Wilson J. Robin, (1976), Graph Theory 1936-1936, pp, 2-20. 6. Guan, Meigu, (1962), Graphic programming usind odd and even points, Chinese Math, pp, 273- 274. 7. Edmonds, J. and Johnson, E. (1973), Matching Euler tours and the Chinese postman, Math. Programming 5, pp, 88-124. 8. Hierholzer, C. (1873), Uber die Moglicheit, einen Linienzug ohne

Wiederholung und ohne Unterfrechnung zu umfahren. Math. Ann. 6, pp, 30- 32.