Outline. CSE 326: Data Structures. Priority Queues Leftist Heaps & Skew Heaps. Announcements. New Heap Operation: Merge
|
|
- Josephine Willis
- 5 years ago
- Views:
Transcription
1 CSE 26: Dt Structures Priority Queues Leftist Heps & Skew Heps Outline Announcements Leftist Heps & Skew Heps Reding: Weiss, Ch. 6 Hl Perkins Spring 2 Lectures 6 & 4//2 4//2 2 Announcements Written HW # due NOW Written HW #2 out tody, due next Fridy Project #2 coming Prt A on Mondy Cn work in pirs; strt figuring out who you d like to work with or whether you wnt to go lone Finl exm Thur. June. :(!) m New Hep Opertion: Merge Given two heps, them into one hep first ttempt: insert ech element of the smller hep into the lrger. runtime: second ttempt: conctente inry heps rrys nd run uildhep. runtime: 4//2 4//2 4
2 Leftist Heps Ide: Focus ll hep mintennce work in one smll prt of the hep Leftist heps:. Most nodes re on the left 2. All the merging work is done on the right 4//2 Definition: Null Pth Length null pth length (npl) of node x = the numer of nodes etween x nd null in its sutree OR npl(x) = min distnce to descendnt with or children npl(null) = - npl(lef) = npl(single-child node) = Equivlent definitions:. npl(x) is the height of lrgest complete sutree rooted t x 2. npl(x) = + min{npl(left(x)), npl(right(x))} 4//2 6 Leftist Hep Properties Hep-order property prent s priority vlue is to childrens priority vlues result: minimum element is t the root 2 Are These Leftist 2 Leftist property For every node x, npl(left(x)) npl(right(x)) result: tree is t lest s hevy on the left s the right Are leftist trees complete 4//2 lnced 4//2 Every sutree of leftist tree is leftist! 2
3 Right Pth in Leftist Tree is Short (#) Clim: The right pth is s short s ny in the tree. Proof: (By contrdiction) Pick shorter pth: D < D 2 Sy it diverges from right pth t x npl(l) D - ecuse of the pth of length D - to null npl(r) D 2 - ecuse every node on right pth is leftist D L x R D 2 Right Pth in Leftist Tree is Short (#2) Clim: If the right pth hs r nodes, then the tree hs t lest 2 r - nodes. Proof: (By induction) Bse cse : r=. Tree hs t lest 2 - = node Inductive step : ssume true for r < r. Prove for tree with right pth t lest r.. Right sutree: right pth of r- nodes 2 r- - right sutree nodes (y induction) 2. Left sutree: lso right pth of length t lest r- (y previous slide) 2 r- - left sutree nodes (y induction) Totl tree size: (2 r- -) + (2 r- -) + = 2 r - Leftist property t x violted! 4//2 4//2 9 Why do we hve the leftist property Becuse it gurntees tht: the right pth is relly short compred to the numer of nodes in the tree A leftist tree of N nodes, hs right pth of t most log (N+) nodes Merge two heps (sic ide) Put the smller root s the new root, Hng its left sutree on the left. Recursively its right sutree nd the other tree. Ide perform ll work on the right pth 4//2 4//2 2
4 Merging Two Leftist Heps (T,T 2 ) returns one leftist hep contining ll elements of the two (distinct) leftist heps T nd T 2 T Merge Continued If npl(r ) > npl(l ) L R R L L R < L R R = Merge(R, T 2 ) T 2 runtime: 4//2 4//2 4 Let s do n exmple, ut first Other Hep Opertions insert deletemin Opertions on Leftist Heps with two trees of totl size n: O(log n) insert with hep size n: O(log n) pretend node is size leftist hep insert y merging originl hep with one node hep deletemin with hep size n: O(log n) remove nd return root left nd right sutrees 4//2 4//2 6 4
5 4 2 Leftest Merge Exmple 4 4// (specil cse) 4 Sewing Up the Exmple 2 4 4//2 2 4 Done 2 Finlly Leftist Heps: Summry Good Bd 4//2 9 4//2 2
6 Rndom Definition: Amortized Time m or tized time: Running time limit resulting from writing off expensive runs of n lgorithm over multiple chep runs of the lgorithm, usully resulting in lower overll running time thn indicted y the worst possile cse. If M opertions tke totl O(M log N) time, mortized time per opertion is O(log N) Difference from verge time: Prolems with leftist heps Skew Heps extr storge for npl extr complexity/logic to mintin nd check npl right side is often hevy nd requires switch Solution: skew heps lindly djusting version of leftist heps lwys switches children when fixing right pth mortized time for:, insert, deletemin = O(log n) however, worst cse time for ll three = O(n) 4//2 2 4//2 22 T Merging Two Skew Heps L R T 2 < 4//2 2 Only one step per itertion, with children lwys switched R L 4 2 Exmple 2 4//
7 Skew Hep Code void (hep, hep2) { cse { hep == NULL: return hep2; hep2 == NULL: return hep; hep.findmin() < hep2.findmin(): temp = hep.right; hep.right = hep.left; hep.left = (hep2, temp); return hep; otherwise: return (hep2, hep); } 4//2 2 } Runtime Anlysis: Worst-cse nd Amortized No worst cse gurntee on right pth length! All opertions rely on worst cse complexity of ll ops = Will do mortized nlysis lter in the course (see chpter if curious) Result: M s tke time M log n mortized complexity of ll ops = 4//2 26 Compring Heps Binry Heps Leftist Heps d-heps Skew Heps Still scope for improvement! 4//2 2
Today s Outline. One More Operation. Priority Queues. New Operation: Merge. Leftist Heaps. Priority Queues. Admin: Priority Queues
Tody s Outline Priority Queues CSE Dt Structures & Algorithms Ruth Anderson Spring 4// Admin: HW # due this Thursdy / t :9pm Printouts due Fridy in lecture. Priority Queues Leftist Heps Skew Heps 4// One
More informationINF 4130 Exercise set 4
INF 4130 Exercise set 4 Exercise 1 List the order in which we extrct the nodes from the Live Set queue when we do redth first serch of the following grph (tree) with the Live Set implemented s LIFO queue.
More informationCSCI 104 Splay Trees. Mark Redekopp
CSCI 0 Sply Trees Mrk edekopp Soures / eding Mteril for these slides ws derived from the following soures https://www.s.mu.edu/~sletor/ppers/selfdjusting.pdf http://digitl.s.usu.edu/~lln/ds/notes/ch.pdf
More information9.3. Regular Languages
9.3. REGULAR LANGUAGES 139 9.3. Regulr Lnguges 9.3.1. Properties of Regulr Lnguges. Recll tht regulr lnguge is the lnguge ssocited to regulr grmmr, i.e., grmmr G = (N, T, P, σ) in which every production
More informationAddition and Subtraction
Addition nd Subtrction Nme: Dte: Definition: rtionl expression A rtionl expression is n lgebric expression in frction form, with polynomils in the numertor nd denomintor such tht t lest one vrible ppers
More informationPriority Queues 9/10. Binary heaps Leftist heaps Binomial heaps Fibonacci heaps
Priority Queues 9/10 Binary heaps Leftist heaps Binomial heaps Fibonacci heaps Priority queues are important in, among other things, operating systems (process control in multitasking systems), search
More informationA ppendix to. I soquants. Producing at Least Cost. Chapter
A ppendix to Chpter 0 Producing t est Cost This ppendix descries set of useful tools for studying firm s long-run production nd costs. The tools re isoqunts nd isocost lines. I soqunts FIGURE A0. SHOWS
More informationCH 71 COMPLETING THE SQUARE INTRODUCTION FACTORING PERFECT SQUARE TRINOMIALS
CH 7 COMPLETING THE SQUARE INTRODUCTION I t s now time to py our dues regrding the Qudrtic Formul. Wht, you my sk, does this men? It mens tht the formul ws merely given to you once or twice in this course,
More informationWhat is Monte Carlo Simulation? Monte Carlo Simulation
Wht is Monte Crlo Simultion? Monte Crlo methods re widely used clss of computtionl lgorithms for simulting the ehvior of vrious physicl nd mthemticl systems, nd for other computtions. Monte Crlo lgorithm
More information164 CHAPTER 2. VECTOR FUNCTIONS
164 CHAPTER. VECTOR FUNCTIONS.4 Curvture.4.1 Definitions nd Exmples The notion of curvture mesures how shrply curve bends. We would expect the curvture to be 0 for stright line, to be very smll for curves
More information3/1/2016. Intermediate Microeconomics W3211. Lecture 7: The Endowment Economy. Today s Aims. The Story So Far. An Endowment Economy.
1 Intermedite Microeconomics W3211 Lecture 7: The Endowment Economy Introduction Columbi University, Spring 2016 Mrk Den: mrk.den@columbi.edu 2 The Story So Fr. 3 Tody s Aims 4 Remember: the course hd
More informationCache CPI and DFAs and NFAs. CS230 Tutorial 10
Cche CPI nd DFAs nd NFAs CS230 Tutoril 10 Multi-Level Cche: Clculting CPI When memory ccess is ttempted, wht re the possible results? ccess miss miss CPU L1 Cche L2 Cche Memory L1 cche hit L2 cche hit
More informationAdministration CSE 326: Data Structures
Administration CSE : Data Structures Binomial Queues Neva Cherniavsky Summer Released today: Project, phase B Due today: Homework Released today: Homework I have office hours tomorrow // Binomial Queues
More informationRoadmap of This Lecture
Reltionl Model Rodmp of This Lecture Structure of Reltionl Dtbses Fundmentl Reltionl-Algebr-Opertions Additionl Reltionl-Algebr-Opertions Extended Reltionl-Algebr-Opertions Null Vlues Modifiction of the
More informationThe Market Approach to Valuing Businesses (Second Edition)
BV: Cse Anlysis Completed Trnsction & Guideline Public Comprble MARKET APPROACH The Mrket Approch to Vluing Businesses (Second Edition) Shnnon P. Prtt This mteril is reproduced from The Mrket Approch to
More informationMeasuring Search Trees
Mesuring Serch Trees Christin Bessiere 1, Bruno Znuttini 2, nd Cèsr Fernández 3 1 LIRMM-CNRS, Montpellier, Frnce 2 GREYC, Cen, Frnce 3 Univ. de Lleid, Lleid, Spin Astrct. The SAT nd CSP communities mke
More informationBuckling of Stiffened Panels 1 overall buckling vs plate buckling PCCB Panel Collapse Combined Buckling
Buckling of Stiffened Pnels overll uckling vs plte uckling PCCB Pnel Collpse Comined Buckling Vrious estimtes hve een developed to determine the minimum size stiffener to insure the plte uckles while the
More informationBurrows-Wheeler Transform and FM Index
Burrows-Wheeler Trnsform nd M Index Ben ngmed You re free to use these slides. If you do, plese sign the guestbook (www.lngmed-lb.org/teching-mterils), or emil me (ben.lngmed@gmil.com) nd tell me briefly
More informationTHE FINAL PROOF SUPPORTING THE TURNOVER FORMULA.
THE FINAL PROOF SUPPORTING THE TURNOVER FORMULA. I would like to thnk Aris for his mthemticl contriutions nd his swet which hs enled deeper understnding of the turnover formul to emerge. His contriution
More informationUNIT 7 SINGLE SAMPLING PLANS
UNIT 7 SINGLE SAMPLING PLANS Structure 7. Introduction Objectives 7. Single Smpling Pln 7.3 Operting Chrcteristics (OC) Curve 7.4 Producer s Risk nd Consumer s Risk 7.5 Averge Outgoing Qulity (AOQ) 7.6
More informationSuffix Trees. Outline. Introduction Suffix Trees (ST) Building STs in linear time: Ukkonen s algorithm Applications of ST.
Suffi Trees Outline Introduction Suffi Trees (ST) Building STs in liner time: Ukkonen s lgorithm Applictions of ST 2 Introduction 3 Sustrings String is ny sequence of chrcters. Sustring of string S is
More informationChapter55. Algebraic expansion and simplification
Chpter55 Algebric expnsion nd simplifiction Contents: A The distributive lw B The product ( + b)(c + d) C Difference of two squres D Perfect squres expnsion E Further expnsion F The binomil expnsion 88
More informationFINANCIAL ANALYSIS I. INTRODUCTION AND METHODOLOGY
Dhk Wter Supply Network Improvement Project (RRP BAN 47254003) FINANCIAL ANALYSIS I. INTRODUCTION AND METHODOLOGY A. Introduction 1. The Asin Development Bnk (ADB) finncil nlysis of the proposed Dhk Wter
More informationTrigonometry - Activity 21 General Triangle Solution: Given three sides.
Nme: lss: p 43 Mths Helper Plus Resoure Set. opyright 003 rue. Vughn, Tehers hoie Softwre Trigonometry - tivity 1 Generl Tringle Solution: Given three sides. When the three side lengths '', '' nd '' of
More informationReinforcement Learning. CS 188: Artificial Intelligence Fall Grid World. Markov Decision Processes. What is Markov about MDPs?
CS 188: Artificil Intelligence Fll 2010 Lecture 9: MDP 9/2/2010 Reinforcement Lerning [DEMOS] Bic ide: Receive feedbck in the form of rewrd Agent utility i defined by the rewrd function Mut (lern to) ct
More informationProblem Set for Chapter 3: Simple Regression Analysis ECO382 Econometrics Queens College K.Matsuda
Problem Set for Chpter 3 Simple Regression Anlysis ECO382 Econometrics Queens College K.Mtsud Excel Assignments You re required to hnd in these Excel Assignments by the due Mtsud specifies. Legibility
More information(a) by substituting u = x + 10 and applying the result on page 869 on the text, (b) integrating by parts with u = ln(x + 10), dv = dx, v = x, and
Supplementry Questions for HP Chpter 5. Derive the formul ln( + 0) d = ( + 0) ln( + 0) + C in three wys: () by substituting u = + 0 nd pplying the result on pge 869 on the tet, (b) integrting by prts with
More information3/7/13. Binomial Tree. Binomial Tree. Binomial Tree. Binomial Tree. Number of nodes with respect to k? N(B o ) = 1 N(B k ) = 2 N(B k-1 ) = 2 k
//1 Adapted from: Kevin Wayne B k B k B k : a binomial tree with the addition of a left child with another binomial tree Number of nodes with respect to k? N(B o ) = 1 N(B k ) = 2 N( ) = 2 k B 1 B 2 B
More informationA Closer Look at Bond Risk: Duration
W E B E X T E S I O 4C A Closer Look t Bond Risk: Durtion This Extension explins how to mnge the risk of bond portfolio using the concept of durtion. BOD RISK In our discussion of bond vlution in Chpter
More informationTechnical Appendix. The Behavior of Growth Mixture Models Under Nonnormality: A Monte Carlo Analysis
Monte Crlo Technicl Appendix 1 Technicl Appendix The Behvior of Growth Mixture Models Under Nonnormlity: A Monte Crlo Anlysis Dniel J. Buer & Ptrick J. Currn 10/11/2002 These results re presented s compnion
More informationChapter 2: Relational Model. Chapter 2: Relational Model
Chpter : Reltionl Model Dtbse System Concepts, 5 th Ed. See www.db-book.com for conditions on re-use Chpter : Reltionl Model Structure of Reltionl Dtbses Fundmentl Reltionl-Algebr-Opertions Additionl Reltionl-Algebr-Opertions
More informationPRIORITY QUEUES. binary heaps d-ary heaps binomial heaps Fibonacci heaps. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley
PRIORITY QUEUES binary heaps d-ary heaps binomial heaps Fibonacci heaps Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos Last updated
More informationAlgorithms PRIORITY QUEUES. binary heaps d-ary heaps binomial heaps Fibonacci heaps. binary heaps d-ary heaps binomial heaps Fibonacci heaps
Priority queue data type Lecture slides by Kevin Wayne Copyright 05 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos PRIORITY QUEUES binary heaps d-ary heaps binomial heaps Fibonacci
More informationFirst Assignment, Federal Income Tax, Spring 2019 O Reilly. For Monday, January 14th, please complete problem set one (attached).
First Assignment, Federl Income Tx, Spring 2019 O Reilly For Mondy, Jnury 14th, plese complete problem set one (ttched). Federl Income Tx Spring 2019 Problem Set One Suppose tht in 2018, Greene is 32,
More information1 Manipulation for binary voters
STAT 206A: Soil Choie nd Networks Fll 2010 Mnipultion nd GS Theorem Otoer 21 Leturer: Elhnn Mossel Srie: Kristen Woyh In this leture we over mnipultion y single voter: whether single voter n lie out his
More informationConditions for FlexiLink
Conditions for FlexiLink Your policy 1 Wht your policy covers FlexiLink is single-premium investment-linked pln designed to increse the vlue of your investment. Through this pln, you cn invest in one or
More informationEarning Money. Earning Money. Curriculum Ready ACMNA: 189.
Erning Money Curriculum Redy ACMNA: 189 www.mthletics.com Erning EARNING Money MONEY Different jos py different mounts of moneys in different wys. A slry isn t pid once in yer. It is pid in equl prts
More informationGet Solution of These Packages & Learn by Video Tutorials on KEY CONCEPTS
FREE Downlod Study Pckge from wesite: www.tekoclsses.com & www.mthsbysuhg.com Get Solution of These Pckges & Lern y Video Tutorils on www.mthsbysuhg.com KEY CONCEPTS THINGS TO REMEMBER :. The re ounded
More information3: Inventory management
INSE6300 Ji Yun Yu 3: Inventory mngement Concordi Februry 9, 2016 Supply chin mngement is bout mking sequence of decisions over sequence of time steps, fter mking observtions t ech of these time steps.
More informationDesign and Analysis of Algorithms
Design and Analysis of Algorithms Instructor: Sharma Thankachan Lecture 9: Binomial Heap Slides modified from Dr. Hon, with permission 1 About this lecture Binary heap supports various operations quickly:
More informationMARKET POWER AND MISREPRESENTATION
MARKET POWER AND MISREPRESENTATION MICROECONOMICS Principles nd Anlysis Frnk Cowell Note: the detil in slides mrked * cn only e seen if you run the slideshow July 2017 1 Introduction Presenttion concerns
More informationProblem Set 2 Solutions
Msshusetts Institute of Tehnology Hnout 6 6.854J/18.415J: Avne Algorithms Wenesy, Septemer 21, 2005 Dvi Krger Prolem Set 2 Solutions Prolem 1. We ugment every noe in the sply tree with the numer.es of
More information1 Solutions to Tute09
s to Tute0 Questions 4. - 4. are straight forward. Q. 4.4 Show that in a binary tree of N nodes, there are N + NULL pointers. Every node has outgoing pointers. Therefore there are N pointers. Each node,
More informationSolutions to Exercises, Set 3
Shool of Computer Siene, University of Nottinghm G5MAL Mhines nd their Lnguges, Spring 1 Thorsten Altenkirh Solutions to Exerises, Set 3 Fridy 3rd Mrh 1 1. () () L(+ +ǫ) = {L(E +F) = L(E) L(F)} L() L(
More informationOutline. CS 188: Artificial Intelligence Spring Speeding Up Game Tree Search. Minimax Example. Alpha-Beta Pruning. Pruning
CS 188: Artificil Intelligence Spring 2011 Lecture 8: Gme, MDP 2/14/2010 Pieter Abbeel UC Berkeley Mny lide dpted from Dn Klein Outline Zero-um determinitic two plyer gme Minimx Evlution function for non-terminl
More informationMeld(Q 1,Q 2 ) merge two sets
Priority Queues MakeQueue Insert(Q,k,p) Delete(Q,k) DeleteMin(Q) Meld(Q 1,Q 2 ) Empty(Q) Size(Q) FindMin(Q) create new empty queue insert key k with priority p delete key k (given a pointer) delete key
More informationMath F412: Homework 4 Solutions February 20, κ I = s α κ α
All prts of this homework to be completed in Mple should be done in single worksheet. You cn submit either the worksheet by emil or printout of it with your homework. 1. Opre 1.4.1 Let α be not-necessrily
More informationProblem Set 2 Suggested Solutions
4.472 Prolem Set 2 Suggested Solutions Reecc Zrutskie Question : First find the chnge in the cpitl stock, k, tht will occur when the OLG economy moves to the new stedy stte fter the government imposes
More informationAdvanced Algorithmics (4AP) Heaps
Advanced Algorithmics (4AP) Heaps Jaak Vilo 2009 Spring Jaak Vilo MTAT.03.190 Text Algorithms 1 Heaps http://en.wikipedia.org/wiki/category:heaps_(structure) Binary heap http://en.wikipedia.org/wiki/binary
More informationInitializing A Max Heap. Initializing A Max Heap
Initializing A Max Heap 3 4 5 6 7 8 70 8 input array = [-,,, 3, 4, 5, 6, 7, 8,, 0, ] Initializing A Max Heap 3 4 5 6 7 8 70 8 Start at rightmost array position that has a child. Index is n/. Initializing
More informationGridworld Values V* Gridworld: Q*
CS 188: Artificil Intelligence Mrkov Deciion Procee II Intructor: Dn Klein nd Pieter Abbeel --- Univerity of Cliforni, Berkeley [Thee lide were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to AI
More informationSET 1C Binary Trees. 2. (i) Define the height of a binary tree or subtree and also define a height balanced (AVL) tree. (2)
SET 1C Binary Trees 1. Construct a binary tree whose preorder traversal is K L N M P R Q S T and inorder traversal is N L K P R M S Q T 2. (i) Define the height of a binary tree or subtree and also define
More informationECON 105 Homework 2 KEY Open Economy Macroeconomics Due November 29
Instructions: ECON 105 Homework 2 KEY Open Economy Mcroeconomics Due Novemer 29 The purpose of this ssignment it to integrte the explntions found in chpter 16 ok Kennedy with the D-S model nd the Money
More informationSTAT 472 Fall 2016 Test 2 November 8, 2016
STAT 47 Fll 016 Test November 8, 016 1. Anne who is (65) buys whole life policy with deth benefit of 00,000 pyble t the end of the yer of deth. The policy hs nnul premiums pyble for life. The premiums
More informationSuccessor. CS 361, Lecture 19. Tree-Successor. Outline
Successor CS 361, Lecture 19 Jared Saia University of New Mexico The successor of a node x is the node that comes after x in the sorted order determined by an in-order tree walk. If all keys are distinct,
More informationOutline for this Week
Binomial Heaps Outline for this Week Binomial Heaps (Today) A simple, fexible, and versatile priority queue. Lazy Binomial Heaps (Today) A powerful building block for designing advanced data structures.
More informationThe IndoDairy Smallholder Household Survey From Farm-to-Fact
The Centre for Glol Food nd Resources The IndoDiry Smllholder Household Survey From Frm-to-Fct Fctsheet 7: Diry Frming Costs, Revenue nd Profitility Bckground This fctsheet uilds on the informtion summrised
More informationChapter 3: The Reinforcement Learning Problem. The Agent'Environment Interface. Getting the Degree of Abstraction Right. The Agent Learns a Policy
Chpter 3: The Reinforcement Lerning Problem The Agent'Environment Interfce Objectives of this chpter: describe the RL problem we will be studying for the reminder of the course present idelized form of
More informationInternational Budget Partnership OPEN BUDGET QUESTIONNAIRE POLAND
Interntionl Budget Prtnership OPEN BUDGET QUESTIONNAIRE POLAND September 28, 2007 Interntionl Budget Prtnership Center on Budget nd Policy Priorities 820 First Street, NE Suite 510 Wshington, DC 20002
More informationCSE 21 Winter 2016 Homework 6 Due: Wednesday, May 11, 2016 at 11:59pm. Instructions
CSE 1 Winter 016 Homework 6 Due: Wednesday, May 11, 016 at 11:59pm Instructions Homework should be done in groups of one to three people. You are free to change group members at any time throughout the
More informationConditions for GrowthLink
Importnt: This is smple of the policy document. To determine the precise terms, conditions nd exclusions of your cover, plese refer to the ctul policy nd ny endorsement issued to you. Conditions for GrowthLink
More informationECE 410 Homework 1 -Solutions Spring 2008
ECE 410 Homework 1 -Solution Spring 2008 Prolem 1 For prolem 2-4 elow, ind the voltge required to keep the trnitor on ppling the rule dicued in cl. Aume VDD = 2.2V FET tpe Vt (V) Vg (V) Vi (V) n-tpe 0.5
More information1 Binomial Tree. Structural Properties:
Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai 600, India An Autonomous Institute under MHRD, Govt of India http://www.iiitdm.ac.in COM 0 Advanced Data Structures
More informationPriority Queues. Fibonacci Heap
ibonacci Heap hans to Sartaj Sahni for the original version of the slides Operation mae-heap insert find-min delete-min union decrease-ey delete Priority Queues Lined List Binary Binomial Heaps ibonacci
More informationOPEN BUDGET QUESTIONNAIRE
Interntionl Budget Project OPEN BUDGET QUESTIONNAIRE UNITED STATES October 2005 Interntionl Budget Project Center on Budget nd Policy Priorities 820 First Street, NE Suite 510 Wshington, DC 20002 www.interntionlbudget.org
More informationAVL Trees. The height of the left subtree can differ from the height of the right subtree by at most 1.
AVL Trees In order to have a worst case running time for insert and delete operations to be O(log n), we must make it impossible for there to be a very long path in the binary search tree. The first balanced
More informationRicardian Model. Mercantilism: 17 th and 18 th Century. Adam Smith s Absolute Income Hypothesis, End of 18 th Century: Major Shift in Paradigm
Mercntilism: th nd th Century Ricrdin Model lesson in Comprtive dvntge Trde ws considered s Zero-Sum Gme It ws viewed mens to ccumulte Gold & Silver Exports were encourged Imports were discourged End of
More informationResearch Article Existence of Positive Solution to Second-Order Three-Point BVPs on Time Scales
Hindwi Publishing Corportion Boundry Vlue Problems Volume 2009, Article ID 685040, 6 pges doi:10.1155/2009/685040 Reserch Article Existence of Positive Solution to Second-Order hree-point BVPs on ime Scles
More informationHeaps. Heap/Priority queue. Binomial heaps: Advanced Algorithmics (4AP) Heaps Binary heap. Binomial heap. Jaak Vilo 2009 Spring
.0.00 Heaps http://en.wikipedia.org/wiki/category:heaps_(structure) Advanced Algorithmics (4AP) Heaps Jaak Vilo 00 Spring Binary heap http://en.wikipedia.org/wiki/binary_heap Binomial heap http://en.wikipedia.org/wiki/binomial_heap
More informationOPEN BUDGET QUESTIONNAIRE FRANCE
Interntionl Budget Project OPEN BUDGET QUESTIONNAIRE FRANCE October 2005 Interntionl Budget Project Center on Budget nd Policy Priorities 820 First Street, NE Suite 510 Wshington, DC 20002 www.interntionlbudget.org
More informationE-Merge Process Table (Version 1)
E-Merge Proess Tle (Version 1) I 1 Indiies Trgets Stte Energy Environmentl ESTABLISHING GOALS & BASELINES Identify gols from stte energy offie perspetive Identify stte puli helth nd welfre gols ffeted
More informationArithmetic and Geometric Sequences
Arithmetic nd Geometric Sequences A sequence is list of numbers or objects, clled terms, in certin order. In n rithmetic sequence, the difference between one term nd the next is lwys the sme. This difference
More informationHeaps
AdvancedAlgorithmics (4AP) Heaps Jaak Vilo 2009 Spring Jaak Vilo MTAT.03.190 Text Algorithms 1 Heaps http://en.wikipedia.org/wiki/category:heaps_(structure) Binary heap http://en.wikipedia.org/wiki/binary_heap
More informationAVL Trees. Height of an AVL Tree. AVL Tree. Balancing Factor
AVL Trees AVL Tree Heigt of n AVL Tree Insertion nd restruturing Removl nd restruturing Costs AVL trees re lned. An AVL Tree is inr ser tree su tt for ever internl node v of T, te eigts of te ildren of
More informationEffects of Entry Restriction on Free Entry General Competitive Equilibrium. Mitsuo Takase
CAES Working Pper Series Effects of Entry Restriction on Free Entry Generl Competitive Euilirium Mitsuo Tkse Fculty of Economics Fukuok University WP-2018-006 Center for Advnced Economic Study Fukuok University
More informationAccess your online resources today at
978--07-670- - CmbridgeMths: NSW Syllbus for the Austrlin Curriculum: Yer 0: Stte./. Access your online resources tody t www.cmbridge.edu.u/go. Log in to your existing Cmbridge GO user ccount or crete
More information3. Argumentation Frameworks
3. Argumenttion Frmeworks Argumenttion current hot topic in AI. Historiclly more recent thn other pproches discussed here. Bsic ide: to construct cceptble set(s) of beliefs from given KB: 1 construct rguments
More informationFibonacci Heaps Y Y o o u u c c an an s s u u b b m miitt P P ro ro b blle e m m S S et et 3 3 iin n t t h h e e b b o o x x u u p p fro fro n n tt..
Fibonacci Heaps You You can can submit submit Problem Problem Set Set 3 in in the the box box up up front. front. Outline for Today Review from Last Time Quick refresher on binomial heaps and lazy binomial
More informationOPEN BUDGET QUESTIONNAIRE CZECH REPUBLIC
Interntionl Budget Project OPEN BUDGET QUESTIONNAIRE CZECH REPUBLIC October 2005 Interntionl Budget Project Center on Budget nd Policy Priorities 820 First Street, NE Suite 510 Wshington, DC 20002 www.interntionlbudget.org
More informationThe potential function φ for the amortized analysis of an operation on Fibonacci heap at time (iteration) i is given by the following equation:
Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai 600 127, India An Autonomous Institute under MHRD, Govt of India http://www.iiitdm.ac.in COM 01 Advanced Data Structures
More information1.6 Heap ordered trees
1.6 Heap ordered trees A heap ordered tree is a tree satisfying the following condition. The key of a node is not greater than that of each child if any In a heap ordered tree, we can not implement find
More informationThe Okun curve is non-linear
Economics Letters 70 (00) 53 57 www.elsevier.com/ locte/ econbse The Okun curve is non-liner Mtti Viren * Deprtment of Economics, 004 University of Turku, Turku, Finlnd Received 5 My 999; ccepted 0 April
More informationReleased Assessment Questions, 2017 QUESTIONS
Relese Assessment Questions, 2017 QUESTIONS Gre 9 Assessment of Mthemtis Applie Re the instrutions elow. Along with this ooklet, mke sure you hve the Answer Booklet n the Formul Sheet. You my use ny spe
More informationChoice of strategic variables under relative profit maximization in asymmetric oligopoly
Economics nd Business Letters () 5-6 04 Choice of strtegic vriles under reltive profit mximiztion in symmetric oligopoly Atsuhiro Stoh Ysuhito Tnk * Fculty of Economics Doshish University Kyoto Jpn Received:
More informationOPEN BUDGET QUESTIONNAIRE SOUTH AFRICA
Interntionl Budget Prtnership OPEN BUDGET QUESTIONNAIRE SOUTH AFRICA September 28, 2007 Interntionl Budget Prtnership Center on Budget nd Policy Priorities 820 First Street, NE Suite 510 Wshington, DC
More informationNon-Deterministic Search. CS 188: Artificial Intelligence Markov Decision Processes. Grid World Actions. Example: Grid World
CS 188: Artificil Intelligence Mrkov Deciion Procee Non-Determinitic Serch Dn Klein, Pieter Abbeel Univerity of Cliforni, Berkeley Exmple: Grid World Grid World Action A mze-like problem The gent live
More informationAVL TREES. From last time. CSE 332 Data Abstractions: A Heterozygous Forest of AVL, Splay, and B Trees. Three Flavors of Balance
-7- CSE Dt Astrctions: A Heterozygous Forest of AVL, Sly, nd B Trees From lst time Binry serc trees cn give us gret erformnce due to roviding structured inry serc. Tis only occurs if te tree is lnced.
More informationFibonacci Heaps CLRS: Chapter 20 Last Revision: 21/09/04
Fibonacci Heaps CLRS: Chapter 20 Last Revision: 21/09/04 1 Binary heap Binomial heap Fibonacci heap Procedure (worst-case) (worst-case) (amortized) Make-Heap Θ(1) Θ(1) Θ(1) Insert Θ(lg n) O(lg n) Θ(1)
More informationStatic Fully Observable Stochastic What action next? Instantaneous Perfect
CS 188: Ar)ficil Intelligence Mrkov Deciion Procee K+1 Intructor: Dn Klein nd Pieter Abbeel - - - Univerity of Cliforni, Berkeley [Thee lide were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to
More informationCOMPLETE COVER - `ADD ON' TO TRAVEL INSURANCE POLICIES CONFERENCE & EVENT ORGANISERS SCHEDULE
SPECIMEN ONLY COMPLETE COVER - `ADD ON' TO TRAVEL INSURANCE POLICIES CONFERENCE & EVENT ORGANISERS SCHEDULE Policy Numer: Policyholder: Certificte of Insurnce: PPIP(E) Period of Insurnce: Finncil Loss:
More informationData Structures. Binomial Heaps Fibonacci Heaps. Haim Kaplan & Uri Zwick December 2013
Data Structures Binomial Heaps Fibonacci Heaps Haim Kaplan & Uri Zwick December 13 1 Heaps / Priority queues Binary Heaps Binomial Heaps Lazy Binomial Heaps Fibonacci Heaps Insert Find-min Delete-min Decrease-key
More informationDesign and Analysis of Algorithms. Lecture 9 November 20, 2013 洪國寶
Design and Analysis of Algorithms 演算法設計與分析 Lecture 9 November 20, 2013 洪國寶 1 Outline Advanced data structures Binary heaps (review) Binomial heaps Fibonacci heaps Dt Data structures t for disjoint dijitsets
More informationCOMP Analysis of Algorithms & Data Structures
COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Binomial Heaps CLRS 6.1, 6.2, 6.3 University of Manitoba Priority queues A priority queue is an abstract data type formed by a set S of
More informationThe phases of a simple compiler: Compiler Construction SMD163. From Intermediate To Target: An Optimizing Compiler: Lecture 13: Instruction selection
Compiler Constrution SMD163 The phses of simple ompiler: Lexer Prser Stti Anlysis IA32 Code Genertor Leture 13: Instrution seletion Viktor Leijon & Peter Jonsson with slides y John Nordlnder Contins mteril
More informationInterest. Interest. Curriculum Ready ACMNA: 211, 229,
Inteest Cuiulum Redy ACMNA: 211, 229, 234 www.mthletis.om INTEREST The whole point of Finnil Mths is to pedit wht will hppen to money ove time. This is so you n e peped y knowing how muh money you will
More informationOPEN BUDGET QUESTIONNAIRE UKRAINE
Interntionl Budget Prtnership OPEN BUDGET QUESTIONNAIRE UKRAINE September 28, 2007 Interntionl Budget Prtnership Center on Budget nd Policy Priorities 820 First Street, NE Suite 510 Wshington, DC 20002
More informationDesign and Analysis of Algorithms 演算法設計與分析. Lecture 9 November 19, 2014 洪國寶
Design and Analysis of Algorithms 演算法設計與分析 Lecture 9 November 19, 2014 洪國寶 1 Outline Advanced data structures Binary heaps(review) Binomial heaps Fibonacci heaps Data structures for disjoint sets 2 Mergeable
More informationOPEN BUDGET QUESTIONNAIRE
Interntionl Budget Prtnership OPEN BUDGET QUESTIONNAIRE SOUTH KOREA September 28, 2007 Interntionl Budget Prtnership Center on Budget nd Policy Priorities 820 First Street, NE Suite 510 Wshington, DC 20002
More informationIntroduction to Greedy Algorithms: Huffman Codes
Introduction to Greedy Algorithms: Huffman Codes Yufei Tao ITEE University of Queensland In computer science, one interesting method to design algorithms is to go greedy, namely, keep doing the thing that
More informationBinary and Binomial Heaps. Disclaimer: these slides were adapted from the ones by Kevin Wayne
Binary and Binomial Heaps Disclaimer: these slides were adapted from the ones by Kevin Wayne Priority Queues Supports the following operations. Insert element x. Return min element. Return and delete minimum
More information