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

  Write recurrence relation corresponding to pseudo-code

Write the recurrence relation corresponding to the pseudo- code, don't forget the cost of the base case. iii. Write the solution of your recurrence, showing how you have solved the recurrence.

  Understand the concept of bootstrapping

It is essential for any entrepreneur to understand the concept of bootstrapping. Bootstrapping is doing anything and everything to conserve capital for only the things that generate revenue.

  Create 4 order class fields

Create 4 Order class fields: order number, customer name, quantity ordered, and total price. Create public accessors for each field except total price.

  Create a console application

Create a console application

  Examples of emerging technologies

Assume you are an Information Systems educator, and you have been asked to make an article about emerging technologies and how important it is to be prepared to adapt to new technologies

  Allow different payment and shipping options

allow different payment and shipping options. There are a plenty of examples of this kind of web sites. Some well-known ones are amazon.com, Barnes & Nobles, and Borders.

  Problems of understanding natural languages

Briefly discussed the problems of understanding natural languages as opposed to formal programming languages and describe how the problem of traveling from one city to another could be framed as a production system. What are the states? What are the..

  How the game was integrated with the concepts of computing

Each week, you will explore a new game through the lens set up by the weekly material. For example, when working with Turing machines, you may wish to represent the concept through a game of Hangman.

  Views of how labor unions impact labor productivity

In your own words, describe the "traditional" and "new" views of how labor unions impact labor productivity. Be sure to describe the justification that each viewpoint uses to support their argument.

  Analyzing the detailed requirements of your prototype data

Design a database prototype that includes diagrams, data dictionary, design decisions, limitations, etc. The database should consist of at least four tables, two different user roles, and two reports.

  Determine optimal objective function value of lp problem

Implement given LP problem in a spreadsheet. Use Solver to solve problem and create Sensitivity Report. Determine the optimal objective function value if RHS value for second constraint changes from 15 to 25?

  Acme container corporation produces egg

Acme Container Corporation produces egg cartons that are sold to egg dis- tributors. Acme has estimated this production function for its egg carton division

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