Exercise 9:
Draw a full binary tree having the following properties
1. Four internal vertices and five terminal vertices.
2. Height = 3 and nine terminal vertices.
3. Height = 4 and nine terminal vertices.
Full binary tree is a tree each vertcle of which has either 0 or 2 children. Internal verticle is a verticle that has children. Terminal verticle is a verticle that has no children
1) a, b, d, g - internal verticles. f, e, c, i, h - terminal verticles
2) Height of a tree is a max distance from its root to the terminal verticle. Full binary tree with height 3 has no more than "2^3=8" terminal points, so there is no full binary tree with such properties
3) j, k, e, l, m, n, o, p, q - terminal verticles. Path with max distance is a-b-d-f-j(or k) - 4 steps
Comments
Leave a comment