- #1
zeion
- 466
- 1
Homework Statement
a) What is the exact number of edges in a Binomial Min-Heap with 255 nodes?
b) Consider a Binomial Min-Heap with 4097 distinct keys. What is the exact maximum number of keys that must be examined to find the minimum key?
Homework Equations
The Attempt at a Solution
a) So I will determine what trees are used by converting to binary 255 -> 11111111
So all trees from 2^0 to 2^7 are used. Each tree has 0, 1, 3, 7, ... edges total 63 edges.
b) 4097 -> 1000...01 so there are only two trees so the answer is 2 nodes.
Is it correct? Thanks.