# A Study About Fibonacci Heap English Language Essay

A Fibonacci pile refers to a heap information construction dwelling of assorted aggregation of trees. It is been a better amortized running clip when compared to binomial pile. Fibonacci tons was foremost developed by Michael L. Fredman and Robert E. Tarjan in 1984 and published in a scientific diary in 1987. The name of Fibonacci pile was coined from Fibonacci Numberss which were used in the running clip analysis.

Find-minimum is referred to as O ( 1 ) amortized clip. The Operations such as insert, lessening key, and merge ( brotherhood ) are better utilized in changeless amortized clip. The Operations delete and delete lower limit works better in O ( log N ) amortized clip. Hence we say that get downing from an empty information construction, any sequences of ‘ a ‘operations The first group ‘a ‘ and ‘b ‘ will hold the operations for the first group will hold to take O ( a + B log N ) clip to finish the individual pile. This is the binomial pile will hold the sequence of operations that would take O ( ( a + B ) log ( n ) ) clip to complete this undertaking. Hence we can even apportion the Fibonacci series when B will hold the asymptotically larger than the, this Fibonacci pile will hold the pile in therefore better than this binomial pile.

The Fibonacci tonss for the precedence queues improvises the asymptotic running clip for the critical algorithms, such as Dijkstra ‘s algorithm for calculating the shortest way between two nodes in a graph.

Examples:

Using vertex 5 as the beginning ( puting its distance to 0 ) , we initialize all the other distances to a?z , setA SA = a?… , and topographic point all the vertices in the waiting line ( deciding ties by lowest vertex figure )

Iteration 1: Dequeue vertex 5 puting it inA SA ( with a distance 0 ) and loosen uping borders ( u5, u2 ) and ( u5, u4 ) so reprioritizing the waiting line

Iteration 2: Dequeue vertex 4 puting it inA SA ( with a distance 2 ) and loosen uping borders ( u4, u2 ) and ( u4, u3 ) so reprioritizing the waiting line. Note border ( u4, u2 ) finds a shorter way to vertex 2 by traveling through vertex 4

Iteration 3: Dequeue vertex 2 puting it inA SA ( with a distance 3 ) and loosen uping border ( u2, u1 ) so reprioritizing the queue.C: UsersSaravananDesktoppicDijkstraexample5.png

Iteration 4: Dequeue vertex 3 puting it inA SA ( with a distance 3 ) and loosen uping no borders so reprioritizing the waiting line.

Iteration 5: Dequeue vertex 1 puting it inA SA ( with a distance 6 ) and loosen uping no borders.

The concluding shortest waies from vertex 5 with corresponding distances is

A Fibonacci pile must fulfill minimum-heap belongings, the key of a kid must ever be greater than or might be The equal key for the full parent. This will truly retroflex the implicates that the lower limit and maximal key will be at the root of one or two of these trees. It will be comparing with the full binomial pile ; the construction which indicates the tree of a Fibonacci pile in one or more flexible province and that is the major advantage. The trees do non hold a peculiar form and in the worst In this instance this type of pile will hold these type of pile in every component which will be used to in a separate tree. Since this flexibleness will let all the trees in the some operations will be executed in a “ lazy ” mode to set the pile correctly. , by proroguing the work for ulterior operations. For case meeting tonss is done by This will hold concatenating the two lists for all the trees with operation which can even increase or diminish cardinal. These can hold some times which cuts the full node from its parent to child node and forms a new pile tree.

However this will hold some order that should hold the full component in the heap otherwise it will be introduced to all the pile for accomplishing the coveted manner of the running clip at some of the pile will be changed at some point of clip. In long, degrees this will hold all of nodes be together here degree to mention all the figure of child node are aside to maintain rather low that is every node will ever hold the individual upwards nodes which will be holding degree ofA O ( logA N ) and these size will differ in the bomber tree rooted in the node for grade of all the A kA will be at least to A FkA +A 2, where it can beA FkA in theA kth this bomber tree will beA Fibonacci figure. It can be achieved by adding some of the regulations that we can even hold the Fibonacci pile that cut at most one kid and two parent node at each non-root node. Which as the first and 2nd kid is cut, this node itself needs to make these cut from its parent and even in the kid node and it becomes the root of a new and uneven tree. These figure of trees

Actually will hold the running clip of slow and even fast operations. This can hold the loss in the sum of clip which saved for the later which can be used to mensurate at any given minute for the possible map. These possible map of the Fibonacci pile is given by

## Potential =A tA + 2m

Where this tA refers for the figure of trees that can be in the Fibonacci pile andA mA will be normally refers to the figure of pronounced nodes. These node can be marked if it is one of its kid and parent node was cut so it will be kept has another kids node.

## Making a new Fibonacci pile

For doing an empty Fibonacci pile, theA MAKE-FIB-HEAPA process is used to apportion and return the Fibonacci pile objectA H, whereA n [ H ] = 0 andA min [ H ] = NIL and there are no trees inA H. Since tA ( H ) = 0 andA m ( H ) = 0, the potency of the empty Fibonacci pile isA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gif ( H ) = 0. The amortized cost ofA MAKE-FIB-HEAPA is therefore equal to itsA O ( 1 ) existent cost.

## Inserting a node

The FIB-HEAP-INSERT ( H, x ) process inserts nodeA xA into Fibonacci heapA H, presuming the class that the node has already been allocated and thatA key [ x ] has already been filled in.

## Algorithm:

grade [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif 0

P [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif NIL

kid [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif NIL

left [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif ten

right [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif ten

grade [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif FALSE

concatenate the root list incorporating ten with root list H

if min [ H ] = NIL or cardinal [ x ] & lt ; cardinal [ min [ H ] ]

so min [ H ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif ten

n [ H ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif n [ H ] + 1

A FIB-HEAP-INSERTA makes no attempt to consolidate the trees within the Fibonacci pile. IfA kA consecutiveA FIB-HEAP-INSERTA operations occurs, thenA kA single-node tree has been added to the root list.

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/425_a.gif

For finding the amortized cost ofA FIB-HEAP-INSERT, Consider HA be the input Fibonacci pile andA H’A be the ensuing Fibonacci pile. Then, A T ( H ‘ ) =A T ( H ) + 1 andA m ( H ‘ ) =A m ( H ) , and the addition in possible is referred as

( ( T ( H ) + 1 ) + 2m ( H ) ) – ( T ( H ) + 2m ( H ) ) = 1.

Since the existent cost isA O ( 1 ) , the amortized cost isA O ( 1 ) + 1 =A O ( 1 ) .

## Finding the lower limit node

The minimal node of a Fibonacci heapA HA is given by the pointerA min [ H ] , so happen the minimal node inA O ( 1 ) existent clip. Since the possible ofA HA does non alter, the amortized cost of the operation is equal to its O ( 1 ) existent cost.

## Uniting two Fibonacci tonss

The process given below unites Fibonacci heapsA H1A andA H2, by destroyingA H1A andA H2A in the procedure.

FIB-HEAP-UNION ( H1, H2 )

1 H hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif MAKE-FIB-HEAP ( )

2 min [ H ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif min [ H1 ]

3 concatenate the root list of H2 with the root list of H

4 if ( min [ H1 ] = NIL ) or ( min [ H2 ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/noteq.gif NIL and min [ H2 ] & lt ; min [ H1 ] )

5 so min [ H ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif min [ H2 ]

6 n [ H ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif n [ H1 ] + n [ H2 ]

7 free the objects H1 and H2

8 return H

The alteration in possible is denoted as

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gif ( H ) – ( hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gif ( H1 ) + hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gif ( H2 ) ) = ( T ( H ) + 2m ( H ) ) – ( ( T ( H1 ) + 2 m ( H1 ) ) + ( T ( H2 ) + 2m ( H2 ) ) ) = 0,

SinceA T ( H ) =A T ( H1 ) +A T ( H2 ) andA m ( H ) =A m ( H1 ) +A m ( H2 ) . The amortized cost ofA FIB-HEAP-UNIONA is therefore equal to itsA O ( 1 ) existent cost.

## Extracting the minimal node

The procedure of pull outing the minimal node is the most hard operations. It is the topographic point where the delayed work of consolidating trees in the root list occurs. The undermentioned pseudocode extracts the minimal node.

FIB-HEAP-EXTRACT-MIN ( H )

1 omega hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif min [ H ]

2 if z hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/noteq.gif NIL

3 so for each kid ten of omega

4 do add x to the root list of H

5 p [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif NIL

6 remove omega from the root list of H

7 if z = right [ z ]

8 so min [ H ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif NIL

9 else min [ H ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif right [ z ]

10 CONSOLIDATE ( H )

11 n [ H ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif n [ H ] – 1

12 return omega

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/428_a.gif

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/429_a.gif

The amortized cost of pull outing the minimal node of anA n-node Fibonacci pile isA O ( D ( n ) ) . LetA HA denote the Fibonacci pile merely prior to theA FIB-HEAP-EXTRACT-MINA operation.

The possible before pull outing the minimal node isA T ( H ) + 2m ( H ) , and the possible afterward is at most ( D ( N ) + 1 ) + 2m ( H ) , since at mostA D ( N ) + 1 roots remain and no nodes become marked during the operation. The amortized cost is therefore at most

O ( D ( N ) + T ( H ) ) + ( ( D ( N ) + 1 ) + 2m ( H ) ) – ( T ( H ) + 2m ( H ) )

= O ( D ( n ) ) + O ( T ( H ) ) – T ( H )

= O ( D ( n ) ) ,

because we can scale up the units of possible to rule the changeless hidden inA O ( T ( H ) ) . Intuitively, the cost of executing each nexus is paid for by the decrease in possible due to the nexus cut downing the figure of roots by one.

## Decreasing a key and canceling a node

We can demo how to diminish the key of a node in a Fibonacci pile inA O ( 1 ) amortized clip and how to cancel any node from anA n-node Fibonacci pile inA O ( D ( n ) ) amortized timeThey are close plenty, that we can jump the maximal degreeA D ( N ) byA O ( 1gA n ) . Proving this edge will connote that FIB-HEAP-EXTRACT-MINA andA FIB-HEAP-DELETEA tally inA O ( 1gA n ) amortized clip.

## Decreasing a key

In the below pseudocode for the operationA FIB-HEAP-DECREASE-KEY, lets assume as before that taking a node from a linked list does non alter any of the structural Fieldss in the removed node.

FIB-HEAP-DECREASE-KEY ( H, x, K )

1 if k & gt ; cardinal [ x ]

2 so error “ new key is greater than current key ”

3 cardinal [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif K

4 y hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif P [ x ]

5 if y hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/noteq.gif NIL and cardinal [ x ] & lt ; cardinal [ Y ]

6 so CUT ( H, x, Y )

7 CASCADING-CUT ( H, Y )

8 if cardinal [ x ] & lt ; cardinal [ min [ H ] ]

9 so min [ H ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif ten

CUT ( H, x, Y )

1 remove ten from the child list of Y, decrementing degree [ Y ]

2 add ten to the root list of H

3 p [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif NIL

4 grade [ x ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif FALSE

CASCADING-CUT ( H, Y )

1 omega hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif P [ Y ]

2 if z hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/noteq.gif NIL

3 so if grade [ y ] = FALSE

4 so grade [ y ] hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/arrlt12.gif True

5 else CUT ( H, Y, omega )

6 CASCADING-CUT ( H, omega )

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/434_a.gif

## Deleting a node

It is easy to cancel a node from anA n-node Fibonacci pile inA O ( D ( n ) ) amortized clip, as is done by the undermentioned pseudocode. We assume that there is no cardinal value of -http: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/infin.gifA presently in the Fibonacci pile.

FIB-HEAP-DELETE ( H, x )

1 FIB-HEAP-DECREASE-KEY ( H, x, -http: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/infin.gif )

2 FIB-HEAP-EXTRACT-MIN ( H )

FIB-HEAP-DELETEA is correspondent toA BINOMIAL-HEAP-DELETE. It makesA xA go the minimal node in the Fibonacci pile by giving it a unambiguously little key of -http: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/infin.gif. NodeA xA is so removed from the Fibonacci pile by theFIB-HEAP-EXTRACT-MINA process. The amortized clip ofA FIB-HEAP-DELETEA is the amount of theA O ( 1 ) amortized clip ofA FIB-HEAP-DECREASE-KEYA and theA O ( D ( n ) ) amortized clip ofA FIB-HEAP-EXTRACT-MIN.

## Jumping the maximal grade

To turn out that the amortized clip ofA FIB-HEAP-EXTRACT-MINA andA FIB-HEAP-DELETEA isA O ( lg N ) , we must demo that the upper boundA D ( n ) on the grade of any node of anA n-node Fibonacci pile isA O ( lgA N ) . By Exercise 21.2-3, when all trees in the Fibonacci pile are disordered binomial trees, A D ( N ) A =A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/hfbrdl12.giflgA nhttp: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/hfbrdr12.gif. The cuts that occur inA FIB-HEAP-DECREASE-KEY, nevertheless, may do trees within the Fibonacci pile to go against the disordered binomial tree belongingss. In this subdivision, we shall demo that because we cut a node from its parent every bit shortly as it loses two kids, A D ( N ) isA O ( lgA N ) . In peculiar, we shall demo thatA D ( N ) A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/lteq12.gifA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/hfbrdl12.gifloghttp: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifA nhttp: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/hfbrdr12.gif, whereA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/435_a.gif.

The key to the analysis is as follows. For each nodeA xA within a Fibonacci pile, define size ( ten ) to be the figure of nodes, includingA xA itself, in the subtree rooted atA ten. ( Note thatA xA need non be in the root list — it can be any node at all. ) We shall demo that size ( x ) is exponential inA grade [ x ] . Bear in head thatA grade [ x ] is ever maintained as an accurate count of the grade ofA ten.

Lemma 21.1

LetA xA be any node in a Fibonacci pile, and say thatA degree [ x ] A = k.A LetA y1, A y2, … , A ykA denote the kids ofA xA in the order in which they were linked toA ten, from the earliest to the latest. Then, A degreeA [ y1 ] A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA 0 anddegree [ Lolo ] A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA iA – 2 forA iA = 2, 3, . . . , A K.

ProofA Obviously, A degree [ y1 ] A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA 0.

ForA iA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA 2, we note that whenA yiA was linked toA ten, all ofA y1, A y2, . . . , A yi-1A were kids ofA x, so we must hold hadA degree [ x ] A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA i – 1. NodeA yiA is linked toA xA merely ifA degree [ x ] =A grade [ Lolo ] , so we must hold besides haddegree [ Lolo ] A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA iA – 1 at that clip. Since so, nodeA yiA has lost at most one kid, since it would hold been cut fromA xA if it had lost two kids. We conclude thatA degreeA [ yiA ] A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA iA – 2.

We eventually come to the portion of the analysis that explains the name “ Fibonacci tons. ” Recall from Section 2.2 that forA kA = 0, 1, 2, . . . , theA kth Fibonacci figure is defined by the return

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/436_a.gif

The undermentioned lemma gives another manner to expressA Fk.

Lemma 21.2

For all integersA kA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA 0,

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/436_b.gif

ProofA The cogent evidence is by initiation onA k. WhenA kA = 0,

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/436_c.gif

We now assume the inductive hypothesis thatA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/436_d.gif, and we have

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/436_e.gif

The undermentioned lemma and its corollary complete the analysis. It uses the inequality ( proved in Exercise 2.2-8 )

Fk+2 hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gif hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifk,

whereA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifA is the aureate ratio defined in equation ( 2.14 ) asA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/436_f.gif.

Lemma 21.3

LetA xA be any node in a Fibonacci pile, and letA kA =A grade [ x ] . Then, size ( x ) A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA Fk+2A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifk, whereA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifA =A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/437_a.gif.

ProofA LetA skA denote the lower limit possible value of size ( omega ) over all nodesA zA such thatA grade [ omega ] =A k. Trivially, A s0A = 1, A s1A = 2, andA s2A = 3. The numberA skA is at most size ( x ) . As in Lemma 21.1, letA y1, A y2, . . . , A ykA denote the kids ofA xA in the order in which they were linked toA ten. To calculate a lower edge on size ( x ) , we count one forA xA itself and one for the first childA y1A ( for which size ( y1 ) A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA 1 ) and so use Lemma 21.1 for the other kids. We therefore have

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/437_b.gif

We now show by initiation onA kA thatA skA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA Fk+2 for all nonnegative integerA k. The bases, forA kA = 0 andA kA = 1, are fiddling. For the inductive measure, we assume thatA kA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA 2 and thatA siA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA FiA + 2 forA iA = 0, 1, . . . , A kA – 1. We have

hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/book6/437_c.gif

The last equality follows from Lemma 21.2.

Therefore, we have shown that size ( x ) A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA skA + 2A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifk.

Corollary 21.4

The maximal degreeA D ( n ) of any node in anA n-node Fibonacci pile isA O ( lgA N ) .

ProofA LetA xA be any node in anA n-node Fibonacci pile, and letA kA =A grade [ x ] . By Lemma 21.3, we haveA nA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA size ( x ) A hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifk. Taking base-http: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifA logarithms yieldsA kA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/gteq.gifA loghttp: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifA n. ( In fact, becauseA kA is an whole number, A kA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/lteq12.gifA hypertext transfer protocol: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/hfbrdl12.gifloghttp: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/phicap12.gifA nhttp: //net.pku.edu.cn/~course/cs101/2007/resource/Intro2Algorithm/images/hfbrdr12.gif. ) The maximal degreeA D ( n ) of any node is thusA O ( lgA N ) .