Anda di halaman 1dari 25

GENERAL

MATHEMATICS 2017
CHAPTER 5 NETWORKS AND DECISION
MATHEMATICS
Key knowledge
The conventions, terminology, properties and types of graphs; edge, face, loop, vertex, the degree of a
vertex,
Isomorphic and connected graphs, and the adjacency matrix, and Eulers formula for planar graphs and its
application
The exploring and travelling problem, walks, trails, paths, Eulerian trails and circuits, and Hamiltonian cycles
The minimum connector problem, trees, spanning trees and minimum spanning trees
Key skills
construct graphs, digraphs and networks and their matrix equivalents to model and analyse practical
situations
recognise that a problem is an example of the exploring and travelling problem and to solve it by utilising the
concepts of walks, trails, paths, Eulerian trails and circuits, and Hamiltonian paths and cycles
recognise that a problem is an example of the minimum connector problem and solve it by utilising the
properties of trees, spanning trees and by determining a minimum spanning tree by inspection or using
Prims algorithm for larger scale problems


Chapter Sections Questions to be completed
5.2 Definitions and Terms 1, 2, 4, 5bd, 6b, 7ac, 8ac, 9bc, 10, 12, 14cd, 15ac, 16, 17, 18, 19
5.3 Planar Graphs 1, 3, 5, 6bd, 7b, 8, 10, 11bc, 12, 13, 14, 15
5.4 Connected Graphs 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 16
5.5 Weighted Graphs and Trees 1, 2, 3, 4, 6, 7, 8, 9, 11, 13, 14, 15, 16
5.6 Flow Problems 1, 2, 3, 4, 5 (all printed in these notes)



More resources available at
http://drweiser.weebly.com

Page 1 of 25
Table of Contents
5.2 Definitions and Terms ................................................................................................................................. 3
Simple graphs ............................................................................................................................................................ 3
Complete graphs ....................................................................................................................................................... 3
Connected Graphs ..................................................................................................................................................... 4
Example 1: ......................................................................................................................................................................................... 5
The degree of a vertex .............................................................................................................................................. 5
Example 2: ......................................................................................................................................................................................... 5
Isomorphic graphs ..................................................................................................................................................... 6
Example 3: ......................................................................................................................................................................................... 6
The Adjacency Matrix ................................................................................................................................................ 7
Example 4: ......................................................................................................................................................................................... 8

5.3 planar graphs .............................................................................................................................................. 9


Planar Graphs ............................................................................................................................................................ 9
Example 5: ......................................................................................................................................................................................... 9
Eulers Formula ......................................................................................................................................................... 9
Eulers Formula ....................................................................................................................................................... 10
Eulers formula can be rearranged in the following ways: ...................................................................................... 10
Example 6: ....................................................................................................................................................................................... 10

5.4 Connected Graphs .................................................................................................................................... 11


Traversing connected graphs .............................................................................................................................. 11
A Walk ..................................................................................................................................................................... 11
A Trail ...................................................................................................................................................................... 11
A Path ...................................................................................................................................................................... 11
A Cycle ..................................................................................................................................................................... 11
A Circuit ................................................................................................................................................................... 11
Example 7: ....................................................................................................................................................................................... 12
Euler trails and circuits ....................................................................................................................................... 12
Euler Trail ................................................................................................................................................................ 12
Euler Circuit ............................................................................................................................................................. 12
Hamiltonian paths and cycles ............................................................................................................................. 13
Hamiltonian Path .................................................................................................................................................... 13
Hamiltonian Cycle ................................................................................................................................................... 13
Example 8: ....................................................................................................................................................................................... 13
Terminologies Summary .................................................................................................................................... 14
5.5 Weighted graphs and trees ....................................................................................................................... 15
Weighted graphs ................................................................................................................................................ 15
Example 9: ....................................................................................................................................................................................... 15
Trees .................................................................................................................................................................. 16
Spanning Trees ................................................................................................................................................... 16
Prims algorithm ................................................................................................................................................ 16
Example 10: ..................................................................................................................................................................................... 17

5.6 Flow Problems .......................................................................................................................................... 18


Directed Graphs ................................................................................................................................................. 18
Understanding minimum flow ................................................................................................................................ 18
Example 11 - Calculating the maximum flow .................................................................................................................................. 19
Cuts ......................................................................................................................................................................... 20
Capacity of a cut .............................................................................................................................................................................. 20
Example 12 Calculating cut capacity ............................................................................................................................................... 20
Cut, cut capacity and minimum cut capacity ................................................................................................................................... 21
Example 13 Calculating maximum flow ........................................................................................................................................... 21
Exercise 5.6 Flow Problems ................................................................................................................................ 22


Page 2 of 25
5.2 Definitions and Terms
A graph is a series of points and lines that can be used to represent the connections that exist in
various settings.


In a graph, the lines are called edges or arcs and the points are called vertices or nodes, with each edge
joining a pair of vertices.
When vertices are joined by an edge, they are known as adjacent vertices. Note that the edges of a graph
can intersect without there being a vertex.
Simple graphs
A simple graph is one in which pairs of vertices are connected by one edge at most.


Complete graphs
A complete graph is one where an edge connecting each vertex to all other vertices.


The number of edges of any complete graph can be determined by the use of the formula:
#(#%&)
= Where V is the vertices and E is the edges
(

Page 3 of 25
Connected Graphs
A connected graph is one where it is possible to reach every vertex of the graph by moving along the
edges.


The graph below is not a connected graph, because not all vertices are connected as one or more
vertex/vertices are not connected, sometimes referred as an isolated vertex. This graph is also known
as a disconnected graph.


If there are more than one route connecting two vertices, than there are multiple edges.



A route that connect itself to just the one vertex is called a loop.






If it is only possible to move along the edges of a graph in one direction, the graph is called a directed
graph and the edges are represented by arrows. Otherwise it is an undirected graph.


Directed Graph Undirected

Page 4 of 25
Example 1:
The diagram represents a system of paths and gates in a large park. Draw a graph to represent the
possible ways of travelling to each gate in the park.







The degree of a vertex
The degree of a vertex is the number of edges that are directly connected
to that vertex.

Deg (A) = 2 Deg (C) = 5 Deg (E) = 3

Deg (B) = 2 Deg (D) = 2 Deg (F) = 2

Example 2:
For the graph in the following diagram, show that the number of
edges is equal to the half the sum of the degree of the vertices.

Deg (A) = Deg (C) = Deg (E) =

Deg (B) = Deg (D) = Deg (F) =




The sum of the degrees of the vertices = ________________________________________
Total number of edges = __________
When comparing the sum of the degrees of the vertices to the total number of edges, we can see that
____________________________________________________________________________________
____________________________________________________________________________________

Page 5 of 25
Isomorphic graphs
Isomorphic graphs have the same number of vertices and edges, with corresponding vertices having
identical degrees and connections.


Note, both graphs have an equal number of edges with
corresponding vertex having the same number of degree.


Example 3:
Confirm whether the following two graphs are isomorphic.


Identify the degree and edges of the vertices for each graph
Graph A B C D E No. of Edges
1
2

Identify the vertex connections for each graph

Vertex Connections

A
B
C
D

E

Page 6 of 25
The Adjacency Matrix
Adjacency matrix is a matrix that represents the number of edges that connect the vertices of a graph.
It is a square matrix with equal number of rows and columns. The adjacency matrix would always be
symmetrical around the leading diagonal line.
TO

FROM


Any non-zero value in the leading diagonal indicates the existence of a loop.




A row/column consisting of all zeros indicates an isolated vertex (a vertex that is not connected to any
other vertex).

Page 7 of 25
Example 4:
Construct the adjacency matrix for the given graph.


TO
A B C D E F
A
F B
R C
O D
M E
F










Page 8 of 25
5.3 planar graphs
Planar Graphs
Planar graph is a graph that can be redrawn with no crossing edges.



Example 5:
Redraw the graph so that it has no intersecting/crossing edges.



Eulers Formula
In all planar graphs, the edges and vertices create distinct areas referred to as faces or regions.


The planar graph shown in the diagram at above has five faces including the area around the outside.

Page 9 of 25
Eulers Formula
Consider the following group of planar graphs.


The number of vertices, edges and faces for each graph is summarised in the following table.

Graph Vertices Edges Faces
1
2
3

For each of these graphs, we can obtain a result that is well known for any planar graph. The difference
between the vertices and edges added to the number of faces will always equal 2.

Graph V E + F = 2
1 + =
2 + =
3 + =

The Eulers formula for any connected planar graphs is therefore:
+ =
Eulers formula can be rearranged in the following ways:
V = E F + 2 or E = V + F 2 or F = E V + 2
Example 6:
How many faces will there be for a connected planar graph of 7 vertices and 10 edges?


Page 10 of 25
5.4 Connected Graphs
Traversing connected graphs
Traversing refers to the movement across the network with a starting and finishing vertices.
The definitions of the main terms used when describing movement across a network are as follows:
A Walk A Trail
Walk: Any route taken through a network, Trail: A walk in which no edges are repeated
including routes that repeat edges and vertices


A Path A Cycle
Path: A walk in which no vertices are repeated, Cycle: A path beginning and ending at the same
except possibly the start and finish vertex


A Circuit
Circuit: A trail beginning and ending at the same vertex.

Page 11 of 25
Example 7:
In the following network, identify two different routes: one
cycle and one circuit.



For a cycle, identify a route that doesnt repeat a vertex apart
from the start/finish.
Cycle: _____________________________________________________________________
For a circuit, identify a route that doesnt repeat an edge and ends at the same vertex.
Circuit: ___________________________________________________________________

Euler trails and circuits
In some practical situations, it is most efficient if a route travels along each edge only once. Examples
include parcel deliveries and council garbage collections. If it is possible to travel a network using each
edge only once, the route is known as an Euler trail or Euler circuit.

Euler Trail Euler Circuit
A Euler trail is a trail in which every edge is used A Euler circuit is a circuit in which every edge is
once. used once.




If the degree of all the vertices of a connected graph are even, then a Euler circuit exists.

If there are exactly 2 vertices of odd degree of a connected graph, then a Euler trail exists.

Page 12 of 25
Hamiltonian paths and cycles
Hamiltonian Cycle
Hamiltonian Path
A Hamiltonian cycle is a cycle that reaches all
A Hamiltonian path is a path that reaches all vertices of a network without necessarily using
vertices of a network without necessarily using all of the available edges.
all of the available edges.




Example 8:
Identify an Euler trail and a Hamiltonian path in the following graph.



Deg (A) = Deg (C) = Deg (E) = Deg (G) =

Deg (B) = Deg (D) = Deg (F) = Deg (H) =



________________________________________________________________________

Euler trial involves identifying a route that uses each edge once.

Euler trail: _________________________________________________________________

Hamiltonian path involves identifying a route that uses each vertex once.

Hamiltonian path: ___________________________________________________________


Page 13 of 25
Terminologies Summary
Walk a route through a network.

Trail walk through the network with no edges repeated.

A trail will form when exactly 2 vertices with odd degree.

Eulerian (Edge)

Circuit walk that starts and Finishes at the same vertex with no edges repeated.
A circuit will form when all vertices have even degree.



Path walk through the network with no vertices repeated.

Hamiltonian (Vertex)


Cycle walk that Starts and Finishes at the same vertices with no
vertices repeated.





Page 14 of 25
5.5 Weighted graphs and trees
Weighted graphs
In many applications using graphs, it is useful to attach a value to the edges. These values could represent
the length of the edge in terms of time or distance, or the costs involved with moving along that section
of the path. Such graphs are known as weighted graphs.


Weighted graphs can be particularly useful as analysis tools. For example, they can help determine how
to travel through a network in the shortest possible time.

Example 9:
The graph represents the distances in kilometres between eight locations. Identify the shortest distance
to travel from A to D that goes to all vertices.



Possible paths Distance






Therefore the shortest distance from A to D that travels to all vertices is _______________

Page 15 of 25
Trees
A tree is a simple connected graph with no circuits, no loops or multiple edges. A tree is therefore must
contain only one face.
The number of edges in a tree is always 1 less than the number of vertices.



Spanning Trees
Spanning trees are sub-graphs (graphs that are formed from part of a larger graph) that include all of
the vertices of the original graph. In practical settings, they can be very useful in analysing network
connections. For example a minimum spanning tree for a weighted graph can identify the lowest-cost
connections. Spanning trees can be obtained by systematically removing any edges that form a circuit,
one at a time.

Prims algorithm
Prims algorithm is a set of logical steps that can be used to identify the minimum spanning tree for a
weighted connected graph.
Steps for Prims algorithm:
Step 1: Begin at a vertex with low weighted edges.
Step 2: Progressively select edges with the lowest weighting, unless they form a circuit.
Step 3: Continue until all vertices are connected.

Page 16 of 25
Example 10:
Use Prims algorithm to identify the minimum spanning tree of the graph shown.

Page 17 of 25
5.6 Flow Problems
Directed Graphs
In the previous sections, graphs were used to represent connections between people, places or objects.
The vertices of a graph represented objects, such as towns, and edges represented the conditions
between them, such as roads. Weighted graphs included extra numerical information about the
connections, such as distance, time or cost. When a graph has this numerical information we call it a
network.
A directed graph, or digraph, records directional information on networks using arrows on the edges.
The network on the right shows roads around a city. The vertices are the intersections of the roads and
the edges are the possible road connections between the intersections. The arrows show that some of
the roads only allow traffic in one direction, while others allow traffic in both directions.
Understanding minimum flow
One of the applications of directed graphs to real-life situations is flow problems. Flow problems involve
the transfer or flow of material from one point, called the source, to another point called the sink.
Examples of this include water flowing through pipes, or traffic flowing along roads.
SOURCE FLOW THROUGH NETWORK SINK
Water flows through pipes in only one direction. In a digraph representing water flow, the vertices are
the origin and destination of the water and the edges represent the pipes connecting them. The weights
on the edges would be the amount of water that can flow through the pipe in a given time. The weights
of flow problem directed graphs are called capacities.
The diagram on the right shows two pipes that are joined
together, connecting the source of water to the sink. There is a
small pipe with capacity 25 litres per minute joined to a large
pipe with capacity 58 litres per minute.
Even though the large pipe has a capacity greater than 25 litres per minute, the small pipe will only allow
25 litres of water through each minute. The flow through the large pipe will never be more than 25 litres
per minute. The large pipe will experience flow below its capacity.
If we reverse the connection and direct water through the large
capacity pipe into the smaller capacity pipe, there will be a
bottleneck of flow at the junction.
The large capacity pipe is delivering 58 litres of water every
minute to the small pipe, but the small pipe will only allow 25 litres per minute to pass.
In both of these situations, the flow through the entire pipe system (both pipes from source to sink) is
restricted to a maximum of 25 litres per minute. This is the capacity of the smallest pipe in the
connection.
If we connect more pipes together, one after the other, we can
calculate the overall capacity or maximum flowof the pipe
system by looking for the smallest capacity pipe in that system.

Maximum flow
If pipes of different capacities are connected one after the other, the maximum flow through the pipes
is equal to the minimum capacity of the individual pipes.
Page 18 of 25
Example 11 - Calculating the maximum flow
In the digraph shown on the right, the
vertices A, B, C, D and E represent towns.
The edges of the graph represent roads
and the weights of those edges are the
maximum number of cars that can travel
on the road each hour. The roads allow
only one-way travel.

a) Find the maximum traffic flow from A to E through town C.


b) Find the maximum traffic flow from A to E overall.
c) A new road is being built to allow traffic from town D to town C. This road can carry 500 cars per
hour.
i. Add this road to the digraph.
ii. Find the maximum traffic flow from A to E overall after this road is built.

Page 19 of 25
Cuts
It is difficult to determine the maximum flow by
inspection for directed networks that involve many
vertices and edges. We can simplify the search for
maximum flow by searching for cuts within the
digraph.
A cut divides the network into two parts, completely
separating the source from thesink. It is helpful to
think of cuts as imaginary breaks within the network
that completelyblock the flow through that
network. For the network or water pipes shown in
this diagram,the dotted line is a cut. This cut
completelyblocks the flow of water from the source
(S)to the sink (A).

The dotted line on the graph above is a cut The dotted line on the graph above isnot a cut
because it separates the source and the sink because material can still flow from the source to
completely. No material can flow from the the sink. Not all of the pathways from source to
source to the sink. sink have been blocked by the cut.

Capacity of a cut
The cut capacity is the sum of all the capacities of the edges that the cut passes through, taking into
account the direction of flow. The capacity of an edge is only counted if it flows from the source side to
the sink side of the cut.

Example 12 Calculating cut capacity


Calculate the capacity of the four cuts shown in the
network on the right. The source is vertex S and the
sink is vertex T.








Page 20 of 25
The capacity of a cut is important to help determine the maximum flow through any digraph. Look for
the smallest, or minimum, cut capacity that exists in the graph. This will bethe same as the maximum
flow that is possible through that graph. This is known as the maximum-flow minimum-cut theorem.

Cut, cut capacity and minimum cut capacity

A cut is an imaginary line across a directed graph that completely separates the source (start of the flow)
from the sink (destination of the flow).

The cut capacity is the sum of the capacities of the edges that are cut. Only edges that flow from the
source side of the cut to the sink side of the cut are included in a cut capacity calculation.

The minimum cut capacity possible for a graph equals the maximum flow through the graph.
Example 13 Calculating maximum flow
Determine the maximum flow from S to T for the digraph shown.

Page 21 of 25
Exercise 5.6 Flow Problems

Page 22 of 25
Page 23 of 25
Page 24 of 25
Page 25 of 25

Anda mungkin juga menyukai