What is a Graph? · Connected Components

Lesson 5

Nikolai Chukhin · Alexander S. Kulikov

We have not defined connected regions, but it is intuitively clear that there are three of them in the maze above.

Now, one can introduce a node for each cell of the maze and connect two neighboring cells by an edge if there is no wall between them.

In the resulting graph, one clearly sees the three connected regions.