External Memory Algorithms and Data Structures - ETH - D-INFK - TI

Eidgenossische
¨
Technische Hochschule
Zurich
¨
Ecole polytechnique federale
´ ´
de Zurich
Politecnico federale di Zurigo
Swiss Federal Institute of Technology Zurich
✂✁☎✄✝✆✟✞✠✆✟✡☛✆☛☞✍✡✏✌ ✎✒✑✔✓✖✕✘✗✙✎✚✕✛✆✟✞✠✄✢✜✛✓✖✕✣ ✤✁✥☞✛✗✙✎✢✦★✧✩✆✟✞✫✪
✬✭✎✚✗✮☞✢✯✱✰✲✎✥✯✱✬✳✕✛✆✂✕✝✎✵✴★✞✤✶✙✦✷✧✙✸✖✕✝✎✺✹✭✰✻✎✙✯✽✼✾✞✠✪✥✗★✿❀✧❁✜✘✗❀❂❃✧✙✁✍✶❅❄❆✗✩✄✝✓❇✞✤✗❉❈❊✪✥✧✙✦✷✗✩✆✂✗
External Memory Algorithms and Data Structures
❋●✗✙❍❁✕✝✦✷❂✘✕✝✎❏■❁■✥✹✭❑✏▲❁▲✙▼
Problem 4
Course Webpage: http://www.ti.inf.ethz.ch/ew/courses/EMADS04/
Topic: Buffer Trees
Due Date:
◆€❖✺◗✥❘✝❙❯❚❱❘✘❲❨❳✚❩❭❬✖❪✙❫✙❫✙❴❯❵✛❛€❛❝❜❀❘❨❞❡❘✚❢❣❛❝❤❁❲✮❘
Exercise 4.1
✐
❜✖❖✺❥❦❛❧❜✏❵✛❛♥♠♣♦q❵✺♦r❘✘s✩❛❧❘✝❲❝♦✏❵✛❞✉t❀❲❝♠❡❖✈❲❝♠✇❛✤①③②❇❤❀❘✚❤❀❘④♠❡❙⑤t❀❞❡❘✝❙✣❘✚♦✩❛❧❘✢⑥⑦❚❁①✵❵❏❚✏❤❁⑧❆❘✘❲♥❛✂❲✮❘✝❘❃❛❧❜✖❘⑨❢✘❤❁❲❝❲✮❘✝♦✩❛●❙✣♠♣♦❀♠♣❙♥❤❀❙⑩❢✚❵✺♦✵❚❱❘
❙❶❵✛♠❡♦✩❛❝❵✺♠♣♦✖❘✚⑥⑨♠❡♦✩❛❧❘✝❲❝♦✏❵✛❞♣❞♣①❏❤✏❷✤♠❡♦❀❸④❖✙♦❀❞♣①❏❛❧❜❀❘❯❲✮❖✩❖✈❛❊❚✖❤❁⑧❆❘✘❲✻❵✺♦✏⑥❏❛❝❜❀❘⑤❷❧❘✘❛✲❖✺❹✾❺❼❻✠❽❿❾✾❘✝❞♣❘✚❙✣❘✝♦✩❛✮❷✳♠♣♦⑦❛❧❜✖❘❯❞♣❘✘❹➀❛❧❙✣❖❇❷✤❛❊❞♣❘✢❵✢◗✙❘✚❷✝➁
➂
❖✙♦✏❢❣❞❡❤✖⑥❀❘✾❛❝❜✖❵✛❛✉➃❀♦✏⑥❭➄✠❙⑤♠❡♦❁♠❡❙❯❤✖❙➅②❇❤✖❘✘❲❝♠♣❘✢❷✉❢✝❵✺♦④❚❱❘✻❵✺♦✖❷❧❥✭❘✘❲✮❘✚⑥✣❖✥♦❁➄➆❞✇♠❡♦❀❘❨❥€♠♣❛❧❜✖❖✙❤❁❛➇❤✏❷✤♠❡♦❀❸⑤❵✺♦❭①④➈✠❺❊❷✝➁
Exercise 4.2
➉
❖✺❥❦⑥❁❖⑨①✥❖✙❤✒t❱❘✘❲❧❹➊❖✈❲✮❙➋❵➌⑥❀❘✚❢❣❲✮❘✚❵✙❷✂❘✝➄✟➍❇❘✝①❏❖✙t❆❘✝❲✮❵✺❛✂♠❡❖✙♦⑦♠♣♦❉❵✺♦➎❘✘s✩❛❧❘✝❲❝♦✏❵✛❞✽t✖❲❧♠❡❖✈❲❝♠✇❛✤①⑦②❇❤❀❘✝❤✖❘♥♠♣❙✣t❀❞❡❘✝❙✣❘✚♦✩❛❧❘✚⑥★❚❁①✷❵④❚✏❤❁⑧❆❘✘❲
❛✂❲✮❘✝❘✛➏★➐✾♠❡◗✙❘✻❵✺♦➌❤❁t✖t❱❘✘❲€❚❱❖✙❤❀♦✏⑥⑤❹➊❖✙❲✉❛❧❜✖❘❊♦❭❤✖❙❯❚❆❘✝❲✔❖✈❹✽➈✫❺➑❖✙t❱❘✘❲❣❵✛❛✂♠❡❖✙♦✏❷✘➁
Exercise 4.3
➒
①❼⑥❁❘✢❷❧❢✘❲❧♠♣❚❀♠❡♦❀❸✳❜❀❖✺❥➎❛❝❖❊⑥❀❘✚❵✛❞❭❥€♠♣❛❧❜⑤⑥❁❤❀t❀❞♣♠❡❢✚❵✛❛❧❘✔❲❝❘✚❙✣❖✺◗✺❵✛❞➆❬✺❢✝❖✙❙⑤t✖❞♣❘✝❛❧❘➓❛❝❜❀❘✭t❀❲✮❖✩❖✺❹❀❖✈❹❀❛❧❜✖❘€➈✫❺❉❚❱❖✙❤✖♦✖⑥♥❺❼❻➆❷❧❖✈❲❝❛✘❻✠➔➌❾✛→⑤➣✲↔✈↕❼❾
❹➊❖✈❲✉❛❝❜❀❘❨t❆❵✛♠✇❲✮❥€♠➙❷✂❘❊❲✮❘✚❢❣❛✮❵✺♦❀❸✙❞♣❘✳♠❡♦✩❛❧❘✘❲❣❷❧❘✚❢❣❛❧♠♣❖✥♦④t❀❲✮❖✈❚❀❞❡❘✝❙❏➁
Exercise 4.4
➈✟♦➎❷✂❖✥❙✣❘●❵✛t✖t❀❞♣♠❡❢✚❵✛❛✂♠❡❖✙♦✏❷❊❖✙♦❀❘❯♠➙❷❊♠♣♦✩❛❝❘✘❲✮❘✚❷✂❛❧❘✢⑥✷❖✥♦❁❞❡①⑨♠❡♦✷❛❝❜❀❘♥♦❭❤❀❙❯❚❱❘✘❲❊❖✺❹€t❱❖✈♠❡♦✩❛❝❷✳❛❧❜✏❵✛❛❨❞✇♠❡❘⑤♠❡♦✒❵❶❲❣❵✺♦❀❸✥❘✻❲❣❵✛❛❧❜✖❘✘❲❨❛❧❜✏❵✺♦★♠❡♦
✐
✎✚✧✙✁❆➛❁✕✒✜✘✗✙✡✏✁➜✆✟✞➊✁❆➛➞➝✝✡➜✕✝✎✢✞✤✕✢✄
❤✖❢✮❜➎②❇❤❀❘✝❲❧♠❡❘✚❷❼❵✛❲❝❘♥❖✈❹➀❛❧❘✝♦✒❲✮❘❣❹➊❘✝❲❧❲✮❘✚⑥✷❛❝❖❏❵✈❷
➁⑨➈✟♦✒❛❧❜❁♠➙❷❼❢✚❵✈❷❧❘⑤❥✔❘
❲✮❘✘t❱❖✈❲❝❛✂♠❡♦❀❸⑨❵✛❞♣❞✔❖✈❹✭❛❝❜❀❘✝❙❏➁
❥✭❖✙❤❁❞➙⑥❃❞✇♠♣➍✥❘✻❛❧❖⑤❵✢◗✙❖✈♠➙⑥④❜✖❵✢◗❇♠♣♦✖❸❯❵✈♦➌❵✙⑥❀⑥❭♠♣❛✂♠❡◗✙❘❨❛❝❘✘❲✮❙➟❖✈❹✽❺❼❻✠➣❨❾✱♠❡♦➌❛❧❜❀❘✲②❇❤❀❘✝❲❝①❶❛✂♠❡❙✣❘✈➁
❵✙❾
➒
①★❵✙⑥❀❵✛t✖❛✂♠❡♦❀❸❃❵★❳✘➄✫⑥❭♠❡❙✣❘✝♦✏❷✤♠❡❖✙♦✏❵✛❞☎❲❣❵✺♦✖❸✙❘✲❛❧❲❝❘✚❘✈❬➜⑥❀❘✚❷❝❢❣❲❝♠✇❚❱❘❼❜✖❖✺❥➠❵❶❲✮❵✺♦✖❸✙❘❼❢✝❖✙❤✖♦✩❛✂♠❡♦❀❸❃②❇❤✖❘✘❲✮①★❢✝❵✺♦★❚❱❘●t❱❘✝❲✂❹➊❖✙❲❝❙✣❘✢⑥
♠♣♦★❺❼❻➊❞❡❖✙❸✱➡✍❾✔♠❡♦✩❛❧❘✝❲❝♦✏❵✛❞✇❞❡①✈➁
❚❱❾➌➢➤s✩❛❧❘✘❲✮♦✖❵✺❞✇♠❡➥✝❘❊❛❧❜❀♠❡❷✾❵✛❞♣❸✥❖✈❲❝♠✇❛❝❜❀❙⑨➁✱➐✾♠❡◗✙❘✻❵✺♦➌❤❁t✖t❱❘✘❲€❚❱❖✙❤❀♦✏⑥⑤❹➊❖✙❲✉❛❧❜✖❘❊♦❭❤✖❙❯❚❆❘✝❲✔❖✈❹✽➈✫❺❊❷✝➁