Graph terminology and network diagrams
Learn the language of graphs and networks in Year 12 General Mathematics for Queensland (QCAA). A graph is just dots and lines: towns joined by highways, players who have met in a competition, or computers linked by cables. Drawing the connections this way strips a problem back to what really matters, from planning a delivery run around Mackay to linking pumps on a cane farm.
You will practise naming vertices, edges and loops, finding the degree of each vertex, and telling simple, complete and bipartite graphs apart. You will turn tables and descriptions into directed and weighted network diagrams, and check your work with the rule that the degrees add to twice the number of edges, ready for adjacency matrices in the next subtopic.
Theory
A graph is a set of vertices joined by edges. This Year 12 General Mathematics guide for Queensland students explains the key words (degree, loop, simple, complete and bipartite graphs, subgraphs, directed and weighted graphs) and shows how to draw a network diagram from a real situation or a table.
A graph is a set of points called vertices (or nodes) joined by lines called edges. Only the connections matter: an edge can be drawn straight or curved, and its length on the page means nothing. An edge that starts and finishes at the same vertex is a loop. Two or more edges joining the same pair of vertices are multiple edges. The degree of a vertex, written \(\deg(A)\), is the number of edge ends at that vertex, so a loop adds \(2\) to the degree.
A simple graph has no loops and no multiple edges. A complete graph \(K_n\) is a simple graph on \(n\) vertices in which every pair of vertices is joined by exactly one edge. A bipartite graph has its vertices split into two groups so that every edge joins a vertex in one group to a vertex in the other, never two vertices in the same group. A subgraph is made of some of the vertices and some of the edges of a graph, where each chosen edge joins two chosen vertices.
In a directed graph (digraph) each edge has an arrow and can only be travelled one way. A directed edge is often called an arc. In a weighted graph each edge carries a number, such as a distance, a time or a cost. A weighted graph that models a real situation (roads, cables, flights, walking tracks) is called a network, and a drawing of it is a network diagram.
Each edge adds \(2\) to the total of the degrees (one for each end), so for any graph:
A complete graph \(K_n\) joins every pair of its \(n\) vertices once. Each vertex has degree \(n - 1\), and the number of edges is:
For the degree of one vertex, count every edge end that touches it:
How to draw a network diagram for a real situation
- Choose the vertices. Each place, person or object becomes one vertex. Label it with a letter and give a key if needed.
- Draw the edges. Join two vertices only when there is a direct link between them (a road, a cable, a game played, a skill shared). Use an arrow if the link only works one way.
- Add the weights. Write the distance, time or cost on each edge, with units stated once.
- Check the diagram. Count the edges against the information given, and check that the degrees add to twice the number of edges. Then describe the graph: simple or not, complete, bipartite, directed, weighted.
Count edge ends at each vertex. The loop at \(P\) counts \(2\).
| \(\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\) |
Check by counting the edges directly: the loop, \(PQ\), \(PR\), \(QR\), \(QS\) and two edges \(RS\) make \(7\). The graph is not simple, because it has a loop and a multiple edge.
Each team is a vertex and each game is an edge. Every pair of teams is joined once.
| \(\text{degree of each vertex}\) | \(=\) | \(6 - 1\) |
| \(\) | \(=\) | \(5\) |
| \(\text{edges in } K_6\) | \(=\) | \(\dfrac{6 \times 5}{2}\) |
| \(\) | \(=\) | \(15\) |
(i) It is the complete graph \(K_6\). (ii) Each team plays \(5\) games, so every vertex has degree \(5\). (iii) \(15\) games are played. Check: \(6 \times 5 = 30\) edge ends, and \(30 \div 2 = 15\).
Put the tutors in one group and the subjects in the other, then draw one edge for each tutor–subject pair.
| \(\text{edges}\) | \(=\) | \(2 + 3 + 2\) |
| \(\) | \(=\) | \(7\) |
(i) Every edge joins a tutor (green) to a subject (amber). No edge joins two tutors or two subjects, so the graph is bipartite. (ii) Yes. \(JM\) and \(JP\) are edges of the graph and both join chosen vertices, so they form a subgraph.
Each stop is a vertex. Each trip is an arrow from its start to its finish, labelled with its time.
| \(\text{trips leaving } E\) | \(=\) | \(E \to W,\ E \to R\) |
| \(\) | \(=\) | \(2\) |
| \(\text{trips arriving at } E\) | \(=\) | \(F \to E,\ H \to E\) |
| \(\) | \(=\) | \(2\) |
(i) The network is a directed, weighted graph with \(7\) arcs. (ii) \(2\) trips leave \(E\) and \(2\) arrive. (iii) No. There is an arrow \(E \to W\) but no arrow \(W \to E\), so a rider must go \(W \to R \to F \to E\) instead.
Common pitfalls
Frequently asked questions
What is the degree of a vertex in a graph?
The degree is the number of edge ends that meet at the vertex. Count each edge joined to it once, and count a loop twice because both of its ends are at that vertex.
Does a loop count as 1 or 2 towards the degree?
A loop adds 2 to the degree of its vertex, because it leaves the vertex and comes back to it. For example, a vertex with two ordinary edges and one loop has degree 4.
What is the difference between a simple graph and a complete graph?
A simple graph has no loops and no multiple edges. A complete graph is a simple graph where every pair of vertices is joined by an edge. Every complete graph is simple, but most simple graphs are not complete.
How many edges does a complete graph have?
A complete graph on n vertices has n(n - 1)/2 edges. For example, K5 has 5 times 4 divided by 2, which is 10 edges.
What makes a graph bipartite?
A graph is bipartite if its vertices can be split into two groups so that every edge joins a vertex in one group to a vertex in the other group. No edge joins two vertices in the same group.
What is the difference between a graph and a network?
A network is a graph used to model a real situation, usually with weights such as distances, times or costs on its edges. The vertices and edges stand for real places and links.