BRICS. Fast Meldable Priority Queues. Basic Research in Computer Science. BRICS RS G. S. Brodal: Fast Meldable Priority Queues

Size: px
Start display at page:

Download "BRICS. Fast Meldable Priority Queues. Basic Research in Computer Science. BRICS RS G. S. Brodal: Fast Meldable Priority Queues"

Transcription

1 BRIS RS G. S. Brodal: Fast Meldable Priority Queues BRIS Basic Researc in omputer Science Fast Meldable Priority Queues Gert Stølting Brodal BRIS Report Series RS ISSN February 1995

2 opyrigt c 1995, BRIS, Department of omputer Science University of Aarus. All rigts reserved. Reproduction of all or part of tis work is permitted for educational or researc use on condition tat tis copyrigt notice is included in any copy. See back inner page for a list of recent publications in te BRIS Report Series. opies may be obtained by contacting: BRIS Department of omputer Science University of Aarus Ny Munkegade, building 540 DK Aarus Denmark Telepone: Telefax: Internet: BRIS@daimi.aau.dk BRIS publications are in general accessible troug WWW and anonymous FTP: ttp:// ftp ftp.brics.aau.dk (cd pub/bris)

3 Fast Meldable Priority Queues Gert Stlting Brodal BRIS y Department of omputer Science, University of Aarus Ny Munkegade, DK-8000 Arus, Denmark 15t February 1995 Abstract We present priority queues tat support te operations MakeQueue, FindMin, Insert and Meld in worst case time O(1) and Delete and DeleteMin in worst case time O(log n). Tey can be implemented on te pointer macine and require linear space. Te time bounds are optimal for all implementations were Meld takes worst case time o(n). To our knowledge tis is te rst priority queue implementation tat supports Meld in worst case constant time and DeleteMin in logaritmic time. Tis work was partially supported by te ESPRIT II Basic Researc Actions Program of te E under contract no (project ALOM II) and by te Danis Natural Science Researc ouncil (Grant No ). y Basic Researc in omputer Science, entre of te Danis National Researc Foundation. 1

4 Introduction We consider te problem of implementing meldable priority queues. Te operations tat sould be supported are: MakeQueue reates a new empty priority queue. FindMin(Q) Returns te minimum element contained in priority queue Q. Insert(Q; e) Inserts element e into priority queue Q. Meld(Q 1 ; Q 2 ) Melds te priority queues Q 1 and Q 2 to one priority queue and returns te new priority queue. DeleteMin(Q) Deletes te minimum element of Q and returns te element. Delete(Q; e) Deletes element e from priority queue Q provided tat it is known were e is stored in Q (priority queues do not support te searcing for an element). Te implementation of priority queues is a classical problem in data structures. A few references are [13, 12, 8, 7, 5, 6, 10]. In te amortised sense, [11], te best performance is acieved by binomial eaps [12]. Tey support Delete and DeleteMin in amortised time O(log n) and all oter operations in amortised constant time. If we want to perform Insert in worst case constant time two ecient data structures exist. Te implicit priority queues of arlsson and Munro [2] and te relaxed eaps of Driscoll et al. [5], but neiter of tese support Meld eciently. However tey do support MakeQueue, FindMin and Insert in worst case constant time and Delete and DeleteMin in worst case time O(log n). Our implementation beats te above by supporting MakeQueue, Find- Min, Insert and Meld in worst case time O(1) and Delete and Delete- Min in worst case time O(log n). Te computational model is te pointer macine and te space requirement is linear in te number of elements contained in te priority queues. We assume tat te priority queues contain elements from a totally ordered universe. Te only allowed operation on te elements is te comparisons of two elements. We assume tat comparisons can be performed 2

5 in worst case constant time. For simplicity we assume tat all priority queues are nonempty. For a given operation we let n denote te size of te priority queue of maximum size involved in te operation. In Sect. 1 we describe te data structure and in Sect. 2 we sow ow to implement te operations. In Sect. 3 we sow tat our construction is optimal. Section 4 contains some nal remarks. 1 Te Data Structure Our basic representation of a priority queue is a eap ordered tree were eac node contains one element. Tis is sligtly dierent from binomial eaps [12] and Fibonacci eaps [8] were te representation is a forest of eap ordered trees. Wit eac node we associate a rank and we partition te sons of a node into two types, type i and type ii. Te eap ordered tree must satisfy te following structural constraints. a) A node as at most one son of type i. Tis son may be of arbitrary rank. b) Te sons of type ii of a node of rank r ave all rank less tan r. c) For a xed node or rank r, let n i denote te number of sons of type ii tat ave rank i. We maintain te regularity constraint tat i) 8i : (0 i < r ) 1 n i 3); ii) 8i; j : (i < j ^ n i = n j = 3 ) 9k : i < k < j ^ n k = 1); iii) 8i : (n i = 3 ) 9k : k < i ^ n k = 1): d) Te root as rank zero. Te eap order implies tat te minimum element is at te root. Properties a), b) and c) bound te degree of a node by tree times te rank of te node plus one. Te size of te subtree rooted at a node is controlled by property c). Lemma 1 sows tat te size is at least exponential in te rank. Te last two properties are essential to acieve Meld in worst case constant time. Te regularity constraint c) is a variation of te regularity constraint tat Guibas et al. [9] used in teir construction of nger searc trees. Te idea is tat between two ranks were tree sons ave 3

6 equal rank tere is a rank of wic tere only is one son. Figure 1 sows a eap ordered tree tat satises te requirements a) to d) (te elements contained in te tree are omitted). 0 3 (( (((( H XX H X H 2 H Figure 1: A eap ordered tree satisfying te properties a) to d). A box denotes a son of type i, a circle denotes a son of type ii, and te numbers are te ranks of te nodes. 0 Lemma 1 Any subtree rooted at a node of rank r as size 2 r. Proof: Te proof is a simple induction in te structure of te tree. By c.i) leaves ave rank zero and te lemma is true. For a node of rank r property c.i) implies tat te node as at least one son of eac rank less tan r. By induction we get tat te size is at least 1 + P r?1 i=0 2 i = 2 r. 2 orollary 1 Te only son of te root of a tree containing n elements as rank at most blog(n? 1)c. We now describe te details of ow to represent a eap ordered tree. A son of type i is always te rigtmost son. Te sons of type ii appear in increasing rank order from rigt to left. See Fig. 1 and Fig. 2 for examples. A node consists of te following seven elds: 1) te element associated wit te node, 2) te rank of te node, 3) te type of te node, 4) a pointer to te fater node, 5) a pointer to te leftmost son and 6) a pointer to te next sibling to te left. Te next sibling pointer of te leftmost son points to te rigtmost son in te list. Tis enables te access to te rigtmost son of a node in constant time too. Field 7) is used to maintain a single linked list of triples of sons of type ii tat ave 4

7 6 leftmost son fater next next triple Figure 2: Te arrangement of te sons of a node. equal rank (see Fig. 2). Te nodes appear in increasing rank order. We only maintain tese pointers for te rigtmost son and for te rigtmost son in a triple of sons of equal rank. Figure 2 sows an example of ow te sons of a node are arranged. In te next section we describe ow to implement te operations. Tere are two essential transformations. Te rst transformation is to add a son of rank r to a node of rank r. Because we ave a pointer to te leftmost son of a node (tat as rank r? 1 wen r > 0) tis can be done in constant time. Notice tat tis transformation cannot create tree sons of equal rank. Te second transformation is to nd te smallest rank i were tree sons ave equal rank. Two of te sons are replaced by a son of rank i + 1. Because we maintain a single linked list of triples of nodes of equal rank we can also do tis in constant time. 2 Operations In tis section we describe ow to implement te dierent operations. Te basic operation we use is to link two nodes of equal rank r. Tis is done by comparing te elements associated wit te two nodes and making te node wit te largest element a son of te oter node. By increasing te rank of te node wit te smallest element to r + 1 te properties a) to d) are satised. Te operation is illustrated in Fig. 3. Tis is similar to te linking of trees in binomial eaps and Fibonacci eaps [12, 8]. We now describe ow to implement te operations. MakeQueue is trivial. We just return te null pointer. FindMin(Q) returns te element located at te root of te tree 5

8 r r + 1 r r " " > Figure 3: Te linking of two nodes of equal rank. representing Q. Insert(Q; e) is equal to Meld Q wit a priority queue only consisting of a rank zero node containing e. Meld(Q 1 ; Q 2 ) can be implemented in two steps. In te rst we insert one of te eap ordered trees into te oter eap ordered tree. Tis can violate property c) at one node because te node gets one additional son of rank zero. In te second step we reestablis property c) at te node. Figure 4 sows an example of te rst step. e 1 e 2 e 1 e 0 1 e 0 2 > b e 2 b e 0 T 1 1 T 2 T 1 e 0 2 T 2 Figure 4: Te rst step of a Meld operation (te case e 1 e 2 < e 0 1 e0 2). Let e 1 and e 2 denote te roots of te trees representing Q 1 and Q 2 and let e 0 1 and e 0 2 denote te only sons of e 1 and e 2. Assume w.l.o.g. tat e 1 is te smallest element. If e 2 e 0 1 we let e 2 become a rank zero son of e 0 1, oterwise e 2 < e 0 1. If e 0 2 < e0 1 we can intercange te subtrees rooted at e 0 2 and e 0 1, so w.l.o.g. we assume e 1 e 2 < e 0 1 e 0 2. In tis case we make e 2 a rank zero son of e 0 1 and swap te elements e 0 1 and e 2 (see Fig. 4). We ave assumed tat te sizes of Q 1 and Q 2 are at least two, but te oter cases are just simplied cases of te general case. 6

9 Te only invariants tat can be violated now are te invariants b) and c) at te son of te root because it as got one additional rank zero son. Let v denote te son of te root. If v ad rank zero we can satisfy te invariants by setting te rank of v to one. Oterwise only c) can be violated at v. Let n i denote te number of sons of v tat ave rank i. By linking two nodes of rank i were i is te smallest rank were n i = 3 it is easy to verify tat c) can be reestablised. Te linking reduces n i by two and increments n i+1 by one. If we let (n r?1 ; : : : ; n 0 ) be a string in f1; 2; 3g te following table sows tat c) is reestablised after te above described transformations. We let x denote a string in f1; 2; 3g and y i strings in f1; 2g. Te table sows all te possible cases. Recall tat c) states tat between every two n i = 3 tere is at least one n i = 1. Te dierent cases are also considered in [9]. y 1 1 > y 1 2 y 2 13y 1 1 > y 2 21y 1 2 y 2 23y 1 1 > y 2 31y 1 2 x3y 2 13y 1 1 > x3y 2 21y 1 2 x3y 3 1y 2 23y 1 1 > x3y 3 1y 2 31y 1 2 y 1 12 > y 1 21 y 1 22 > y 1 31 x3y 1 12 > x3y 1 21 x3y 2 1y 1 22 > x3y 2 1y 1 31 After te linking only b) can be violated at v because a son of rank r as been created. Tis problem can be solved by increasing te rank of v by one. Because of te given representation Meld can be performed in worst case time O(1). DeleteMin(Q) removes te root e 1 of te tree representing Q. Te problem is tat now property d) can be violated because te new root e 2 can ave arbitrary rank. Tis problem is solved by te following transformations. First we remove te root e 2. Tis element later on becomes te new root of rank zero. At most O(log n) trees can be created by 7

10 removing te root. Among tese trees te root tat contains te minimum element e 3 is found and removed. Tis again creates at most O(log n) trees. We now nd te root (e 4 ) of maximum rank among all te trees and replaces it by te element e 3. A rank zero node containing e 4 is created. Te tree of maximum rank and wit root e 3 is made te only son of e 2. All oter trees are made sons of te node containing e 3. Notice tat all te new sons of e 3 ave rank less tan te rank of e 3. By iterated linking of sons of equal rank were tere are tree sons wit equal rank, we can guarantee tat n i 2 f1; 2g for all i less tan te rank of e 3. Possibly, we ave to increase te rank of e 3. Finally, we return te element e 1. e 1 e 2, lt, e, l 4. T. l B e... B. 3 T B T. T..... e 2 e 2 e 2 e 3... PP e 3 e B B A > > e B > A A e 4 B B B Figure 5: Te implementation of DeleteMin. Because te number of trees is at most O(log n) DeleteMin can be performed in worst case time O(log n). Figure 5 illustrates ow DeleteMin is performed. Delete(Q; e) can be implemented similar to DeleteMin. If e is te root we just perform DeleteMin. Oterwise we start by bubbling e upwards in te tree. We replace e wit its fater until te fater of e as rank less tan or equal to te rank of e. Now, e is te arbitrarily ranked son of its fater. Tis allows us to replace e wit an arbitrary ranked node, provided tat te eap order is still satised. Because te rank of e increases for eac bubble step, and te rank of a node is bounded by blog(n? 1)c, tis can be performed in time O(log n). We can now replace e wit te meld of te sons of e as described in te implementation of DeleteMin. Tis again can be performed in worst case time O(log n). 8

11 To summarise, we ave te teorem: Teorem 1 Tere exists an implementation of priority queues tat supports MakeQueue, FindMin, Insert and Meld in worst case time O(1) and DeleteMin and Delete in worst case time O(log n). Te implementation requires linear space and can be implemented on te pointer macine. 3 Optimality Te following teorem sows tat if Meld is required to be nontrivial, i.e. to take worst case sublinear time, ten DeleteMin must take worst case logaritmic time. Tis sows tat te construction described in te previous sections is optimal among all implementations were Meld takes sublinear time. If Meld is allowed to take linear time it is possible to support Delete- Min in worst case constant time by using te nger searc trees of Dietz and Raman [3]. By using teir data structure MakeQueue, FindMin, DeleteMin, Delete can be supported in worst case time O(1), Insert in worst case time O(log n) and Meld in worst case time O(n). Teorem 2 If Meld can be performed in worst case time o(n) ten DeleteMin cannot be performed in worst case time o(log n). Proof: Te proof is by contradiction. Assume Meld takes worst case time o(n) and DeleteMin takes worst cast time o(log n). We sow tat tis implies a contradiction wit te (n log n) lower bound on comparison based sorting. Assume we ave n elements tat we want to sort. Assume w.l.o.g. tat n is a power of 2, n = 2 k. We can sort te elements by te following list of priority queue operations. First, create n priority queues eac containing one of te n elements (eac creation takes worst case time O(1)). Ten join te n priority queues to one priority queue by n?1 Meld operations. Te Meld operations are done bottom-up by always melding two priority queues of smallest size. Finally, perform n DeleteMin operations. Te elements are now sorted. 9

12 Te total time for tis sequence of operations is: X nt MakeQueue + k?1 i=0 X 2 k?1?i T Meld (2 i ) + n T DeleteMin (i) = o(n log n): Tis contradicts te lower bound on comparison based sorting. 2 i=1 4 onclusion We ave presented an implementation of meldable priority queues were Meld takes worst case time O(1) and DeleteMin worst case time O(log n). Anoter interesting operation to consider is DecreaseKey. Our data structure supports DecreaseKey in worst case time O(log n), because DecreaseKey can be implemented in terms of a Delete operation followed by an Insert operation. Relaxed eaps [5] support DecreaseKey in worst case time O(1) but do not support Meld. But it is easy to see tat relaxed eaps can be extended to support Meld in worst case time O(log n). Te problem to consider is if it is possible to support bot DecreaseKey and Meld simultaneously in worst case constant time. As a simple consequence of our construction we get a new implementation of meldable double ended priority queues, wic is a data type tat allows bot FindMin/FindMax and DeleteMin/DeleteMax [1, 4]. For eac queue we just ave to maintain two eap ordered trees as described in section 1. One tree ordered wit respect to minimum and te oter wit respect to maximum. If we let bot trees contain all elements and te elements know teir positions in bot trees we get te following corollary. orollary 2 An implementation of meldable double ended priority queues exists tat supports MakeQueue, FindMin, FindMax, Insert and Meld in worst case time O(1) and DeleteMin, DeleteMax, Delete, DecreaseKey and IncreaseKey in worst case time O(log n). 10

13 References [1] M. D. Atkinson, J.-R. Sack, N. Santoro, and T. Strototte. Minmax eaps and generalized priority queues. ommunications of te AM, 29(10):996{1000, [2] Svante arlsson and J. Ian Munro. An implicit binomial queue wit constant insertion time. In Proc. 1st Scandinavian Worksop on Algoritm Teory (SWAT), volume 318 of Lecture Notes in omputer Science, pages 1{13. Springer Verlag, Berlin, [3] Paul F. Dietz and Rajeev Raman. A constant update time nger searc tree. In Advances in omputing and Information - II '90, volume 468 of Lecture Notes in omputer Science, pages 100{109. Springer Verlag, Berlin, [4] Yuzeng Ding and Mark Allen Weiss. Te relaxed min-max eap. ATA Informatica, 30:215{231, [5] James R. Driscoll, Harold N. Gabow, Rut Srairman, and Robert E. Tarjan. Relaxed eaps: An alternative to bonacci eaps wit applications to parallel computation. ommunications of te AM, 31(11):1343{1354, [6] Micael J. Fiscer and Micael S. Paterson. Fisspear: A priority queue algoritm. Journal of te AM, 41(1):3{30, [7] Micael L. Fredman, Robert Sedgewick, Daniel D. Sleator, and Robert E. Tarjan. Te pairing eap: A new form of self{adjusting eap. Algoritmica, 1:111{129, [8] Micael L. Fredman and Robert Endre Tarjan. Fibonacci eaps and teir uses in improved network optimization algoritms. In Proc. 25rd Ann. Symp. on Foundations of omputer Science (FOS), pages 338{346, [9] Leo J. Guibas, Edward M. Mcreigt, Micael F. Plass, and Janet R. Roberts. A new representation for linear lists. In Proc. 9tAnn. AM Symp. on Teory of omputing (STO), pages 49{60,

14 [10] Peter Hyer. A general tecnique for implementation of ecient priority queues. Tecnical Report IMADA-94-33, Odense University, [11] Robert Endre Tarjan. Amortized computational complexity. SIAM Journal on Algebraic and Discrete Metods, 6:306{318, [12] Jean Vuillemin. A data structure for manipulating priority queues. ommunications of te AM, 21(4):309{315, [13] J. W. J. Williams. Algoritm 232: Heapsort. ommunications of te AM, 7(6):347{348,

15 Recent Publications in te BRIS Report Series RS Gert Stølting Brodal. Fast Meldable Priority Queues. February pp. RS Alberto Apostolico and Dany Breslauer. An Optimal O(log log n) Time Parallel Algoritm for Detecting all Squares in a String. February pp. To appear in SIAM Journal on omputing. RS Dany Breslauer and Devdatt P. Dubasi. Transforming omparison Model Lower Bounds to te Parallel-Random- Access-Macine. February pp. RS-95-9 RS-95-8 RS-95-7 RS-95-6 RS-95-5 RS-95-4 RS-95-3 RS-95-2 RS-95-1 Lars R. Knudsen. Partial and Higer Order Differentials and Applications to te DES. February pp. Ole I. Hougaard, Micael I. Scwartzbac, and Hosein Askari. Type Inference of Turbo Pascal. February pp. David A. Basin and Nils Klarlund. Hardware Verification using Monadic Second-Order Logic. January pp. Igor Walukiewicz. A omplete Deductive System for te -alculus. January pp. Luca Aceto and Anna Ingólfsdóttir. A omplete Equational Axiomatization for Prefix Iteration wit Silent Steps. January pp. Mogens Nielsen and Glynn Winskel. Petri Nets and Bisimulations. January pp. To appear in TS. Anna Ingólfsdóttir. A Semantic Teory for Value Passing Processes, Late Approac, Part I: A Denotational Model and Its omplete Axiomatization. January pp. François Laroussinie, Kim G. Larsen, and arsten Weise. From Timed Automata to Logic - and Back. January pp. Gudmund Skovbjerg Frandsen, Tore Husfeldt, Peter Bro Miltersen, Teis Raue, and Søren Skyum. Dynamic Algoritms for te Dyck Languages. January pp.

Priority Queues. Meld(Q 1,Q 2 ) merge two sets

Priority Queues. Meld(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 information

On the other hand, the main disadvantage of the amortized approach is that it cannot be applied in real-time programs, where the worst-case bound on t

On the other hand, the main disadvantage of the amortized approach is that it cannot be applied in real-time programs, where the worst-case bound on t Randomized Meldable Priority Queues Anna Gambin and Adam Malinowski Instytut Informatyki, Uniwersytet Warszawski, Banacha 2, Warszawa 02-097, Poland, faniag,amalg@mimuw.edu.pl Abstract. We present a practical

More information

Finger Search Trees with Constant. Insertion Time. Gerth Stlting Brodal. Max-Planck-Institut fur Informatik. Im Stadtwald. D Saarbrucken

Finger Search Trees with Constant. Insertion Time. Gerth Stlting Brodal. Max-Planck-Institut fur Informatik. Im Stadtwald. D Saarbrucken Finger Search Trees with Constant Insertion Time Gerth Stlting Brodal Max-Planck-Institut fur Informatik Im Stadtwald D-66123 Saarbrucken Germany Email: brodal@mpi-sb.mpg.de September 26, 1997 Abstract

More information

Bounding Tree Cover Number and Positive Semidefinite Zero Forcing Number

Bounding Tree Cover Number and Positive Semidefinite Zero Forcing Number Bounding Tree Cover Number and Positive Semidefinite Zero Forcing Number Sofia Burille Mentor: Micael Natanson September 15, 2014 Abstract Given a grap, G, wit a set of vertices, v, and edges, various

More information

3.6 Directional Derivatives and the Gradient Vector

3.6 Directional Derivatives and the Gradient Vector 288 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES 3.6 Directional Derivatives and te Gradient Vector 3.6.1 Functions of two Variables Directional Derivatives Let us first quickly review, one more time, te

More information

Finger Search Trees with Constant Insertion Time. Gerth Stlting Brodal. Max-Planck-Institut fur Informatik. Im Stadtwald, D Saarbrucken, Germany

Finger Search Trees with Constant Insertion Time. Gerth Stlting Brodal. Max-Planck-Institut fur Informatik. Im Stadtwald, D Saarbrucken, Germany Finger Search Trees with Constant Insertion Time Gerth Stlting Brodal Max-Planck-Institut fur Informatik Im Stadtwald, D-66123 Saarbrucken, Germany Abstract We consider the problem of implementing nger

More information

CSE 332: Data Structures & Parallelism Lecture 8: AVL Trees. Ruth Anderson Winter 2019

CSE 332: Data Structures & Parallelism Lecture 8: AVL Trees. Ruth Anderson Winter 2019 CSE 2: Data Structures & Parallelism Lecture 8: AVL Trees Rut Anderson Winter 29 Today Dictionaries AVL Trees /25/29 2 Te AVL Balance Condition: Left and rigt subtrees of every node ave eigts differing

More information

CE 221 Data Structures and Algorithms

CE 221 Data Structures and Algorithms CE Data Structures and Algoritms Capter 4: Trees (AVL Trees) Text: Read Weiss, 4.4 Izmir University of Economics AVL Trees An AVL (Adelson-Velskii and Landis) tree is a binary searc tree wit a balance

More information

Section 2.3: Calculating Limits using the Limit Laws

Section 2.3: Calculating Limits using the Limit Laws Section 2.3: Calculating Limits using te Limit Laws In previous sections, we used graps and numerics to approimate te value of a it if it eists. Te problem wit tis owever is tat it does not always give

More information

CS 234. Module 6. October 16, CS 234 Module 6 ADT Dictionary 1 / 33

CS 234. Module 6. October 16, CS 234 Module 6 ADT Dictionary 1 / 33 CS 234 Module 6 October 16, 2018 CS 234 Module 6 ADT Dictionary 1 / 33 Idea for an ADT Te ADT Dictionary stores pairs (key, element), were keys are distinct and elements can be any data. Notes: Tis is

More information

Multi-Stack Boundary Labeling Problems

Multi-Stack Boundary Labeling Problems Multi-Stack Boundary Labeling Problems Micael A. Bekos 1, Micael Kaufmann 2, Katerina Potika 1 Antonios Symvonis 1 1 National Tecnical University of Atens, Scool of Applied Matematical & Pysical Sciences,

More information

Lecture 7. Binary Search Trees / AVL Trees

Lecture 7. Binary Search Trees / AVL Trees Lecture 7. Binary Searc Trees / AVL Trees T. H. Cormen, C. E. Leiserson and R. L. Rivest Introduction to Algoritms, 3rd Edition, MIT Press, 2009 Sungkyunkwan University Hyunseung Coo coo@skku.edu Copyrigt

More information

Announcements. Lilian s office hours rescheduled: Fri 2-4pm HW2 out tomorrow, due Thursday, 7/7. CSE373: Data Structures & Algorithms

Announcements. Lilian s office hours rescheduled: Fri 2-4pm HW2 out tomorrow, due Thursday, 7/7. CSE373: Data Structures & Algorithms Announcements Lilian s office ours resceduled: Fri 2-4pm HW2 out tomorrow, due Tursday, 7/7 CSE373: Data Structures & Algoritms Deletion in BST 2 5 5 2 9 20 7 0 7 30 Wy migt deletion be arder tan insertion?

More information

Dynamic Maintenance of Majority Information in Constant Time per Update

Dynamic Maintenance of Majority Information in Constant Time per Update RIS RS-95-45 Frandsen & Skyum: ynamic Maintenance of Majority Information RIS asic Research in omputer Science ynamic Maintenance of Majority Information in onstant Time per pdate Gudmund Skovbjerg Frandsen

More information

arxiv: v1 [cs.ds] 1 May 2015

arxiv: v1 [cs.ds] 1 May 2015 Strictly Implicit Priority Queues: On the Number of Moves and Worst-Case Time Gerth Stølting Brodal, Jesper Sindahl Nielsen, and Jakob Truelsen arxiv:1505.00147v1 [cs.ds] 1 May 2015 MADALGO, Department

More information

arxiv: v2 [cs.ds] 9 Apr 2009

arxiv: v2 [cs.ds] 9 Apr 2009 Pairing Heaps with Costless Meld arxiv:09034130v2 [csds] 9 Apr 2009 Amr Elmasry Max-Planck Institut für Informatik Saarbrücken, Germany elmasry@mpi-infmpgde Abstract Improving the structure and analysis

More information

BRICS. Worst Case Efficient Data Structures. Basic Research in Computer Science BRICS DS-97-1 G. S. Brodal: Worst Case Efficient Data Structures

BRICS. Worst Case Efficient Data Structures. Basic Research in Computer Science BRICS DS-97-1 G. S. Brodal: Worst Case Efficient Data Structures BRICS Basic Research in Computer Science BRICS DS-97-1 G. S. Brodal: Worst Case Efficient Data Structures Worst Case Efficient Data Structures Gerth Stølting Brodal BRICS Dissertation Series DS-97-1 ISSN

More information

CS 234. Module 6. October 25, CS 234 Module 6 ADT Dictionary 1 / 22

CS 234. Module 6. October 25, CS 234 Module 6 ADT Dictionary 1 / 22 CS 234 Module 6 October 25, 2016 CS 234 Module 6 ADT Dictionary 1 / 22 Case study Problem: Find a way to store student records for a course, wit unique IDs for eac student, were records can be accessed,

More information

Binary Search Tree - Best Time. AVL Trees. Binary Search Tree - Worst Time. Balanced and unbalanced BST

Binary Search Tree - Best Time. AVL Trees. Binary Search Tree - Worst Time. Balanced and unbalanced BST AL Trees CSE Data Structures Unit Reading: Section 4.4 Binary Searc Tree - Best Time All BST operations are O(d), were d is tree dept minimum d is d = log for a binary tree N wit N nodes at is te best

More information

Type Inference of Turbo Pascal

Type Inference of Turbo Pascal BRICS RS-95-8 Hougaard et al.: Type Inference of Turbo Pascal BRICS Basic Research in Computer Science Type Inference of Turbo Pascal Ole I. Hougaard Michael I. Schwartzbach Hosein Askari BRICS Report

More information

2 The Derivative. 2.0 Introduction to Derivatives. Slopes of Tangent Lines: Graphically

2 The Derivative. 2.0 Introduction to Derivatives. Slopes of Tangent Lines: Graphically 2 Te Derivative Te two previous capters ave laid te foundation for te study of calculus. Tey provided a review of some material you will need and started to empasize te various ways we will view and use

More information

1.4 RATIONAL EXPRESSIONS

1.4 RATIONAL EXPRESSIONS 6 CHAPTER Fundamentals.4 RATIONAL EXPRESSIONS Te Domain of an Algebraic Epression Simplifying Rational Epressions Multiplying and Dividing Rational Epressions Adding and Subtracting Rational Epressions

More information

Announcements SORTING. Prelim 1. Announcements. A3 Comments 9/26/17. This semester s event is on Saturday, November 4 Apply to be a teacher!

Announcements SORTING. Prelim 1. Announcements. A3 Comments 9/26/17. This semester s event is on Saturday, November 4 Apply to be a teacher! Announcements 2 "Organizing is wat you do efore you do someting, so tat wen you do it, it is not all mixed up." ~ A. A. Milne SORTING Lecture 11 CS2110 Fall 2017 is a program wit a teac anyting, learn

More information

Are Fibonacci Heaps Optimal? Diab Abuaiadh and Jeffrey H. Kingston ABSTRACT

Are Fibonacci Heaps Optimal? Diab Abuaiadh and Jeffrey H. Kingston ABSTRACT Are Fibonacci Heaps Optimal? Diab Abuaiadh and Jeffrey H. Kingston ABSTRACT In this paper we investigate the inherent complexity of the priority queue abstract data type. We show that, under reasonable

More information

Haar Transform CS 430 Denbigh Starkey

Haar Transform CS 430 Denbigh Starkey Haar Transform CS Denbig Starkey. Background. Computing te transform. Restoring te original image from te transform 7. Producing te transform matrix 8 5. Using Haar for lossless compression 6. Using Haar

More information

4.1 Tangent Lines. y 2 y 1 = y 2 y 1

4.1 Tangent Lines. y 2 y 1 = y 2 y 1 41 Tangent Lines Introduction Recall tat te slope of a line tells us ow fast te line rises or falls Given distinct points (x 1, y 1 ) and (x 2, y 2 ), te slope of te line troug tese two points is cange

More information

Quake Heaps: A Simple Alternative to Fibonacci Heaps

Quake Heaps: A Simple Alternative to Fibonacci Heaps Quake Heaps: A Simple Alternative to Fibonacci Heaps Timothy M. Chan Cheriton School of Computer Science, University of Waterloo, Waterloo, Ontario N2L G, Canada, tmchan@uwaterloo.ca Abstract. This note

More information

Fast Calculation of Thermodynamic Properties of Water and Steam in Process Modelling using Spline Interpolation

Fast Calculation of Thermodynamic Properties of Water and Steam in Process Modelling using Spline Interpolation P R E P R N T CPWS XV Berlin, September 8, 008 Fast Calculation of Termodynamic Properties of Water and Steam in Process Modelling using Spline nterpolation Mattias Kunick a, Hans-Joacim Kretzscmar a,

More information

SORTING 9/26/18. Prelim 1. Prelim 1. Why Sorting? InsertionSort. Some Sorting Algorithms. Tonight!!!! Two Sessions:

SORTING 9/26/18. Prelim 1. Prelim 1. Why Sorting? InsertionSort. Some Sorting Algorithms. Tonight!!!! Two Sessions: Prelim 1 2 "Organizing is wat you do efore you do someting, so tat wen you do it, it is not all mixed up." ~ A. A. Milne SORTING Tonigt!!!! Two Sessions: You sould now y now wat room to tae te final. Jenna

More information

12.2 Techniques for Evaluating Limits

12.2 Techniques for Evaluating Limits 335_qd /4/5 :5 PM Page 863 Section Tecniques for Evaluating Limits 863 Tecniques for Evaluating Limits Wat ou sould learn Use te dividing out tecnique to evaluate its of functions Use te rationalizing

More information

Funnel Heap - A Cache Oblivious Priority Queue

Funnel Heap - A Cache Oblivious Priority Queue Alcom-FT Technical Report Series ALCOMFT-TR-02-136 Funnel Heap - A Cache Oblivious Priority Queue Gerth Stølting Brodal, Rolf Fagerberg Abstract The cache oblivious model of computation is a two-level

More information

Cryptanalysis of LOKI. Lars Ramkilde Knudsen. Aarhus Universitet Datalogisk Afdeling. Ny Munkegade. DK-8000 Aarhus C. Abstract

Cryptanalysis of LOKI. Lars Ramkilde Knudsen. Aarhus Universitet Datalogisk Afdeling. Ny Munkegade. DK-8000 Aarhus C. Abstract 1 Cryptanalysis of LOKI Lars Ramkilde Knudsen Aarus Universitet Datalogisk Afdeling Ny Munkegade DK-8000 Aarus C. Abstract In [BPS90] Brown, Pieprzyk and Seberry proposed a new encryption primitive, wic

More information

AVL Trees Outline and Required Reading: AVL Trees ( 11.2) CSE 2011, Winter 2017 Instructor: N. Vlajic

AVL Trees Outline and Required Reading: AVL Trees ( 11.2) CSE 2011, Winter 2017 Instructor: N. Vlajic 1 AVL Trees Outline and Required Reading: AVL Trees ( 11.2) CSE 2011, Winter 2017 Instructor: N. Vlajic AVL Trees 2 Binary Searc Trees better tan linear dictionaries; owever, te worst case performance

More information

15-122: Principles of Imperative Computation, Summer 2011 Assignment 6: Trees and Secret Codes

15-122: Principles of Imperative Computation, Summer 2011 Assignment 6: Trees and Secret Codes 15-122: Principles of Imperative Computation, Summer 2011 Assignment 6: Trees and Secret Codes William Lovas (wlovas@cs) Karl Naden Out: Tuesday, Friday, June 10, 2011 Due: Monday, June 13, 2011 (Written

More information

Data Structures and Programming Spring 2014, Midterm Exam.

Data Structures and Programming Spring 2014, Midterm Exam. Data Structures and Programming Spring 2014, Midterm Exam. 1. (10 pts) Order te following functions 2.2 n, log(n 10 ), 2 2012, 25n log(n), 1.1 n, 2n 5.5, 4 log(n), 2 10, n 1.02, 5n 5, 76n, 8n 5 + 5n 2

More information

CHAPTER 7: TRANSCENDENTAL FUNCTIONS

CHAPTER 7: TRANSCENDENTAL FUNCTIONS 7.0 Introduction and One to one Functions Contemporary Calculus 1 CHAPTER 7: TRANSCENDENTAL FUNCTIONS Introduction In te previous capters we saw ow to calculate and use te derivatives and integrals of

More information

More on Functions and Their Graphs

More on Functions and Their Graphs More on Functions and Teir Graps Difference Quotient ( + ) ( ) f a f a is known as te difference quotient and is used exclusively wit functions. Te objective to keep in mind is to factor te appearing in

More information

CS211 Spring 2004 Lecture 06 Loops and their invariants. Software engineering reason for using loop invariants

CS211 Spring 2004 Lecture 06 Loops and their invariants. Software engineering reason for using loop invariants CS211 Spring 2004 Lecture 06 Loops and teir invariants Reading material: Tese notes. Weiss: Noting on invariants. ProgramLive: Capter 7 and 8 O! Tou ast damnale iteration and art, indeed, ale to corrupt

More information

Numerical Derivatives

Numerical Derivatives Lab 15 Numerical Derivatives Lab Objective: Understand and implement finite difference approximations of te derivative in single and multiple dimensions. Evaluate te accuracy of tese approximations. Ten

More information

Rank-Pairing Heaps. Bernard Haeupler Siddhartha Sen Robert E. Tarjan. SIAM JOURNAL ON COMPUTING Vol. 40, No. 6 (2011), pp.

Rank-Pairing Heaps. Bernard Haeupler Siddhartha Sen Robert E. Tarjan. SIAM JOURNAL ON COMPUTING Vol. 40, No. 6 (2011), pp. Rank-Pairing Heaps Bernard Haeupler Siddhartha Sen Robert E. Tarjan Presentation by Alexander Pokluda Cheriton School of Computer Science, University of Waterloo, Canada SIAM JOURNAL ON COMPUTING Vol.

More information

Wrap up Amortized Analysis; AVL Trees. Riley Porter Winter CSE373: Data Structures & Algorithms

Wrap up Amortized Analysis; AVL Trees. Riley Porter Winter CSE373: Data Structures & Algorithms CSE 373: Data Structures & Wrap up Amortized Analysis; AVL Trees Riley Porter Course Logistics Symposium offered by CSE department today HW2 released, Big- O, Heaps (lecture slides ave pseudocode tat will

More information

Cpt S 223 Fall Cpt S 223. School of EECS, WSU

Cpt S 223 Fall Cpt S 223. School of EECS, WSU Course Review Cpt S 223 Fall 2012 1 Final Exam When: Monday (December 10) 8 10 AM Where: in class (Sloan 150) Closed book, closed notes Comprehensive Material for preparation: Lecture slides & class notes

More information

13.5 DIRECTIONAL DERIVATIVES and the GRADIENT VECTOR

13.5 DIRECTIONAL DERIVATIVES and the GRADIENT VECTOR 13.5 Directional Derivatives and te Gradient Vector Contemporary Calculus 1 13.5 DIRECTIONAL DERIVATIVES and te GRADIENT VECTOR Directional Derivatives In Section 13.3 te partial derivatives f x and f

More information

4.2 The Derivative. f(x + h) f(x) lim

4.2 The Derivative. f(x + h) f(x) lim 4.2 Te Derivative Introduction In te previous section, it was sown tat if a function f as a nonvertical tangent line at a point (x, f(x)), ten its slope is given by te it f(x + ) f(x). (*) Tis is potentially

More information

Design Patterns for Data Structures. Chapter 10. Balanced Trees

Design Patterns for Data Structures. Chapter 10. Balanced Trees Capter 10 Balanced Trees Capter 10 Four eigt-balanced trees: Red-Black binary tree Faster tan AVL for insertion and removal Adelsen-Velskii Landis (AVL) binary tree Faster tan red-black for lookup B-tree

More information

Hash-Based Indexes. Chapter 11. Comp 521 Files and Databases Spring

Hash-Based Indexes. Chapter 11. Comp 521 Files and Databases Spring Has-Based Indexes Capter 11 Comp 521 Files and Databases Spring 2010 1 Introduction As for any index, 3 alternatives for data entries k*: Data record wit key value k

More information

Symmetric Tree Replication Protocol for Efficient Distributed Storage System*

Symmetric Tree Replication Protocol for Efficient Distributed Storage System* ymmetric Tree Replication Protocol for Efficient Distributed torage ystem* ung Cune Coi 1, Hee Yong Youn 1, and Joong up Coi 2 1 cool of Information and Communications Engineering ungkyunkwan University

More information

Sorting and Searching

Sorting and Searching Sorting and Searching Lecture 2: Priority Queues, Heaps, and Heapsort Lecture 2: Priority Queues, Heaps, and Heapsort Sorting and Searching 1 / 24 Priority Queue: Motivating Example 3 jobs have been submitted

More information

Coarticulation: An Approach for Generating Concurrent Plans in Markov Decision Processes

Coarticulation: An Approach for Generating Concurrent Plans in Markov Decision Processes Coarticulation: An Approac for Generating Concurrent Plans in Markov Decision Processes Kasayar Roanimanes kas@cs.umass.edu Sridar Maadevan maadeva@cs.umass.edu Department of Computer Science, University

More information

Course Review. Cpt S 223 Fall 2010

Course Review. Cpt S 223 Fall 2010 Course Review Cpt S 223 Fall 2010 1 Final Exam When: Thursday (12/16) 8-10am Where: in class Closed book, closed notes Comprehensive Material for preparation: Lecture slides & class notes Homeworks & program

More information

Packet Switching Networks. Jonathan S. Turner. Computer and Communications Research Center. the result of user connections that pass through the

Packet Switching Networks. Jonathan S. Turner. Computer and Communications Research Center. the result of user connections that pass through the Fluid Flow Loading Analysis of Packet Switcing Networks Jonatan S. Turner Computer and Communications Researc Center Wasington University, St. Louis, MO 63130 Abstract Recent researc in switcing as concentrated

More information

19.2 Surface Area of Prisms and Cylinders

19.2 Surface Area of Prisms and Cylinders Name Class Date 19 Surface Area of Prisms and Cylinders Essential Question: How can you find te surface area of a prism or cylinder? Resource Locker Explore Developing a Surface Area Formula Surface area

More information

12.2 TECHNIQUES FOR EVALUATING LIMITS

12.2 TECHNIQUES FOR EVALUATING LIMITS Section Tecniques for Evaluating Limits 86 TECHNIQUES FOR EVALUATING LIMITS Wat ou sould learn Use te dividing out tecnique to evaluate its of functions Use te rationalizing tecnique to evaluate its of

More information

Priority Queues Heaps Heapsort

Priority Queues Heaps Heapsort Priority Queues Heaps Heapsort After this lesson, you should be able to apply the binary heap insertion and deletion algorithms by hand implement the binary heap insertion and deletion algorithms explain

More information

A Cost Model for Distributed Shared Memory. Using Competitive Update. Jai-Hoon Kim Nitin H. Vaidya. Department of Computer Science

A Cost Model for Distributed Shared Memory. Using Competitive Update. Jai-Hoon Kim Nitin H. Vaidya. Department of Computer Science A Cost Model for Distributed Sared Memory Using Competitive Update Jai-Hoon Kim Nitin H. Vaidya Department of Computer Science Texas A&M University College Station, Texas, 77843-3112, USA E-mail: fjkim,vaidyag@cs.tamu.edu

More information

Towards ultimate binary heaps

Towards ultimate binary heaps Towards ultimate binary heaps Amr Elmasry 1 Jyrki Katajainen 2 1 Computer and Systems Engineering Department, Alexandria University Alexandria 21544, Egypt 2 Department of Computer Science, University

More information

Hash-Based Indexes. Chapter 11. Comp 521 Files and Databases Fall

Hash-Based Indexes. Chapter 11. Comp 521 Files and Databases Fall Has-Based Indexes Capter 11 Comp 521 Files and Databases Fall 2012 1 Introduction Hasing maps a searc key directly to te pid of te containing page/page-overflow cain Doesn t require intermediate page fetces

More information

Sorting and Searching

Sorting and Searching Sorting and Searching Lecture 2: Priority Queues, Heaps, and Heapsort Lecture 2: Priority Queues, Heaps, and Heapsort Sorting and Searching 1 / 24 Priority Queue: Motivating Example 3 jobs have been submitted

More information

Three Sorting Algorithms Using Priority Queues

Three Sorting Algorithms Using Priority Queues Three Sorting Algorithms Using Priority Queues Amr Elmasry Computer Science Department Alexandria University Alexandria, Egypt. elmasry@cs.rutgers.edu Abstract. We establish a lower bound of B(n) = n log

More information

ADAPTIVE SORTING WITH AVL TREES

ADAPTIVE SORTING WITH AVL TREES ADAPTIVE SORTING WITH AVL TREES Amr Elmasry Computer Science Department Alexandria University Alexandria, Egypt elmasry@alexeng.edu.eg Abstract A new adaptive sorting algorithm is introduced. The new implementation

More information

Algorithms for Minimum Spanning Trees

Algorithms for Minimum Spanning Trees Algorithms & Models of Computation CS/ECE, Fall Algorithms for Minimum Spanning Trees Lecture Thursday, November, Part I Algorithms for Minimum Spanning Tree Sariel Har-Peled (UIUC) CS Fall / 6 Sariel

More information

Design Patterns for Data Structures. Chapter 10. Balanced Trees

Design Patterns for Data Structures. Chapter 10. Balanced Trees Capter 10 Balanced Trees Capter 10 Four eigt-balanced trees: Red-Black binary tree Faster tan AVL for insertion and removal Adelsen-Velskii Landis (AVL) binary tree Faster tan red-black for lookup B-tree

More information

Mean Waiting Time Analysis in Finite Storage Queues for Wireless Cellular Networks

Mean Waiting Time Analysis in Finite Storage Queues for Wireless Cellular Networks Mean Waiting Time Analysis in Finite Storage ueues for Wireless ellular Networks J. YLARINOS, S. LOUVROS, K. IOANNOU, A. IOANNOU 3 A.GARMIS 2 and S.KOTSOOULOS Wireless Telecommunication Laboratory, Department

More information

1 Copyright 2012 by Pearson Education, Inc. All Rights Reserved.

1 Copyright 2012 by Pearson Education, Inc. All Rights Reserved. CHAPTER 20 AVL Trees Objectives To know wat an AVL tree is ( 20.1). To understand ow to rebalance a tree using te LL rotation, LR rotation, RR rotation, and RL rotation ( 20.2). To know ow to design te

More information

Two Modifications of Weight Calculation of the Non-Local Means Denoising Method

Two Modifications of Weight Calculation of the Non-Local Means Denoising Method Engineering, 2013, 5, 522-526 ttp://dx.doi.org/10.4236/eng.2013.510b107 Publised Online October 2013 (ttp://www.scirp.org/journal/eng) Two Modifications of Weigt Calculation of te Non-Local Means Denoising

More information

Chapter 6 Heaps. Introduction. Heap Model. Heap Implementation

Chapter 6 Heaps. Introduction. Heap Model. Heap Implementation Introduction Chapter 6 Heaps some systems applications require that items be processed in specialized ways printing may not be best to place on a queue some jobs may be more small 1-page jobs should be

More information

An Anchor Chain Scheme for IP Mobility Management

An Anchor Chain Scheme for IP Mobility Management An Ancor Cain Sceme for IP Mobility Management Yigal Bejerano and Israel Cidon Department of Electrical Engineering Tecnion - Israel Institute of Tecnology Haifa 32000, Israel E-mail: bej@tx.tecnion.ac.il.

More information

International Journal of Advanced Research in Computer Science and Software Engineering

International Journal of Advanced Research in Computer Science and Software Engineering Volume 2, Issue 9, September 2012 ISSN: 2277 128X International Journal of Advanced Researc in Computer Science and Software Engineering Researc Paper Available online at: www.ijarcsse.com Performance

More information

Algorithms and Data Structures. (c) Marcin Sydow. Priority Queue. Example Applications. Extensions of. Priority Queue. Binomial Heap.

Algorithms and Data Structures. (c) Marcin Sydow. Priority Queue. Example Applications. Extensions of. Priority Queue. Binomial Heap. Topics covered by this lecture: Naive Implementations Binary Sort and other examples Extended s (*) Denition (PQ) is an abstract data structure supporting the following operations: insert(t e) // add to

More information

Lecture 7 March 5, 2007

Lecture 7 March 5, 2007 6.851: Advanced Data Structures Spring 2007 Prof. Erik Demaine Lecture 7 March 5, 2007 Scribes: Aston Motes and Kevin Wang 1 Overview In previous lectures, we ve discussed data structures that efficiently

More information

Piecewise Polynomial Interpolation, cont d

Piecewise Polynomial Interpolation, cont d Jim Lambers MAT 460/560 Fall Semester 2009-0 Lecture 2 Notes Tese notes correspond to Section 4 in te text Piecewise Polynomial Interpolation, cont d Constructing Cubic Splines, cont d Having determined

More information

FIBONACCI HEAPS. preliminaries insert extract the minimum decrease key bounding the rank meld and delete. Lecture slides by Kevin Wayne

FIBONACCI HEAPS. preliminaries insert extract the minimum decrease key bounding the rank meld and delete. Lecture slides by Kevin Wayne FIBONACCI HEAPS preliminaries insert extract the minimum decrease key bounding the rank meld and delete Lecture slides by Kevin Wayne http://www.cs.princeton.edu/~wayne/kleinberg-tardos Last updated on

More information

CS711008Z Algorithm Design and Analysis

CS711008Z Algorithm Design and Analysis CS700Z Algorithm Design and Analysis Lecture 7 Binary heap, binomial heap, and Fibonacci heap Dongbo Bu Institute of Computing Technology Chinese Academy of Sciences, Beijing, China 1 / Outline Introduction

More information

CS711008Z Algorithm Design and Analysis

CS711008Z Algorithm Design and Analysis CS711008Z Algorithm Design and Analysis Lecture 7. Binary heap, binomial heap, and Fibonacci heap Dongbo Bu Institute of Computing Technology Chinese Academy of Sciences, Beijing, China 1 / 108 Outline

More information

Introduction to Computer Graphics 5. Clipping

Introduction to Computer Graphics 5. Clipping Introduction to Computer Grapics 5. Clipping I-Cen Lin, Assistant Professor National Ciao Tung Univ., Taiwan Textbook: E.Angel, Interactive Computer Grapics, 5 t Ed., Addison Wesley Ref:Hearn and Baker,

More information

Priority Queues Heaps Heapsort

Priority Queues Heaps Heapsort Priority Queues Heaps Heapsort Complete the Doublets partner(s) evaluation by tonight. Use your individual log to give them useful feedback! Like 230 and have workstudy funding? We are looking for CSSE230

More information

Lecture 19 April 15, 2010

Lecture 19 April 15, 2010 6.851: Advanced Data Structures Spring 2010 Prof. Erik Demaine Lecture 19 April 15, 2010 1 Overview This lecture is an interlude on time travel in data structures. We ll consider two kinds of time-travel

More information

Two-Level Iterative Queuing Modeling of Software Contention

Two-Level Iterative Queuing Modeling of Software Contention Two-Level Iterative Queuing Modeling of Software Contention Daniel A. Menascé Dept. of Computer Science George Mason University www.cs.gmu.edu/faculty/menasce.tml 2002 D. Menascé. All Rigts Reserved. 1

More information

Comparison of the Efficiency of the Various Algorithms in Stratified Sampling when the Initial Solutions are Determined with Geometric Method

Comparison of the Efficiency of the Various Algorithms in Stratified Sampling when the Initial Solutions are Determined with Geometric Method International Journal of Statistics and Applications 0, (): -0 DOI: 0.9/j.statistics.000.0 Comparison of te Efficiency of te Various Algoritms in Stratified Sampling wen te Initial Solutions are Determined

More information

Two new methods for constructing double-ended priority queues from priority queues

Two new methods for constructing double-ended priority queues from priority queues Computing (2008) 83:193 204 DOI 10.1007/s00607-008-0019-2 Two new methods for constructing double-ended priority queues from priority queues Amr Elmasry Claus Jensen Jyrki Katajainen Received: 10 August

More information

THE POSSIBILITY OF ESTIMATING THE VOLUME OF A SQUARE FRUSTRUM USING THE KNOWN VOLUME OF A CONICAL FRUSTRUM

THE POSSIBILITY OF ESTIMATING THE VOLUME OF A SQUARE FRUSTRUM USING THE KNOWN VOLUME OF A CONICAL FRUSTRUM THE POSSIBILITY OF ESTIMATING THE VOLUME OF A SQUARE FRUSTRUM USING THE KNOWN VOLUME OF A CONICAL FRUSTRUM SAMUEL OLU OLAGUNJU Adeyemi College of Education NIGERIA Email: lagsam04@aceondo.edu.ng ABSTRACT

More information

Fault Localization Using Tarantula

Fault Localization Using Tarantula Class 20 Fault localization (cont d) Test-data generation Exam review: Nov 3, after class to :30 Responsible for all material up troug Nov 3 (troug test-data generation) Send questions beforeand so all

More information

Redundancy Awareness in SQL Queries

Redundancy Awareness in SQL Queries Redundancy Awareness in QL Queries Bin ao and Antonio Badia omputer Engineering and omputer cience Department University of Louisville bin.cao,abadia @louisville.edu Abstract In tis paper, we study QL

More information

CHAPTER The elevation can be determined as. The partial derivatives can be evaluated,

CHAPTER The elevation can be determined as. The partial derivatives can be evaluated, 1 CHAPTER 14 14.1 Te elevation can be determined as (.8,1. (.81. 1.5(1. 1.5(.8 Te partial derivatives can be evaluated,.5 (1..5(.8.4 1.5 4 (.8 1.5 4(1. 1.7 (1. 5 5.4 wic can be used to determine te gradient

More information

CSE 548: Analysis of Algorithms. Lectures 14 & 15 ( Dijkstra s SSSP & Fibonacci Heaps )

CSE 548: Analysis of Algorithms. Lectures 14 & 15 ( Dijkstra s SSSP & Fibonacci Heaps ) CSE 548: Analysis of Algorithms Lectures 14 & 15 ( Dijkstra s SSSP & Fibonacci Heaps ) Rezaul A. Chowdhury Department of Computer Science SUNY Stony Brook Fall 2012 Fibonacci Heaps ( Fredman & Tarjan,

More information

Implementation of Integral based Digital Curvature Estimators in DGtal

Implementation of Integral based Digital Curvature Estimators in DGtal Implementation of Integral based Digital Curvature Estimators in DGtal David Coeurjolly 1, Jacques-Olivier Lacaud 2, Jérémy Levallois 1,2 1 Université de Lyon, CNRS INSA-Lyon, LIRIS, UMR5205, F-69621,

More information

Unsupervised Learning for Hierarchical Clustering Using Statistical Information

Unsupervised Learning for Hierarchical Clustering Using Statistical Information Unsupervised Learning for Hierarcical Clustering Using Statistical Information Masaru Okamoto, Nan Bu, and Tosio Tsuji Department of Artificial Complex System Engineering Hirosima University Kagamiyama

More information

Heap Model. specialized queue required heap (priority queue) provides at least

Heap Model. specialized queue required heap (priority queue) provides at least Chapter 6 Heaps 2 Introduction some systems applications require that items be processed in specialized ways printing may not be best to place on a queue some jobs may be more small 1-page jobs should

More information

Linear Interpolating Splines

Linear Interpolating Splines Jim Lambers MAT 772 Fall Semester 2010-11 Lecture 17 Notes Tese notes correspond to Sections 112, 11, and 114 in te text Linear Interpolating Splines We ave seen tat ig-degree polynomial interpolation

More information

Course Review for Finals. Cpt S 223 Fall 2008

Course Review for Finals. Cpt S 223 Fall 2008 Course Review for Finals Cpt S 223 Fall 2008 1 Course Overview Introduction to advanced data structures Algorithmic asymptotic analysis Programming data structures Program design based on performance i.e.,

More information

Materials: Whiteboard, TI-Nspire classroom set, quadratic tangents program, and a computer projector.

Materials: Whiteboard, TI-Nspire classroom set, quadratic tangents program, and a computer projector. Adam Clinc Lesson: Deriving te Derivative Grade Level: 12 t grade, Calculus I class Materials: Witeboard, TI-Nspire classroom set, quadratic tangents program, and a computer projector. Goals/Objectives:

More information

l Heaps very popular abstract data structure, where each object has a key value (the priority), and the operations are:

l Heaps very popular abstract data structure, where each object has a key value (the priority), and the operations are: DDS-Heaps 1 Heaps - basics l Heaps very popular abstract data structure, where each object has a key value (the priority), and the operations are: l insert an object, find the object of minimum key (find

More information

Heap-on-Top Priority Queues. March Abstract. We introduce the heap-on-top (hot) priority queue data structure that combines the

Heap-on-Top Priority Queues. March Abstract. We introduce the heap-on-top (hot) priority queue data structure that combines the Heap-on-Top Priority Queues Boris V. Cherkassky Central Economics and Mathematics Institute Krasikova St. 32 117418, Moscow, Russia cher@cemi.msk.su Andrew V. Goldberg NEC Research Institute 4 Independence

More information

Course Review. Cpt S 223 Fall 2009

Course Review. Cpt S 223 Fall 2009 Course Review Cpt S 223 Fall 2009 1 Final Exam When: Tuesday (12/15) 8-10am Where: in class Closed book, closed notes Comprehensive Material for preparation: Lecture slides & class notes Homeworks & program

More information

Notes: Dimensional Analysis / Conversions

Notes: Dimensional Analysis / Conversions Wat is a unit system? A unit system is a metod of taking a measurement. Simple as tat. We ave units for distance, time, temperature, pressure, energy, mass, and many more. Wy is it important to ave a standard?

More information

TREES. General Binary Trees The Search Tree ADT Binary Search Trees AVL Trees Threaded trees Splay Trees B-Trees. UNIT -II

TREES. General Binary Trees The Search Tree ADT Binary Search Trees AVL Trees Threaded trees Splay Trees B-Trees. UNIT -II UNIT -II TREES General Binary Trees Te Searc Tree DT Binary Searc Trees VL Trees Treaded trees Splay Trees B-Trees. 2MRKS Q& 1. Define Tree tree is a data structure, wic represents ierarcical relationsip

More information

Hollow Heaps. Aarhus University, Denmark. Tel Aviv University, Israel. Princeton University, USA. July 7, 2015

Hollow Heaps. Aarhus University, Denmark. Tel Aviv University, Israel. Princeton University, USA. July 7, 2015 Hollow Heaps Thomas Dueholm Hansen 1 Haim Kaplan 2 Robert E. Tarjan 3 Uri Zwick 2 1 Department of Computer Science, Aarhus University, Denmark. 2 School of Computer Science, Tel Aviv University, Israel.

More information

each node in the tree, the difference in height of its two subtrees is at the most p. AVL tree is a BST that is height-balanced-1-tree.

each node in the tree, the difference in height of its two subtrees is at the most p. AVL tree is a BST that is height-balanced-1-tree. Data Structures CSC212 1 AVL Trees A binary tree is a eigt-balanced-p-tree if for eac node in te tree, te difference in eigt of its two subtrees is at te most p. AVL tree is a BST tat is eigt-balanced-tree.

More information

The Euler and trapezoidal stencils to solve d d x y x = f x, y x

The Euler and trapezoidal stencils to solve d d x y x = f x, y x restart; Te Euler and trapezoidal stencils to solve d d x y x = y x Te purpose of tis workseet is to derive te tree simplest numerical stencils to solve te first order d equation y x d x = y x, and study

More information

Density Estimation Over Data Stream

Density Estimation Over Data Stream Density Estimation Over Data Stream Aoying Zou Dept. of Computer Science, Fudan University 22 Handan Rd. Sangai, 2433, P.R. Cina ayzou@fudan.edu.cn Ziyuan Cai Dept. of Computer Science, Fudan University

More information