1 early printings of clrs3 say on pages 546-547 we treat

Assignment Help Data Structure & Algorithms
Reference no: EM13370197

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: EM13370197

Questions Cloud

You make a really solid point in noting that traditional : you make a really solid point in noting that traditional organizations are not able to transform into a lean
1 demonstrate knowledge and understanding of the key : 1. demonstrate knowledge and understanding of the key engineering principles that underpin current geotechnical and
1 your company appointed you as the project manager for a : 1. your company appointed you as the project manager for a new innovative hr project. this project will need a
Question 1antibodies directed against hiv can enhance the : question 1antibodies directed against hiv can enhance the infection by facilitating entry of virus into immune
1 early printings of clrs3 say on pages 546-547 we treat : 1. early printings of clrs3 say on pages 546-547 we treat min and max differently the element stored in min does not
Jane wants to setup a photo shop the cost to rent an office : jane wants to setup a photo shop. the cost to rent an office is 150 per week. the variable cost of making one photo is
What is the cellular tropism of hiv does it change during : what is the cellular tropism of hiv? does it change during the course of an infection? which cellular receptors confer
Question 1 echinoderms describe the specialized structures : question 1 echinoderms describe the specialized structures and functions of echinoderms. include in your answera. a
Strategic operation management and the discussion topic is : strategic operation management and the discussion topic is the overall nature of demand affects planning and control

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Recurrence-worst case running time-recursive binary search

Provide a recurrence for worst case running time of recursive Binary Search function in terms of n, the size of the search array. Solve the recurrence.

  Analyze algorithm to determine length of longest substring

Explain and analyze the algorithm to determine the length of longest substring that appears both forward and backward in an input string T[1 . n].

  Exhibit an algorithm that detects automation

Exhibit an algorithm that detects whether one finite automaton accepts a subset of the set accepted by another machine.

  Write algorithms to perform the following operations on it

Write algorithms to perform the following operations on it - create, insertion, deletion, for testing overflow and empty conditions.

  Algorithm to decide flavor of ice cream

A group of ten people need to decide which one flavor of ice cream they will all order, out of three options. The algorithm can question and re-question the participants, and present the answers to the participants.

  What are the properties of an algorithm

What is a first-in-first-out data structure ? Write algorithms to perform the following operations on it - create, insertion, deletion, for testing overflow and empty conditions.

  Describe why algorithm runs in linear time-adjacency matrix

Rreached from every other vertex. Describe why your algorithm runs in linear time (O(V2) on an adjacency matrix; O(E+V) on an adjacency list).

  Writing algorithm which ?nds xbest

Provide an O(n) algorithm which ?nds xbest such that distbest:= ∑i=1 to n|xbest - xi| is as small as possible.

  Question about software importance

Determine what makes software so important and list a number of ways that software has an impact on our life.

  How to calculate signature using mod

How does he calculate the signature on each of m1j mod n (for positive integer j), m1-1 mod n, m1*m2 mod n, and in general m1j*m2k mod n (for arbitrary integers j and k)?

  Define wan and provide an example of typical wan setup

Define a WAN and provide an example of a typical WAN setup and describe the components. Provide a picture, chart, or image if possible.

  Explaining elementary operations used in algorithm

How many elementary operations are used in algorithm given below? The elementary operations are comparison operations (such as > and

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