Resources For Teachers For Tutors For Students & Parents AI New Books Pricing
Year 12 Maths - General (Unit 3 & Unit 4) Graphs, networks and travelling problems

Graphs, digraphs and networks

20 practice questions 0 video lessons Theory + worked examples

Learn the language of graphs, digraphs and networks in Year 12 VCE General Mathematics. A graph is simply dots and lines: towns linked by highways, players who have met on court, or train stations joined by track. Drawing only the connections strips a problem back to what matters, whether you are mapping one-way laneways in the Melbourne CBD or the roads between Gippsland towns.

You will practise finding the degree of a vertex, spotting loops, multiple edges, isolated vertices and bridges, and telling simple, complete and connected graphs apart. You will turn tables into directed graphs, read in-degrees and out-degrees, and add weights to make networks, ready to describe the same graphs with matrices and to test whether they can be drawn flat.

Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

A graph is a set of vertices joined by edges. This Year 12 General Mathematics guide for students in Victoria explains degree, loops, simple and complete graphs, connected graphs and bridges, directed graphs with in-degree and out-degree, and networks with weighted edges.

A graph is a set of points called vertices joined by lines called edges. Only the connections matter: an edge may be straight or curved, and its length on the page means nothing. An edge that starts and finishes at the same vertex is a loop, and two or more edges joining the same pair of vertices are multiple edges. The degree of a vertex, \(\deg(A)\), is the number of edge ends at that vertex, so a loop adds \(2\). A vertex of degree \(0\) is an isolated vertex.

A simple graph has no loops and no multiple edges. A complete graph joins every pair of vertices by exactly one edge. A subgraph is part of a graph: some of its vertices and some of the edges between them. A graph is connected if you can travel along edges from any vertex to any other. A bridge is an edge which, if removed, would leave a connected graph in two pieces. A bipartite graph has its vertices split into two groups, with every edge joining a vertex in one group to a vertex in the other (never two vertices in the same group).

In a directed graph (a digraph) every edge has an arrow and can only be travelled one way; a directed edge is also called an arc. The in-degree of a vertex is the number of arcs arriving at it, and the out-degree is the number leaving it. When each edge carries a number (a distance, time or cost), the graph is a weighted graph or network.

Key idea. Every edge has two ends, so the degrees of a graph always add to twice the number of edges. In a digraph every arc leaves one vertex and arrives at another, so the in-degrees and the out-degrees each add to the number of arcs.
Vertices, edges, a loop, a multiple edge and an isolated vertexSix vertices A to F. B and C are joined by two edges. D has a loop. F has no edges. Degrees: A 2, B 4, C 3, D 4, E 3, F 0. A B C D E F
B and C are joined by two edges and D has a loop, so the graph is not simple. \(\deg(D) = 1 + 1 + 2 = 4\). F is an isolated vertex, so the graph is not connected.
A weighted network with one bridgeFive towns W, K, L, P, Q joined by roads (km): WK 14, KL 9, LW 11, KP 16, LP 12, PQ 21. PQ is drawn in red: it is a bridge. W K L P Q 14 9 11 16 12 21
A network of roads (km). Removing \(PQ\) would cut \(Q\) off from the other towns, so \(PQ\) (red) is a bridge. No other road is a bridge.

Each edge adds \(2\) to the total of the degrees (one for each end), so for any graph:

\[\text{sum of degrees} = 2 \times \text{number of edges}\]
∑deg=2e

For one vertex, count every edge end that touches it:

\[\deg(v) = (\text{edges to other vertices}) + 2 \times (\text{loops at } v)\]
deg(v)=edges+2×loops

A complete graph on \(n\) vertices joins every pair once, so each vertex has degree \(n - 1\) and:

\[\text{number of edges} = \dfrac{n(n-1)}{2}\]
e=n(n−1)2

In a digraph:

\[\text{sum of in-degrees} = \text{sum of out-degrees} = \text{number of arcs}\]
∑in=∑out=arcs
Quick check. The sum of the degrees is always even. If your degrees add to an odd number, an edge end has been missed or counted twice. It also means every graph has an even number of vertices of odd degree.

How to draw a graph or network for a real situation

  1. Choose the vertices. Each place, person or object becomes one vertex, labelled with a letter.
  2. Draw the edges. Join two vertices only when there is a direct link (a road, a cable, a game played). Use an arrow if the link only works one way: that makes a digraph.
  3. Add the weights. Write the distance, time or cost on each edge, with units stated once.
  4. Check. Count the edges against the information given and check the degrees add to twice the number of edges.

How to find a bridge

  1. Cover one edge at a time.
  2. Ask: can every vertex still be reached from every other? If not, that edge is a bridge.
  3. An edge that lies on a closed loop of edges is never a bridge, and an edge to a vertex of degree \(1\) always is.
Example 1 β€” Degrees and edges
For the graph shown, find the degree of each vertex and the number of edges. Is the graph simple?
Solution

Count edge ends at each vertex. The loop at \(P\) counts \(2\).

Example 1 graphSquare P Q S R with diagonal Q R, a loop at P and two edges joining R and S. P Q R S
\(\deg(P)\)\(=\)\(2 + 1 + 1\)
\(\)\(=\)\(4\)
\(\deg(Q)\)\(=\)\(1 + 1 + 1\)
\(\)\(=\)\(3\)
\(\deg(R)\)\(=\)\(1 + 1 + 1 + 1\)
\(\)\(=\)\(4\)
\(\deg(S)\)\(=\)\(1 + 1 + 1\)
\(\)\(=\)\(3\)
\(\text{sum of degrees}\)\(=\)\(4 + 3 + 4 + 3\)
\(\)\(=\)\(14\)
\(\text{number of edges}\)\(=\)\(14 \div 2\)
\(\)\(=\)\(7\)
deg(P)=4

Check by counting directly: the loop, \(PQ\), \(PR\), \(QR\), \(QS\) and two edges \(RS\) make \(7\). The graph is not simple: it has a loop and a multiple edge.

Example 2 β€” A complete graph
Eight netball teams in a Bendigo competition each play every other team once. Model the games as a graph. (i) What type of graph is it? (ii) What is the degree of each vertex? (iii) How many games are played?
Solution

Each team is a vertex and each game is an edge. Every pair of teams is joined once.

Complete graph on eight verticesEight vertices A to H in a ring, every pair joined by an edge: 28 edges. A B C D E F G H
\(\text{degree of each vertex}\)\(=\)\(8 - 1\)
\(\)\(=\)\(7\)
\(\text{number of edges}\)\(=\)\(\dfrac{8 \times 7}{2}\)
\(\)\(=\)\(28\)
e=28

(i) A complete graph on \(8\) vertices. (ii) Each team plays \(7\) games, so every vertex has degree \(7\). (iii) \(28\) games. Check: \(8 \times 7 = 56\) edge ends, and \(56 \div 2 = 28\).

Example 3 β€” In-degree and out-degree
A shuttle on Phillip Island runs one-way trips (times in minutes): \(C \to Q\) 4, \(Q \to R\) 6, \(R \to C\) 5, \(C \to S\) 8, \(S \to R\) 3, \(R \to S\) 3 and \(I \to C\) 7. (i) Draw the directed network. (ii) Find the in-degree and out-degree of \(C\). (iii) Which vertex has in-degree \(0\)? (iv) Can a rider travel directly from \(Q\) to \(C\)?
Solution

Each stop is a vertex. Each trip is an arrow from its start to its finish, labelled with its time.

Directed network of one-way shuttle tripsArrows C to Q 4, Q to R 6, R to C 5, C to S 8, S to R 3, R to S 3, I to C 7 (minutes). C Q R S I 4 6 5 8 3 3 7
\(\text{in-degree}(C)\)\(=\)\(1 + 1\)
\(\)\(=\)\(2\)
\(\text{out-degree}(C)\)\(=\)\(1 + 1\)
\(\)\(=\)\(2\)
\(\text{total arcs}\)\(=\)\(7\)
in(C)=2

(ii) Arcs arrive at \(C\) from \(R\) and \(I\); arcs leave \(C\) to \(Q\) and \(S\). (iii) No arc arrives at \(I\), so \(I\) has in-degree \(0\) (its out-degree is \(1\)). (iv) No. There is an arc \(C \to Q\) but none from \(Q\) to \(C\); a rider goes \(Q \to R \to C\) instead. \(S \to R\) and \(R \to S\) are two different arcs.

Example 4 β€” Connected graphs and bridges
The network shows roads (km) between six Gippsland towns. (i) Is the network connected? (ii) Find the total length of the roads. (iii) Which roads are bridges?
Solution

Check that every town can be reached, add the weights, then remove one road at a time.

Gippsland road networkTowns T, M, R, S, B, L. Roads (km): TM 8, TR 18, MR 15, MS 52, RS 47, SB 68, BL 35. T M R S B L 8 18 15 52 47 68 35
\(\text{total}\)\(=\)\(8 + 18 + 15 + 52 + 47 + 68 + 35\)
\(\)\(=\)\(243 \text{ km}\)
243km

(i) Yes: every town can be reached from \(T\). (ii) \(243\) km. (iii) \(SB\) and \(BL\). Removing \(SB\) cuts \(B\) and \(L\) off from the rest, and removing \(BL\) cuts off \(L\). Every other road lies on a closed loop (\(T\)–\(M\)–\(R\) or \(M\)–\(S\)–\(R\)), so removing it leaves another way round.

Common pitfalls

A loop counts twice. Watch out for counting a loop as \(1\) towards the degree. Both of its ends are at the same vertex, so it adds \(2\).
Crossings are not vertices. Two edges that cross on the page do not meet unless a vertex is drawn there.
Follow the arrows in a digraph. \(A \to B\) does not let you travel from \(B\) to \(A\). In-degree counts arrows arriving, out-degree counts arrows leaving.

Frequently asked questions

What is the degree of a vertex?

The degree is the number of edge ends at the vertex. Count each edge joined to it once, and count a loop twice because both of its ends are at that vertex.

What is the difference between in-degree and out-degree?

They are used in a directed graph. The in-degree of a vertex is the number of arcs pointing into it, and the out-degree is the number of arcs pointing away from it.

What is a bridge in a graph?

A bridge is an edge of a connected graph which, if it were removed, would split the graph into two separate pieces. An edge that is part of a closed loop of edges is never a bridge.

What is an isolated vertex?

An isolated vertex has no edges at all, so its degree is 0. A graph with an isolated vertex (and at least one other vertex) is not connected.

How many edges does a complete graph have?

A complete graph with n vertices has n(n - 1)/2 edges. For example, a complete graph on 5 vertices has 5 times 4 divided by 2, which is 10 edges.

What is the difference between a graph and a network?

A network is a graph with a number, such as a distance, time or cost, on each edge. It is used to model a real situation like roads between towns.