edited by
9,139 views
28 votes
28 votes

A $2-3$ tree is such that

  1. All internal nodes have either $2$ or $3$ children
  2. All paths from root to the leaves have the same length

The number of internal nodes of a $2-3$ tree having $9$ leaves could be

  1. $4$
  2. $5$
  3. $6$
  4. $7$
edited by

5 Answers

0 votes
0 votes

 

Why it is not possible to create with 5 & 6 internal nodes:

With 5 internal nodes,1 will be root then remains 4 nodes

With 4 nodes we need at least 2 levels 1st & 2nd level (as root is at 0th) 1st level required 2 nodes and 2nd level required 4 nodes

Hence Total=6 nodes EXACTLY (We can't have leaves at multiples levels to maintain 2nd property)

Clearly not possible.

With 6 internal nodes,1 will be root then remains 5 nodes

With 5 nodes we need at least 2 levels 1st & 2nd level (as root is at 0th) 1st level required 2 nodes and 2nd level required 4 nodes.

Hence Total=6 nodes EXACTLY(We can't have leaves at multiples levels to maintain 2nd property)

Clearly not possible

Answer:

Related questions

23 votes
23 votes
4 answers
5
Kathleen asked Sep 13, 2014
4,970 views
Context-free languages are:closed under unionclosed under complementationclosed under intersectionclosed under Kleene closure
24 votes
24 votes
4 answers
8
Kathleen asked Sep 13, 2014
5,551 views
A computer system has $6$ tape devices, with n processes competing for them. Each process may need $3$ tape drives. The maximum value of n for which the system is guarant...