UNION FIND. naïve linking link-by-size link-by-rank path compression link-by-rank with path compression context. An Improved Equivalence Algorithm

Similar documents
UNION FIND. naïve linking link-by-size link-by-rank path compression link-by-rank with path compression context

MapReduce Optimizations and Algorithms 2015 Professor Sasu Tarkoma

Strongly Connected Components. Uses for SCC s. Two Simple SCC Algorithms. Directed Acyclic Graphs

Lecture 27: Voronoi Diagrams

Journal of World s Electrical Engineering and Technology J. World. Elect. Eng. Tech. 1(1): 12-16, 2012

Towards Adaptive Information Merging Using Selected XML Fragments

GARBAGE COLLECTION METHODS. Hanan Samet

arxiv: v4 [cs.ds] 7 Feb 2018

Embeddings into Crossed Cubes

Lecture 8 Introduction to Pipelines Adapated from slides by David Patterson

Controlled Information Maximization for SOM Knowledge Induced Learning

HISTOGRAMS are an important statistic reflecting the

FACE VECTORS OF FLAG COMPLEXES

Reachable State Spaces of Distributed Deadlock Avoidance Protocols

Lecture # 04. Image Enhancement in Spatial Domain

Communication vs Distributed Computation: an alternative trade-off curve

Image Enhancement in the Spatial Domain. Spatial Domain

DYNAMIC STORAGE ALLOCATION. Hanan Samet

Information Retrieval. CS630 Representing and Accessing Digital Information. IR Basics. User Task. Basic IR Processes

All lengths in meters. E = = 7800 kg/m 3

Undirected Depth-First Search. CSE 421 Introduction to Algorithms. Undirected Depth-First Search. Directed Depth First Search

n If S is in convex position, then thee ae exactly k convex k-gons detemined by subsets of S. In geneal, howeve, S may detemine fa fewe convex k-gons.

And Ph.D. Candidate of Computer Science, University of Putra Malaysia 2 Faculty of Computer Science and Information Technology,

A Memory Efficient Array Architecture for Real-Time Motion Estimation

IP Network Design by Modified Branch Exchange Method

Class 21. N -body Techniques, Part 4

THE THETA BLOCKCHAIN

Evaluation of Partial Path Queries on XML Data

A Two-stage and Parameter-free Binarization Method for Degraded Document Images

Obstacle Avoidance of Autonomous Mobile Robot using Stereo Vision Sensor

RANDOM IRREGULAR BLOCK-HIERARCHICAL NETWORKS: ALGORITHMS FOR COMPUTATION OF MAIN PROPERTIES

ART GALLERIES WITH INTERIOR WALLS. March 1998

Efficient Execution Path Exploration for Detecting Races in Concurrent Programs

Evaluation of Partial Path Queries on XML data

An Optimised Density Based Clustering Algorithm

On the Conversion between Binary Code and Binary-Reflected Gray Code on Boolean Cubes

Module 6 STILL IMAGE COMPRESSION STANDARDS

Detection and Recognition of Alert Traffic Signs

DUe to the recent developments of gigantic social networks

Point-Biserial Correlation Analysis of Fuzzy Attributes

a Not yet implemented in current version SPARK: Research Kit Pointer Analysis Parameters Soot Pointer analysis. Objectives

Gravitational Shift for Beginners

Two-Dimensional Coding for Advanced Recording

Efficient protection of many-to-one. communications

Shortest Paths for a Two-Robot Rendez-Vous

ADDING REALISM TO SOURCE CHARACTERIZATION USING A GENETIC ALGORITHM

An Extension to the Local Binary Patterns for Image Retrieval

A Recommender System for Online Personalization in the WUM Applications

DYNAMIC STORAGE ALLOCATION. Hanan Samet

INDEXATION OF WEB PAGES BASED ON THEIR VISUAL RENDERING

Separability and Topology Control of Quasi Unit Disk Graphs

The EigenRumor Algorithm for Ranking Blogs

Modelling, simulation, and performance analysis of a CAN FD system with SAE benchmark based message set

Slotted Random Access Protocol with Dynamic Transmission Probability Control in CDMA System

IP Multicast Simulation in OPNET

Optical Flow for Large Motion Using Gradient Technique

Spiral Recognition Methodology and Its Application for Recognition of Chinese Bank Checks

A Minutiae-based Fingerprint Matching Algorithm Using Phase Correlation

A Family of Distributed Deadlock Avoidance Protocols and their Reachable State Spaces

Pipes, connections, channels and multiplexors

ANALYTIC PERFORMANCE MODELS FOR SINGLE CLASS AND MULTIPLE CLASS MULTITHREADED SOFTWARE SERVERS

Concomitants of Upper Record Statistics for Bivariate Pseudo Weibull Distribution

Worst-Case Delay Bounds for Uniform Load-Balanced Switch Fabrics

Prioritized Traffic Recovery over GMPLS Networks

Lecture #22 Pipelining II, Cache I

DEADLOCK AVOIDANCE IN BATCH PROCESSES. M. Tittus K. Åkesson

Topic -3 Image Enhancement

Modeling a shared medium access node with QoS distinction

POMDP: Introduction to Partially Observable Markov Decision Processes Hossein Kamalzadeh, Michael Hahsler

A New and Efficient 2D Collision Detection Method Based on Contact Theory Xiaolong CHENG, Jun XIAO a, Ying WANG, Qinghai MIAO, Jian XUE

COSC 6385 Computer Architecture. - Pipelining

Dynamic Multiple Parity (DMP) Disk Array for Serial Transaction Processing

UCB CS61C : Machine Structures

arxiv: v2 [physics.soc-ph] 30 Nov 2016

An Unsupervised Segmentation Framework For Texture Image Queries

CS 2461: Computer Architecture 1 Program performance and High Performance Processors

Conversion Functions for Symmetric Key Ciphers

Monte Carlo Techniques for Rendering

The International Conference in Knowledge Management (CIKM'94), Gaithersburg, MD, November 1994.

Quality Aware Privacy Protection for Location-based Services

Intuitionistic Fuzzy Soft N-ideals

Hierarchically Clustered P2P Streaming System

Performance Optimization in Structured Wireless Sensor Networks

CS 5114: Theory of Algorithms. Sorting. Insertion Sort. Exchange Sorting. Clifford A. Shaffer. Spring 2010

The Dual Round Robin Matching Switch with Exhaustive Service

Also available at ISSN (printed edn.), ISSN (electronic edn.) ARS MATHEMATICA CONTEMPORANEA 3 (2010)

A ROI Focusing Mechanism for Digital Cameras

Any modern computer system will incorporate (at least) two levels of storage:

A Shape-preserving Affine Takagi-Sugeno Model Based on a Piecewise Constant Nonuniform Fuzzification Transform

(a, b) x y r. For this problem, is a point in the - coordinate plane and is a positive number.

Title. Author(s)NOMURA, K.; MOROOKA, S. Issue Date Doc URL. Type. Note. File Information

Data mining based automated reverse engineering and defect discovery

An Improved Resource Reservation Protocol

Generalized Grey Target Decision Method Based on Decision Makers Indifference Attribute Value Preferences

XFVHDL: A Tool for the Synthesis of Fuzzy Logic Controllers

Lecture Topics ECE 341. Lecture # 12. Control Signals. Control Signals for Datapath. Basic Processing Unit. Pipelining

Scaling Location-based Services with Dynamically Composed Location Index

IP MULTICAST. Adiseshu Hari, T. V. Lakshman and Gordon Wilfong Nokia Bell Labs

Achievable Catalog Size in Peer-to-Peer Video-on-Demand Systems

How many times is the loop executed? middle = (left+right)/2; if (value == arr[middle]) return true;

Transcription:

Disjoint-sets data type Lectue slides by Kevin Wayne Copyight 5 Peason-Addison Wesley http://www.cs.pinceton.edu/~wayne/kleinbeg-tados UNION FIND naïve linking link-by-size link-by-ank path compession link-by-ank with path compession contet Goal. Suppot thee opeations on a collection of disjoint sets. MAKE-SET(): ceate a new set containing only element. FIND(): etun a canonical element in the set containing. UNION(, y): eplace the sets containing and y with thei union. Pefomance paametes. m = numbe of calls to MAKE-SET, FIND, and UNION. n = numbe of elements = numbe of calls to MAKE-SET. Dynamic connectivity. Given an initially empty gaph G, suppot thee opeations. ADD-NODE(u): add node u. ADD-EDGE(u, v): add an edge between nodes u and v. IS-CONNECTED(u, v): is thee a path between u and v? disjoint sets = connected components MAKE-SET opeation UNION opeation FIND opeations Last updated on // : AM Disjoint-sets data type: applications Disjoint-sets data type: applications Oiginal motivation. Compiling EQUIVALENCE, DIMENSION, and COMMON statements in Fotan. An Impoved Equivalence Algoithm BERNARD A. GALLER AND MICHAEL J. FISHER Univesity of Michigan, Ann Abo, Michigan An algoithm fo assigning stoage on the basis of EQUIV- ALENCE, DIMENSION and COMMON declaations is pesented. The algoithm is based on a tee stuctue, and has educed computation time by pecent ove a peviously published algoithm by identifying all equivalence classes with one scan of the EQUIVALENCE declaations. The method is applicable in any poblem in which it is necessay to identify equivalence classes, given the element pais defining the equivalence elation. Note. This pape also intoduced key data stuctue fo poblem. Applications. Pecolation. Kuskal s algoithm. Connected components. Computing LCAs in tees. Computing dominatos in digaphs. Equivalence of finite state automata. Checking flow gaphs fo educibility. Hoshen Kopelman algoithm in physics. Hinley Milne polymophic type infeence. Mophological attibute openings and closings. Matlab s BW-LABEL function fo image pocessing. Compiling EQUIVALENCE, DIMENSION and COMMON statements in Fotan....

Disjoint-sets data stuctue UNION FIND naïve linking link-by-size link-by-ank path compession link-by-ank with path compession contet Paent-link epesentation. Repesent each set as a tee of elements. Each element has an eplicit paent pointe in the tee. The oot seves as the canonical element (and points to itself). FIND(): find the oot of the tee containing. UNION(, y): mege tees containing and y. UNION(, 5) paent of is oot 5 Disjoint-sets data stuctue Disjoint-sets data stuctue Paent-link epesentation. Repesent each set as a tee of elements. Each element has an eplicit paent pointe in the tee. The oot seves as the canonical element (and points to itself). FIND(): find the oot of the tee containing. UNION(, y): mege tees containing and y. Aay epesentation. Repesent each set as a tee of elements. Allocate an aay paent[] of length n. paent[i] = j means paent of element i is element j. 5 must know numbe of elements n a pioi paent[] 5 5 UNION(, 5) oot paent of is oot 5 5 Note. Fo bevity, we suppess aows and self loops in figues.

Naïve linking Naïve linking Naïve linking. Link oot of fist tee to oot of second tee. Naïve linking. Link oot of fist tee to oot of second tee. UNION(5, ) UNION(5, ) 5 5 Naïve linking Naïve linking: analysis Naïve linking. Link oot of fist tee to oot of second tee. MAKE-SET() UNION(, y) paent[]. s FIND(y). paent[] s. FIND() WHILE ( paent[]) paent[]. RETURN. FIND(). Theoem. Using naïve linking, a UNION o FIND opeation can take Θ(n) time in the wost case, whee n is the numbe of elements. Pf. In the wost case, FIND takes time popotional to the height of the tee. Height of the tee is n afte the sequence of union opeations: UNION(, ), UNION(, ),, UNION(n, n). height = height = ma numbe of links on any path fom oot to leaf node height = n- n

Link-by-size UNION FIND Link-by-size. Maintain a tee size (numbe of nodes) fo each oot node. Link oot of smalle tee to oot of lage tee (beaking ties abitaily). naïve linking link-by-size link-by-ank path compession link-by-ank with path compession UNION(5, ) size = size = contet 5 Link-by-size Link-by-size Link-by-size. Maintain a tee size (numbe of nodes) fo each oot node. Link oot of smalle tee to oot of lage tee (beaking ties abitaily). Link-by-size. Maintain a tee size (numbe of nodes) fo each oot node. Link oot of smalle tee to oot of lage tee (beaking ties abitaily). UNION(5, ) size = MAKE-SET() paent[]. size[]. UNION(, y) FIND(). s FIND(y). IF ( = s) RETURN. ELSE IF (size[] > size[s]) 5 FIND() WHILE ( paent[]) paent[]. RETURN. paent[s]. size[] size[] + size[s]. ELSE paent[] s. size[s] size[] + size[s]. link-by-size 5

Link-by-size: analysis Link-by-size: analysis Popety. Using link-by-size, fo evey oot node : size[] height(). Pf. [ by induction on numbe of links ] Base case: singleton tee has size and height. Inductive hypothesis: assume tue afte fist i links. Tee ooted at changes only when a smalle (o equal) size tee ooted at s is linked into. Case. [ height() > height(s) ] size = (height = ) s size = (height = ) sizeʹ[] > size[] height() = heightʹ(). inductive hypothesis Popety. Using link-by-size, fo evey oot node : size[] height(). Pf. [ by induction on numbe of links ] Base case: singleton tee has size and height. Inductive hypothesis: assume tue afte fist i links. Tee ooted at changes only when a smalle (o equal) size tee ooted at s is linked into. Case. [ height() height(s) ] size = (height = ) s size = (height = ) sizeʹ[] = size[] + size[s] size[s] height(s) = height(s) + = heightʹ(). link-by-size inductive hypothesis Link-by-size: analysis A tight uppe bound Theoem. Using link-by-size, any UNION o FIND opeation takes O(log n) time in the wost case, whee n is the numbe of elements. Pf. The unning time of each opeation is bounded by the tee height. By the pevious popety, the height is lg n. lg n = log n Note. The UNION opeation takes O() time ecept fo its two calls to FIND. Theoem. Using link-by-size, a tee with n nodes can have height = lg n. Pf. Aange k calls to UNION to fom a binomial tee of ode k. An ode-k binomial tee has k nodes and height k. B B B B B

Link-by-ank SECTION 5.. UNION FIND naïve linking link-by-size link-by-ank path compession link-by-ank with path compession contet Link-by-ank. Maintain an intege ank fo each node, initially. Link oot of smalle ank to oot of lage ank; if tie, incease ank of new oot by. UNION(, ) ank = ank = 5 Note. Fo now, ank = height. Link-by-ank Link-by-ank Link-by-ank. Maintain an intege ank fo each node, initially. Link oot of smalle ank to oot of lage ank; if tie, incease ank of new oot by. Note. Fo now, ank = height. ank = 5 Link-by-ank. Maintain an intege ank fo each node, initially. Link oot of smalle ank to oot of lage ank; if tie, incease ank of new oot by. MAKE-SET() UNION(, y) paent[]. ank[]. FIND() WHILE ( paent[]) paent[]. RETURN. FIND(). s FIND(y). IF ( = s) RETURN. ELSE IF (ank[] > ank[s]) paent[s]. ELSE IF (ank[] < ank[s]) paent[] s. ELSE paent[] s. ank[s] ank[s] +. link-by-ank

Link-by-ank: popeties Link-by-ank: popeties PROPERTY. If is not a oot node, then ank[] < ank[paent[]]. Pf. A node of ank k is ceated only by linking two oots of ank k. PROPERTY. If is not a oot node, then ank[] will neve change again. Pf. Rank changes only fo oots; a nonoot neve becomes a oot. PROPERTY. If paent[] changes, then ank[paent[]] stictly inceases. Pf. The paent can change only fo a oot, so befoe linking paent[] =. Afte is linked-by-ank to new oot we have ank[] > ank[]. ank = ank = PROPERTY. Any oot node of ank k has k nodes in its tee. Pf. [ by induction on k ] Base case: tue fo k =. Inductive hypothesis: assume tue fo k. A node of ank k is ceated only by linking two oots of ank k. By inductive hypothesis, each subtee has k nodes esulting tee has k nodes. PROPERTY 5. The highest ank of a node is lg n. Pf. Immediate fom PROPERTY and PROPERTY. ank = ( nodes) ank = ( nodes) ank = ank = 5 Link-by-ank: popeties Link-by-ank: analysis PROPERTY. Fo any intege k, thee ae n / k nodes with ank k. Pf. Any oot node of ank k has k descendants. [PROPERTY ] Any nonoot node of ank k has k descendants because: - it had this popety just befoe it became a nonoot [PROPERTY ] - its ank doesn t change once it became a nonoot [PROPERTY ] - its set of descendants doesn t change once it became a nonoot Diffeent nodes of ank k can t have common descendants. [PROPERTY ] ank = ( node) Theoem. Using link-by-ank, any UNION o FIND opeation takes O(log n) time in the wost case, whee n is the numbe of elements. Pf. The unning time of UNION and FIND is bounded by the tee height. By PROPERTY 5, the height is lg n. ank = ( node) ank = (5 nodes) ank = ( nodes) ank = ( nodes)

Path compession UNION FIND Path compession. When finding the oot of the tee containing, change the paent pointe of all nodes along the path to point diectly to. naïve linking link-by-size link-by-ank path compession w befoe path compession link-by-ank with path compession contet u v T T afte path compession SECTION 5.. T w v u T T T Path compession Path compession Path compession. When finding the oot of the tee containing, change the paent pointe of all nodes along the path to point diectly to. Path compession. When finding the oot of the tee containing, change the paent pointe of all nodes along the path to point diectly to. 5 5

Path compession Path compession Path compession. When finding the oot of the tee containing, change the paent pointe of all nodes along the path to point diectly to. Path compession. When finding the oot of the tee containing, change the paent pointe of all nodes along the path to point diectly to. 5 5 Path compession Path compession Path compession. When finding the oot of the tee containing, change the paent pointe of all nodes along the path to point diectly to. 5 Path compession. When finding the oot of the tee containing, change the paent pointe of all nodes along the path to point diectly to. FIND() IF ( paent[]) paent[] FIND(paent[]). RETURN paent[]. Note. Path compession does not change the ank of a node; so height() ank[] but they ae not necessaily equal. this FIND implementation changes the tee stuctue (!) 5

Path compession Fact. Path compession with naïve linking can equie Ω(n) time to pefom a single UNION o FIND opeation, whee n is the numbe of elements. Pf. The height of the tee is n afte the sequence of union opeations: UNION(, ), UNION(, ),, UNION(n, n). naïve linking: link oot of fist tee to oot of second tee Theoem. [Tajan van Leeuwen ] Stating fom an empty data stuctue, path compession with naïve linking pefoms any intemied sequence of m n MAKE-SET, UNION, and FIND opeations on a set of n elements in O(m log n) time. Pf. Nontivial (but omitted). SECTION 5.. UNION FIND naïve linking link-by-size link-by-ank path compession link-by-ank with path compession contet Link-by-ank with path compession: popeties Link-by-ank with path compession: popeties PROPERTY. The tee oots, node anks, and elements within a tee ae the same with o without path compession. Pf. Path compession does not ceate new oots, change anks, o move elements fom one tee to anothe. T y z T befoe path compession z T afte path compession y T PROPERTY. The tee oots, node anks, and elements within a tee ae the same with o without path compession. COROLLARY. PROPERTY, hold fo link-by-ank with path compession. PROPERTY. If is not a oot node, then ank[] < ank[paent[]]. PROPERTY. If is not a oot node, then ank[] will neve change again. PROPERTY. If paent[] changes, then ank[paent[]] stictly inceases. PROPERTY. Any oot node of ank k has k nodes in its tee. PROPERTY 5. The highest ank of a node is lg n. PROPERTY. Fo any intege k, thee ae n / k nodes with ank k. Bottom line. PROPERTY hold fo link-by-ank with path compession. (but we need to echeck PROPERTY and PROPERTY )

Link-by-ank with path compession: popeties Iteated logaithm function PROPERTY. If paent[] changes, then ank[paent[]] stictly inceases. Pf. Path compession can make point to only an ancesto of paent[]. PROPERTY. If is not a oot node, then ank[] < ank[paent[]]. Pf. Path compession doesn t change any anks, but it can change paents. If paent[] doesn t change duing a path compession, the inequality continues to hold; if paent[] changes, then ank[paent[]] stictly inceases. y z T befoe path compession z T afte path compession y T Def. The iteated logaithm function is defined by: lg n = n +lg (lg n) Note. We have lg* n 5 unless n eceeds the # atoms in the univese. n lg * n [, ] [5, ] [, 55] [55, 55 ] 5 iteated lg function T Analysis Divide nonzeo anks into the following goups: { } { } {, } { 5,,, } {,,, } { 55, 55,, 55 }... Popety. Evey nonzeo ank falls within one of the fist lg * n goups. Pf. The ank is between and lg n. [PROPERTY 5] Ceative accounting Cedits. A node eceives cedits as soon as it ceases to be a oot. If its ank is in the inteval { k +, k +,, k }, we give it k cedits. goup k Poposition. Numbe of cedits disbused to all nodes is n lg * n. Pf. By PROPERTY, the numbe of nodes with ank k + is at most n k+ + n k+ + n k Thus, nodes in goup k need at most n cedits in total. Thee ae lg * n goups. [PROPERTY ]

Running time of FIND Link-by-ank with path compession Running time of FIND. Bounded by numbe of paent pointes followed. Recall: the ank stictly inceases as you go up a tee. [PROPERTY ] Case : paent[] is a oot only happens fo one link pe FIND. Case : ank[paent[]] is in a highe goup than ank[]. Case : ank[paent[]] is in the same goup as ank[]. Case. At most lg * n nodes on path can be in a highe goup. [PROPERTY ] Case. These nodes ae chaged cedit to follow paent pointe. Each time pays cedit, ank[paent[]] stictly inceases. [PROPERTY ] Theefoe, if ank[] is in the goup { k +,, k }, the ank of its paent will be in a highe goup befoe pays k cedits. Once ank[paent[]] is in a highe goup than ank[], it emains so because: - ank[] does not change once it ceases to be a oot. [PROPERTY ] - ank[paent[]] does not decease. [PROPERTY ] - thus, has enough cedits to pay until it becomes a Case node. 5 Theoem. Stating fom an empty data stuctue, link-by-ank with path compession pefoms any intemied sequence of m n MAKE-SET, UNION, and FIND opeations on a set of n elements in O(m log*n) time. Link-by-size with path compession UNION FIND naïve linking link-by-size link-by-ank path compession link-by-ank with path compession contet Theoem. [Fische ] Stating fom an empty data stuctue, link-by-size with path compession pefoms any intemied sequence of m n MAKE-SET, UNION, and FIND opeations on a set of n elements in O(m log log n) time.

Link-by-size with path compession Link-by-size with path compession Theoem. [Hopcoft Ullman ] Stating fom an empty data stuctue, link-by-size with path compession pefoms any intemied sequence of m n MAKE-SET, UNION, and FIND opeations on a set of n elements in O(m log*n) time. Theoem. [Tajan 5] Stating fom an empty data stuctue, link-by-size with path compession pefoms any intemied sequence of m n MAKE-SET, UNION, and FIND opeations on a set of n elements in O(m α(m, n)) time, whee α(m, n) is a functional invese of the Ackemann function. SIAM J. COMPUT. Vol., No., Decembe Efficiency of a Good But Not Linea Set Union Algoithm SET MERGING ALGORITHMS* J. E. HOPCROFT" AND J. D. ULLMAN{ Abstact. This pape consides the poblem of meging sets fomed fom a total of n items in such a way that at any time, the name of a set containing a given item can be ascetained. Two algoithms using diffeent data stuctues ae discussed. The eecution times of both algoithms ae bounded by a constant times ng(n), whee G(n) is a function whose asymptotic gowth ate is less than that of any finite numbe of logaithms of n. Key wods, algoithm, algoithmic analysis, computational compleity, data stuctue, equivalence algoithm, meging, popety gamma, set, spanning tee ROBERT ENDRE TAR JAN Univesity of Califonia, Bekeley, Califoma ABSTRACT. TWO types of instuctmns fo mampulating a family of disjoint sets which patitmn a umvese of n elements ae consideed FIND() computes the name of the (unique) set containing element UNION(A, B, C) combines sets A and B into a new set named C. A known algoithm fo implementing sequences of these mstuctmns is eamined It is shown that, if t(m, n) as the maimum time eqmed by a sequence of m > n FINDs and n -- intemied UNIONs, then kima(m, n) _~ t(m, n) < k:ma(m, n) fo some positive constants ki and k, whee a(m, n) is elated to a functional invese of Ackemann's functmn and as vey slow-gowing. 5 Ackemann function Ackemann function Ackemann function. [Ackemann ] A computable function that is not pimitive ecusive. Ackemann function. [Ackemann ] A computable function that is not pimitive ecusive. A(m, n) = n + m = A(m, ) m> n = A(m,A(m, n )) m> n> A(m, n) = n + m = A(m, ) m> n = A(m,A(m, n )) m> n> Invese Ackemann function. (m, n) =min{i :A(i, m/n ) log n} I am not smat enough to undestand this easily. Raymond Seidel Note. Thee ae many inequivalent definitions. 5 5

Invese Ackemann function Invese Ackemann function Definition. k(n) = n/ k = n = k + k ( k (n)) E. α (n) = n /. α (n) = lg n = # of times we divide n by, until we each. α (n) = lg * n = # of times we apply the lg function to n, until we each. α (n) = # of times we apply the iteated lg function to n, until we each. 5 5 α(n) 5 5 5 α(n) 55 = 55 55 55 555 huge 55 555 Definition. Popety. Fo evey n 5, the sequence α (n), α (n), α (n), conveges to. E. [n =!] α (n) 5, α (n) =, α (n) =, α (n) =, α 5(n) =. One-paamete invese Ackemann. α(n) = min { k : α k(n) }. E. α(!) = 5. k(n) = n/ k = n = k + k ( k (n)) Two-paamete invese Ackemann. α(m, n) = min { k : α k(n) + m / n }. α(n) α(n) 5 55 5 5 A tight lowe bound Path compaction vaiants Theoem. [Fedman Saks ] In the wost case, any CELL-PROBE(log n) algoithm equies Ω(m α(m, n)) time to pefom an intemied sequence of m MAKE-SET, UNION, and FIND opeations on a set of n elements. Cell-pobe model. [Yao ] Count only numbe of wods of memoy accessed; all othe opeations ae fee. Path splitting. Make evey node on path point to its gandpaent. 5 T5 befoe path splitting Michael L. Fedmal Bellcoe and U.C. San Diego The Cell Pobe Compleity of Dynamic Data Stuctues Michael E. Sak>. U.C. San Diego, Bellcoe and Rutges Univesity T T T afte path splitting. Summay of Results Dynamic data stnctue poblems involve the epesentation of data in memoy in such a way as to pemit cetain types of modifications of the data (updates) and cetain types of questions about the data (queies). This paadigm encompasses many fimdamental poblems in compute science. The pupose of this pape is to pove new lowe and uppe bounds on the tie pe opeation to implement solutions to some familia dynamic data stuctue poblems including list epesentation, subset anking, patial sums, and the set union poblem. The main featues of ou lowe bounds ae: () They hold in the cell pobe model of computation (A. Yao egiste size fom logn to polylog(n) only educes the time compleity by a constant facto. On the othe hand, deceasing the egiste size fom logn to inceases time compleity by a logn facto fo one of the poblems we conside and only a loglogn facto fo some othe poblems. The fist two specific data stuctue poblems obtain bounds ae: fo which we List Repesentation. This poblem concens the epesention of an odeed list of at most n (not necessaily distinct) elements fom the univese U = (,,..., n ). The opeations to be suppoted ae epot(k). which etuns the k element of the list, inset(k, u) which insets element u into the list between the T T 5 T5 T 55 5

Path compaction vaiants Linking vaiants Path halving. Make evey othe node on path point to its gandpaent. Link-by-size. Numbe of nodes in tee. befoe path halving Link-by-ank. Rank of tee. T 5 T5 afte path halving Link-by-andom. Label each element with a andom eal numbe between. and.. Link oot with smalle label into oot with lage label. T 5 T T5 T T T 5 5 Disjoint-sets data stuctues Theoem. [Tajan van Leeuwen ] Stating fom an empty data stuctue, link-by- { size, ank } combined with { path compession, path splitting, path halving } pefoms any intemied sequence of m n MAKE-SET, UNION, and FIND opeations on a set of n elements in O(m α(m, n)) time. Wost-Case Analysis of Set Union Algoithms ROBERT E. TAR JAN AT&T Bell Laboatoies, Muay Hdl, New Jesey AND JAN VAN LEEUWEN Univestty of Utecht. Utecht. The Nethelands Abstact. This pape analyzes the asymptotic wost-case unning time of a numbe of vaiants of the well-known method of path compession fo maintaining a collection of disjoint sets unde union. We show that two one-pass methods poposed by van Leeuwen and van de Weide ae asymptotically optimal, wheeas seveal othe methods, including one poposed by Rein and advocated by Dijksta, ae slowe than the best methods. 5