Expected depth of the kth smallest element

Assignment Help Basic Computer Science
Reference no: EM13968203

1. Show the following regarding the maximum item in the heap:

a. It must be at one of the leaves.

b. There are exactly fN/21 leaves.

c. Every leaf must be examined to ?nd it.

2. Show that the expected depth of the kth smallest element in a large complete heap (you may assume N  = 2k  - 1) is bounded by log k.

3. a. Give an algorithm to ?nd all nodes less than some value, X, in a binary heap. Your algorithm should run in O(K), where is the number of nodes output.

b. Does your algorithm extend to any of the other heap structures discussed in this chapter?

c.  Give an algorithm that ?nds an arbitrary item in a binary heap using at most roughly 3N/4 comparisons.

Reference no: EM13968203

Questions Cloud

Problem regarding the complexity of algorithm : If a d-heap is stored as an array, for an entry located in position i, where are the parents and children?
For the soon-to-be-incorporated firm of ebroadcast sports : Dennis is a promoter for the soon-to-be-incorporated firm of eBroadcast Sports, Inc. Dennis signs a contract with Fitz & Geraldo, Accountants, to render their services before eBroadcast Sports is incorporated and for one year after the incorporation.
Running time of both algorithms for sorted : Compare the running time of both algorithms for sorted, reverse-ordered, and random inputs.
Marketing decision that results in dramatic decrease : Donatello is a director and officer of Enzio's Pizza Corporation. Donatello selects an ad campaign that consumers find offensive? a marketing decision that results in a dramatic decrease in profits for the firm and its shareholders. Donatello is a di..
Expected depth of the kth smallest element : Show that the expected depth of the kth smallest element in a large complete heap (you may assume N  = 2k  - 1) is bounded by log k.
Discuss norman augustine and dilbert contribution : Why was the DII so important to the eventual success of Lockheed Martin's ethics program? Discuss Norman Augustine's and Dilbert's contribution in helping Lockheed Martin turn the corner with its ethics program
Identify also range of discounting rates in which project : "Carolina Company is considering Projects S and L, whose cash flows are shown below. These projects are mutually exclusive, equally risky, and are not repeatable. If the decision is made by choosing the project with the higher IRR, how much value wil..
Cause safety stock to increase : Which of the following would cause safety stock to increase?
Order to minimize the total production cost : Golf Shafts, Inc. (GSI)) produces graphite shafts for several manufacturers of golf clubs. Two GSI manufacturing facilities, one locate in San Diego and the other in Tampa , have the capabilities to produce shafts in varying degrees of stiffness, For..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determine finish tag-packet-by-packet fair queueing system

Let the packet-by-packet fair queueing system with three logical buffers and with service rate of one unit/second. Determine finish tag, order of transmission and actual packet completion times for each packet arrival.

  Degrees in fahrenheit

They need a program that will convert Fahrenheit to Celsius. The user will enter the degrees in Fahrenheit and the program will give the results in Celsius.

  Components of an instructional strategy

we discussed the importance of planning your instructional strategy. What are the components of an instructional strategy? How important is the room layout and what impact does it have on the effectiveness of training?

  What is the expected total number of tickets receive

What is the expected total number of tickets you receive?

  How many sensors does snort use

Is Snort an HIDS or an NIDS? 2. How many sensors does Snort use? 3. What does a preprocessor do? 4. Is Snort anomaly-based or signature-based?

  Identify how it supports business processes

Identify how IT supports business processes

  Make an instance of romannumerals

Make an instance of RomanNumerals and invoke the method toRoman(int n). Enter a number in the Arabic notation and it will convert it to a Roman numeral. For example 17 will be converted to XVII.You will notice a test suite that we provide with the..

  Explain what is meant by wear-leveling in flash drives?

Explain what is meant by wear-leveling in Flash drives?

  Explain it ethics and responsible conduct

Specify the main reasons why green computing should be part of any organization's social responsibility posture. Next, propose three (3) actions that IT organizations could take to reduce their carbon footprint.

  Explain the concept of referential integrity constraints

How would you explain the concept of "referential integrity constraints" using a real world example.

  Describe a scenario in which a network sniffer is warranted

Describe a scenario in which a network sniffer is warranted

  Impact major societal concerns like education

Facebook, Twitter, YouTube, and other Web 2.0 tools (file sharing, cloud-services, etc.) provide ways for us to connect with individuals and share information in almost real time. Describe how you use these tools in your life today.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd