Introduction To Algorithms, Third Edition (international Edition)
Introduction To Algorithms, Third Edition (international Edition)
3rd Edition
ISBN: 9780262533058
Author: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein
Publisher: TRILITERAL
Question
Book Icon
Chapter 20, Problem 1P

(a)

Program Plan Intro

To prove the characteristics of the recurrence relation is P(u)=(u+1)P(u)+Θ(u) .

(a)

Expert Solution
Check Mark

Explanation of Solution

Consider the vEB-tree having different subtree of same kinds. Suppose that a vEB-tree consists of different subtrees of size u+ , u and u1 .

The nodes of different subtrees need to be stored that takes total space of O(lgn) . The pointer of the subtree stores u+ then other subtrees into the tree in same cost.

The total length of the tree can be defined as the summation of all the vEB-trees that is P(u)=P(u+)+u+P(u)+Θ(u) .

Suppose that u+ is integer so suppose it u=22m then the equation will be modified as follows:

  P(u)=(1+2m)m(2m)+Θ(u).=(1+u)P(u)+Θ(u).

Hence, the recurrence relation is defined as P(u)=(u+1)P(u)+Θ(u) .

(b)

Program Plan Intro

To prove the recurrence relation P(u)=(u+1)P(u)+θ(u) has solution P(u)=O(u).

(b)

Expert Solution
Check Mark

Explanation of Solution

Suppose the equation P(u)=(u+1)P(u)+θ(u) , the equation can be solved as follows:

Consider the bound region of the number that fall down to square of 2 that is the ith term of the expression is represented as the summation of all the terms before the ith terms and given as u1i .

Consider the unity case so that the value of i=1 , i>1 and i<1 , the solution of the equation is exist in the term of u that is O(u) .

Therefore, the recurrence P(u)=(u+1)P(u)+θ(u) has solution of O(u) .

(c)

Program Plan Intro

To modify vEB-TREE-INSERT to produces pseudo-code for RS-eVB-TREE-INSERT procedures.

(c)

Expert Solution
Check Mark

Explanation of Solution

The algorithm of the vEB-TREE-INSERT is used to insert the elements in the vEB tree and this procedure is similar to the insertion procedure of RS-vEB-TREE-INSERT.

Consider the simple procedure of the vEB-TREE-INSERT, the algorithm required some modification to use in the insertion of RS-vEB-TREE-INSERT. The modifications are given below:

  1. The algorithm needs to checks the key that have to insert in the tree already exists or not in the cluster.
  2. If the key is already existed in the cluster then it just replaces the key with desired key.
  3. Otherwise it needs to find the position to insert the key that restrict the algorithm procedure.

These modifications mentioned above in the procedure of vEB-TREE-INSERT make the procedure as the procedure of RS-vEB-TREE-INSERT.

(d)

Program Plan Intro

To modifies the vEB-TREE-SUCESSOR procedure to produce code for the procedure RS-eVB-TREE-SUCESSOR.

(d)

Expert Solution
Check Mark

Explanation of Solution

The procedure can be modifies as follows:

Step 1: Check for the existing key.

Step 2: Allocate the space for non-existing key for successor.

Step 3: Check the key constraints and marked as the successor.

Step 4: If another successor is found then marked the nearest successor to successor of the key.

Now, the algorithm restricts the tree to find the successor of desired key.

(e)

Program Plan Intro

To prove the RS-vEB-TREE-INSERT and RS-vEB-TREE-SUCESSOR procedures run in O(lg(lgn)) .

(e)

Expert Solution
Check Mark

Explanation of Solution

The RS-vEB-TREE-INSERT algorithm is used to insert the key in the tree. The insertion operation first checks the existence of the key in the cluster that needs searching operation.

It dividing the cluster into several new clusters to easily search for the key then if founds then it replace it otherwise it insert the key in to the cluster. The whole procedure is taken the logarithm time and depends upon the size of the tree.

The RS-vEB-TREE-SUCESSOR algorithm finds the successor of the elements by comparing the values of the key to all the keys of the cluster. Suppose that there are total n clusters then the size of the tree is lgn so it takes total time of O(lg(lgn)) .

Therefore, both the procedure takes total time of O(lg(lgn)) .

(f)

Program Plan Intro

To prove that the space required for the RS-vEB tree structure is O(n) if the elements are never deleted from a vEB-TREE.

(f)

Expert Solution
Check Mark

Explanation of Solution

The general space required to store the RS-vEB tree is O(lg(lgn)) where the whole process stores the tree in structure or hierarchal form with logarithmic time and the lgn is the depth of tree with total n clusters.

The adding of elements in the corresponding hash table of the tree requires the constant time as the position is marked as the fundamental source for storing the keys in the table.

If a new element is inserted in the table then it also stores in the summary of RS-vEB tree and the tree is already existed, it just required to add that will takes the constant amortized of time equals to the number of elements in the cluster of tree.

After adding the key it required to make one element as the min-elements where it adds the elements and the min-element is already defined to it takes the constant time that is equal to the O(n) .

Program Plan Intro

To give the time required to create RS-vEB trees.

Expert Solution
Check Mark

Explanation of Solution

The algorithm of RS-vEB-TREE-INSERT is used to create a tree by using the elements with some parameters. For the creation of the tree the algorithm initialized a parameter that is V.u that takes the constant time.

The algorithm depends on the parameter u for the insertion of elements but for the creation of empty RS-vEB tree it just initialized the V.u and after that there is no dependency on u .

The initialization of the V.u is done on the constant time so for the creating new empty RS-vEB tree the algorithm takes the constant amount of time.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Why are requirements changing a significant source of risks in system projects?
Why is functionality a key criterion in technology selection?
What is the significant advantage of using project management software?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning