## Introduction to Graph Theory

«Poor, sad-eyed stranger!» – this is how American author Mark Twain described the canvasser or the salesman. Why was he so sad and poor? Maybe because he had to solve the big problem of a travelling salesperson – “Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?”. Without the answer, we could not trade today.

A long time ago, this was an inconvenient difficulty not only for the canvasser, but also for the mathematicians. The travelling salesman problem was mathematically formulated in the 1800s by the Irish mathematician W.R. Hamilton and by the British mathematician Thomas Kirkman.

Up to this day, the issue is existent for postmen and travellers all over the world. The most convenient and profitable approach for a solution is graph theory.

Another issue is called the Seven Bridges of Königsberg, named by Leonard Euler in 1736, and it sounds more like a beautiful legend than a problem.

Königsberg in Prussia (now Kaliningrad, Russia), was set on both sides of the Pregel River, and included two large islands, which were connected to the rest of the city by seven bridges. The problem was to devise a walk through the city that would cross each of those bridges once and only once. The residents of the city always challenged visitors and travellers to see whether they could solve the problem. However, no one except Leonard Euler could find a way; not even the locals. Euler proved that the problem had no solution. He was able to find a rule, using which, it was easy to determine whether it is possible to pass through all bridges, without passing twice on either of them. Its negative resolution laid the foundations of graph theory. Euler wrote a paper about the The Seven Bridges of Königsberg and published it in 1736. It was the first paper about graph theory in history and the first page of the history of graph theory.

This is the history. Now, let’s take a look at pop culture. Labyrinths have featured prominently in pop culture for a long time. Starting from the myths of Theseus and Minotaur and ending with the dystopian science fiction action thriller “The Maze Runner”. Or do you remember the fourth movie about Harry Potter and his adventures in the labyrinth? And the “The Shining” by Stephen King? The labyrinth challenges the hero to find the right path to escape. The study of labyrinths is also connected to graph theory. If the protagonists knew the basics of graph theory, they might have found a faster way out in some cases.

What then is the graph theory?

Graph theory in mathematics means the study of graphs. Graphs are one of the prime objects of study in discrete mathematics. In general, a graph is represented as a set of vertices (nodes or points) connected by edges (arcs or line). Graphs are therefore mathematical structures used to model pairwise relations between objects. They are found on road maps, constellations, when constructing schemes and drawings. Graphs underlie many computer programs that make modern communication and technological processes possible. They contribute to the development of thinking, both logical and abstract. For example, maybe you remember this game from your childhood: connect the dots on the piece of paper to make a figure, a dog or a cat – those connections are also graphs.

We all know the saying: “Mathematics is not needed in real life”, but graph theory is actually applicable in real life. In fact, this is how it was discovered.