Speak Maths Β· University

Graphs: dots, lines and counting walks

A graph is dots joined by lines: the simplest picture of anything connected, from paths in a park to friendships to the internet. A small table of 0s and 1s can hold the whole picture.

Draft: written by an AI helper and not yet checked by a teacher.

The alphabet

Read each sign aloud, the way it is written under it.

  • Say: G equals V and E; the size of V, the size of EMeans: A graph G is a set V of vertices (dots) and a set E of edges (lines); bars count how many.
  • Say: the degree of vMeans: How many edges touch the vertex v.
  • Say: u is adjacent to v (u tilde v)Means: u and v are joined by an edge: they are neighbours.
  • Say: v zero is adjacent to v one, and so on to v k; if v k is v zero again, it is a cycleMeans: A path moves along edges from one vertex to another; ending where it began makes a cycle.
  • Say: the number of edges is the number of vertices minus oneMeans: A connected graph with this count is a tree: joined, with no cycle.
  • Say: A of u, v is one exactly when u is adjacent to vMeans: The adjacency matrix A has a 1 where there is an edge and a 0 where there is none.
  • Say: A squared, entry i j, is the sum over k of A i k times A k jMeans: This entry counts the walks of length two from i to j: one for each middle vertex k.
  • Say: the sum of deg v over all v in V equals two times the number of edgesMeans: Every edge has two ends, so adding all the degrees counts each edge twice.

The story: The bridges of a park

Subtitles:

Tap a line to see its words.

  1. A park has some spots and the paths between them. Draw a dot for each spot and a line for each path: a graph.
  2. The park has five spots, called a to e, and five paths.
  3. Spot b is next to c and to d; spot a is not next to d.
  4. Three paths meet at b; only one reaches a.
  5. A walk from a to e that never repeats a spot: a path of three steps.
  6. From b to c to d and back to b: a cycle, a round trip.
  7. Add up the paths meeting at each spot: ten, which is twice the five paths, since each path has two ends.
  8. In the table of 0s and 1s, the entry for b and c is 1; for a and d it is 0.
  9. Multiplying the table by itself shows one walk of two steps from a to d: through b.
  10. The council closes the path between c and d. Now the park has one path fewer than spots: a tree.

In words this story is 749 letters long; in symbols, 104.

Read it

What does it say?

Write it

Which notation says this?

The degree of the vertex v is four.

Adding up all the degrees gives twice the number of edges.

The number of walks of length two from i to j is the entry in row i, column j of the matrix A squared.

The vertices a and b are not adjacent.

A walk of two steps: from a to b, then from b to c.

A cycle of length three: a to b to c and back to a.

The graph has seven vertices and six edges.

A graph with ten edges: its degrees add up to twenty.

The vertex v is isolated: no edge touches it.

In the adjacency matrix: there is no edge between u and v.

The number of walks of length three from i to j.

A tree with n vertices has n minus one edges.

Build it

Tap the tiles in order. One tile does not belong.

The number of edges is the number of vertices, minus one.

The entry of A at u and v is one exactly when u and v are adjacent.

The number of two-step walks from i to j: the sum over k of A at i, k times A at k, j.

A cycle of four vertices: a to b, to c, to d, and back to a.

The degree of v is the sum of row v of the adjacency matrix.

In a tree the degrees add up to twice the number of edges, and the edges are the vertices minus one.

Challenges

Creative puzzles that use every sign of this chapter. Take your time; there is no clock.

1 The park, as a table

The table is the adjacency matrix of the park from the story. Judge each sentence about the park.

βœ“
βœ“βœ“βœ“
βœ“βœ“
βœ“βœ“βœ“
βœ“

A tick means the spot in the row is adjacent to the spot in the column.

2 Graph words

Five lines about a graph. Pair each with what it says.

Tap a line, then its meaning.

3 A tree’s count

A tree on the park’s spots must have one path fewer than spots. One tile is wrong. Find it, then fix it.

Tap the tile that is wrong.

4 Two ends to every path

This should say that the degrees add up to twice the number of edges. One tile is wrong. Find it, then fix it.

Tap the tile that is wrong.

5 Walks of two steps

The matrix is the 4-cycle: four spots in a ring, each next to its two neighbours. How many walks of two steps lead from vertex 1 to vertex 3?

6 An impossible set of degrees

Five spots have degrees 3, 3, 2, 2 and one more, x. Which value of x is impossible?

7 A busy but not too busy park

Every spot touches at least one path, but no spot touches all the other spots. Write it in symbols.

8 A friend in common

Any two different spots have a spot adjacent to both. Write it in symbols.

9 The hub

Five rooms of a house and the doors between them, as an adjacency matrix. Judge each sentence about this graph.

βœ“βœ“βœ“βœ“
βœ“βœ“
βœ“βœ“
βœ“
βœ“

A tick means the room in the row has a door to the room in the column.

10 Six stations, five tracks

Six stations on a small railway and the tracks between them, as an adjacency matrix. Judge each sentence about this graph.

βœ“
βœ“βœ“
βœ“βœ“βœ“
βœ“
βœ“βœ“
βœ“

A tick means a track joins the station in the row to the station in the column.

11 Reading the table

Five things one can read off an adjacency matrix. Pair each with its meaning.

Tap a line, then its meaning.

12 Five counts

Five counts about a graph. Pair each with what it counts.

Tap a line, then its meaning.

13 Through the middle

This should count the two-step walks from i to j: a step from i to some k, then a step from k to j. One tile is wrong. Find it, then fix it.

Tap the tile that is wrong.

14 Close the loop

This should be a cycle through a, b and c: three steps that return to the start. One tile is wrong. Find it, then fix it.

Tap the tile that is wrong.

15 Six spots, two paths each

Six spots in a park, each with exactly two paths. How many paths are there?

16 A tree of ten

A tree has ten vertices. What do its degrees add up to?

17 Out and back

Four spots, every pair joined by a path. How many walks of two steps start at spot 1 and end at spot 1?

18 Three paths from everywhere

In this park every spot has exactly three paths. Write it in symbols, then compare.

19 A triangle somewhere

Somewhere in the graph three vertices are each adjacent to the other two. Write it in symbols, then compare.

Tell your own

Draw a small graph of your own (a road map, a family, a game board) and write its vertices, its edges, and the degree of one vertex.

Kept on this device only.