37
21 In this chapter 21A Vertices and edges 21B Planar graphs 21C Eulerian paths and circuits 21D Hamiltonian paths and circuits 21E Trees VCE VCE co cov v erage erage Area of study Units 1 & 2 • Geometry Undirected graphs and networks

Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

21In this chapter21A Vertices and edges21B Planar graphs21C Eulerian paths and

circuits21D Hamiltonian paths and

circuits21E Trees

VCEVCEcocovverageerageArea of studyUnits 1 & 2 • Geometry

Undirectedgraphs andnetworks

Gen. Maths Ch. 21(13) Page 153 Thursday, December 30, 1999 1:10 PM

Page 2: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

154

G e n e r a l M a t h e m a t i c s

Undirected graphs and networks

Graphs are an efficient way of summarising data in many practical problems. Thegraphs we will be dealing with in this chapter differ from those that we have workedwith in the past, as they consist of points connected by various lines. As there is noparticular order or direction to these lines, the graphs are defined as

undirected

graphsor

networks

.Undirected graphing is an area of mathematics dealing with problems such as plan-

ning a delivery route to visit a number of shops while travelling the least distance,designing a communications network to link a number of towns, organising the flow ofwork in a factory, or allocating jobs for increased efficiency.

Below are examples of undirected graphs or networks you may have come across:

Route map for the Melbourne Metropolitan Tram Network

The Swiss mathematician Leonhard Euler (pronounced

oyler

; 1707–1783) developedmuch of the theory of undirected graphs in his work on topology and graph theory.

H – O – H O = C = OMilliammeter

Voltmeter

12 v, 24 w Lamp

RectifierOA91

1000 ohm

50 mA

DC

+ –

AC

+

++

An electrical circuit

(H2O) (CO2)

The chemical molecules for water (left)and carbon dioxide (right)

Gen. Maths Ch. 21(13) Page 154 Thursday, December 30, 1999 1:10 PM

Page 3: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s

155

Vertices and edges

The map at right shows the main roads linking a number ofcountry towns in Victoria.

We can see that there are three main roads leading intoTraralgon, but only one joining Leongatha and Yarram. Themap is an example of an undirected graph or network sincethere are no arrows showing a particular direction.

The network consists of

vertices

(the towns) and

edges

(the roads). The

degree

of avertex is defined as the number of edges leading to or from that vertex. Therefore thedegree of the Traralgon vertex is 3 because there are 3 roads leading to or from there. Thedegree of the Yarram vertex is 2 because there are only 2 roads leading to or from there.

The graph is considered to be a

connected graph

since it is possible to reach eachvertex from any other one. A connected graph must have all vertices joined to at leastone other vertex. There cannot be any isolated vertices.

We use the term

multiple edge

if there is more than one edgelinking two vertices. For example, in the figure at right there is amultiple edge between vertices A and C.

The figure also contains a

loop

at vertex B. An edge whichconnects a vertex to itself is defined as a loop. When calculatingthe degree of a vertex, a loop counts as 2. Thus the degree of vertexB is 3; 1 for the edge connecting B to A plus 2 for the loop.

The figure is not a connected graph because not all vertices are connected to at leastone other vertex. E is therefore an

isolated vertex

as it is not able to be reached fromthe other vertices.

TrafalgarMoe

MorwellTraralgon

YarramLeongatha

A

C

B

D

E

For the following graph, state:a the number of vertices b the number of edgesc the degree of each vertex d whether the graph is connected.THINK WRITEa Count the number of vertices.

Note: The vertices are the points labelled A, B, C, D and E.

a The number of vertices is 5, that is,A, B, C, D and E.

b Count the number of edges.Note: The number of edges is found by counting the number of lines joining the vertices. Remember: A loop is counted as 2.

b The number of edges is 9.

c Count the degree of each vertex, that is, the number of edges leading to or from each vertex.Note:1. C contains a loop, which is counted as 2

when totalling edges.2. The degree of A is abbreviated to deg(A)

etc.

c Vertex A has 4 connections to other vertices, so deg(A) = 4.Vertex B has 3 connections to other vertices, so deg(B) = 3.Vertex C has 6 connections to other vertices, so deg(C) = 6.Vertex D has 3 connections to other vertices, so deg(D) = 3.Vertex E has 0 connections to other vertices, so deg(E) = 0.

d Answer the question. d The graph is not connected, as vertex E has no edges leading to or from it; that is, it is isolated from each of the other vertices.

AC

B

DE

A

B

C

DE

1WORKEDExample

Gen. Maths Ch. 21(13) Page 155 Thursday, December 30, 1999 1:10 PM

Page 4: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

156

G e n e r a l M a t h e m a t i c s

Draw a connected graph which has 6 vertices, 2 loops and 3 multiple edges. Determine the number of edges and the degree of each vertex.Note: There are numerous ways of drawing this connected graph using the given information.THINK WRITE

Draw 6 points and label themA, B, C, D, E, F.Draw edges connecting the points A to F.Note: As this diagram represents a connected graph, each vertex must be connected to at least one other vertex.Select two of the points and draw a loop on each of them.Select 3 pairs of points and draw an extra edge connecting each specific pair.Note: For this example, each step has been drawn in a different colour to highlight each stage.Count the number of edges.Note: A loop is counted as 2 when totalling edges.

There are 13 edges.

Determine the degree of each of the vertices, that is, count the number of edges leading to or from each vertex.Note: Vertices B and C have loops; thus they will each have an extra 2 added to their vertex sum.

deg(A) = 3; that is,

deg(B) = 5; that is,

deg(C) = 3; that is,

deg(D) = 4; that is,

deg(E) = 3; that is,

deg(F) = 4; that is,

1

2

3

4

5

6 Fig 1A

Fig 14B

C

D

Fig 17

E

F

2WORKEDExample

E F

A

D

B C

remember1. An undirected graph or network consists of vertices and edges.2. The degree of a vertex equals the number of edges connected to it.3. A loop adds 2 to the degree of a vertex.4. A connected graph has no isolated vertices.

remember

Gen. Maths Ch. 21(13) Page 156 Thursday, December 30, 1999 1:10 PM

Page 5: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 157

Vertices and edges

1 For each of the following graphs, state:

i the number of verticesii the number of edgesiii the degree of each vertex.

2 Which of the graphs in question 1 are connected?

3 Draw the graphs in question 1 that are not connected, and include extra edges to makethe graphs connected.

4 Which of the graphs in question 1 contain loops?

5 Draw a connected graph which has 7 vertices, 3 loops and 4 multiple edges. Deter-mine the number of edges and the degree of each vertex.

6 Draw a connected graph that has:

7 Determine the degree of each vertex in question 6.

8 If a graph has 5 vertices, what is the least number of edges it could have so that it isconnected?

9 Draw the following graphs:a number of vertices is 4, deg(A) = 2, deg(B) = 3, deg(C) = 3 and deg(D) = 2b number of vertices is 4, deg(E) = 4, deg(F) = 3, deg(G) = 2 and deg(H) = 1.

10 For this undirected graph:a determine the number of vertices, Vb determine the number of edges, Ec determine the degree of each vertexd determine whether or not the graph is connectede if the graph is not connected, suggest how it may become

connected.

a b c

d e f

a 5 vertices and 8 edges b 5 vertices and 6 edgesc 5 vertices and 14 edges d 5 vertices and 5 edgese 5 vertices and 3 edges.

21AWORKEDExample

1

C

BA

D C

BA

D

C

BA

D

C

BA

D

C

B

AD

E

A1

2

3

4

56

WORKEDExample

2

A

C

B

FE

D

HG

Gen. Maths Ch. 21(13) Page 157 Thursday, December 30, 1999 1:10 PM

Page 6: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

158 G e n e r a l M a t h e m a t i c s

11

The degree of the vertex, C, in this diagram is:A 3B 5C 2D 4E 6

12

If a connected graph has 6 vertices, the least number of edges it could have is:

13

The graph at right consists of:A 8 edges and 6 verticesB 6 edges and 12 verticesC 10 edges and 6 verticesD 6 edges and 8 verticesE 12 edges and 6 vertices

A 5 B 4 C 6 D 7 E 8

mmultiple choiceultiple choice

A

C

B

E D

mmultiple choiceultiple choice

mmultiple choiceultiple choice

A F

B

D

C

E

Gen. Maths Ch. 21(13) Page 158 Thursday, December 30, 1999 1:10 PM

Page 7: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 159

Planar graphsUndirected graphs that can be drawn with no crossing edges are called planar graphsor networks. Electronic circuits are examples of planar graphs.

Sometimes it is possible to redraw undirected graphs that have crossing edges andremove the crossovers. For example, the graph on the left may be redrawn as the graphon the right, a planar graph.

To show that the above graph was planar, we simply redrew each of the vertices andthen added in the edges making sure that there were no crossovers. However, this is notalways possible.

The graph at right is not planar.To redraw the graph, we commence with the edges from A,

and then add in the edges from B.

When we try to join C to F, we find that it must cross over an edge.

RegionsA planar graph divides the plane into a number of regions. A region,R, is an area from which it is not possible to move unless an edgeis crossed. Regions exist within the graph as well as outside thegraph.

The graph at right has 5 vertices, 9 edges and 6 regions (that is,5 regions from within the graph and 1 region outside the graph).

A B

D C

AB

D C

A B C

F E D

A B C

F E D

A B C

F E D

A B

C1

2

34

6

5

E D

Gen. Maths Ch. 21(13) Page 159 Thursday, December 30, 1999 1:10 PM

Page 8: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

160 G e n e r a l M a t h e m a t i c s

From the results obtained in worked example 3 we find that:

Figure and type of graph

Number of vertices (V)

Number of regions (R)

Number of edges (E) V + R – E

a Planar 9 8 15 2

b Not planar 4 1 2 3

c Planar 7 7 12 2

Redraw the following networks as connected planar graphs if possible.a b c

THINK WRITE

a Redraw each of the vertices. aAdd in the edges making sure there are no crossovers.

Answer the question. The network is a connected planar graph as there are no edges which cross over.

b Redraw each of the vertices. bAdd in the edges making sure there are no crossovers.

Answer the question. The network is not a connected planar graph. It is not possible to reach a particular vertex from all other vertices.

c Redraw each of the vertices. cAdd in the edges making sure there are no crossovers.

Answer the question. The network is a connected planar graph as there are no edges which cross over.

A

E

HG

D F

I

B CA

D

B C A E

FG

B D

C

12 A

E

HG

D F

I

B C

3

12

B C

A

D3

12

A E

FG

B D

C

3

3WORKEDExample

Gen. Maths Ch. 21(13) Page 160 Thursday, December 30, 1999 1:10 PM

Page 9: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 161In fact, if we analysed numerous planar graphs we would find, as Euler did, that in

each case the final column V + R − E would equal 2.Leonhard Euler developed a number of important results in the theory of planar

graphs, one of which is shown below.

For any connected planar graph, the relationship between the number of vertices, V, regions, R, and edges, E, is given by:

V + R – E = 2This is known as Euler’s Law.

a i Determine whether Euler’s formula holds for the given graph and state whether the graph is a connected planar graph.

ii Compare the sum of the degrees of all the vertices and the number of edges.

iii Establish how many odd-degree vertices there are.b Determine whether Euler’s formula holds for the given information

and state whether a connected planar graph would be produced.i V = 7, R = 4, E = 8 ii V = 7, R = 5, E = 10

Continued over page

THINK WRITE

a i Write down Euler’s formula. a i V + R − E = 2Determine the number of vertices. V = 6Determine the number of edges. E = 8Determine the number of regions. Note: Remember there is an outside region which must be included in the total.

R = 4

Substitute the V, R, and E values into the LHS of Euler’s formula.

LHS = V + R − E= 6 + 4 − 8

Evaluate. = 10 − 8= 2

Compare the answer obtained with the RHS of the equation.

RHS = 2RHS = LHS

Answer the question. Euler’s formula holds for the given graph so the given graph is a connected planar graph.

ii Determine the degree of each vertex.

ii deg(A) = 2 deg(D) = 4deg(B) = 3 deg(E) = 2deg(C) = 3 deg(F) = 2

Determine the degree of vertices sum. 2 + 3 + 3 + 4 + 2 + 2 = 16Determine the number of edges of the graph.

There are 8 edges.

Compare the results obtained in steps 2 and 3.

The degree of all the vertices is twice the number of edges.

iii Determine how many odd-degree vertices there are.

iii There are 2 odd-degree vertices, that is, an even number of odd-degree vertices.

AB

CD

E

F

1234

5

6

7

8

1

23

4

4WORKEDExample

Gen. Maths Ch. 21(13) Page 161 Thursday, December 30, 1999 1:10 PM

Page 10: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

162 G e n e r a l M a t h e m a t i c s

As we observed in worked example 4, and as Leonhard Euler discovered:

For any connected planar graph:• the sum of the degree of all the vertices = 2 × number of edges• there is always an even number of odd-degree vertices.

We will work with Leonhard Euler’s results in the following exercise.

THINK WRITE

b i Write down Euler’s formula. b i V + R − E = 2Substitute the V, R, and E values into the LHS of Euler’s formula.

LHS = V + R − E= 7 + 4 − 8

Evaluate. = 11 − 8= 3

Compare the answer obtained with the RHS of the equation.

RHS = 2RHS ≠ LHS

Answer the question. Euler’s formula does not hold for the given information. This combination of values would not produce a connected planar graph.

ii Write down Euler’s formula. ii V + R − E = 2Substitute the V, R, and E values into the LHS of Euler’s formula.

LHS = V + R − E= 7 + 5 − 10

Evaluate. = 12 − 10= 2

Compare the answer obtained with the RHS of the equation.

RHS = 2RHS = LHS

Answer the question. Euler’s formula holds for the given information. This combination of values would produce a connected planar graph.

12

3

4

5

12

3

4

5

remember1. A planar graph has no crossover edges.2. A planar graph divides the plane into a number of regions.3. When counting regions, the region around the outside of the graph is counted

as 1.4. For any connected planar graph:

(a) Euler’s Law states that V + R − E = 2(b) the sum of the degree of all the vertices = 2 × number of edges(c) there is always an even number of odd-degree vertices.

remember

Gen. Maths Ch. 21(13) Page 162 Thursday, December 30, 1999 1:10 PM

Page 11: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 163

Planar graphs

1 Redraw the following networks as connected planar graphs, if possible.

2 a Copy and complete the table below for each of the following graphs.

b Copy and complete the following sentence.

For any planar graph, V + R − E = .

This formula is known as Law.

3 a Determine whether Euler’s formula holds for the given graph and state whether the graph is a connected planar graph.

b Compare the sum of the degrees of all the vertices and the number of edges.

c Establish how many odd-degree vertices there are.

a b c d

i ii iii iv

v vi vii viii

Number of vertices (V)

Number of regions (R)

Number of edges (E) V + R – E

i

ii

iii

iv

v

vi

vii

viii

21BWORKEDExample

3

WORKEDExample

4aA

D

B

C

E

F

Gen. Maths Ch. 21(13) Page 163 Thursday, December 30, 1999 1:10 PM

Page 12: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

164 G e n e r a l M a t h e m a t i c s

4 Complete the tasks listed below for each of the following graphs.

i Find the number of vertices.ii Find the number of regions.iii Write down the degree of each vertex.iv Find the total of all these degrees.v Write down the number of edges.vi Compare the results obtained in parts iv and v and then copy and complete the

following sentence:For any connected planar graph, the sum of the degrees of all the vertices = × number of edges.

5 For each of the graphs in question 4, write down how many vertices there are whosedegree is an odd number.

6 Is the following statement true or false?‘In any connected graph, there is always an even number of odd-degree vertices.’

7 Determine whether Euler’s formula holds for the given information and state whethera connected planar graph would be produced.

8 Use Euler’s formula for each of the connected planar graphs below to determine thevalue of the unknown.

9

The number of vertices a connected planar network with 6 edges and 3 regions has is:

a b c

d e f

a V = 8, R = 4, E = 10 b V = 4, R = 3, E = 5c V = 7, R = 5, E = 10 d V = 10, R = 8, E = 15e V = 5, R = 4, E = 6 f V = 6, R = 8, E = 4g V = 4, R = 6, E = 8 h V = 7, R = 8, E = 13i V = 9, R = 4, E = 11 j V = 12, R = 4, E = 14

a V = 4, R = 7, E = ? b V = 5, R = 6, E = ?c V = 4, R = ?, E = 5 d V = 4, R = ?, E = 6e V = ?, R = 8, E = 11 f V = ?, R = 2, E = 4g V = 8, R = 5, E = ? h V = 5, R = ?, E = 10i V = ?, R = 8, E = 12 j V = ?, R = 5, E = 7

A 1 B 5 C 4 D 6 E 3

A B

C D

AC

B

D E

A

B

D E

C

A B

D E

F

C

A B

E F

C D

AC

DF

G

E

B

WORKEDExample

4b

mmultiple choiceultiple choice

Gen. Maths Ch. 21(13) Page 164 Thursday, December 30, 1999 1:10 PM

Page 13: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 16510

The number of regions a connected planar network with 8 edges and 7 vertices has is:

11For the given graph ,

A 6 B 5 C 4 D 3 E 2

A V = 8, R = 5, E = 12 B V = 7, R = 5, E = 6C V = 6, R = 6, E = 12 D V = 7, R = 6, E = 6E V = 8, R = 6, E = 12

Schlegel diagramsA tetrahedron (one of the 5 platonic solids) may be represented as a planar graph. (It may help to imagine a squashed version of the tetrahedron.)

Such a representation is called a Schlegel diagram.Draw the corresponding Schlegel diagram for each of the following platonic solids.

cube octahedron dodecahedron icosahedron

Map colouringHow many different colours are needed to colour a map so that no two adjoining regions are the same colour? Regions that meet at a point only may be the same colour.

1 Copy and colour the ‘map’ at right using the minimum of colours.

mmultiple choiceultiple choice

Fig 60

A

BC D

E

F

GH

mmultiple choiceultiple choice

tetrahedron

Gen. Maths Ch. 21(13) Page 165 Thursday, December 30, 1999 1:10 PM

Page 14: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

166 G e n e r a l M a t h e m a t i c s

2 The simplified map of Africa below shows borders between countries. Print it from your Maths Quest CD and colour it using the minimum number of colours.

3 Suggest the minimum number of colours needed to colour any map.

Africa – Political

N

0 500 1000 km

Azimuthal Equal Area Projection

Gen. Maths Ch. 21(13) Page 166 Thursday, December 30, 1999 1:10 PM

Page 15: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 167

Eulerian paths and circuitsA path is a series of vertices connected by edges: it displays howto travel from one vertex to another via an edge. Just as in everydaylife a path is something we can walk along, we may consider apath in a graph as something that can be traversed. In a path thevertices are used only once and the edges are traversed (passedover) only once; that is, edges and vertices listed in a path may not be repeated.

Some examples of paths in the graph above are: ABD, ABDE and ACDB. Thesequence ABCA is not a path since there is no edge which connects vertex B to vertexC.

A circuit (or cycle) is a path which starts and finishes at the same vertex and no edgeis traversed (passed over) more than once.

An example of a circuit from the above graph is ABDCA.

1. A path is a series of vertices connected by edges.2. A circuit (or cycle) is a path which starts and finishes at the same vertex and no

edge is traversed more than once.

An Eulerian path is a path which uses each edge in a graphonly once, however a vertex may be repeated.

For the graph at right, an Eulerian path could start at A,travel to C–D–A–B–D then finish at E. Another Eulerian pathis E–D–C–A–B–D–A.

Do you remember a children’s game in which you must draw a pictureof an envelope (or a house) without lifting your pencil off the paper andwithout going over any line twice?

This is an example of an Eulerian path.

A graph may have more than one Eulerian path or it may not bepossible to draw any Eulerian paths. An example of a graph for whichan Eulerian path is not possible is shown at right.

If an Eulerian path starts and finishes at the same vertex, it iscalled an Eulerian circuit. Therefore, an Eulerian circuit is apath which starts and finishes at the same vertex, uses all theedges and does not go over any edge twice. An Eulerian circuitmay be drawn for the graph at right.

The Eulerian circuit is 1–2–3–5–4–3–1.Eulerian paths and circuits have many real-life applications in areas such as planning

delivery routes and communication networks.Consider the following example of a practical application of an Eulerian circuit.

Postal workers collect their mail from the distribution centre, deliver mail along theirparticular route where each street (edge) is crossed once. At the end of their deliveryroute, the postal workers return to the distribution centre. Other examples includerecycling and garbage collection, newspaper and junk mail deliveries and so on.

Fig 61A

B

C D

E

Fig 62A B

C D

E

1

2

3

4 5

Gen. Maths Ch. 21(13) Page 167 Thursday, December 30, 1999 1:10 PM

Page 16: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

168 G e n e r a l M a t h e m a t i c s

1. An Eulerian path is a path which uses each edge in a graph only once.2. An Eulerian circuit is an Eulerian path which starts and finishes at the same

vertex.

For each of the following graphs determine whether it is possible to draw an:i Eulerian path andii Eulerian circuit.a b

THINK WRITE

a i Specify a path in which each edge is only used once.Note: A vertex may be used more than once.

a i Begin at vertex A;travel to B–D–A–C–D–E.

Answer the question. It is possible to specify an Eulerian path from the given graph. The Eulerian path is A–B–D–A–C–D–E.

ii Specify a path which begins and ends at the same vertex but uses each edge only once.

ii Begin at vertex B; travel toD–C–A–D–E. Cannot get back toB without going over edges already covered.

Attempt another path.Note: In this case any path attempted will lead to the same result.

Begin at vertex C, travel toD–B–A–D–E. Cannot get back toC without going over edges already covered.

Answer the question. It is not possible to specify an Eulerian circuit from the given graph without going over some of the edges twice.

b i Specify a path in which each edge is only used once.Note: A vertex may be used more than once.

b i Begin at vertex A;travel to B–F–D–B–C–D–E–F–A.

Answer the question. It is possible to specify an Eulerian path from the given graph. This is actually a special case of an Eulerian path as it is also an Eulerian circuit A–B–F–D–B–C–D–E–F–A.

Fig 66A B E

C D

Fig 67A F E

B C

D

1

2

1

2

3

1

2

5WORKEDExample

Gen. Maths Ch. 21(13) Page 168 Thursday, December 30, 1999 1:10 PM

Page 17: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 169

After studying many undirected graphs dealing with Eulerian paths and circuits, it wasfound that for an Eulerian path and an Eulerian circuit to be obtained from a given net-work, the following characteristics had to be satisfied:

1. An Eulerian path is possible if the number of odd-degree vertices is 0 or 2.2. An Eulerian circuit is possible if each of the vertices has even degrees.

Let us see if these characteristics have been satisfied in worked example 5. Recallthat in worked example 5a, only an Eulerian path was satisfied. However, in workedexample 5b, both an Eulerian path and an Eulerian circuit were specified.

If we examine the degree of each vertexin worked example 5a, we find that thereare two odd number degree vertices; that is,A and E. Therefore the characteristics foran Eulerian path have been satisfied. How-ever, we were unable to specify an Euleriancircuit as each vertex did not have an evendegree.

If we examine the degree of each vertexin worked example 5b, we find that thereare 0 odd number degree vertices.

This implies that each vertex has an even degree. Therefore the characteristics forboth an Eulerian path and an Eulerian circuit have been satisfied.

Vertex A B C D E F

Degree 2 4 2 4 2 4

THINK WRITE

ii Specify a path which begins and ends at the same vertex but uses each edge only once.

ii Begin at vertex C; travel toD–E–F–A–B–F–D–B–C.

Answer the question.Note: In this case it is possible to obtain an Eulerian circuit from any vertex.

It is possible to specify an Eulerian circuit from the given graph. One possible Eulerian circuit isC–D–E–F–A–B–F–D–B–C.

1

2

Vertex Degree

A 3 ⇒ Odd

B 2

C 2

D 4

E 1 ⇒ Odd

remember1. A path is a series of vertices connected by edges.2. A circuit (or cycle) is a path which starts and finishes at the same vertex and no

edge is traversed more than once.3. An Eulerian path is a path which uses each edge in a graph only once.4. An Eulerian circuit is an Eulerian path which starts and finishes at the same

vertex.5. An Eulerian path is possible if the number of odd vertices is 0 or 2.6. An Eulerian circuit is possible if each of the vertices has even degrees.

remember

Gen. Maths Ch. 21(13) Page 169 Thursday, December 30, 1999 1:10 PM

Page 18: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

170 G e n e r a l M a t h e m a t i c s

Eulerian paths and circuits

1 For which of the following graphs is it possible to draw an:

2 Copy and complete this table for the graphs in question 1.

Note: The shaded regions indicate that the particular vertex does not exist for thegiven graph.

3 Using the results from question 2, copy and complete these rules to check if it ispossible to draw an Eulerian path or an Eulerian circuit.a An Eulerian path is possible if the number of odd degree vertices is or .b An Eulerian circuit is possible if the vertices all have degrees.

4 For the following networks:i state the degree of each vertexii specify whether an Eulerian path is possible

a Eulerian path b Eulerian circuit?i ii iii

iv v vi

Vertex

Degree of vertex in

graph i

Degree of vertex in

graphii

Degree of vertex in

graphiii

Degree of vertex in

graphiv

Degree of vertex in

graphv

Degree of vertex in

graphvi

A

B

C

D

E

F

Number of odd vertices

Eulerian path

(Yes/No)

Eulerian circuit

(Yes/No)

21CWORKEDExample

5A B

D C

A B

D C

A

E

B

D C

A B

D C

A D

B C

E

A C

F E

B D

Gen. Maths Ch. 21(13) Page 170 Thursday, December 30, 1999 1:10 PM

Page 19: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 171iii specify whether an Eulerian circuit is possible.

5 The graph at right shows a number of roads in a town. Thecouncil is organising a street sweeping route so that the same roadis not used twice. The street sweeping truck is to start and finishat the council depot, D.a Explain why it is not possible to do this without going down

one street twice.b If one street were to be left out, it would be possible to complete the task without

going down the same street twice. Which street has to be left out?

6 The network at right shows a number of paths in a park.a Is it possible to start at A and walk along each pathway once

and return to A?b If it is, draw such a path. If not, which path needs to be

walked along twice?

7For this graph, a suitable Eulerian path would be:A D–B–F–C–AB A–C–F–C–DC A–B–E–D–C–AD C–F–B–D–C–A–B–E–DE C–F–B–E

Questions 8 and 9 refer to the following graphs.

8The graphs which have an Eulerian path are:

9The graphs which have an Eulerian circuit are:

10If a graph has only even degree vertices then:A it is possible to draw an Eulerian circuit but not an Eulerian pathB it is not possible to draw either an Eulerian circuit or an Eulerian pathC it is possible to draw an Eulerian circuit but it depends on the graph whether an

Eulerian path can be drawnD it is possible to draw an Eulerian path but not an Eulerian circuitE it is possible to draw an Eulerian path and an Eulerian circuit.

a b c d

i ii iii

A i only B i and ii only C i, ii and iii D ii and iii only E i and iii only

A i only B ii only C iii only D i and ii only E ii and iii only

A B

F

G H

E

C

D

A

E

B

C D

A B

C D

A

H

BC

EF

D

G

A D H

B E I

C F J

GK

A

B

HD

C

F

E

G

J

I

mmultiple choiceultiple choiceA B

C D

F E

A D

B C

F

C

B D

A E A

B

D

C

E

mmultiple choiceultiple choice

mmultiple choiceultiple choice

WorkS

HEET 21.1

mmultiple choiceultiple choice

Gen. Maths Ch. 21(13) Page 171 Thursday, December 30, 1999 1:10 PM

Page 20: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

172 G e n e r a l M a t h e m a t i c s

Hamiltonian paths and circuitsEulerian paths are used when we need to find a way to travel along each edge onlyonce. This is useful in areas such as postal or delivery routes and garbage collections.However, there are occasions when we are interested in travelling to each vertex onlyonce, but it is not important that we travel along each edge.

For example, if the vertices are five tourist areas to be visited ina town, we may be interested in visiting each area (vertex) but notin travelling along each road. A path that passes through eachvertex once is called a Hamiltonian path (named after Sir WilliamHamilton [1805–65], a Scottish mathematician). A Hamiltonianpath must pass through each vertex once, but does not have to use each edge. Usuallyall of the edges are not required to draw a Hamiltonian path.

In the graph shown (above right), one Hamiltonian path is A–B–C–D–E. Another isA–E–D–C–B. It is possible to specify a number of Hamiltonian paths from a given graph.

A Hamiltonian path that starts and finishes at the same vertex iscalled a Hamiltonian circuit, in this case, one vertex is usedtwice: for starting and finishing.

In the network at right, C–D–E–A–B–C is an example of aHamiltonian circuit.

1. A Hamiltonian path passes through each vertex only once. It may not use all of the edges.

2. A Hamiltonian circuit is a Hamiltonian path which starts and finishes at the same vertex.

A B

E D

C

B A

E

C

D

Determine which of the following have a:i Hamiltonian pathii Hamiltonian circuit.a b c

THINK WRITEa i Specify a Hamiltonian path for the

given graph.Note: Each vertex must be used only once. However, each edge does not need to be used.There may be more than one Hamiltonian path.

a i Begin at vertex C; travel to D–B–A–E.Or begin at vertex A; travel toE–D–B–C.

Answer the question. It is possible to specify a Hamiltonian path from the given graph. Possible Hamiltonian paths include: C–D–B–A–E or A–E–D–B–C.

C

DE

AB A B C D

F E

A

C D

B E

1

2

6WORKEDExample

Gen. Maths Ch. 21(13) Page 172 Thursday, December 30, 1999 1:10 PM

Page 21: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 173

THINK WRITE

ii Specify a Hamiltonian circuit for the given graph.Note: We must begin and end at the same vertex and pass each of the other vertices once only.

ii Begin at vertex D; travel toC–B–A–E–D.

Answer the question. It is possible to specify a Hamiltonian circuit from the given graph. A possible Hamiltonian circuit is D–C–B–A–E–D.

b i Specify a Hamiltonian path for the given graph.

b i Begin at vertex A; travel toB–C–F–E–D.

Answer the question. It is possible to specify a Hamiltonian path from the given graph. The Hamiltonian path isA–B–C–F–E–D.

ii Specify a Hamiltonian circuit for the given graph.Note: To get back to vertex A, we will have to go through vertices B and C.

ii Begin at vertex A; travel toB–C–D–E–F. It is not possible to get back to A without passing throughB and C again.

Answer the question. It is not possible to specify a Hamiltonian circuit as we cannot get back to the start, that is, to vertex A, without passing through B and C again.

c i Specify a Hamiltonian path for the given graph.

c i Begin at vertex A; travel to B–C. We cannot go any further as we are unable to get to vertex D and E.

Answer the question. It is not possible to specify a Hamiltonian path as the graph is not connected.

ii Specify a Hamiltonian circuit for the given graph.

ii Begin at vertex A; travel to B–C. Again, it is not possible to reach vertices D and E and then get backto A.

Answer the question. It is not possible to specify a Hamiltonian circuit as the graph is not connected.

1

2

1

2

1

2

1

2

1

2

Gen. Maths Ch. 21(13) Page 173 Thursday, December 30, 1999 1:10 PM

Page 22: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

174 G e n e r a l M a t h e m a t i c s

Shortest pathThe shortest path in a graph has a number of applications in business: minimising thedistance travelled, minimising the time for a journey or a series of jobs and minimisingtransport costs. In shortest path problems, we usually have a starting point (for examplea depot, main office or a warehouse) and require a Hamiltonian circuit with the leastdistance. One method for finding the shortest path is to move along the network choosingthe edge with the shortest distance or least cost until a Hamiltonian circuit is formed.

The graph at right shows a delivery network with O being the central office.Gaetano must deliver items to each of the six places labelled 1, 2, . . ., 6. The edges represent roads between the places. Plan a delivery route for Gaetano to deliver the items to each of the six places, without going to the same place twice. Gaetano must return to the central office after the items have been delivered.THINK WRITE

Specify a Hamiltonian path for the given graph.Note: Gaetano must visit each vertex only once and start and finish at O. Therefore, we need a Hamiltonian circuit.

Begin at vertex O; travel to 2–1–3–4–6–5–O.

Check that each vertex (except O) has only been used once.

Each vertex (except O) has only been used once.

Answer the question.Note: In this example there is more than one possible solution.

One possible solution for Gaetano’s route is O–2–1–3–4–6–5–O. Another possible solution is O–5–6–4–3–1–2–O.

1

2 5

6

4

3

O

1

2

3

7WORKEDExample

A distributor supplies retail outlets labelled A, B, C, D and E from a warehouse, W. The distances along the roads are shown in the network at right.Find the shortest delivery route that goes to each retail outlet and returns to the warehouse.THINK WRITE

Obtain a Hamiltonian circuit starting and finishing at W. Look at the possible routes WA, WD and WC. Choose the route of the least distance, that is, WD. Continue from D, until a Hamiltonian circuit is formed choosing the least distance.

Begin at vertex W, travel to D–A–B–E–C–W.

Highlight the selected route.Answer the question. The shortest delivery route, W–D–A–B–E–C–W,

is highlighted in the above diagram.The distance for the shortest route is 56 km, that is, 8 + 3 + 6 + 11 + 18 + 10 = 56 km.

A

D

B

EC

W

10 km9 km

13 km

7 km3 km8 km

9 km

11 km

18 km

6 km

1

2

A

D

B

EC

W

10 km9 km

13 km

7 km3 km8 km

9 km

11 km

18 km

6 km

3

8WORKEDExample

Gen. Maths Ch. 21(13) Page 174 Thursday, December 30, 1999 1:10 PM

Page 23: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 175In other problems we may not require a Hamiltonian circuit as many shortest path

situations require simply travelling in one direction from the starting point to thedestination. A method similar to that used in worked example 8 may be used; choosingthe shortest distance edge and moving along the network until the destination is reached.

There is a lot of trial and error involved in calculating the shortest distance; it is advis-able to use a pencil, eraser and scrap paper for calculations to decide the shortest path.

Find the shortest distance along the roads between towns A and G in the given diagram.

THINK WRITE

Obtain the route which gives the shortest distance from A to G.Note: We do not require a Hamiltonian circuit as we are moving directly from A to G and do not need to visit all of the towns.Start at vertex A. Look at the possible routes AB, AC and AD.Choose the route of the least distance, that is, AB.From B, look at BG, BF and BC.Again choose the route of the least distance, that is, BF.Note: The distance from towns B to G via F was shorter than the more direct route of B to G (that is, 27 km compared to 31 km).

Begin at vertex A; travel to B–F–G.

Highlight the selected route.Answer the question. The shortest delivery route from A and G,

A–B–F–G, is highlighted in the above diagram.The distance for the shortest route is 38 km, that is, 11 + 10 + 17 = 38 km.

18 km9 km

9 km17 km

14 km 22 km

10 km11 km

31 km

15 k

m

25 km

12 k

m

A

D E

GF

C

B

1

10 km17 km

31 km

GF

B

2

18 km9 km

9 km17 km

14 km 22 km

10 km11 km

31 km

15 k

m

25 km

12 k

m

A

D E

GF

C

B

3

9WORKEDExample

remember1. A Hamiltonian path passes through each vertex only once. It may not use all of

the edges.2. A Hamiltonian circuit is a Hamiltonian path which starts and finishes at the

same vertex.3. To find the shortest path in a network, choose the edge of least distance and

move along the network until the destination is reached. This usually requires a trial and error approach.

remember

Gen. Maths Ch. 21(13) Page 175 Thursday, December 30, 1999 1:10 PM

Page 24: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

176 G e n e r a l M a t h e m a t i c s

Hamiltonian paths and circuits

1 Determine which of the following have a:

2 The graph at right represents a delivery route with O being thecentral office. A courier must deliver items to each of the eightplaces labelled 1, 2, . . ., 8. The edges represent roads betweenthe places. Plan a delivery route for the courier to deliver theitems to each of the eight places without going to the same placetwice. The courier must return to the central office after the items have been delivered.

a Hamiltonian path b Hamiltonian circuit.i ii iii

iv v vi

21DWORKEDExample

6

1

67 8

5

32

4 O

WORKEDExample

7

Gen. Maths Ch. 21(13) Page 176 Thursday, December 30, 1999 1:10 PM

Page 25: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 1773 Construct a graph for which a Hamiltonian circuit is 4–3–2–1–5–4.

4 Draw a graph that does not have a Hamiltonian path.

5 Which graphs in question 1 also have an Eulerian path?

6 A distributor located at O supplies shops labelled A to F. The distances are in kilometres. Find the shortest delivery route from the depot at O that visits each shop and returns to the depot.

7 A delivery firm has to collect goods at storage places E, F, G, H and I and deliver them to the depot at D. Find the shortest route from the depot visiting each storage place and returning to the depot.

8 Find the length of the shortest Hamiltonian circuit in each of the following.

(Hint: You may find it easiest to start in the top left-hand corner of each network.)

9 The table shows the distance, in km, between storage points A, B, C, E, F and G anda depot D.

Note: The shaded region indicates that there is no road connectingthe two towns.a Transfer the information from the above table onto a copy of

the graph at right.b Find the shortest path from the depot, visiting each storage

point and finishing at the depot.

10 Find the shortest distance along the roads, between the towns S and F in each of thefolowing diagrams. (Note that distances are in kilometres.)

a b c d

A B C E F G

D 8 12 15 16

A 15 12

B 10 22

C 29 14

E 15

F 19

a b c

WORKEDExample

8

A

B C

O D E

F

6 711

2216

17

1010

35 5

5

8 km

11 k

m

9 km

16 km

20 km

7 kmD

I H G

E F15 km10 km8 km

6 km 12 km

45

5

4

4

4 57

7

6

6

53 3

44

5 4

6 9 6810

10

11

7 7

12

12 10

8

7

5

4 3

410

AD E

F

GC

B

WORKEDExample

9

6

58

6 69

10

88

7 7

33

A

C D

B

F

GE

S

9

4

4 77

6

10

18

75 13

2110

10

S

AB

FGE

DC

6

6

6

10

10

12 17

19

12

1211

25

EC

S

A B

D F

G

Gen. Maths Ch. 21(13) Page 177 Thursday, December 30, 1999 1:10 PM

Page 26: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

178 G e n e r a l M a t h e m a t i c s

11 For the network shown in the diagram at right, find theshortest distance between:

12 A tour of six country towns is to start and finish atBendigo. Find the shortest distance tour.

13 The distance, in km, between five towns is shown in the table below.

Note: The shaded region indicates that there is no road connecting the two towns.a Transfer the information from the above table onto a copy of the

graph at right.b A tour is planned to start and finish at A and visit all of the towns.

Find the shortest distance for the tour.c If the tour were to start and finish at C, would the shortest distance

be the same?d A new tour, starting and finishing at A, is planned to visit all the towns and a

further town, F. The distances from B to F, C to F and E to F are 476, 429 and319 km respectively. Find the shortest distance tour now possible.

14

A Hamiltonian circuit for the graph at right is:

15

The length of the shortest Hamiltonian circuit is:

a A and H b E and G.

B C D E

A 300 353 417 280

B 219 453 345

C 291 402

D 258

A A–D–E–C–F–G–A B A–D–B–C–E–C–F–G–AC A–D–E–C–B–F–G D A–D–E–C–B–F–G–AE A–G–F–B–D–C–E–A

A 53 km B 47 km C 56 kmD 40 km E 51 km

10

1014

13

12

1122

13

8

6

99

4

5

E

A

C

B G

HD

F

Mildura

Swan Hill

Kerang

BendigoHorsham

Ouyen

212 km

103 km225 km

60 km

115 km219 km

140 km

234 km247 km

D

E

AB

C

mmultiple choiceultiple choice

A D

F C

BEG

WorkS

HEET 21.2

mmultiple choiceultiple choice

3 km

12 km

12 km

17 k

m

13 k

m

2 km

9 km

15 km

5 km

14 km

A B

C

D

E

F

Gen. Maths Ch. 21(13) Page 178 Thursday, December 30, 1999 1:10 PM

Page 27: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 179

TreesA tree is a connected graph without any circuits, loops or multiple edges.

Examples of trees include: and

Since a tree cannot have any circuits or loops, it contains only one region.Examples of graphs which are not trees include:

and

This is not a tree This is not a tree This is not a tree because it is because the graph because the grapha circuit. contains a loop. contains a multiple edge.

Trees are used in transportation and communication networks, in computer pro-gramming, in planning projects to represent independent activities or structures, and inroad and railway planning.

In order for any network to be defined as a tree, it must satisfy the following criteria:1. the graph must be connected2. the graph must not contain any circuits, loops or multiple edges3. the graph must contain only one region.

1 2 4

5

3

C DA

E

B

A B

C D D C

B A

1

2

3

4 5

Which of the following are trees?a b c

THINK WRITEa Determine whether the graph is connected. a This graph does not represent a tree since

it is not connected.b Determine whether the graph is

connected.b The graph is connected.

Determine whether the graph contains any circuits, loops or multiple edges.

This graph does not represent a tree since it contains a circuit, that is, 1–2–4–1.

c Determine whether the graph is connected. c The graph is connected.Determine whether the graph contains any circuits, loops or multiple edges. Count the number of regions.

This graph does represent a tree as it meets each of the criteria, that is, this is a connected graph without any circuits, loops or multiple edges. There is only 1 region.

1 2

3 4

1 2

3 4

1 2

5 6

4 3

1

2

12

10WORKEDExample

Gen. Maths Ch. 21(13) Page 179 Thursday, December 30, 1999 1:10 PM

Page 28: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

180 G e n e r a l M a t h e m a t i c s

The tree obtained in worked example 11 is one possible spanning tree for the graph. Aspanning tree is a tree that includes all the vertices in the graph. Find other spanningtrees in worked example 11 by removing different edges.

Often it is necessary to find a minimal spanning tree; that is, a spanning tree with theminimum length (or cost, or time).

To find a minimal spanning tree:1. select the edge with the minimum value. If there is more than one such edge,

choose any one of them.2. select the next smallest edge, provided it does not create a cycle.3. repeat step 2 until all the vertices have been included.

a Remove the edges from this graph to produce a tree.b Comment on the relationship between the number of edges and the

number of vertices.

THINK WRITE

a Look at the given graph and identify any circuits.

a There are 4 circuits: A–B–C–A, B–D–E–B, B–E–F–B and B–D–E–F–B.

Remove one of the edges from circuit A–B–C–A, say BC.

Remove the edge BE from circuitB–D–E–F–B

Remove the edge BF from circuitB–D–E–F–B.

b Count the number of vertices, V. b V = 6

Count the number of edges, E. E = 5

Answer the question. The difference between the vertices and edges in a tree is 1; that is, V − E = 1.

A

C

D

B E

F

1

2 A

C

D

B E

F

3 A

C

D

B E

F

4 A

C

D

B E

F

1

2

3

11WORKEDExample

Gen. Maths Ch. 21(13) Page 180 Thursday, December 30, 1999 1:10 PM

Page 29: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 181

a Find the minimal spanning tree of the network shown at right.b Comment on the relationship between the number of edges and

the number of vertices.

THINK WRITE

a Select the edge with the smallest value and highlight it.

a The smallest edge is CE.

Select the next smallest edge and highlight it.

The next smallest edge is CA.

Select the next smallest edge and highlight it.

The next smallest edge is ED.

Continue this process until vertices B and F are connected and highlighted.Note: BC and DF respectively are the next smallest edges.Answer the question. The minimal spanning tree is shown

above. Its value is 4 + 6 + 3 + 5 + 7 = 25.b Count the number of vertices, V. b V = 6

Count the number of edges, E. E = 5Answer the question. The difference between the vertices and

edges in a tree is 1; that is, V − E = 1.

A C D FE

B8 6

43 5

76

1014

12

1

A C D FE

B

3

2

A C D FE

B

43

3

A C D FE

B

43 5

4

A C D FE

B

43 5

6

7

5

123

12WORKEDExample

remember1. A tree is a connected graph without any circuits, loops or multiple edges which

contains only one region.2. A spanning tree is a tree that includes all the vertices in the graph.3. A minimal spanning tree is a spanning tree with the minimum length (or cost,

or time).4. To find a minimal spanning tree:

(a) select the edge with the minimum value. If there is more than one such edge, choose any one of them.

(b) select the next smallest edge, provided it does not create a cycle.(c) repeat step b until all the vertices have been included.

5. The vertices and edges in a tree are related by the equation V − E = 1.

remember

Gen. Maths Ch. 21(13) Page 181 Thursday, December 30, 1999 1:10 PM

Page 30: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

182 G e n e r a l M a t h e m a t i c s

Trees

1 Which of the following are trees?

For those networks which are not trees, give reasons why they are not.

2 Change those graphs in question 1 that are not trees into trees by removing or addingedges.

3 a i Draw a tree with 5 vertices. ii How many edges are there?b i Draw a tree with 11 vertices. ii How many edges are there?c Copy and complete: If a tree has V vertices, the number of edges is given by

E = .

4 Use the result from question 3 to find how many vertices there are in a tree with:

5 Construct spanning trees for the following graphs:

6 Find the value of the minimal spanning tree for each of the following graphs.

7 A communication network is to be developed linking sixtowns. The distances (in km) between the towns are shownin the graph at right. Calculate the minimal spanning tree sothat the length of cabling used to connect the towns is aminimum.

a b c d

e f g h

a 8 edges b 9 edges c 16 edges d 17 edges e 20 edges

a b c d

a b c

d e f

21EWORKEDExample

10

WORKEDExample

11

WORKEDExample

12 8

7

41

2 3

6 5

34

26

5

5 35

7

6

4

4

2

8

4

5 55

5 5

5

6

33

4

5

4

49

6 5

74 4

2

5

35

66

6

7 43 3

374

4

5

64

5

755

9780

62

58 47

52

7684

143

165

143

Gen. Maths Ch. 21(13) Page 182 Thursday, December 30, 1999 1:10 PM

Page 31: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 1838

The following graphs which represent trees are:

9The network at right, when changed to a tree, will resemble whichof the following?

i ii iii iv

A i and iv only B i and ii only C ii and iii onlyD iii and iv only E all of them

A B C

D E

mmultiple choiceultiple choice

mmultiple choiceultiple choice

A

CE

B

DF

A

C

EB

DF

A

C

EB

DF

A

C

E

BD

F

A

C

E

BD

F

A

C

EB

D

F

Gen. Maths Ch. 21(13) Page 183 Thursday, December 30, 1999 1:10 PM

Page 32: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

184 G e n e r a l M a t h e m a t i c s

Vertices and edges• An undirected graph or network consists of vertices and edges.• The degree of a vertex is the number of edges leading

to or from that vertex. A loop counts as 2 edges.• In a connected graph it is possible to reach each vertex

from any other vertex. A connected graph must not have any isolated vertices.

Planar graphs• A planar graph has no crossover edges.• A planar graph divides the plane into a

number of regions.• When counting regions, the region around

the outside of the graph is counted as 1.• For any connected planar graph: V = 5

Euler’s Law states that: V + R − E = 2. E = 8The sum of the degree of all the vertices = R = 52 × number of edges. V + R − EThere is always an even number of odd-degree = 5 + 5 − 8vertices. = 2

Eulerian paths and circuits• A path is a series of vertices connected by edges.• A circuit (or cycle) is a path which starts and finishes at the same vertex and no edge

is traversed more than once.• An Eulerian path is a path which uses each edge in a graph only once, however a

vertex may be repeated.• An Eulerian circuit is an Eulerian path which starts and finishes at the same vertex.• An Eulerian path is possible if the number of odd vertices is 0 or 2.• An Eulerian circuit is possible if each of the vertices has even degrees.

Hamiltonian paths and circuits• A Hamiltonian path passes through each vertex only once. It is not necessary to use

all of the edges.• A Hamiltonian circuit is a Hamiltonian path that starts and finishes at the same vertex.• To find the shortest path in a network, choose the edge of least distance and move

along the network until the destination is reached. This usually requires a trial and error approach.

Trees• A tree is a connected graph without any circuits, loops or multiple edges and

contains only one region.• A spanning tree is a tree that includes all the vertices in the graph.• A minimal spanning tree is a spanning tree with the minimum length (or cost, or time).• To find a minimal spanning tree:

1. select the edge with the minimum value. If there is more than one such edge, choose any one of them.

2. select the next smallest edge, provided it does not create a cycle.3. repeat step 2 until all the vertices have been included.

• The vertices and edges in a tree are related by the equation V − E = 1.

summary

Edge

Vertex

Loop

Multipleedges

A planar graph Not a planar graph

Gen. Maths Ch. 21(13) Page 184 Thursday, December 30, 1999 1:10 PM

Page 33: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 185

Multiple choice

1 Which of these graphs is not a connected graph?

Questions 2 and 3 refer to the diagram at right.

2 The vertices with degree 4 are:

3 The number of edges in total is:

4 For the graph at right:

5 The number of regions that a connected planar network with 12 edges and 8 vertices has is:

6 The description that does not satisfy Euler’s formula for a planar network is:

Questions 7 and 8 refer to the following graphs.

A B C

D E

A A and B B B only C B and DD all of them E none of them

A 5 B 4 C 7 D 9 E 8

A V = 4, E = 6, R = 4 B V = 6, E = 4, R = 3C V = 4, E = 6, R = 3 D V = 4, E = 5, R = 4E V = 6, E = 4, R = 4

A 7 B 6 C 5 D 4 E 3

A V = 6, E = 7, R = 3 B V = 9, E = 15, R = 8 C V = 12, E = 21, R = 12D V = 9, E = 12, R = 5 E V = 5, E = 11, R = 8

i ii iii

iv v

CHAPTERreview

21A

A

B C

D

21A

21A

21B

21B

21B

A B

C D

A B

C

D E

A B

E CD

B C

E FG

D

A A B

D E

C

Gen. Maths Ch. 21(13) Page 185 Thursday, December 30, 1999 1:10 PM

Page 34: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

186 G e n e r a l M a t h e m a t i c s

7 The graph that has an Eulerian path is:

8 The graph that has an Eulerian circuit is:

9 If a graph has 2 vertices of odd degree and all the other vertices of even degree, then:A it is possible to draw an Eulerian path and an Eulerian circuitB it is possible to draw an Eulerian path but not an Eulerian circuitC it is possible to draw an Eulerian circuit but not an Eulerian pathD it is not possible to draw either an Eulerian circuit or an Eulerian pathE it is possible to draw an Eulerian circuit but it depends on the graph whether an Eulerian

path can be drawn.

10 A Hamiltonian circuit for the graph at right is:A 1–7–6–5–4–3–2B 6–7–5–6–1–2–3–4C 1–2–3–4–5–7–6–1D 6–7–5–4–3–2–6–1–6E 1–2–3–4–6–5–7–1

11 The length of the shortest Hamiltonian circuit is:A 35B 32C 33D 17E 34

12 A distributor supplies four shops from a warehouse. The distances of the shops from the warehouse range from 10 km to 20 km. The shortest delivery route from the warehouse to all four shops and back to the warehouse could be found by using:

13

The graphs that are trees are:

14 The minimal spanning tree of the graph at right has a length of:A 24B 26C 19D 15E 25

A i only B ii only C iii only D iv only E v only

A i only B ii only C iii only D iv only E v only

A an Eulerian path B an Eulerian circuit C a Hamiltonian pathD a Hamiltonian circuit E a minimal spanning tree.

i ii iii iv

A all of them B i only C i and ii onlyD i and iv only E iii only

21C

21C

21C

3

4

5

6

7

1

221D

A B

E

4

8

9

6

6

57

7D

C

21D

21C,D,E

21E

A

B

C D E

F

811

1014

76

48 3

5

21E

Gen. Maths Ch. 21(13) Page 186 Thursday, December 30, 1999 1:10 PM

Page 35: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s 18715 When converted to a spanning tree, the network at right will resemble

which of the following?

Short answer

1 For the graph at right:a write down the number of verticesb write down the number of edgesc write down the degree of each vertexd establish if the graph is connectede if it is not connected, suggest how it may become connected.

2 Draw a connected graph with 10 vertices, 18 edges and 2 loops.

3 Re-draw the graph at right to show clearly that it is a planar graph.

4 a Using Euler’s Law, determine whether the following would produce a connected planar graph.

b Use Euler’s Law for each of the connected planar graphs below to determine the value of the unknown.

5 For the graph at right:a how many vertices and edges are there in the graph?b write down the degree of each vertexc explain how your answer to b means that the graph does not

have an Eulerian circuitd write down an Eulerian path for the graph.

A B

C D E

i V = 3, R = 2, E = 3 ii V = 7, R = 4, E = 8iii V = 10, R = 12, E = 20 iv V = 6, R = 5, E = 9

i V = 10, R = 9, E = ? ii V = 8, R = 7, E = ?iii V = 4, R = ?, E = 3 iv V = ?, R = 4, E = 5

21AA B

E F

DC

A B

E F

DC

A B

E F

DC

A B

E F

DC

A B

E F

DC

A B

E F

DC

A

DE

BC

F

HI

G 21A

21A

A D

B

E

C

F

21B

21B

A

B C

F

ED

21C

Gen. Maths Ch. 21(13) Page 187 Thursday, December 30, 1999 1:10 PM

Page 36: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

188 G e n e r a l M a t h e m a t i c s

6 Trish delivers the local paper after school each Tuesday afternoon. On most days she collects the papers from the printers and distributes them along the route illustrated at right.a i If Trish is able to start from any point, is she able to deliver

the papers going down each of the streets only once?ii If she is, write down one possible route she may take.iii Is this the only possible route? If not, write down an alternative route.

b i If the papers are dropped off at Trish’s house, (vertex L), is she able to complete her round and return home going down each of the streets only once?

ii If so, which type of circuit has been completed?iii Write down two possible circuits that Trish could have completed.

7 a Write down two Hamiltonian circuits starting at vertex 1 for the network at right.

b Calculate the least value of the Hamiltonian circuit for the graph.c Give one real-life situation for which the least value Hamiltonian

circuit found above would be appropriate.d Is a Hamiltonian circuit possible for the graph in question 5?

8 The distance, in km, between five towns is shown in the table below.

Note: The shaded region indicates that there is no road connecting the two towns.a Transfer the information from the above table onto a copy of the

graph at right.b A tour is planned to start and finish at A and visit all of the towns.

Find the shortest distance for the tour.c If the tour were to start and finish at C, would the shortest distance

be the same?d A new tour, starting and finishing at A, is planned to visit all the

towns and a further town, F. The distances from B to F, C to F and E to F are 480, 429 and 339 km respectively. Find the shortest distance tour now possible.

9 a Find a spanning tree for the graph at right.b How many edges are there in a tree with:

i 6 vertices?ii 11 vertices?iii 14 vertices?

c Draw an example of each of the trees in part b.

10 Find the shortest distance from S to F in the following network.

B C D E

A 400 462 489 310

B 290 495 420

C 320 470

D 300

DA

B

CF

E J

K

HM LI21C

1

2

3

6

45

8

6 7

89

14

1315

10 10

21D

21D

E

A

B

C

D

A D

B

E

C

F

21E

S

C

A E

F

G

DB

14

1016

18

15

16

1412

12 12

236 8

21E

Gen. Maths Ch. 21(13) Page 188 Thursday, December 30, 1999 1:10 PM

Page 37: Undirected graphs and networks - mathsbooks.netmathsbooks.net/Maths Quest 11 General Mathematics... · OA91 1000 ohm 50 mA DC + – AC + + + An electrical circuit (H 2 O) (CO 2) The

C h a p t e r 2 1 U n d i r e c t e d g r a p h s a n d n e t w o r k s

189

Analysis

The map shows six towns, labelled A to F, on an island. The lines represent roads linking the towns, with distances given in kilometres. The map may be treated as a

planar network

with the towns as

vertices

and the roads as

edges

.

a

What is a planar network?

b

Explain what the statement ‘the degree of F

=

3’ means.

c

Write down the degree of each vertex.

d

Calculate

S

, the sum of the degrees of all the vertices.

e

How many edges are there?

f

Write down a formula linking

S

and

E

for this network (

E

=

number of edges).

All the roads on the island are to be re-surfaced, with the work starting at F.

g

Give a route to be used by the workers so that each road is re-surfaced and no road is travelled twice.

h

Is the route above an example of:

i

an Eulerian circuit?

ii

an Eulerian path?

iii

a Hamiltonian circuit?

iv

a Hamiltonian path?

i

Calculate the shortest distance from A to D.

A communication network is to be established on the island.

j

Explain why a minimal spanning tree for the network would be used in planning the communication network.

k

Calculate the minimal spanning tree for the network.

A supermarket chain has stores at each of the towns. Each store is to be visited by the regional manager, starting and finishing at the main office in B.

l

Outline the shortest route (that is, the least distance to travel).

m

Is the route above an example of:

i

an Eulerian circuit?

ii

an Eulerian path?

iii

a Hamiltonian circuit?

iv

a Hamiltonian path?

A

12

20

21

22

18 14 21

19B C

DE

F

testtest

CHAPTERyyourselfourself

testyyourselfourself

21

Gen. Maths Ch. 21(13) Page 189 Monday, January 3, 2000 3:17 PM