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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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