Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
Question
Book Icon
Chapter 19, Problem 1P

(a)

Program Plan Intro

Explain the assumption that Line 7 can be performed in O(1) actual time.

(a)

Expert Solution
Check Mark

Explanation of Solution

For performing line 7, the time taken is proportional to the number of children does x have. For adding each child in the root list requires to update the parent’s pointer to NULL instead of x.

Therefore, the updating of parent pointer to x is wrong in this assumption.

(b)

Program Plan Intro

Give anupper bound on the actual time of PISANO-DELETE, when node x is not inH.min .

(b)

Expert Solution
Check Mark

Explanation of Solution

An actual cost of bounded by x.degree and updating all children of x takes constant time so, the actual time of PISANO-DELETE is O(x.degree+c) , where c is number of calls to CASCADING-CUT procedure.

Hence, the upper bound on the actual time is O(x.degree+c) .

(c)

Program Plan Intro

Use PISANO-DELETE( H,x ), describe that the node x is not a root, bound the potential of H’ in terms of x.degree, c, t ( H ) and m ( H ).

(c)

Expert Solution
Check Mark

Explanation of Solution

Explanation:

As given CASCASDING-CUT rule we know that if it marked more than one node then m(H')m(H)+1 .

If the children increased from the previous that x had then equation will become t(H')=x.degree+t(H) .

Now taking the consideration and according to question, combiningthese expressions the bound of potential is − ϕ(H')t(H)+x.degree+2(1+m(H)).

(d)

Program Plan Intro

Conclude that the amortized time for PISANO-DELETE is asymptotically no better than for FIB-DELETE, even when x H.min.

(d)

Expert Solution
Check Mark

Explanation of Solution

The amortized time for PISANO-DELETE is asymptotically is θ(x.degree)=θ(lgn) .

When x H.min then the time taken in FIB-DELETE is also θ(lgn) which same as the time is taken for PISANO-DELETE.

Therefore, the amortized time for PISANO-DELETE is asymptotically no better than for FIB-DELETE, even when x H.min.

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
"Do not use AI tools. Solve the problem by hand on paper only and upload a photo of your handwritten solution."
| √ (r² + r + 1)e^ dr
Ensure you answer the question asked at the end of the document. Do not just paste things without the GNS3 console outputs
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT