edited by
759 views

2 Answers

Best answer
6 votes
6 votes

at first level,there can be only 1..hence only 1 way

at second level,there can be 2 or 3 ,hence 2 ways

at third level,there can be 4,or 5 or 6 or 7 ,hence 4! ways

at fourth level,there can be 8 or 9or 10 or 11 or 12 or 13 or 14 or 15 ,hence 8! ways

so,total number of min heaps are 1*2* 4! * 8! ways . It looks like this ....


But actually, question only asks to handle leaf nodes not internal nodes, hence the numbers 2,3,4,5,6,7 can be arranged any way.

At root, 1 is for sure fixed, but for 2,3,4,5,6,7 , total ways will be 

$C(6,3) * 2! * 1 * 2! * 8! = 3225600 $ ways.


PS: $C(6,3)$ :- Choose any three elements for left $3$ positions and arrange them in $2!$ ways.

Then, right $3$ positions can be permuted in $2!$ ways .

selected by

Related questions

1 votes
1 votes
0 answers
1
5 votes
5 votes
2 answers
2
Utkarsh Joshi asked Nov 24, 2018
3,504 views
The minimum number of comparisons required to find the 65th smallest element in a minheap is equal to
1 votes
1 votes
1 answer
3
sunaina rawat asked Nov 7, 2017
762 views
The number of min heap trees are possible with 15 elements such that every leaf node must be greater than all non-leaf nodes of the tree are ________.
1 votes
1 votes
1 answer
4