AMS 301.3 (Fall, 2008)
Estie Arkin
Exam 2 – Solution sketch
Mean 77.8, median 80, high 98, low 50.
1. (10 points) Let
T
be a balanced 7ary tree with 100 internal nodes. Show your work! (A correct
guess with no work shown will recieve very partial credit.)
(a). How many nodes does the tree have?
n
=
mi
+ 1,
m
= 7,
i
= 100, so
n
= 701,
(b). How many edges does the tree have?
n
−
1 = 700.
(c). What is the height
l
=
n
−
i
= 601, so the height of the tree is
⌈
log
7
601
⌉
= 4.
2. (10 points) (a). Highlight the edges of a minimum spanning tree of the graph.
A
B
C
D
E
F
0
1
5
4
1
(b). Edge (A,D) of cost 4 is added to the graph. Will it be part of the minimum spanning tree?
Explain. Yes, it will replace the edge (C,D) of cost 5 as a way to connect D.
3.
(8 points) I wish to model the following word problem as a graph problem:
The Maytag
repairman has been called to repair washers and dryers at several customer’s homes. Assume travel
times between locations are known. The repairman starts and ends his day at his home, and would
like to complete his work as quickly as possible.
(a). What do the nodes of the graph to be constructed represent? repair locations and home.
(b). What do the edges of the graph to be constructed represent? Possible travel between locations.
(c). State which graph problem it is: Traveling Salesman Problem.
4. (12 points) True or False? If true, give a short proof. If false, give a counterexample:
(a). For every connected graph
G
, the DFS tree on
G
and the BFS tree on
G
have the same number
of edges. True, since number of edges of any spanning tree is
n
−
1.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 ARKIN
 Graph Theory, Shortest path problem, Mickey, shortest path tree

Click to edit the document details