Skip to content
Graphs

Graphs

Unless you come from a background in mathematical olympiads, graphs will be an entirely novel concept. While their abstract definition leaves little to appreciate, you will see how they can be used to model tons of different problems.

What is a graph?

A graph is a collection of nodes and edges. Edges connect (exactly) two different nodes. For example, a graph with nodes [1,2,3,4,5][1,2,3,4,5] and edges [(1,2),(1,3),(2,4),(2,5),(4,2)][(1,2), (1,3), (2,4), (2,5), (4,2)] can be represented with a figure like this:

Example graph
Image generated with the help of this website.

Well, alright, but what would we ever use graphs for? Keep reading, the end goal of this introductory article is to solve a maze problem!