maths.free › Combinatorics & Graph Theory › Graph Theory › Eulerian and Hamiltonian Graphs

Eulerian and Hamiltonian Graphs

Graph theory is an area of mathematics that has found many applications in a variety of disciplines. Throughout this text, we will encounter a number of them.

Eulerian and Hamiltonian Graphs

Graph theory is an area of mathematics that has found many applications in a variety of disciplines. Throughout this text, we will encounter a number of them. However, graph theory traces its origins to a problem in Königsberg, Prussia (now Kaliningrad, Russia) nearly three centuries ago. The river Pregel passes through the city, and there are two large islands in the middle of the channel. These islands were connected to the mainland by seven bridges as indicated in . It is said that the citizens of Königsberg often wondered if it was possible for one to leave his home, walk through the city in such a way that he crossed each bridge precisely one time, and end up at home again. Leonhard Euler settled this problem in 1736 by using graph theory in the form of .

Let \(\bfG\) be a graph without isolated vertices. We say that \(\bfG\) is eulerian provided that there is a sequence \((x_0,x_1,x_2,\dots,x_t)\) of vertices from \(\bfG\), with repetition allowed, so that

  1. \(x_0=x_t\)
  2. \(i=0,1,\dots, t-1\)\(x_ix_{i+1}\)\(\bfG\)
  3. \(e\in E\)\(i\)\(0\le i\lt t\)\(e=x_ix_{i+1}\)

When \(\bfG\) is eulerian, a sequence satisfying these three conditions is called an eulerian circuit. A sequence of vertices \((x_0,x_1,\dots,x_t)\) is called a circuit when it satisfies only the first two of these conditions. Note that a sequence consisting of a single vertex is a circuit. Before proceeding to Euler's elegant characterization of eulerian graphs, let's use SageMath to generate some graphs that are and are not eulerian.

Run the code below. It will execute until it finds a graph \(\bfG\) that is eulerian. The output that will be produced is a list of the degrees of the vertices of the graph \(\bfG\) followed by a drawing of \(\bfG\).

We encourage you to evaluate the run the code above multiple times, even changing the number of vertices and edges. If it seems to be running a log time, it may be that you have made the number of edges too small, so try increasing it a bit. Do you notice anything about the degrees of the vertices in the graphs produced?

Now let's try to find a graph \(\bfH\) that is not eulerian. Again, the output is the list of degrees of \(\bfH\) followed by a drawing of \(\bfH\).

One thing you probably noticed in running this second block of code is that it tended to come back much faster than the first. That would suggest that the non-eulerian graphs outnumber the eulerian graphs. Did you notice anything different about the degrees of the vertices in these graphs compared to the ones that were eulerian?

The following elementary theorem completely characterizes eulerian graphs. Its proof gives an algorithm that is easily implemented.

Condensed: the full section is in Keller & Trotter, Applied Combinatorics.

Nyt sinä Yksikään laskin ei ratkaise tätä, mutta sen osat ovat yhtä totta. Kokeile alla olevaa tai kirjoita omasi.

Harjoittelu (3)

Kokeile ensin kutakin paperilla. Tarkista vastaus, varmistuneet voidaan avata ratkaisijassa jokaista vaihetta varten.

  1. Write a couple of sentences to explain informally the difference between a graph being eulerian and a graph being hamiltonian. If possible, give an example (other than the rather silly bridge problem in the text) where each concept would be useful.

  2. Briefly but specifically explain why the graph \(\bfH\) in is not eulerian.

  3. Try your hand at finding the eulerian circuit in \(\bfG\) in by following the method illustrated in the text. Instead of giving all the steps or the final circuit here, just give the circuit that you come up with after the initial trivial circuit \((1)\).

Pidä oma työsi

Vapaa tili lisää muistiinpanoja jokaiseen oppituntiin, muistiinpanoja siitä, mitä olet saanut päätökseen, ratkaistuja ongelmiasi yhdessä paikassa ja ohjaajaa, jolta voit kysyä tästä sivusta. Matematiikka on kaikille avoin, kirjautunut tai ei.

Rekisteröidy Kirjautuminen

Symbolit, joita käytetään täällä

Napauta symbolia koko määrittelyn, kuvan ja sen jokaisen kirjaimen osalta.

Kysymyksiä

Permutation or combination?

Ask whether order matters. A lock code is a permutation (order matters); a hand of cards is a combination (it does not).

What is a graph in this sense?

Dots (vertices) joined by lines (edges), not a plot. Road maps, social networks and molecules are graphs; questions like "is there a route" and "how few colours" are graph theory.

Osaa tästä sivusta on muokattu Keller & Trotter, Applied Combinatorics (CC BY-SA 4.0). Tässä on tiivistetty ja selitetty uudelleen, virheet ovat meidän.

Lisää Combinatorics & Graph Theory