0% found this document useful (0 votes)
176 views14 pages

Chapter 14 Worked Solutions

The document summarizes solutions to exercises on graphs, networks and trees. It includes the degree of vertices in graphs, verifying Euler's rule, identifying isolated vertices and loops in adjacency matrices, and determining whether graphs have Eulerian paths, trails or circuits based on the degrees of vertices. Key concepts covered are degrees of vertices, Euler's rule (v - e + f = 2), adjacency matrices, isolated vertices, loops, and conditions for Eulerian paths, trails and circuits.

Uploaded by

P
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
176 views14 pages

Chapter 14 Worked Solutions

The document summarizes solutions to exercises on graphs, networks and trees. It includes the degree of vertices in graphs, verifying Euler's rule, identifying isolated vertices and loops in adjacency matrices, and determining whether graphs have Eulerian paths, trails or circuits based on the degrees of vertices. Key concepts covered are degrees of vertices, Euler's rule (v - e + f = 2), adjacency matrices, isolated vertices, loops, and conditions for Eulerian paths, trails and circuits.

Uploaded by

P
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Chapter 14 – Graphs, networks and

trees: travelling and connecting


problems
Solutions to Exercise 14A
1 d
a i There are three edges connected to
town A, so deg(A) = 3.
ii There are two edges connected to
town B, so deg(B) = 2.
iii There is one edge connected to town
H, so deg(H) = 1.

b sum of degrees
= deg(A) + deg(B) 3
+ deg(C) + deg(D) + deg(H) a The graphs in ii, iii and iv have all
=3+2+4+4+1 connections between vertices the same,
= 14 but the graph in i does not. For example,
they have two edges between A and C but
c A possible subgraph that contains only the graph in i does not.
towns H, D and C is Graph i is not isomorphic to the others.

b The graphs in i, iii and iv have all


connections between vertices the same,
but the graph in ii does not. For example,
they do not have an edge between A and
C but the graph in ii does.
Graph ii is not isomorphic to the others.

Note: Some subgraphs are possible where c The graphs in i, iii and iv have all
vertices are isolated. These subgraphs connections between vertices the same,
have not been shown. but the graph in ii does not. For example,
they do not have an edge between E and
2 Note: only one alternative has been C but the graph in ii does.
shown for the answers to the following Graph ii is not isomorphic to the others.
questions. Others are possible.
a 4 Note: In the graphs for this question,
dotted edges show the edges that are
repositioned in order to demonstrate the
planar nature of the graphs. There are
other solutions possible.
b a

1
b c v–e+f =2
5 – 14 + f = 2
f = 2 – 5 + 14
f = 11

d v–e+f =2
c 10 – e + 11 = 2
– e = 2 – 10 – 11
– e = – 19
e = 19

d This graph is non-planar and cannot be


redrawn.

5
a i There are six faces, so f = 6.
There are eight vertices, so v = 8.
There are twelve edges, e = 12.

ii v – e + f = 8 – 12 + 6
=2
Euler’s rule is verified.

b i There are eight faces, so f = 8.


There are six vertices, so v = 6.
There are twelve edges, e = 12.

ii v – e + f = 6 – 12 + 8
=2
Euler’s rule is verified.

c i There are seven faces, so f = 7.


There are seven vertices, so v = 7.
There are twelve edges, e = 12.

ii v – e + f = 7 – 12 + 7
=2
Euler’s rule is verified.

6
a v–e+f =2
8 – 10 + f = 2
f = 2 – 8 + 10
f=4

b v–e+f =2
v – 14 + 4 = 2
v = 2 – 4 + 14
v = 12

2
Solutions to Exercise 14B
1 2
a A B C D a
A 0 1 1 0
B 1 0 1 1 
C 1 1 0 0
 
D 0 1 0 0 b

b A B C D
A 0 1 1 0
B 1 0 0 1 
C 1 0 0 1 c
 
D 0 1 1 0

c A B C D
A 0 1 0 0
B 1 0 
3 The zero in row C, column A show that
0 0 vertex C is not connected to vertex A.
C 0 0 0 1 There is a zero in row C, column B and
  row C, column C as well. This means
D 0 0 1 0 that C is not connected to any other
vertex, so it is isolated.
d A B C D
4 If every vertex has a loop, there will be a
A 0 1 1 1
‘1’ in every position along the diagonal,
B 1 0 1 1  that is in position (A,A), (B,B), …
C 1 1 0 1
  5 The graph
D 1 1 1 0 • has no loops, so the diagonal will be
all zeros
e A B C D E F • has no duplicate edges, so there will
A 0 1 1 0 0 0 only be ‘0’ or ‘1’
• is complete, so every vertex is
B 1 0 0 1 0 0  connected to every other vertex.
C 1 0 0 1 0 0 Every position in the matrix will be a
  ‘1’, except for the diagonal.
D 0 1 1 0 0 0
E 0 0 0 0 0 1 The adjacency matrix for the graph is
 
F 0 0 0 0 1 0
A B C D E
f A B C D A 0 1 1 1 1
A 0 0 0 0 B 1 0 1 1 1 
B 0 0 0 1  C 1 1 0 1 1
 
C 0 0 0 2 D 1 1 1 0 1
  E 1 1 1 1 0 
D 0 1 2 0

3
Solutions to Exercise 14C
Note: There are multiple possible answers
to the questions in this exercise.
1 d This walk starts and ends at different
a This walk starts and ends at different vertices, so it is not a cycle, nor circuit.
vertices so it is not a cycle, nor circuit. There are repeated edges and vertices, so
The walk does not repeat edges, nor the walk is a walk only.
vertices, so it is a path.
e This walk starts and ends at different
b This walk starts and ends at different vertices, so it is not a cycle, nor circuit.
vertices so is not a cycle nor circuit. The There are no repeated edges, nor vertices,
walk has a repeated vertex, but not a so the walk is a path.
repeated edge so the walk is a trail.
f This walk starts and ends at different
c This walk starts and ends at different vertices, so it is not a cycle, nor circuit.
vertices so it is not a cycle, nor circuit. There are repeated edges and vertices, so
The walk does not repeat edges, nor the walk is a walk only.
vertices, so it is a path.
3
d This walk starts and ends at the same a i This graph has two odd-degree
vertex, so it could be a circuit or a cycle. vertices (A and E) and so it will have
however, there is a repeated vertex and a an eulerian trail.
repeated edge, so it will be neither. It
cannot be a trail or a path because of the ii One possible eulerian trail for this
repeated edge and vertex, so this walk is graph is A−B−E−D−B−C−D−A−E.
only a walk. There are other trails possible.

e This walk starts and ends at different b i This graph has all vertices of odd
vertices, so it is not a cycle, nor circuit. degree. Neither an eulerian trail, nor
The walk has a repeated vertex but not a eulerian circuit, are possible.
repeated edge, so this walk is a trail.
c i This graph has two odd-degree
f This walk starts and ends at different vertices (A and F) and so it will have
vertices, so it is not a cycle, nor circuit. an eulerian trail.
The walk has not repeated edge and no
repeated vertex, so the walk is a path. ii One possible eulerian trail for this
graph is A−C−E−C−B−D−E−F. There
2 are other trails possible
a This walk starts and ends at different
vertices, so it is not a cycle, nor circuit. d i This graph has all vertices of even
The walk has a repeated edge and vertex, degree. An eulerian circuit is possible.
so it is a walk only.
ii One possible eulerian circuit for this
b This walk starts and ends at the same graph is A−B−C−D−E−C−A. There
vertex, so it could be a cycle or a circuit. are other circuits possible
There is no repeated edge, nor vertex, so
the walk is a cycle. e i This graph has all vertices of even
degree. An eulerian circuit is possible.
c This walk starts and ends at different
vertices, so it is not a cycle, nor circuit, ii One possible eulerian circuit for this
There are no repeated edges, nor vertices, graph is F−E−A−B−E−D−C−B−D−F.
so the walk is a path. There are other circuits possible

4
4 7
a A hamiltonian cycle for this graph is a
A−B−C−F−I−H−E−G−D−A. Vertex Degree
A 4
b A hamiltonian cycle for this graph is B 2
A−B−C−D−E−F−A. C 5
D 2
c A hamiltonian cycle for this graph is E 4
A−B−D−C−E−A. F 4
G 3
5 F−A−B−C−D−E−H−G. SUM: 24

6 b i To walk the minimum distance, would


a There are five edges connected to vertex mean walking along each path only
W so deg(W) = 5. once. Walking along each of the paths
only once would be an eulerian circuit
b i The salesman will visit each location or trail. An eulerian circuit is not
(vertex) only once and will not return possible because there are two odd-
to his starting point. This is an degree vertices (C and G).
example of a hamiltonian path Walking an eulerian trail therefore, can
start at either C or G.
ii One possible order is
E−W−D−C−B−A−F. ii An eulerian trail would follow each of
the paths only once, so the total
c i An eulerian circuit is not possible distance Jamie will walk is equal to the
because there are two vertices that total length of paths that can be
have an odd degree. Eulerian circuits walked.
are only possible if the graph has all
vertices with an even degree. Path length
A−B 200
ii An eulerian trail is possible because A−C 400
there are exactly two vertices that have 200
A−F
an odd degree, W and C. These
A−G 200
vertices will be the starting and ending
vertices of an eulerian trail. If W is the B−C 250
start, the eulerian trail will end at C−D 150
vertex C. C−E 350
C−F 150
D−E 100
E−F 250
E−G 300
F−G 250
TOTAL: 2800

Jamie would walk a total of 2800 m

c Michelle should walk the cycle


F−G−A−B−C−D−E−F.

5
8
a By inspection, there are 7 different trails
from town A to town D. Where there are
different routes between two towns, the
route is shown by a subscript.
A−C1−D
A−C2−D
A−B1−D
A−B2−D
A−B1−C−D
A−C1− B1−D
A−C1− B2−D

b A vehicle can travel between town A and


town B in two ways, without visiting any
other town.

d An eulerian circuit is not possible through


this network because there are some odd-
degree vertices (B and C).

6
Solutions to Exercise 14D
1 d Shortest path from A to I (by inspection)
a The edge showing a weight of 12 is is either A−C−F−G−I for a distance of
between town D and town E. 4 + 10 + 4 + 8
= 26 kilometres
b C to D via B, means C to B (8 minutes)
followed by B to D (9 minutes) for a total or A−E−F−G−I for a distance of
of 9 + 8 = 17 minutes. 8+6+4+8
= 26 kilometres
c D to E direct is 12 minutes
D to E via B is 9 + 11 = 20 minutes. 4
a The starting vertex for the problem is
By driving direct, the motorist will save the first row vertex. The starting vertex is
20 – 12 = 8 minutes. A.

d The options for travelling from A to E and b A cross in the table indicates that the
visiting all towns exactly once are: vertex for that column is not directly
connected to the vertex in the row.
A−C−D−B−E for a total time of 45 Vertices D and E are not directly
minutes. connected to vertex A.

A−B−C−D−E for a total time of 36 c The next row vertex is the column vertex
minutes. that has the smallest, unboxed number in
the row.
A−C−B−D−E for a total time of 44 The smallest number in row A is 2, from
minutes. column C so C is the next row vertex.

The shortest time is 36 minutes. d The numbers in any row give the distance
between the row vertex and the column
2 By inspection, the shortest path from A to vertex.
E will be A−C−D−E for a length of 11. The length of edge A–F is 6.

3 5
a The path A−B−E−H−I has length: Q R S T U
5 + 9 + 12 + 8 P 3 1 × 4 ×
= 34 kilometres R 5 1 6 4 3

b The circuit F−E−D−H−E−A−C−F has 6


length: a Vertex V was chosen because column V
6 + 6 + 10 + 12 + 8 + 4 + 10 had the smallest number in the row,
= 56 kilometres which was 5. Column P also has a 5, so
vertex P could have been chosen instead.
c The shortest cycle starting and ending at
E is via B and A, E−B−A−E for a distance b The × indicates that a direct connection
of: does not exist. There is an × in row V and
9+5+8 column U, so there is definitely no direct
= 22 kilometres connection between V and U.

c There is a ‘6’ in row V and column W.


This includes the “5” from the box value
of V so the distance between V and W is
6 – 5 = 1.

7
7
a The length of the shortest path from A to
C is the last box number in column C, or
10.

b The length of the shortest path from A to


E is the last box number in column E, or
16.

c Using Dijkstra’s algorithm to determine


the shortest path, the shortest path is
A−B−C −E.

8
a The length of the shortest path from A to The shortest path from A to I is A−E−G−I.
G is the last box number in column G, or
7. 9
a
b The shortest path from A to G is found
from the table of calculations:

The shortest path from S to F is


S−B−D−F with length 12.

The shortest path from A to G is A−E−G.


The shortest path from S to F is
c The length of the shortest path from A to I S−A−C−D−F with length 10.
is the last box number in column I, or 8.
c
d The shortest path from A to I is found
from the table of calculations:

The shortest path from S to F is


S−B−D−F with length 15.

8
d

The shortest path from S to F is


S−A−E−G−F with length 19.

10

The length of the shortest path between


town A and B is 19 kilometres.

11

a The length of the shortest path from Q to


W is 46 kilometres.

b The shortest path from Q to W is


Q−C−B−E−F−G−L−W.

9
Solutions to Exercise 14E
1 c
a There are 7 vertices, so the spanning tree
will have 7 – 1 = 6 edges.

The network has 12 edges, so 12 – 6 = 6


edges must be removed.
Total weight = 18 + 10 + 10 + 9
b Note: other trees are possible as answers = 47
to this question.
d

Total weight
= 70 + 80 + 100 + 100 + 90 + 90 + 200
= 730

3 The shortest length of pipe required to


c The first graph has weight: connect all water storages will be the
4 + 5 + 2 + 3 + 2 + 6 = 22 weight of the minimum spanning tree for
the network.
The second graph has weight:
2 + 2 + 5 + 3 + 2 + 6 = 20

The third graph has weight:


3 + 2 + 5 + 3 + 2 + 6 = 21

2
a

The weight of the minimum spanning


tree, shown in red above, is
weight
Total weight = 2 + 2 + 2 + 1 + 3 = 70 + 70 + 40 + 50 + 40 + 60 + 80 + 40
= 10 + 40
= 490
b

Total weight
= 16 + 10 + 12 + 11 + 15 + 16
= 80

10
Solutions to Review: Multiple-choice questions
1 Seven vertices can be connected with six 8 The graph is planar and must be redrawn
edges, one less than the number of without edges crossing before counting
vertices. C the faces:

2 A This graph has a cycle so is not a tree.


B This graph has a cycle so is not a tree.
C This graph is a spanning tree.
D This graph has a cycle so is not a tree.
E This graph is a tree but does not
include the vertex 2 so it is not a
spanning tree. C
There are five regions defined by the
3 P has degree 2 graph in planar form. B
Q has degree 5
R has degree 3 9 The graph is drawn below, with the
S has degree 4 degrees of each vertex written beside
T has degree 4 them.
U has degree 2 A

4 v = 15 and f = 12
v–e+f=2
15 – e + 12 = 2
– e = 2 – 15 – 12
– e = – 25
e = 25 D
The sum of the degrees is
5 An eulerian circuit will exist if all of the 3+2+3+3+5+2+2+3+1
vertices have an even degree. = 24 E

A has two odd-degree vertices. 10 An eulerian trail exists if there are exactly
B has all even-degree vertices. two odd-degree vertices in a graph. The
C has all even-degree vertices. graph currently has four odd-degree
D has all even-degree vertices. vertices, that is A, E, C, D.
E has all even-degree vertices. A
Joining two of these by an edge would
6 v = 8 and e = 13 make their degree even. B
v–e+f=2
8 – 13 + f = 2 11 The minimum spanning tree is shown in
f = 2 – 8 + 13 red in the diagram below:
f=7 C

7 Hamiltonian cycle starts and ends at the


same vertex, so it cannot be option E.

Hamiltonian cycles pass through every


vertex only once, so it cannot be option A
(visits E multiple times) or option C
(visits A multiple times),

Hamiltonian cycles pass through every


vertex in the graph, so it cannot be option
D which does not visit vertex F. B The length of the minimum spanning tree
= 2 + 4 + 5 + 4 + 7 + 8 = 30 A

11
12 Eulerian circuit will be possible if all of
the vertices have an even degree, so it
could be option A or B.

By inspection, a hamiltonian cycle is


possible only in option A. A

13 A complete graph has every vertex


connected to every other vertex, so

A – the paper boy would NOT be


covering the minimum distance by
travelling between every pair of houses

B – the amount of cabling would NOT be


the minimum required if it connected
every house to every other house

C – All teams (vertices) playing every


other team would mean each team or
vertex is connected to every other team in
a complete graph

D – Six tasks between start and finish


would be more linear, one after the other

E – Allocation of assignment to one


student means the vertex would be
connected to one other vertex. C

14 In the given graph,


- A is directly connected to B in two ways
(could be only option B)
- A is directly connected to C in one way
- A is directly connected to D in one way
- B is directly connected to C in one way
- B is directly connected to D in one way
- C is directly connected to D in two ways
B

15 An eulerian circuit exists if all the


vertices have an even degree.

Option A has two odd-degree vertices.


Option B has all even-degree vertices.
Option C has two odd-degree vertices.
Option D has two odd-degree vertices.
Option E has two odd-degree vertices. B

12
Solutions to Review: Extended-response questions
1 The matrix is
a i The only edge missing from the graph
is the direct connection between vertex
E and vertex C. There is only one
direct connection between these
vertices, of length 5, so this must be
added to the graph.

b i The route
A–B–A–F–E–D–C–E–F–A

has distance

6 + 6 + 5 + (3+2) + 4 + 4 + 5 + (2+3)
ii The cable should be laid along the +5
minimum spanning tree for the graph. = 45 kilometres
The minimum spanning tree is shown
in red below: ii This route is not a hamiltonian cycle
because some of the vertices are
visited more than once, namely A, F
and E.

iii There are many answers, but one


possible route is:
A–B–C–D–F–E–A

iv The distance travelled will vary


depending on the answer for part iii.
The weight of the minimum spanning The route in part iii above has distance
tree
=4+5+4+5+6 6+9+4+7+5+8
= 24 = 39 kilometres

The minimum length of cable required c Starting at A and returning to A by


is 24 kilometres. travelling each track once is an example
of an eulerian circuit. This can only
iii There is: occur if all vertices are of even degree.
• one connection between D and C
• no loop at D At the moment, vertex C and F both have
• one connection between D and E odd degrees, so joining them by a new
• one connection between D and F path will make them both have an even
• one connection between E and C degree, making an eulerian circuit
• no loop at E possible.
• one connection between E and F
• no connection between F and C
• no loop at F

13
2 g The minimum spanning tree, determined
a By inspection, the shortest path from by Primm’s algorithm, is shown in red on
Amity to Bevin is via checkpoint R, taking the network below.
the shorter of the two possible routes
from checkpoint R to Bevin.

The length of this path = 7 + 4 = 11 km

b It is possible to travel the network on


every road exactly once because there are
two vertices (Amity and checkpoint V)
that are of an odd degree. All the others
have an even degree.

c If the road begins at Amity, the race must


finish at the other odd-degree vertex,
checkpoint V.

d The competitor should not travel to


checkpoint U next. This will mean that
all the roads out of Bevin in the direction
of Carter have already been travelled, and
so one of them will need to be travelled
again to return the competitor to the
unvisited checkpoint R.

The shortest path from Bevin to Carter is


Bevin – T – U – Carter

Note: There is an alternative route for the


same length: Bevin – T – U – V – Carter

f The shortest distance from Bevin to


Carter is 10 kilometers (answer to part e).

The shortest distance from Amity to Bevin


is 11 km (answer to part a).

The shortest distance from Amity to


Carter is 10 + 11 = 21 kilometres.

14

You might also like