Solutions to Review for Exam #2 Review
Chapter 5
and vertices V={A,B,C,D,E}
A
B
E
D
C
1b) Give the degree of every vertice in part 1a)
Deg(C)=3,deg(A)=4,deg(B)=1,deg(D)=2,deg(E)=0.
1c) List all edges adjacent to AB
1d) Is the graph connected or disconnected?
disconnected
2) In the following graph
a) Determine if an Euler circuit, Euler path, or neither exist.
Euler Circuit since all of the vertices are of even degree.
b) If there is an Euler path or circuit, where should it start and stop?
The Euler Circuit can begin anywhere, and has to end at the same spot it started.
3) True or false?
a) The Euler Circuit theorem says that if the degree of all the vertices in a graph are odd, then the graph has an
Euler circuit.
T
F
b) The Euler path theorem says that is there are two vertices of odd degree, then an Euler path exists. T
F
It must also be connected
c) It is possible that the sum of all degrees of all vertices of a graph to be an even number.
T
F
4) How many edges are there in a graph with vertices of degree 2,3,3,3,2,3?
(2+3+3+3+2+3)/2=16/2=8.
5) Use Fleury’s Algorithm to find an Euler path or circuit in the following graph(label edges 1,2, etc):
2
1
4
3
5
6
9
10
7
8
6) Find an optimal Eulerization of the following graph
Notice that there are 3 vertices of degree 3 that we need to deal with.
Chapter 6
1) For the following graph
A
E
C
G
D
F
B
a) find a Hamiltonian circuit
A,C,G,D,B,F,E,A
b) find a Hamiltonian path that begins at A and ends at B
A,C,E,G,F,D,B
2a) Draw the complete graphs K6,K5,K4, and K3.
K3
K6
K4
K5
b) Find the number of edges and Hamiltonian circuits in the above graphs.
For K3 we have [3(3-1)]/2=3 total edges and 2!=2 total Hamiltonian circuits.
For K4 we have [4(4-1)]/2=6 total edges and 3!=6 total Hamiltonian circuits.
For K5 we have [5(5-1)]/2=10 total edges and 4!=24 total Hamiltonian circuits.
For K6 we have [6(6-1)]/2=15 total edges and 5!=120 total Hamiltonian circuits.
3) In the following graph, find the most efficient Hamiltonian circuit by using
B
2
A
5
6
3
4
2
C
D
a) Brute force
Circuit
Weight
ABCDA
ABDCA
ACBDA
ACDBA
11
15
18
15
11
18
The most efficient Hamiltonian Circuit is either ABCDA or ADCBA.
b) Nearest neighbor algorithm (sorry, I should have mentioned a starting point, say A)
ABCDA
c) What is the error in the nearest neighbor algorithm?
(11-11)/11=0
d) Repetitive nearest neighbor algorithm.
ABCDA we already know that this is one of the most efficient ones.
CDABC
Chapter 7
1) Let T represent tree and N represent network. Circle one, both, or neither T or N in each of the following graphs.
T
N
T
N
2) True or False?
a) In a tree, every edge is a bridge
T
F
b) A tree with N-1 vertices has N edges T
F
c) If every edge of a graph is a bridge, then the graph is a tree.
d) A tree must be a connected graph
T
F
e) Every tree is a network
T
F
f) A spanning tree is a subgraph with no paths
T
F
T
T
F
N
3) Find the number of possible spanning trees for the following graph.
4*4*3=48
4) Use Kruskal’s algorithm to the minimum spanning tree in the following weighted network.
2.2 4
2.1
1.2
3
1
1.4
2
5) Assume that one of the three points- X,Y, or Z- is a Steiner point of triangle ABC. The distances of each of these
three points to the vertices of the triangle are given in the table. Determine which of the three points is the Steiner
X
54
61
125
A
B
C
Y
72
94
77
Z
41
87
104
Sum down the columns and choose the smallest of those sums. It ends up the Z is the Steiner point.
6) Below is an equilateral triangle each side of length 1. Construct a 30-60-90 triangle with the length of the sides
labeled appropriately (split triangle in half, and use pythagorean theorem).
30
1
A
90
60
1/2
We get the above by splitting the triangle directly in half.
Then use the Pythagorean Theorem to find the length of side A.
We have:
A 2  (1 / 2) 2  12  A 2  3 / 4  A  3 / 2.
Chapter 8
Sorry, for problem 1) I forgot to include arrows. Use the arc set A={AB,AC,BE,CB,DA,EB,ED,EA}
To determine the direction of the arrows.
Solutions for this problem were given in class (exercise)
1) For the digraph shown in the figure,
A
B
C
E
D
a) find all vertices that are incident to A.
b) find all vertices that are incident from A.
c) find all arcs adjacent to AC.
d) find the indegree of C
e) find the outdegree of C
2) #1 from text of Chapter 8: The answer for this one is in the back of the book.
3) #28 from Chapter 8 in text
We end up with the following timetable:
P1 C(9)
E(6)
G(2)
P2 B(5)
A(8)
D(12)
idle
F(1)
Idle
You should consider the time intervals T=0,5,9,13,15,17,25, and finishing with 26.