Analyze the time-space complexity of algorithms

Assignment Help Data Structure & Algorithms
Reference no: EM1373332

1. Early printings of CLRS3 say on pages 546-547 "we treat min and max differently: the element stored in min does not appear in any of the clusters, but the element stored in max does." This is not true (they may have corrected it in later printings)-what that sentence should say is "we treat min and max differently: the element stored in min does not appear in any of the clusters, but unless the vEB tree contains just one element (so that the minimum and maximum elements are the same), the element stored in max does." Rewrite the code for vEB-Empty-Tree-Insert, vEB-Tree-Insert, and vEB- Tree-Delete so that indeed, max does not appear in any of the clusters, just as min does not appear in any of the clusters.

2. Problem 20-1, parts (a) and (b) only, on page 557. In part (b), be careful that you do not get snagged by the pitfall described in the middle of page 86 of CLRS3. (Hint : For part (b), can you prove, under reasonable assumptions, that P(u) = u - 2?) Do not do parts (c)-(g); instead, do the following replacement for part (c):

(c) We can store all of the array-of-pointers substructures in a single array outside the vEB tree itself. This would change the recurrence (20.5) to

P(u) = (√u + 1)P(√u) + O(1).

Solve this recurrence. Does this idea improve the vEB structure?

3. Consider the "dynamic range minimum query problem." Let S ⊆ U = {0, 1, 2, . . . , u-1}. Each s ∈ S is labeled with a real number v(s). We need to maintain a data structure on S that supports the following operations:

• initialize(S): Construct and initialize the data structure for S.
• decreaseKey(s, x): If x < v(s), change v(s) to x; otherwise, do nothing.
• minimum(x): Return min{v(s)|s ∈ S, s ≤ x}.

Show how a vEB tree can be used to support these three operations. Analyze the time/space complexity of your algorithms.

Reference no: EM1373332

Questions Cloud

Elucidate what is the minimum price the product could have : Elucidate what is the minimum price the product could have been sold for to cover the unit cost, period expenses also overhead.
Describe how many pounds of every seed should be in blend : If the blend needs to score at least 300 points for shade tolerance, 400 points for traffic resistance also 750 points for drought resistance, describe how many pounds of every seed should be in the blend. Describe how much will the blend cost.
Concepts in macroeconomics : As an worker of the World Bank you have been asked to research requires of a country with a particular economic concern.
Compute the value of the price index for gdp : Compute the value of the price index for GDP for 2006 using 2005 as base year. By what percent did prices rise?
Analyze the time-space complexity of algorithms : How a vEB tree can be used to support these three operations and analyze the time/space complexity of your algorithms.
Elucidate what volume of demand would manager have : Elucidate what volume of demand would the manager be indifferent between the 2 cities Which city should be chosen if demand is higher than this volume.
Which strategic alternatives emerge from situation analysis : Which strategic alternatives emerge from situation analysis. Which level of decision making would you target in your report-corporate, business or functional? It's for Integrative Business Strategy class.
Computing the growth rate of real gdp : Suppose past year's real GDP was $7,000 billion, this year nominal GDP is $8,820 billion, and GDP deflator for this year is 120. Determine the growth rate of real GDP? Does this demonstrate an improvement in economic welfare?
Elucidate what should be the optimal batch size : Elucidate what should be the optimal batch size (Q) of clay tigers to be produced also shipped to the stores in every order. Keep 4 digits after decimal points in calculations.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Finding equation has no solutions mod m

Let the equation ax = b mod m, where x is unknown and a, b and m are given. Illustrate that this equation has either no solutions mod m, or d solutions mod m.

  Online vs. face-to-face classes

Communication A significant distinction between online and face-to-face classes lies in the area of communication.

  Explaining effective customer relationships and loyalty

Paws'n Tails is an online pet shop that wants to influence what customers buy and builkd effective customer relationships and loyalty.

  Program development cycle for algorithm using pseudocode

Illustrate all your work. Use modular approach to solving this problem. Give the following submodule. Calculations - module to compute gross pay. Using the Program Development Cycle, develop an algorithm using pseudocode for the following task.

  Write algorithm segment for locating nth successor of item

Write an algorithm or code segment for locating the nth successor of an item in a circlar linked list (the nth item that follows the given item in the list).

  Explain the sorting techniques selection sort

Explain the following sorting techniques using appropriate algorithms- (i) selection sort (ii) bubble sort

  Create algorithm to prepare daily hotel charge report

Create the algorithm to prepare the daily hotel charge report. Input consists of series of records which contain a room number, customer name, cost of the room, and cost of meals charged to the room.

  Determine the branching factor

Expalin the search algorithm that results from each of the following special cases. How does it relate to other algorithms we have discussed.

  Testing item in array of member using sequential search

Look up each test item in array of member items, by using sequential search. What is the worst-case running time of it. (asymptotically, in terms of n and k)?

  Determine algorithm for cs curriculum consists of n courses

Determine an algorithm which works directly with this graph representation, and calculates minimum number of semesters necessary to complete the curriculum.

  Transmitting image using raster scan order

If we were to transmit this image using raster scan order, after 15 seconds how many rows of the image will the user have received?

  Create greedy algorithm to find market to buy apples

Assume we drive pickup truck from city A to city B. Along high way, we will go through n apple markets, labeled with 1, 2, ..., n, where you can buy or sell apples. which means you buy and sell apples at the same market i.

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