Introduction to Algorithms, Third Edition



Download 4,84 Mb.
Pdf ko'rish
bet340/618
Sana07.04.2022
Hajmi4,84 Mb.
#534272
1   ...   336   337   338   339   340   341   342   343   ...   618
Bog'liq
Introduction-to-algorithms-3rd-edition

19
Fibonacci Heaps
The Fibonacci heap data structure serves a dual purpose. First, it supports a set of
operations that constitutes what is known as a “mergeable heap.” Second, several
Fibonacci-heap operations run in constant amortized time, which makes this data
structure well suited for applications that invoke these operations frequently.
Mergeable heaps
A
mergeable heap
is any data structure that supports the following five operations,
in which each element has a
key
:
M
AKE
-H
EAP
./
creates and returns a new heap containing no elements.
I
NSERT
.H; x/
inserts element
x
, whose
key
has already been filled in, into heap
H
.
M
INIMUM
.H /
returns a pointer to the element in heap
H
whose key is minimum.
E
XTRACT
-M
IN
.H /
deletes the element from heap
H
whose key is minimum, re-
turning a pointer to the element.
U
NION
.H
1
; H
2
/
creates and returns a new heap that contains all the elements of
heaps
H
1
and
H
2
. Heaps
H
1
and
H
2
are “destroyed” by this operation.
In addition to the mergeable-heap operations above, Fibonacci heaps also support
the following two operations:
D
ECREASE
-K
EY
.H; x; k/
assigns to element
x
within heap
H
the new key
value
k
, which we assume to be no greater than its current key value.
1
D
ELETE
.H; x/
deletes element
x
from heap
H
.
1
As mentioned in the introduction to Part V, our default mergeable heaps are mergeable min-
heaps, and so the operations M
INIMUM
, E
XTRACT
-M
IN
, and D
ECREASE
-K
EY
apply. Alterna-
tively, we could define a

Download 4,84 Mb.

Do'stlaringiz bilan baham:
1   ...   336   337   338   339   340   341   342   343   ...   618




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish