20 Fibonacci Heaps
来源:互联网 发布:mac照片如何分类 编辑:程序博客网 时间:2024/06/13 01:20
1. Structure
- a collection of min-heap-ordered trees.
- not constrained to be binomial trees.
- trees with Fibonacci heaps are rooted but unordered.(rootlist is not ordered)
Representation of Fibonacci Heaps
- p[x] to its parent
- child[x] to any one of its children(only point to one children)
- left[x] to left sibling(circular, doubly linked lists)
- right[x] to right sibling (circular, doubly linked lists)
- degree[x] the number of children in the child list of node x
- mark[x] indicates whether node x has lost a child since the last time x was made the child of another node.
- min[H] minimum node
Advantage of doubly linked lists:
- remove a node from a circular, doubly linked list in O(1) time
- concatenate two such lists into one circular, doubly linked list in O(1) time.
Potential function P(H)=count(root) + 2* count(marked)
2. Mergeable-heap operations
*Do not need to consolidate the trees within the Fibonacci heap except extract min. Delay work as late as possible
- make-heap
- insert: make a new node and add it to rootlist
- minimum
- union: concatenate the root list of two heap and then change minimum if necessary
- extract-min: remove min, add its children to root list, merge same degree trees??why need to consolidate
- decrease key: if decreased is bigger than its parent, complete. else addthis subtree to root list, unmark this node. If its original parent isunmarked, mark it. else cut it add to root list, recursively does this to the ancestor on the path to the root.(If an marked node added to root list, it is unmarked) If the parent is already in root list, no need to mark. ??amortized cost
- delete: decrease key to smallest, extract-min
- 20 Fibonacci Heaps
- 斐波那契堆(Fibonacci heaps)
- 堆:Binary Heap, Fibonacci Heaps资料+总结
- 斐波那契堆(Fibonacci heaps)
- Heaps
- D-HEAPS
- Leftist Heaps
- Skew Heaps
- chapter 19 binomial heaps
- 编程珠玑column14 heaps
- 二叉堆 -- Binary Heaps
- UVA - 1436 Counting heaps
- CSU1616: Heaps(区间DP)
- Leftist Heaps 习题解
- Skew Heaps 习题解
- Fibonacci
- fibonacci
- Fibonacci
- 测试回顾版-Loadrunner脚本编程(1)-VuGen脚本文件的开发过程
- linux系统ioctl使用示例
- 应用最广的十大Javascript框架
- 测试回顾版-Loadrunner脚本编程(2)-
- 测试回顾版-Loadrunner脚本编程(3)- 检查点,关联等函数
- 20 Fibonacci Heaps
- 测试回顾版-Loadrunner脚本编程(4)-数据类型操作和字符串操作
- Linux下的CVS权限设置
- linux学习笔记 1
- JAVASCRIPT应用篇(4)--JS的IE和Firefox兼容性汇编
- 基于GPRS的无线视频监控系统
- Python
- 曾经的图片 过去的心情
- openldap学习笔记