CSCI203 Spring 2010 Workshops Lab 7 (1) With Answers!
CSCI203 Spring 2010 Workshops Lab 7 (1) With Answers!
http://my.uowdubai.ac.ae
CSCI 203
Spring 2010
LAB Session #7
Week 8:
b. 6, 5, 4, 3, 2, 1
1 2 3 4 5 6 7
1 0 1 0 1 0 0 1
2 0 0 1 0 0 0 0
3 0 0 0 1 0 0 0
4 1 0 0 0 0 0 0
5 0 1 0 0 0 0 0
6 1 0 0 0 1 0 0
7 1 0 0 1 0 1 0
c. starting at vertex 1 List the vertices in order as they are visited by DFS
(use the adjacency list)
1 -> 2 -> 3 -> 4 -> Backtrack to 2 -> 5 - > Backtrack to 1 -> 7 -> 6
i =n −1 i
b. Compute the following : ∑∑5
i =0 k =0
c. 22 + 21+…+2k
n +1 i −1
c. ∑∑6i
i =1 k =0
Question 8 (assignment)
Question 9
a. Show that the maximum number of nodes in a binary tree of height h is
2h+1 − 1 (h = 0. A binary tree of height 0 has one node)