AMS 301
Fall, 2009
Homework Set # 5 — Solution Notes
Problem A: (a). How many internal nodes does the tree have?
n
=
mi
+ 1,
n
= 81,
m
= 5, so
i
= 16.
n
=
i
+
l
,
l
= 81
−
16 = 65.
(b). How many edges does the tree have? 81
−
1 = 80
(c). What is the height of
T
?
⌈
log
5
65
⌉
= 3
# 16, Section 3.1:
Let
e
i
(resp.,
v
i
) be the number of edges (resp., vertices) in tree
i
(
i
=
1
,
2
,...,t
). In tree
i
, we know that
e
i
=
v
i
−
1. Sum this equation over all
i
to get:
∑
i
e
i
=
∑
i
(
v
i
−
1).
But,
∑
i
e
i
=
e
, and
∑
i
(
v
i
−
1) = (
∑
i
v
i
)
−
(
∑
i
1) =
v
−
t
(since there are
t
terms in the summation).
Thus,
e
=
v
−
t
.
# 26(a), Section 3.1:
Number the coins 1
,
2
,...,
20. There are 21 possible outcomes: “All Fair”,
(since problem states that AT MOST 1 coin is too light) 1L (“coin 1 is too light”), 2L, ..., 20L. In
any decision tree that solves the problem, there must be (at least) 21 leaves corresponding to the
possible outcomes. Now, each internal vertex of the tree will correspond to placing some number,
i
,
of coins on each side of the balance. (Note that if we place
i
coins on one side, but
j
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
 1L, #, 2L, 20L

Click to edit the document details