1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Binomial Min-Heap question

  1. Dec 11, 2012 #1
    1. The problem statement, all variables and given/known data

    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?

    2. Relevant equations

    3. 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.
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted