




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、Analysis Of Fibonacci HeapsMaxDegreeLet Ni = min # of nodes in any min (sub)tree whose root has i children.N0 = 1. N1 = 2.695Ni , i 1Children of b are labeled in the order in which they became children of b.c1 became a child before c2 did, and so on.So, when ck became a child of b, degree(b) = k 1.d
2、egree(ck) at the time when ck became a child of b = degree(b) at the time when ck became a child of b = k 1.bc1c2ciNi , i 1So, current degree(ck) = max0, k 2.So, Ni = N0 + (S0=q=i-2 Nq ) + 1 = (S0=q 1 = (S0=q 1.N0 = 1.N1 = 2.Ni = (S0=q 1.Ni = Fi+2 (1 + sqrt(5)/2)i , i = 0.MaxDegreeMaxDegree = logfn,
3、 where f = (1 + sqrt(5)/2.Accounting MethodInsert.Guessed amortized cost = 2.Use 1 unit to pay for the actual cost of the insert and keep the remaining 1 unit as a credit for a future remove min operation.Keep this credit with the min tree that is created by the insert operation.Meld.Guessed amortiz
4、ed cost = 1.Use 1 unit to pay for the actual cost of the meld.Remove Nonmin Element87316592867410495theNode695Remove Nonmin Element8731659286741095695Guessed amortized cost = 2logfn + 3.Use logfn units to pay for setting parent fields to null for subtrees of deleted node.Use 1 unit to pay for remain
5、ing work not related to cascading cut. Remove Nonmin Element8731659286741095695Keep logfn units to pay for possible future pairwise combining of the new top-level trees created.Kept as 1 credit per new top-level tree.Discard excess credits (if any).Remove Nonmin Element8731659286741095695Keep 1 unit
6、 to pay for the time when node whose ChildCut field is set to true is cut from its parent, and another 1 unit for the pairwise combining of the cut subtree.Remove Nonmin Element8731659286741095695Keep the 2 credits on the node (if any) whose ChildCut field is set to true by the ensuing cascading cut
7、 operation.If there is no such node, discard the credits.Remove Nonmin ElementGuessed amortized cost = 2logfn + 3.Use logfn units to pay for setting parent fields to null.Use 1 unit to pay for remaining work not related to cascading cut. Keep 1 unit to pay for the time when node whose ChildCut field
8、 is set to true is cut from its parent, and another 1 unit for the pairwise combining of the cut subtree.Keep logfn units to pay for possible future pairwise combining of the new top-level trees created.Remove Nonmin ElementPlacement of credits.Keep 1 unit on each of the newly created top-level tree
9、s.Keep 2 units on the node (if any) whose ChildCut field is set to true by the ensuing cascading cut operation.Discard the remaining credits (if any).DecreaseKey(theNode, theAmount)87316592867410495theNode695DecreaseKey(theNode, theAmount)10095873165928674695Guessed amortized cost = 4.DecreaseKey(th
10、eNode, theAmount)10095873165928674695Use 1 unit to pay for work not related to cascading cut. DecreaseKey(theNode, theAmount)10095873165928674695Keep 1 unit to pay for possible future pairwise combining of the new top-level tree created whose root is theNode.Kept as credit on theNode.DecreaseKey(the
11、Node, theAmount)10095873165928674695Keep 1 unit to pay for the time when node whose ChildCut field is set to true is cut from its parent, and use another 1 unit for the pairwise combining of the cut subtree. DecreaseKey(theNode, theAmount)10095873165928674695Keep the 2 credits on the node (if any) w
12、hose ChildCut field is set to true by the ensuing cascading cut operation.If there is no such node, discard the credits.Decrease KeyGuessed amortized cost = 4.Use 1 unit to pay for work not related to cascading cut. Keep 1 unit to pay for the time when node whose ChildCut field is set to true is cut
13、 from its parent, and use another 1 unit for the pairwise combining of the cut subtree.Keep 1 unit to pay for possible future pairwise combining of the new top-level tree created whose root is theNode.Decrease KeyKeep the 2 credits on the node (if any) whose ChildCut field is set to true by the ensu
14、ing cascading cut operation.If there is no such node, discard the credits.Remove MinGuessed amortized cost = 3logfn.Actual cost = 2logfn 1 + #MinTrees.Allocation of amortized cost.Use 2logfn 1 to pay part of actual cost.Keep remaining logfn + 1 as a credit to pay part of the actual cost of a future rem
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 硫化鋁企業(yè)數(shù)字化轉(zhuǎn)型與智慧升級戰(zhàn)略研究報告
- 米醋企業(yè)數(shù)字化轉(zhuǎn)型與智慧升級戰(zhàn)略研究報告
- 鉆石項鏈企業(yè)數(shù)字化轉(zhuǎn)型與智慧升級戰(zhàn)略研究報告
- 2025年建筑涂料色漿項目發(fā)展計劃
- 平車整車鐵路貨運企業(yè)ESG實踐與創(chuàng)新戰(zhàn)略研究報告
- 紙企業(yè)數(shù)字化轉(zhuǎn)型與智慧升級戰(zhàn)略研究報告
- 倉儲籠企業(yè)ESG實踐與創(chuàng)新戰(zhàn)略研究報告
- 2025年化學(xué)材料:灌漿料合作協(xié)議書
- 《投資標的確認協(xié)議》
- 個人職業(yè)包裝設(shè)計合同
- 《西方經(jīng)濟學(xué)》(上冊)課程教案
- 移動政企部年終總結(jié)
- 施工合同協(xié)議書樣本
- 醫(yī)學(xué)綜合題庫(含答案)
- 工會一函兩書模板
- 四年級語文下冊第六單元【集體備課】(教材解讀+教學(xué)設(shè)計)
- 2024版義務(wù)教育小學(xué)科學(xué)課程標準
- 當(dāng)代青年心態(tài)問題研究報告
- 《籃球防守戰(zhàn)術(shù)基礎(chǔ)配合》教案(三篇)
- 專利申請文件-審查意見的答復(fù)
- 衛(wèi)生院醫(yī)院管理提升年活動方案例文
評論
0/150
提交評論