Lect12 Scapegoat Slides
Lect12 Scapegoat Slides
Lect12 Scapegoat Slides
"t
scapegoat Trees :
Recap :
Example :
p
:
Met
→
-
-
( guaranteed for find ) .
-
Better Mem .
usage . .
overview
-
:
rebuild it
¥
IScapegqattreesfg.ua
'
tune -
-
⑨
,
How to rebuild ?
Time Olk )
n
Insert : .
¥
standard
' t
rebuild ( p)
.
same BST :
siiobrdeeetwaerteagicsf
as
-
itdeprtachetsoearhcishpath Dek.tseaimea.std.net f
"
-
- '
- '
back -
find unbalanced
|sRrfubrhildfybetreeY¥Im)
-
node -
hc-buildsubtreelAEO.j.IT )
heights log
Tree
.hn?.7lgnDelete:mn-szn-YeIbfuiid
-
.
- ,
!÷÷÷÷ .÷÷÷÷÷÷÷i÷÷
Insert : - T_ Details of Operations :
Example ,⑤ : .
1120 ⑤
fit
.
htt ; Mtt
'
h←m←o
,⑨ ④
:
same as
-
:¥÷÷÷÷÷÷:* :* . .
.
iii.
vnisoidtesdinsnjg.ly?jljngeoftscapegozttreeswT
-
rial
proof contradiction
g
By
§
-
.
Lau :
Pichi 'd
depth
logger
-
p
rebuild Lp
'
nwwde
?
V-ancestorsn-break-sjapegoat.rs
pc but
-
. ,
binanymfd.ph
.
o
-
n
has
catchiest
"
' ?
-
While
backing out , traverse
605 otp that satisfies Q i
.
zssizecpk.FI
other sibling Eh)dsn
"
"
Too
→
slow ? No !
charge to rebuild .
go
.
d> loyz.no/psfs)dn dsl0$%n,
- ,
¥9
t.ie#ttreeswMol e e -
-
Theorem :
Starting with an
empty tree ,
.
any sequence
of m
dictionary operations
tree take time
on a
scapegoat )]
0cm log m ) [Amortized OC :
login
Proof ( sketch )
:
Find O Clog:
n ) guaranteed [ Heights Olbgn ))
Delete : In order to induce a rebuild ,
.
.
nodes in tree . .