...

>

Introduction to Graph Algorithms

Introduction to Graph Algorithms

Learn the concepts of graph theory and graph algorithms by studying the Königsberg bridge problem.

This course is about algorithms on graphs, which are data structures that represent a set of nodes interconnected by edges. An example of a graph is shown below:

g a a b b a--b c c a--c d d a--d b--c
A graph with four nodes and four edges.

Although graphs are an abstract concept of mathematics and theoretical computer science, they can be used to model various problems from real-life applications. Some examples are:

  • routing of IP packages on the internet.
  • finding the fastest connection in public transportation systems.
  • detecting deadlocks in operating system processes.

As such, graph algorithms can be a powerful and versatile tool in every software developer’s toolbox.

A bit of history

The study of graph theory perhaps originated with the so-called Königsberg bridge problem. It is a neat example of modeling a real-life puzzle using graphs.

The historical Prussian city of Königsberg (today Kalinigrad) consisted of four landmasses separated by rivers and connected by a total of seven bridges. In the early 18th century, mathematician Leonard Euler studied whether there was any way to devise a walk through the city that crosses each of the ...