year 12 maths a textbook - chapter 7
Post on 05-Dec-2014
884 Views
Preview:
DESCRIPTION
TRANSCRIPT
syllabussyllabusrrefefererenceenceElective topicOperations research — networks and queuing
In thisIn this chachapterpter7A Networks, nodes and arcs7B Minimal spanning trees7C Shortest paths7D Network flow
7
Networks
Maths A Yr 12 - Ch. 07 Page 355 Friday, September 13, 2002 9:33 AM
356
M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
Introduction to networks
Mathematical models may be computer programs, drawings, a system of equations or acombination of these. Through models, people attempt to understand real situations. Apostman plans the shortest delivery route or a builder schedules jobs on a large con-struction project so that the formwork is done as soon as the foundations are completedand the plasterers do not arrive before the walls have gone up.
Models allow these people to think about and plan tasks before actually doing them.In particular
operations research
is the science of planning and executing an oper-ation to make the most economical use of available resources.
Networks, nodes and arcs
Networks are maps that can represent an amazing variety of different things: simplifiedmaps, relationships between people, sub-tasks in a building project, computer terminalsor the flow of traffic through a city. In each case the network provides a means ofstudying real-life situations so that decisions can be made. When drawing a network,irrelevant information, such as bends in the roads of a map, is ignored.
1. A network is a collection of objects connected to each other in some way.2. Networks are made up of
nodes
joined by
arcs
. If nodes are connected they are joined by an arc.
3. When the arcs have arrows they are called
directed networks
and travel is possible only in the direction of the arrows.
There are many examples where networks can be used to model a situation. The firstworked example uses a network to plan a drive that takes the shortest possible path ordistance.
The
network
can be drawn and each
node
labelled. A path is a specific set of
arcs
connecting nodes and can be represented by the letters in the nodes, as we will see.
Maths A Yr 12 - Ch. 07 Page 356 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s
357
If Effie and George were more concerned with time, rather than distance, they mighthave consulted their travel adviser about the times for each of these stages and redrawnthe network with the arcs representing average times for travelling on each connectingroad. This network would help them to find the shortest time.
George and Effie want to drive from Airlie to Gillespie using the map at right.a Draw a network which represents the map.b Given that each road taken must bring them
closer to Gillespie, list the number of ways from Airlie to Gillespie. How many ways are possible?
c Identify the shortest path from the possible routes in b.
THINK WRITE/DRAW
a Represent towns with circles, called nodes, labelled with the first letter of the town.
a
Ignore the bends in the roads and use straight lines to represent roads connecting the towns.Check that towns not connected by roads on the map are not joined with an arc.
b Each road taken from Airlie must go towards Gillespie. Indicate the direction on each arc with an arrow.
b
Use the network to list the number of ways from A to G.
A–B–D–E–GA–B–D–F–GA–B–E–GA–C–D–E–GA–C–D–F–GA–C–F–G
Answer the question. There are 6 ways to go from Airlie to Gillespie.
c Add the lengths of the nodes to calculate the distances of the 6 routes in part b.
c A–B–D–E–G (60 + 46 + 41 + 54) 201 kmA–B–D–F–G 204 kmA–B–E–G 197 kmA–C–D–E–G 200 kmA–C–D–F–G 203 kmA–C–F–G 184 km
Answer the question. The shortest path is A–C–F–G: Airlie to Charles to Friday to Gillespie.
Charles Friday
Gillespie
Ellis
Barnard
DavisAirlie
Moon Mountain
Lake Kawana
46 km
83 km
60 km
66 km 39 km
68 km
50 km
54 km
48 km
41 km
1
GA
C F
B
D
E83
68
66 39 5048
4660 41 542
3
1
GA
C F
B
D
E83
68
66 39 5048
4660 41 54
2
3
1
2
1WORKEDExample
Maths A Yr 12 - Ch. 07 Page 357 Wednesday, September 11, 2002 4:24 PM
358
M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
So, Effie and George would plan different routes depending on whether they were inter-ested n shortest distance or shortest time. In addition to distances and times, arcs mayalso represent other relationships between nodes. In the following worked example welook at cost relationships between nodes.
Effie consults the local travel adviser about the travel times for the stages in the journey planned in worked example 1. She then redraws the network with the average time (in minutes) taken to drive between the towns as shown at right. Which path would take the least time and what is that time?
THINK WRITE
List all the possible paths and the times they will take.
A-B-D-E-G 153 minA-B-D-F-G 155 minA-B-E-G 153 minA-C-D-E-G 151 minA-C-D-F-G 153 minA-C-F-G 156 min
The path of least time is ACDEG. The path ACDEG takes 151 min, the least time.
GA
C F
B
D
E67
68
50 29 3836
364531 41
1
2
2WORKEDExample
The costs of connecting various locations on a university campus with computer cable are given in the table below. A blank space indicates no direct connection.
Draw a network to represent this situation, showing the cost of connection along each arc.
A B C D E
A —— 4000 5000 3000
B —— —— 1500 2200 4500
C —— —— —— 2200 1500
D —— —— —— —— 2500
THINK WRITE/DRAW
There are 5 nodes. Draw them as labelled circles. Because A and C have 3 connections, put them on the outside.
1A
C
B
D
E
3WORKEDExample
Maths A Yr 12 - Ch. 07 Page 358 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s
359
Networks, nodes and arcs
1
Examine the network at right. (All the lengths are in metres.)
a
Which is the longest path?
b
Which is the shortest path?
2
A traveller plans a journey from Ulawatu to Bargara (shown on the road map at right).
a
Draw a network to represent this situation.
b
Calculate the longest path if no road is travelled twice.
c
Calculate the shortest path.
d
The travelling times between each town are:Ulawatu–Yallingup 85 minUlawatu–Black Rock 75 minYallingup–Angourie 80 minBlack Rock–Angourie 82 minYallingup–Bargara 120 minAngourie–Bargara 34 min.
i
Draw a network of this situation showing the time taken to travel between towns on each arc of the network.
ii
Calculate the longest time taken to travel from Ulawatu to Bargara.
THINK WRITE/DRAW
From the table insert, in a systematic way, each arc and label each arc with its cost.
2A
C
B
D
E
50002200
4000
3000
1500
4500
1500
2500
2200
remember1. A network is a collection of objects connected to each other in some specific
way.2. A network consists of nodes which may be connected by arcs.3. In a directed network, the arcs will have a direction indicated by arrows.4. Networks can be used to model situations and calculate shortest paths.
remember
7AWORKEDExample
1c
A
B
C
E
D
3 m6 m
5 m
9 m4 m
WORKEDExample
1Yallingup
Bargara
Angourie
Black Rock
Ulawatu
120 km
118 km
100 km109 km
45 km
160 km
Maths A Yr 12 - Ch. 07 Page 359 Wednesday, September 11, 2002 4:24 PM
360 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
iii Calculate the shortest time taken to travel from Ulawatu to Bargara.iv Complete the table showing the shortest distance between each of the towns.
v Produce a similar table showing the travelling times between each of the townsshown on the map.
3 A traveller plans a journey from Renoir to Gauguin. The distances between various nearby towns are shown on the map at right.a Calculate the shortest path.b The travelling times between the following
towns are:Renoir–Pissarro 47 minRenoir–Monet 44 minMonet–Cezanne 40 minPissarro–Cezanne 45 minPissarro–Van Gogh 34 minPissarro–Matisse 75 minPissarro–Monet 25 minCezanne–Van Gogh 20 minVan Gogh–Matisse 38 minCezanne–Gauguin 59 minMatisse–Gauguin 28 min
i Draw a network of this situation showing the time taken to travel between townson each arc of the network.
ii Calculate the longest time to travel from Renoir to Gauguin.iii Calculate the shortest time to travel from Renoir to Gauguin.
c Complete the table below showing the shortest distance between each of the towns.
d Produce a similar table showing the travelling times between each of the townsshown on the map.
Ulawatu YallingupBlack Rock
Angourie Bargara
Ulawatu —— 120 100 209
Yallingup —— —— 220
Black Rock —— —— ——
Angourie —— —— —— ——
Renoir Pissarro Monet CezanneVan
Gogh Matisse Gauguin
Renoir —— 179
Pissarro —— —— 41 123
Monet —— —— ——
Cezanne —— —— —— ——
Van Gogh —— —— —— —— ——
Matisse —— —— —— —— —— ——
WORKEDExample
2 PissarroRenoir
Monet
CezanneGauguin
Van Gogh
Matisse
60
38
75
30
65
46
46
4158
62
85
Maths A Yr 12 - Ch. 07 Page 360 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 3614 The cost of trips on McFlaherty’s Bus service are given in the table below.
a Draw a network representing this information.b What is the minimum cost of travelling from Port St to Tork Rd?c What is the minimum cost of travelling from Bell St to Port St?
5
The distances, in kilometres, between towns in a region are given in the table below.Note: Where a blank appears no direct link between the towns exists.
In a big storm the bridge on the Armida to Beech road was washed out. How far is thejourney from Beech to Armida now?A 163 km B 128 km C 189 km D 154 km
Minimal spanning treesThe diagram at right represents a farm complex. Each site needs to be connected directly or indirectly to the transformer so that it can get electrical power. For example, the garage can get its power directly from the transformer or indirectly from the house, if the house is connected. The numbers represent the distance between each site. How should the connections be arranged so that the minimum length of cabling is used?
To answer this question in a systematic way we consider the following aspects of networks.
A tree is a series of connections in a network that does not contain a loop.A spanning tree in a network is a tree that contains each node.
Port St Land St Tork Rd Bell St Key St
Port St —— 2.40 1.80
Land St —— —— 2.40 1.50
Tork Rd —— —— —— 1.80 1.50
Bell St —— —— —— —— 2.00
Grantha Tamwor Armida Beech Kianga
Grantha —— 85 104 122
Tamwor —— —— 43 100
Armida —— —— —— 85
WORKEDExample
3
SkillSH
EET 7.1mmultiple choiceultiple choice
Sheds Workshop
250
240
200250
350
390
400350
150 250
Garage
Transformer
200
Pump House
Maths A Yr 12 - Ch. 07 Page 361 Wednesday, September 11, 2002 4:24 PM
362 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
To identify a minimal spanning tree, we use the minimal spanning algorithm which has the following steps.Step 1 Choose any node at random and connect it to its closest neighbour.Step 2 Choose an unconnected node which is the closest to any connected node.
Connect this node to the nearest connected node. (If two or more nodes are nearest; that is have the same value, just select any one.)
Step 3 Repeat step 2 until all the nodes are connected.
The minimal spanning algorithm can be used to determine the least length of cableneeded to connect each building of the farm complex considered above.
Find the minimal spanning tree to determine the minimum amount of cable needed to connect all the buildings in this farm complex to the transformer. Distances between locations are shown in this plan and are in metres.
THINK WRITE/DRAW
Draw a network with nodes using the first letter of each building.Use dotted lines for the arcs and label each arc with distances between the nodes.Start with the transformer and find the shortest arc. The unconnected node closest to T is P, so join T to P with an arc.Find the unconnected node closest to P or T. It is G. Connect P and G with an arc.Find the unconnected node closest to P, T, or G. It is W. Connect G and W with an arc.Find the unconnected node closest to P, T, G or W. It is H. Connect W and H.
The sheds, S, are still not connected. Find the node closest to P, T, G, W or H which is closest to the unconnected node S. Connect W and S with an arc.
Add up the lengths in the minimal spanning tree.
350 + 150 + 200 + 200 + 240 = 1140
Answer the question. The minimal length of cable to connect the buildings is 1140 m.
Sheds Workshop
250
240
200250
350
390
400350
150 250
Garage
Transformer
200
Pump House
1
2
S W
HG
P
T
240
200 200
400
350
250250
250150
350390
3
4
5
6
7
S W
HG
P
T
240
200200
150
350
8
9
4WORKEDExample
Maths A Yr 12 - Ch. 07 Page 362 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 363For the minimal spanning tree in the previous worked example it does not matter whichnode was used as the starting point. The same spanning tree would have resulted. How-ever, suppose that the distance between the sheds and the pump had been 240 — thesame distance from the sheds to the workshop. Then we could have chosen the finalarc as either SW or SP but not both. However, the total length of the minimal spanningtree would have been the same.
History of mathematicsJ O H N F O R B E S N A S H ( 1 9 2 8 – )
When the movie A Beautiful Mind won an Oscar for best film in 2002, John Nash was in the audience. The movie, based on a book by the same name, is his story.
John Nash was born in Bluefield, West Virginia in the United States. His school-teachers did not recognise his brilliance and they focussed on his lack of social skills.
His mother was a schoolteacher who encouraged his love of books and experiments. One of his chemistry experiments with explosives caused the death of a school friend. He enjoyed Compton’s Pictured Encyclopedia, and the book, Men of Mathematics by E T Bell, first excited him about mathematics. He succeeded in proving difficult mathematical problems such as Fermat’s Theorem for himself.
He entered Carnegie Technical College in Pittsburgh to follow his father’s footsteps in engineering. He moved to chemistry to avoid the rigidity of mechanical drawing. Then,
encouraged by the mathematics faculty, he moved from chemistry to major in mathematics, realising that it was possible to make a good career in America as a mathematician.
He excelled in mathematics and graduated with an MS as well as a BS because of his advanced mathematical knowledge. On graduation from Carnegie, where an elective course in international economics influenced his mathematical ideas, he was offered fellowships at both Harvard and Princeton.
In 1948, he chose Princeton where he was closer to his family in Bluefield. He avoided lectures and studied on his own, and was full of mathematical ideas. His interest in game theory grew and he developed the math-ematics of equilibrium strategies to predict behaviour. In two papers Equilibrium Points in n-person Games and Non-cooperative Games, Nash proved the existence of a stra-tegic equilibrium for non-cooperative games, the Nash equilibrium, and suggested approaching the study of cooperative games by their reduction to non-cooperative form. In his two papers on bargaining theory, he proved the existence of the Nash bargaining solution and provided the first execution of the Nash program.
He was awarded the Nobel Prize in Economic Science in 1994, for this work on game theory 45 years earlier.
In the movie, A Beautiful Mind, we see a version of how his ideas were stimulated bythinking about non-predictable strategies in a bar scene. In another scene we see him
Maths A Yr 12 - Ch. 07 Page 363 Wednesday, September 11, 2002 4:24 PM
364 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
mapping the interactions between pigeons and saying that he is developing an algorithm to predict their behaviour. An algorithm is a step-by-step procedure for a particular math-ematical problem and is the idea that lies at the heart of all the computer programming and the code which drives digital computers.
After obtaining his degree in 1950 he worked as an instructor at Princeton but moved to the mathematics faculty of Massachusetts Institute of Technology (MIT)where he met his wife, Alicia, a physics graduate. In 1958 he was described as the most promising mathematician in the world. He became mentally disturbed in 1959 when Alicia was pregnant.
Nash attributes his recovery from mental illness to a determined effort to think rationally, aided by light mathematical work. He rejected his delusions and in his acceptance speech for the Nobel Prize in
1994 said, ‘I am still making the effort and it is conceivable that with the gap period of about 25 years of partially deluded thinking providing a sort of vacation, my situation may be atypical. Thus I have hopes of being able to achieve something of value through my current studies or with any new ideas that come in the future.’
In 1999 John Nash was also awarded the Leroy P Steele Prize by the American Mathematical Society for contributions to research.
Questions1. Which book first stimulated John Nash’s
interest in mathematics?2. Which two prizes did John Nash receive?3. What is an algorithm?
Research1. Find out about game theory. 2. What opportunities are there to study
mathematics after finishing school?
The cost, in dollars, of connecting 7 offices with a computer network is given in the table.
Use the minimal spanning algorithm to calculate the minimum cost of connecting the offices.
A B C D E FA —— 45 70 100 65 140B —— —— 150 50 90 95C —— —— —— 100 85 50D —— —— —— —— 40 55E —— —— —— —— —— 70
THINK WRITE/DRAW
Draw a network to represent the information given in the table.Select any starting point, say C.
1
2
A
C D
FB
E
4570
100
140
15050
50100
85
40
705590
95
65
5WORKEDExample
Maths A Yr 12 - Ch. 07 Page 364 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 365
THINK WRITE/DRAW
Identify the shortest arc connected to C. This is arc CF.
Identify the shortest arc connected to C or F to an unconnected node. This is arc FD.
Continue, using the minimal spanning algorithm to get the figure opposite.
Use the minimal spanning tree to answer the question.
The minimum cost of linking the offices is $45 + $50 + $50 + $55 + $40 = $240.
3 A
C D
FB
E
4570
100
140
15050
50100
85
40
705590
95
65
4 A
C D
FB
E
4570
100
140
15050
50100
85
40
705590
95
65
5 A
C D
FB
E
4570
100
140
15050
50100
85
40
705590
95
65
6
Maths A Yr 12 - Ch. 07 Page 365 Wednesday, September 11, 2002 4:24 PM
366 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
Minimal spanning trees
1 Find the minimal spanning tree for each of the following networks.a b
c d
2 The rail authority plans to connect the country centres shown with a rail network (distances are in kilometres). What is the minimum length of track required to achieve this? Use a minimal spanning tree algorithm as follows.a Begin at Pallas and connect it to its nearest
neighbour. Which town is this?b Which unconnected town is closest to Pallas
or to the town selected in a?c Connect this town to the existing link in the
shortest way possible.d Continue by connecting the closest
unconnected nodes to any connected ones, one at a time, until all nodes are connected.
remember1. A spanning tree connects all nodes in the network and does not contain any
loops.2. A minimal spanning tree is the smallest spanning tree.3. To find the minimal spanning tree use the minimal spanning tree algorithm.
Step 1 Choose any node at random and connect it to its closest neighbour.Step 2 Choose an unconnected node which is the closest to any connected
node. Connect this node to the nearest connected node.Step 3 Repeat Step 2 until all nodes are connected.
remember
7BWORKEDExample
4
A
B
C
D
4 8
59
A
B
C
D
4 6
5
47
A D
B E
C
21
17 30
12
15
18
A D
B E
C
30
4030
40
20
15
1520
Yule Xavier
Walga
Urchin
SturtPallas
View
Zenith
Rockdale
82
8850
7970
80
55
5262
55
8865 67
6542
50
52
Maths A Yr 12 - Ch. 07 Page 366 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 3673 The paths between the various cages at the
Nolonger Park Zoo are dirt and when it rains they become muddy. The figure at right shows all paths, with distances in metres. Management has decided to put in concrete paths.a What total length of path would be required if
each dotted line was to become a concrete path?b Use the minimal spanning tree algorithm to
find the minimum length of concrete path that is required so that patrons could see each exhibit and visit the kiosk without walking on a dirt path.
c Repeat the minimal spanning tree algorithm using a different starting point andshow that it does not matter where you start.
4 Use the minimal spanning tree algorithm to find the minimal spanning tree for thefollowing networks.a b
c d
5 Find the minimal spanning tree for each of the following networks.a b c
6 A number of small, private mines have openedup in Waller Flats and the local shire council wants to link them by bitumen roads as shown in the figure at right. What is the minimum length of road that is needed? (Assume the only connections that can be made are those marked on the map of Waller Flats at right.)
Monkeys
Crocodiles Lions
BirdsEntrance
Kiosk
80
605060
30
7055
50 65
65
24
23
20
30
55
31
1823
18
B E
A
C
D
F
A C E
B D F
60454545
54 54
4848
A B
C E
F G40
40
5050
23 23
20 20
30 30
D
A
B
F
E
CD
7
8
7
6
7
48
6
9
6
AD
F
GE
C
B
17 15
18
22
13 15
20
1018
15
12
AD
E
G
F
C
B
14 18
1714
22
221012
10
18 8
15
A B I
C F
H
J
D
E
G K5 5
8 8
88
5 5
55
8
12
12
1255
Mine 4
Mine 1
Mine 2
Mine 3
Mine 7
Mine 6
Mine 5
5 km
7 km
15 km
6 km14 km
11 km
15 km
12 km
10 km
Maths A Yr 12 - Ch. 07 Page 367 Wednesday, September 11, 2002 4:24 PM
368 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
7 In question 6 the dotted lines connecting the mines represent dirt roads. If aninspector wants to visit all the mines and is willing to travel on dirt roads, what is theshortest distance he or she needs to travel to visit each of them, starting from Mine 1?
8 A gas pipeline is to be connected between 5 towns so that each town has at least oneconnection to the system. The gas pipeline costs $25 000 per kilometre. The distance(in km) between the towns is given in this table.
a Find the length of the network connecting these towns in the shortest way.b What is the cost of this connection?
9 An office computer system requires the linking of 8 terminals. Each terminal has tohave at least one connection with the system. The cost (in dollars) of connecting eachterminal with another is given in the table.
a What is the smallest possible cost for linking the computer terminals if each ter-minal has at least one connection with the system?
b If each terminal is connected to every other terminal, what is the cost of thelinking?
Use the network at right to answer questions 10 and 11. The dimensions are in km.
10
Which of the following arcs are not in the spanning tree?A AB B AC C BC D BG
11
What is the length of the minimal spanning tree?A 120 km B 105 km C 98 km D 103 km
A B C D E
A —— 16 23 10 43
B —— —— 32 17 19
C —— —— —— 35 43
D —— —— —— —— 38
A B C D E F G H
A —— 35 50 75 50 100 65 105
B —— —— 100 40 65 70 90 105
C —— —— —— 70 60 40 55 15
D —— —— —— —— 30 40 105 100
E —— —— —— —— —— 55 40 30
F —— —— —— —— —— —— 25 50
G —— —— —— —— —— —— —— 75
WORKEDExample
5
AF
C D E
B
G 18
40
2712
25
18
2015
22
18
22
mmultiple choiceultiple choice
mmultiple choiceultiple choice
Maths A Yr 12 - Ch. 07 Page 368 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 369
Shortest pathsGiven a network representing the distance between towns, consider the question, ‘Howfar is it from town A to town X?’.
In earlier sections we have approached such a question using a trial and errormethod. However, when networks become more complex, a systematic method isrequired. The method used is called the shortest path algorithm.
Shortest path algorithmTo find the shortest path between A and X in a network, follow these steps.
Step 1 For all nodes that are one step away from A, write the shortest distance from A inside the circle representing the closest node.
Step 2 For all nodes which are two steps away from A, write the shortest distance from A inside the circle representing the closest node two steps away.
Step 3 Continue in this way until X is reached.
Step 4 The shortest path can be identified by starting at X and moving back to the node from which the minimum value at X was obtained, then continuing this process until A is reached. This will be explored in the next worked example.
Find the shortest path from A to P in the network at right. The units are in minutes and represent time taken.Note: We have placed the labels outside the nodes so that the times can be placed inside the circles.
THINK WRITE/DRAW
Beginning at A write inside the nodes at B and E the shortest time taken to get to them.Then write in the shortest time for all nodes which are two steps away from A. That is, C = 4, F = 5 and I = 8.Continue in this way until P is reached. For example, at node J, the time from I would be 10, so the shorter time, 9, from F is put in the node.Now back-track from P moving from node to node along the arcs which produced the minimum values. Check to see if this is the shortest path.This is the shortest path. Put arrows on this path.Write the answer. The shortest path from A to P is
A–B–F–J–K–L–P and is 14 minutes long.
A B C D
E F G H
I J K L
M N O P
23 3 3 3
5 4 5 5
3 1 3 1
3
2
3
2
3
2
2
2
3
2
3
1 A B C D
E F G H
I J K L
M N O P
2
3 3 3 3
5 4 5 5
3 1 3 1
33 5 7 9
8 9 11 13
11 10 12 14
2 4 6
2
3
2
3
2
2
2
3
2
3
2
3
4
5
6
6WORKEDExample
Maths A Yr 12 - Ch. 07 Page 369 Wednesday, September 11, 2002 4:24 PM
370 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
Shortest paths
1 Find the length of the shortest path from A to B in each of the following networks.
a b
c d
e f
rememberTo find the shortest path from A to X in a network:
1. For all nodes one step away from A, write the shortest distance.
2. For all nodes two steps away from A, write the shortest distance.
3. Continue until X is reached.
The shortest path is located by starting at X and working backwards to A.
remember
7CWORKEDExample
6 7
2
810
410 5 5
4 3
A
B
20
14
2525
122013 16
1210 25
15
A B
23
20
3034
3423 1630
1824 45
27
A B
A
B
2
6
4
4
33 2 4
4 4 55
10 6 7
10 6 7
7 8
5
6
12
4
7
A
B
5 4
57
5
4
6
5
4
6
7
5
5
5
4 3
5 3
A
B
45 25 16
35 19 29
23 40 30
15 32 2415 25 16
18 16 25
35 50 14
22
26
12
Maths A Yr 12 - Ch. 07 Page 370 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 3712 From the map at right, where the units are km,
answer the following questions.a What is the shortest distance from Fourier to
Rolle?b What is the shortest distance from Fourier to
Stokes?c What is the shortest distance from Fourier to
Stokes travelling through Reynolds?
3 For each of the following networks, find the shortest path from A to B.a b
c d
e f
Aiken Stokes
Feynman
Rolle
Ahmes
Lebesgue
Fourier
Gauss
HardyReynolds
2595
64
3224
60
5644
32 45
2745
26
51
34
36
A
B
12610
15 10
5
7
76
32
28
31
10
15
25
10
8
5
8
A
B
3040
50
25 25
35
4050
45
30
50
40
35
35
25
25
15
20
35
15
14
13
16
12
1310
12
1311
86
9 7
7
8
7
8 8
8 8
5 9
A
B7
30
35
26
15
34
2320
30
2612
640
26
15 15
14
25
12
7
15 8
15 14
A
B
35 3725
8
6
66
88 8
8 7
6
6
10
116
7
7
67
6 88 10
10
1112
8
12
13
1214
11
A
B
13
A
B
8 12 11
13 12 9
158
10 11
1414 11
5
7 88
1212
7 8 13
12 9
Maths A Yr 12 - Ch. 07 Page 371 Wednesday, September 11, 2002 4:24 PM
372 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
4 This table shows the travelling times in minutes between towns which are connecteddirectly to each other. Note: The line indicates that towns are not connected directly toeach other.
a Draw a network to show the connection of the towns by these roads.b Find the shortest travelling time between Addisba and Eric.
This network at right represents the potential cost of a covered walkway between various locations on a campus.
1 How many nodes are there in this network?
2 How many arcs are there in this network?
3 Which node/s have more than 4 arcs meeting?
The cost of the walkway is to be kept to a minimum but it should be possible to go fromany location to any other via a covered walkway.
4 Find the minimal spanning tree.
5 What arcs are not included in the minimal spanning tree?
6 What is the minimum cost of such an arrangement of walkways?
7 If one is to travel from D to F under cover, what path should be taken?
It is found that there was an error in the estimate for the walkway connecting A to C. Thecorrect value should be $3600.
8 Find the new minimal spanning tree
9 What is the new minimum cost for a suitable arrangement of walkways?
10 If one were to travel from B to C under cover, what path should be taken?
Addisba Bundong Callop Dilger Eric
Addisba 0 50 20 25 —
Bundong 50 0 25 30 30
Callop 20 25 0 — 60
Dilger 25 30 — 0 70
Eric — 30 60 70 0
WorkS
HEET 7.1
1
A C
B
D
E
F
3600 30004000
8000
6400
6400
60002000
4000
Maths A Yr 12 - Ch. 07 Page 372 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 373
Network flowAn application of networks used to analyse flow of traffic or water is network flow.These usually involve directed networks where arrows show the direction of flow. Anexample is described below.
A driver starts for work in the city at 7.30 am each morning. He lives in an outersuburb and as he travels from his driveway through a few streets in his local neighbour-hood, there is not much traffic on the roads. As he joins the road that connects hissuburb to the next suburb, he notices an increase in the volume of the traffic. As thistwo-lane road joins the four-lane freeway into the city, the flow of traffic becomesimmense. Cars are following bumper to bumper, with drivers changing lanes to drive inthe fastest lane. The costs involved, financial and otherwise, for those who participatein the morning rush are significant.
It is in everyone’s best interest that the traffic flow smoothly and that traffic jams be avoided at all costs. Engineers use mathematical models of network flow to ensuresmooth flow of traffic.
Flow capacities and maximum flowThe network’s starting node(s) iscalled the source. This is where allflows commence. The flow goesthrough the network to the end node(s)which is called the sink.
The flow capacity (capacity) of anarc is the amount of flow that an arccan allow through if it is not connectedto any other arcs.
The inflow of a node is the total ofthe flows of all arcs leading into thenode.
The outflow of a node is the minimumvalue obtained when one compares theinflow to the sum of the capacities of allthe arcs leaving the node.
Consider the following figures.
The flow capacity of the network is the total flow possible through the entire network.
Source Sink
A B C
D
E
F B
10
2010030
B
80
2010030
All flow commences at A. It is therefore the source. All flow converges on F indicating it is the sink.
B has an inflow of 100. The flow capacity of the arcs leaving B is 30 + 20 + 10 = 60. The outflow is the minimum of 100 and 60, which is 60.
B still has an inflow of 100 but now the capacity of the arcs leaving B is (80 + 20 + 30) = 130. The outflow from B is now 100.
Maths A Yr 12 - Ch. 07 Page 373 Wednesday, September 11, 2002 4:24 PM
374 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
Consider the information presented in the following table.
a Convert the information to a network diagram, clearly indicating the direction andquantity of the flow.
b Determine the flow capacity of the network.
c Determine whether the flow through the network is sufficient to meet the demand of all the towns.
From ToQuantity
(litres per minute) Demand (E)
Rockybank Reservoir (R) Marginal Dam 1000 —
Marginal Dam (M) Freerange (F) 200 200
Marginal Dam (M) Waterlogged (W) 200 200
Marginal Dam (M) Dervishville (D) 300 300
THINK WRITE
a Construct and label the required number of nodes. The nodes are labelled with the names of the source of the flow and the corresponding quantities are recorded on the arcs.
a
b Examine the flow into and out of the Marginal Dam node. Record the smaller of the two at the node. This is the maximum flow through this point in the network.
b
Even though it is possible for the reservoir to send 1000 L/min (in theory), the maximum flow that the dam can pass on is 700 L/min (the minimum of the inflow and the sum of the capacities of the arcs leaving the dam).
In this case the maximum flow through Marginal Dam is also the maximum flow of the entire network.
Maximum flow is 700 L/min.
R M W
F
D
E1000 200 200
300 300
200 200
1
R M W
F
D
1000 200
300
200
2
7WORKEDExample
Maths A Yr 12 - Ch. 07 Page 374 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 375
Consider what would happen to the system ifRockybank Reservoir continually discharged 1000L/min into Marginal Dam while its output remainedat 700 L/min.
Such flow networks enable future planning.Future demand may change, the population maygrow or a new industry that requires more watermay come to one of the towns. The next workedexample will examine such a case.
Excess flow capacity is the surplus of thecapacity of an arc less the flow into the arc.
The seven bridges of KönigsbergOn the River Pregel in the European town of Königsberg, there were 7 bridges arranged as below.
People wondered if it was possible to cross all 7 bridges without crossing any bridge more than once.
Can you see if it can be done?
THINK WRITE
c Determine that the maximum flow through Marginal Dam meets the total flow demanded by the towns.
c
Flow through Marginal Dam = 700 L/minFlow demanded = 200 + 300 + 200
= 700 L/min
If the requirements of step 1 are able to be met, then determine that the flow into each town is equal to the flow demanded by them.
By inspection of the table, all town inflows equal town demands (capacity of arcs leaving the town nodes).
1
M W
F
D
E200 200
300 300
200 200
2
inve
stigationinvestigatio
n
Island Land
Maths A Yr 12 - Ch. 07 Page 375 Wednesday, September 11, 2002 4:24 PM
376 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
A new dairy factory, Creamydale (C), is to be set up on the outskirts of Dervishville. The factory will require 250 L/min of water.a Determine whether the original flow to Dervishville is sufficient.b If the answer to part a is no, is there sufficient flow capacity into Marginal Dam to allow
for a new pipeline to be constructed directly to the factory to meet their demand?c Determine the maximum flow through the network if the new pipeline was constructed.
THINK WRITEa Add the demand of the new
factory to Dervishville’s original flow requirements. If this value exceeds the flow into Dervishville then the new demand cannot be met.
a
The new requirements exceed the flow.
The present network is not capable of meeting the new demands.
b Reconstruct the network including a new arc for the factory after Marginal Dam.
b
Repeat step 1 from worked example 7 to find the outflow of node M.
Marginal Dam inflow = 1000Marginal Dam outflow
= 200 + 200 + 300 + 250= 950
Determine if the flow is sufficient for a new pipeline to be constructed.
There is excess flow capacity of 300 into Marginal Dam which is greater than the 250 demanded by the new factory. The existing flow capacity to Marginal Dam is sufficient.
c This answer can be gained from part b step 2 above.
c The maximum flow through the new network is 950 L/min.
1
R M W
F
D
E1000 200 200
300 300 + 250
200 200
2 M
D
E
300 550
1
R M W
F
D
C
E1000 200 200
300
250 250
300
200 200
2
R M W
F
D
C
1000 200
300
200
250
3
8WORKEDExample
Maths A Yr 12 - Ch. 07 Page 376 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 377The maximum flow through most simple networks can be determined using thesemethods, but more complex networks require different methods to be used.
For more information on paths and circuits, click here when using the CD-ROM.
Network flow
1 Convert the following flow tables into network diagrams, clearly indicating the direc-tion and quantity of the flow.
a From To Flow capacity b From To Flow capacity
AABCD
BCCDE
100200
50250300
RSTTU
STUEE
250200100100
50
c From To Flow capacity d From To Flow capacity
MMNNQOR
NQORREE
202015
5101212
DDGGFFJH
FGHJHJEE
88532688
— Minimum cut–Maximum flowextensioneextensionxtension INTE
RACTIVE
C
D- ROM
— Paths and circuits: Eulerian and Hamiltonianextensioneextensionxtension INTE
RACTIVE
C
D- ROM
remember1. In a network flow diagram, the arcs have quantities that indicate rates of flow;
for example, litres per minute, cars per second, people per hour and so on.2. The starting node(s) from which all flows commence is called the source.3. The flow goes through the network to the end node(s) which is called the sink.4. The flow capacity (or capacity) of an arc is the amount of flow that an arc
would allow if it were not connected to any other arcs.5. The flow capacity of the network is the total flow possible through the network.6. The inflow of a node is the total of the flows of all arcs leading into the node.7. The outflow of a node is the minimum of either the inflow or the sum of the
capacities of all the arcs leaving the node.8. Excess flow capacity of an arc equals the flow capacity of an arc minus the
flow into the arc.
remember
7DWORKEDExample
7a
Maths A Yr 12 - Ch. 07 Page 377 Wednesday, September 11, 2002 4:24 PM
378 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
2 For node B in the network at right, state:
a the inflow at B
b the arc capacities flowing out of B
c the outflow from B.
3 Repeat question 2 for the network at right.
4 For each of the networks in question 1, determine:
i the flow capacity
ii whether the flow through the network is sufficient to meet the demand.
5 Convert the following flow diagrams to tables as in question 1.a b
c d
6 Calculate the capacity of each of the networks in question 5.
7 i Introduce new arcs, from the information which follows, to each of the networkdiagrams produced in question 1
ii calculate the new network flow capacities.
a From To Flow capacity b From To Flow capacity
AABCDB
BCCDEE
100200
50250300100
RSTTUS
STUEET
250200100100
50100
A
B
C
D
27 34
23 16
A C
B
D
E
45
3
34
2
26
WORKEDExample
7b, c
A C
B
D
E
45
3
34
2
26
A C
B
D
E
45
3
34
2
26
A
C
B
D
E
45
3
7
3
8
2 6A
C
B
DF
E
45
12
7
3
7
48
2 6
WORKEDExample
8
Maths A Yr 12 - Ch. 07 Page 378 Wednesday, September 11, 2002 4:24 PM
C h a p t e r 7 N e t w o r k s 379
8
In question 7c the outflow from N is:A 5 B 20 C 15 D 25
Questions 1 to 4 refer to the network at right.The network represents the distance between towns in kilometres.
1 What is the shortest path from A to F?
2 Give the length of the shortest path from A to F.
3 Give the shortest path from B to F.
4 What is the length of the shortest path from B to F?
5 In the network at right, what is the inflow at the node?
6 In the same network as question 5, what is the outflow at the node?
7 What is the excess flow capacity of arc BC in the network at right?
Questions 8 to 10 also refer to the first network above. This network shows the capacityof irrigation pipes in kilolitres per hour.
8 What is the inflow at C?
9 What is the outflow at C?
10 What is the maximumflow in the network?
c From To Flow capacity d From To Flow capacity
MMNNQORN
NQORREEE
202015
5101212
5
DDGGFFJHD
FGHJHJEEE
88532688
10
WorkS
HEET 7.2mmultiple choiceultiple choice
2
A C
B
D
E
F32
20
4020
32
3010
1520
20
10
40
A B20 30
C
Maths A Yr 12 - Ch. 07 Page 379 Wednesday, September 11, 2002 4:24 PM
380
M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
Networks, nodes and arcs
• A network consists of a number of nodes connected by arcs.• When the arcs have arrows the network is called a directed network and travel is
possible only in the direction of the arrows.
Minimal spanning tree
• A tree is a series of connections in a network that does not contain a loop.• A spanning tree in a network is a tree that contains each node of the network.• A minimal spanning tree is the arrangement of arcs in which every node is connected
to at least one other node in such a way as to minimise the total length of these arcs.• To find the minimal spanning tree use the minimal spanning tree algorithm:
Step 1 Choose any node at random and connect it to its closest neighbour.Step 2 Choose an unconnected node which is the closest to any connected node.
Connect this node to the nearest connected node.Step 3 Repeat Step 2 until all the nodes are connected.
• A path is a series of nodes connected by arcs. • The shortest path is the shortest distance from a given starting point to a given end point.
Shortest path
• The shortest path is the shortest distance from a given starting point to a given end point.• To find the shortest path between A and X:
1. For all nodes that are one step away from A, write the shortest distance from A inside the circle representing the node.
2. For all nodes which are two steps away from A, write the shortest distance from A inside the circle representing the node.
3. Continue in this way until X is reached. 4. The shortest path can be identified by starting at X and moving back to the node
from which the minimum value at X was obtained, then continuing this process until A is reached.
Network flow
• A network can be used to represent the network flow of quantities such as water, traffic or telephone calls.
• Arcs indicate rates of flow. The inflow at a node is the sum of the capacities of the arcs leading into the node. The outflow at a node is the minimum of either the inflow or the sum of the capacities of the arcs leaving the node.
• In a network flow diagram, the arcs have quantities that indicate rates of flow, for example, litres per minute, cars per second people per hour and so on.
• The starting node(s) is called the source, from which all flows commence.• The flow goes through the network to the end node(s) which is called the sink.• The flow capacity (or capacity) of an arc is the amount of flow that an arc would
allow if it were not connected to any other arcs.• The flow capacity of the network is the total flow possible through the entire network.• The inflow of a node is the total of the flows of all arcs leading into the node.• The outflow of a node is the minimum of either the inflow or the sum of the
capacities of all the arcs leaving the node.• Excess flow capacity equals the flow capacity of an arc minus the flow into the arc.
summary
Maths A Yr 12 - Ch. 07 Page 380 Friday, September 13, 2002 10:36 AM
C h a p t e r 7 N e t w o r k s 381
1 For the network at right, write down:a the number of nodesb the number of arcs.
2 The following table represents the cost, in tens of thousands of dollars, of resurfacing roads connecting various locations in a district. Draw a network representing this situation.
3 Describe an algorithm used to identify the minimal spanning tree.
4 Give the minimal spanning tree for the network in question 1.
5 Determine the minimal spanning tree for the figureat right.
6 It is planned to join the towns shown on the map at right by a rail link. Use a minimal spanning algorithm to find the shortest length of track needed to connect each town by rail.
A B C D E
A —— 5 11 12
B —— —— 4 7
C —— —— —— 8
D —— —— —— ——
E —— —— —— —— ——
7A
CHAPTERreview
A C G
B E
D F
20
2010 10
1020
105
10
10
7A
7B7B7BB E
C F
H
I
D G J
KA
1515
30
4030
15 30
25 15 35
1515
25
2530
35
30
25
20
35 30 30
7BBrownsville
Caerleon
Freshwater
Gaine
AmesburyManto
Miriam
15 km16 km
18 km
34 km
41 km
18 km
19 km61 km
15 km
Maths A Yr 12 - Ch. 07 Page 381 Wednesday, September 11, 2002 4:24 PM
382 M a t h s Q u e s t M a t h s A Ye a r 1 2 f o r Q u e e n s l a n d
7 Identify the shortest path from A to G in question 1. What is the length of this path?
8 Identify the shortest path from A to K in question 5. What is the length of this path?
9 If the arcs in the network in question 1 represent capacity for flow, calculate the following:a inflow at Cb outflow at Cc the maximum flow.
10 If the arcs in question 5 represent capacity for flow, calculate each of the following:a inflow at Cb outflow at Cc maximum flow from A to K.
11 From the table at rightproduce a network flow diagram.
12 Draw the network flow diagram for the table at right.
7C7C7D
7D
7D From To Flow quantity
A B 13
A C 6
B C 10
B D 4
C D 3
C E 14
D F 10
E F 15
7D
testtest
CHAPTERyyourselfourself
testyyourselfourself
7
From To Flow quantity
A B 13
A C 6
A G 16
B C 10
B D 4
B G 2
C D 3
C E 14
D F 10
E F 15
G D 3
G H 10
H F 13
Maths A Yr 12 - Ch. 07 Page 382 Wednesday, September 11, 2002 4:24 PM
top related