Question: ( 2 0 pts ) A rooted binary tree has three types of nodes, red, green, and blue with the following properties: Each red node

(20 pts) A rooted binary tree has three types of nodes, red, green, and blue with the following
properties:
Each red node has two children, exactly one of which is green.
Each green node has exactly one child, which is not green.
Blue nodes have no children.
Let R,G, and B respectively denote the number of red, green, and blue nodes. Prove (by
induction on the tree height) that
(a)B=R+1
(b) either G=R or G=B; and
(c)G=B if and only if the root is green.
( 2 0 pts ) A rooted binary tree has three types

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!