Directed Graphs

Year 2 Warm Up
State a Hamilton Circuit for the following
figure:
a
One answer is;
a-g-c-b-f-e-i-k-h-d-j-a
f
e
b
j
g
k
i
d
h
c
Directed and Weighted Graphs
and
Tournaments
Objective: S2C4PO1
Weighted Paths and Circuits
Weighted network paths and circuits
• _________
have values along the edges.
• To find the shortest network path you look
for the path that travels the shortest distance
but goes to all the vertices.
• To find the shortest network circuit you look
for the circuit that travels the shortest
distance, remember a network circuit will
start and end at the same point.
b
1. What is the
shortest distance
from point a to e?
10
2. Name the shortest
Euler path. How
long is it?
a
4
4
3
5
d
c
3
Ex:
4
6
e
CBDCAGDEFG = 38
GDEFGACDBC = 38
g
All Euler Paths will have the
same length.
5
4
f
3. Is there an Euler Circuit? No
Applications: Trucking Routes, Toll Roads, Fastest
routes for running errands, Resistance on power lines
Directed Graphs
• The graphs we have looked at so far have
been ______________.
undirected graphs
direction
graphs give the edges
• Directed
___________
_____ a ______
that must be traveled from one vertex to
another.
• Think about the difference between a
regular 2-way street (undirected) and a
1-way street (directed).
Yesterday you found several different Euler
Circuits in this figure.
Let’s look at how adding direction to a graph
changes the number of solutions we can find.
B
Our first possible solution from
yesterday was: D,E,F,A,D,C,A,B,D
Now that the graph is directed, is
that still a solution? NO
C
A
D
F
E
Which solutions work now that the
graph is directed?
ACDABDEFA
ABDEFACDA
Tournament Graphs
• Directed graphs are often used in looking at
____________.
tournaments Specifically, round-robin
tournaments where each person/team plays
every other person/team with no ties.
• In a tournament graph, the vertices correspond
to the players. The edge between each pair of
winner to the
players is oriented from the _______
loser
_____.
Tournaments
1.
Assume that the vertex-edge graph below is a
representation of a Mathlete round-robin
tournament.
2. The winner of a tournament is defined by any
first in a _____________.
Hamilton Path
vertex that comes ____
Amanda
Salim
1. The arrow always points
from the winner to the
loser of the game.
2. A Hamilton Path touches
every vertex once and
only once.
Amanda is the winner of
the Tournament!!!
Josie
Alessandro
Tournaments
1.
You can also put the information in the graph
into a matrix to find the winner.
2. A win is worth 1 and a loss is worth 0.
A
D
J
K
A
X
1
1
1
= 3
D
0
X
0
1
= 1
J
0
0
X
1
= 1
K
0
0
0
X
= 0
A is the winner of the
tournament!
A
D
K
J
Examples
Which team wins the tournament?
Ex. 2
Ex. 1
Hamilton HS
Team B
Team C
Team A
Chandler HS
Perry HS
Perry HS
GO PUMAS!
Team E
Team D
Team D
Creating a Tournament Graph
There is a “HORSE” tournament between Shaq,
Kobe, Dwayne, and Kevin. The tournament is a
round robin. Create a tournament graph that
has Dwayne winning the tournament and Shaq
beating Kobe in their one-on-one game.
Step 1:
Shaq
Kobe
Create a graph that has a
vertex for every player.
Step 2:
Mark the given information.
Kevin
Dwayne
Creating a Tournament Graph
Step 3:
The Winner of the tourney is the start of a Hamilton Path. So
starting at Dwayne, make a directed path that touches every
vertex once. There are a few ways you can do this.
Step 4:
Fill in the other arrows carefully. Make sure the “winner” has the
most wins and that there aren’t any other Hamilton paths that
start with another player.
Shaq
Kevin
Kobe
Dwayne
Summary…
How do you determine the winner of a
tournament using a vertex edge graph?
Homework:
Directed Graph/Tournament WS #2