Tutorial Topic 6: Tree Discrete Mathematics DAT10203
Answer all questions INDIVIDUALLY.
1. Which of these graphs are trees? If not, give the reasons.
a) a b c d) p s t
e f
d
g h
q r u
b) a e)
b
j k l
d
c e
f g
o n m
c) p q
f) y z
r
x
s
v
w u
t u
1
Tutorial Topic 6: Tree Discrete Mathematics DAT10203
2. From Figure 2, identify the following vertex (or vertices) is (or are) which :
(a) Root
(b) Internal
(c) Leaves
(d) Children of j
(e) Parent of h
(f) Siblings of o
(g) Ancestors of m
(h) Descendants of b
Figure 2
3. Given the rooted tree as Figure 3. Find the:
a. Height of this rooted tree
b. Level of 11
c. Children of 16
d. Parent of 14
e. Descendents of 10
f. Ancestors 7
Figure 3
4. Consider a binary tree shown in Figure 4 below. Find the:
a. Level of b
b. Children of b
c. Ancestors of e
d. Descendents of c
e. Leaves
f. Height of this rooted tree
Figure 4
2
Tutorial Topic 6: Tree Discrete Mathematics DAT10203
5. From the given trees below, represent it into a binary tree.
Figure 5
6. Build a binary search tree for the words banana, peach, apple, pear, coconut, mango and
papaya using alphabetical order.
7. Build a binary search tree for the words oenology, phrenology, campanology, ornithology,
ichthyology, limnology, alchemy and astrology using alphabetical order.
8. Using alphabetical order, construct a binary search tree for the words in sentence “The quick
brown fox jumps over the lazy dog”.