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

  Draw flowchart to print average for each student

Draw a flowchart to print the average for each student in a class. Input. Input consists of student records each containing a student's name(STUDENT-NAME), score for first test(TEST), score for second test(TEST2), and score for third test(TEST3)..

  Algorithm to minimize average difference between height

The problem is to assign each skier a ski to minimize the average difference between height of a skier and his/her ski. Give pseudocode and write its asymptotic running time.

  Write algorithm using pseudo code consensus algorithm

Write an algorithm, using pseudo code, "Consensus algorithm": A group of ten people need to decide which one flavor of ice cream they will all order, out of three options.

  Use of primitives helps remove ambiguities in algorithm

Explain the distinction between an ambiguity in a proposed algorithm and an ambiguity in the representation of an algorithm. Describe how the use of primitives helps remove ambiguities in an algorithm's representation.

  Design randomized algorithm for solving decoding problem

The Viterbi algorithm is a deterministic algorithm for solving the Decoding problem. Design a randomized algorithm for solving the Decoding problem.

  Write the selection sort algorithm

Write the selection sort algorithm

  Create a solution algorithm using pseudocode

Algorithm that will receive two integer items from a terminal operator, and display to the screen their sum, difference, product and quotient.

  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.

  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.

  Linear-time algorithm to find odd-length cycle in graph

Give a linear-time algorithm to find an odd-length cycle in a directed graph. You may not suppose that graph is strongly connected.

  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.

  Survey of fault tolerance policy for load balancing scheme o

This paper investigates about fault-tolerance in load balancing schemes in distributed environment. There are some more parameters influencing QOS but our main focus is on fault tolerance and load balancing.

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