the subset partial order Paul Pritchard Technical Report CIT School of Computing and Information Technology

Size: px
Start display at page:

Download "the subset partial order Paul Pritchard Technical Report CIT School of Computing and Information Technology"

Transcription

1 A simple sub-quadratic algorithm for computing the subset partial order Paul Pritchard Technical Report CIT School of Computing and Information Technology Grith University Queensland, Australia 4111 March 1995 Abstract A given collection of sets has a natural partial order induced by the subset relation. Let the size N of the collection be dened as the sum of the cardinalities of the sets that comprise it. Algorithms have recently been presented that compute the partial order (and thereby the minimal and maximal sets, i.e., extremal sets) in worst-case time O(N 2 = log N ). This paper develops a simple algorithm that uses only simple data structures, and gives a simple analysis that establishes the above worst-case bound on its running time. The algorithm exploits a variation on lexicographic order that may be of independent interest. 1 Introduction Given is a collection F = fs1; : : : ; S k g, where each S i is a set over the same domain D. Dene the size of the collection to be N = P i js i j. Pritchard [4] presented algorithms for nding those sets in F that have no subset in F. Starting from a naive O(N 2 ) algorithm 1, an algorithm was obtained that had worst-case complexity O(N log N) when there was a constant that bounded the cardinality of each set in F. It was later shown [5] that there is an implementation with worst-case running time O(N 2 = log N). Yellin and Jutla [8] generalized the problem to that of computing the minimal (as in [4]) or maximal sets in the partial order on the distinct sets in F that is induced by the subset relation. They presented an algorithm that built the 1 Our model is a uniform cost RAM with (log N )-bit words. 1

2 partial order in O(N 2 = log N) operations over a dictionary ADT, and observed that dynamic perfect hashing [2] gave a randomized amortized expected running time of O(1) per ADT operation. Pritchard [6] presented a variant algorithm permitting an implementation taking worst-case time O(N 2 = log N). These known sub-quadratic algorithms are variously complex ([5]), rely on complex data structures ([8]), or require substantial housekeeping ([6]). We proceed to develop an alternative approach that has a simple structure, that uses simple and ecient algorithmic techniques, and that has a straightforward analysis that establishes a worst-case running time of O(N 2 = log N). 2 Initial development and analysis For simplicity of presentation, we shall assume that F is a set rather than a multiset. Equal sets can be gathered in an inexpensive preliminary computation, and thereafter treated as one set in a collection of distinct sets. Following [8], we shall compute the complete subset graph, where the vertices are the sets of F, and there is an edge from S to S 0 i S 0 S. We shall use a transformational style of development, starting with a high-level algorithm. V := F; E := ;; forall x 2 F do forall y 2 F such that y x do E := E [ (x; y) end forall y end forall x f (V; E) is the complete subset graph for F g Consider the naive implementation of the inner loop: forall y 2 F do if y x then E := E [ (x; y) end if end forall y With each set implemented as an ordered linked list or array of its elements, the cost of a straightforward implementation of a subset test y x is O(jxj + jyj). Hence, recalling that there are k sets in F, the cost of this inner loop is order y (jxj + jyj) = y jxj + y jyj = kjxj + N: The overall cost is therefore order x (kjxj + N) = k x jxj + x 2 N = kn + kn = 2kN:

3 Since k = O(N), the worst-case cost is O(N 2 ), and it is easy to see this bound is tight. An obvious optimization is to only consider y such that jyj < jxj, but the worst case is still quadratic. In search of another optimization, x x, and consider y such that jyj < jxj. Instead of each element of x contributing (1) to the cost of the subset test y x in the worst case, we can arrange for just the elements of y \ x to do so by precomputing, for each element d in the domain D, a list of the sets in F that contain d. Then to nd all subsets of x, the list for each member d of x is traversed, an initially zero count is incremented for each set y in the list, and a set is recognized as a subset of x when P its count reaches its cardinality. The cost of the inner loop is O( d2x weight(d)), where weight(d) denotes the number of sets in F that contain d. Therefore the total cost (after the precomputation) is O( weight(d)) = O( weight(d) 2 ): x d2x d It can be seen that in the worst case, when there is an element with weight (N), the complexity is still quadratic. 3 Handling common elements Repeated scanning of the list of sets for an element d can be avoided whenever successive sets x contain d. To arrange for common elements to occur in successive sets, the domain elements are ordered by non-increasing weight, each set is ordered by the domain ordering, and the sets now sequences are ordered lexicographically using the ordered domain as the ordered alphabet (with most common element rst). The sets x are then taken in order by the outer loop. The result is that all sets containing the most common element are processed successively at the start, so that only one pass over its list of sets is needed. Moreover, at most two passes need be made over the list for the next most common element, and in general, at most 2 i?1 passes over the list for the i'th most common element. We are now ready to present the complete algorithm and its analysis. 1. Compute the weight of each element; 2. Order the domain elements by non-increasing weight; 3. Order the elements in each set to respect the domain order; 4. Sort the ordered sets lexicographically, using the ordered domain as the ordered alphabet; 5. Compute the list of sets for each domain element; 6. For each set x, record edge (x; y) for each set y such that y x. 3

4 Let the size of the domain D be m. We assume each element has non-zero weight, so that m = O(N). Step 1 is done by scanning each set in F, in total time (m) + (N) = (N). Step 2 is done with an asymptotically optimal sorting algorithm such as Heapsort in time O(m log m) = O(N log N). Alternatively, bin sorting can be used, taking time O(N). Step 3 is done by applying an asymptotically optimal sorting algorithm such as Heapsort to each set. The total time required is O(N log N). Step 4 is done using the repeated radix (i.e., bin) sorting method in [1], in time (m) + (N) = (N). Alternatively, the more sophisticated algorithm of Paige and Tarjan [3] can be used. It has the same worst-case complexity. Step 5 is done by scanning each set x, and appending a reference to it to the list for each element d 2 x. The total cost is (m)+(n) = (N). The resulting lists respect the lexicographic order on the sets. The crucial step 6 is implemented as follows. Set Y is used to gather all subsets of the current set x. With each set y a counter y:count is associated that equals the number of elements of x that have been processed so far that are in y. By \prev x" (resp. \next x") is denoted the set immediately preceding (resp. following) x in the lexicographic order; it should be taken as empty if x is rst (resp. last). f Step 6: g Y := ;; forall y 2 F do y:count := 0 end forall y; forall x 2 F; in lexicographic order; do forall d 2 x? previous x; in domain order; do forall y such that d 2 y do Increment y:count; if y:count = jyj then Y := Y [ fyg end if end forall y end forall d; forall y 2 Y do Record edge (x; y) end forall y; forall d 2 x? next x do forall y such that d 2 y do if y:count = jyj then Y := Y? fyg end if; Decrement y:count end forall y end forall d end forall x The key to the ecient implementation of step 6 is that each set y such that d 2 y may be found in O(1) time by following the corresponding list of sets. Let the domain D as ordered by non-increasing weights be D = fd1; : : : ; d m g. As has already been observed, the list for d i is processed at most 2 i?1 times. Therefore, 4

5 the total cost of step 6 over all executions is order Now m weight(d i ) minf2 i?1 ; weight(d i )g: i=1 Let I = blog 2 (N= log N)c = (log N). Then for i I, 2 i?1 < N= log N, so ii weight(d i ) minf2 i?1 ; weight(d i )g < ii weight(d i )N= log N N 2 = log N: i>i weight(d i ) minf2 i?1 ; weight(d i )g i>i weight(d i ) 2 : Since P i>i weight(d i ) < N, the sum of squares of the weights is maximized by maximizing the weights. But for i > I, since the weights are non-increasing, weight(d i ) N=i < N=I N= log 2 N: Therefore i>i weight(d i ) 2 = O(N 2 = log 2 N) O(log N) = O(N 2 = log N): It is now apparent that the worst-case complexity of our algorithm is O(N 2 = log N). 4 Further improvements The supersets of x may be detected just as easily as the subsets: y x when jyj = jxj. Step 6 can easily be modied to record these edges as well. By removing x from each of the lists it belongs to (one for each member) after x is processed, each edge is found just once, and redundant computation is avoided. Another improvement can be obtained by choosing a better ordering of the sets, to reduce the number of runs, i.e., maximal sequences of consecutive occurrences of elements. Although lexicographic ordering does the job, in that is is fast to compute and leads to an O(N 2 = log N) complexity, it is far from optimal in the worst case. An unusual ordering that we call lezigzagraphic roughly halves the maximum number of runs, and is just as easy to compute. Table 1 shows the two orderings applied to the family of all non-empty subsets of f1; : : : ; 4g. Each element of D is assigned a column so as to highlight runs. 5

6 lexicographic lezigzagraphic Table 1: Two orderings of non-empty subsets of f1; : : : ; 4g. Let length(s) denote the number of characters in a string s, and s:i denote the i'th character of s, 1 i length(s). Then lezigzagraphic order is dened as follows. Let s; s 0 be unequal strings, and e be maximal such that their rst e characters agree. Then ( s e = length(s) _ s:(e + 1) > s s 0 0 :(e + 1); if e is odd; e = length(s 0 ) _ s:(e + 1) < s 0 :(e + 1); if e is even; (1) where reference to an element implies its existence. In contrast, the denition of lexicographic order does not distinguish between odd and even e: s s 0 e = length(s) _ s:(e + 1) < s 0 :(e + 1): (2) The name \lezigzagraphic" derives from the relationship to lexicographic ordering, and the zigzag graphical pattern of elements sharing the same prex (as revealed by table 1). This is not the place to expound on this interesting order the interested reader is referred to [7] for proofs of the properties we use below. But it may be worth noting here that a slightly less cumbersome denition is obtained by \padding" (to the right) with a \top" alphabetic character +1. Then the two left disjuncts involving lengths in the r.h.s. of equation (1) may be dropped. In contrast, for lexicographic ordering, dening missing characters to be?1 allows the left disjunct in the r.h.s. of (2) to be dropped. The mathematical property that we need in our application here is that for any collection of distinct sets in lezigzagraphic order, the number of runs for the 6

7 i'th element in the alphabet is at most d2 i?2 e. This may be proven by induction on i, exploiting the structure evident in table 1. There remains the problem of computing the lezigzagraphic order in step 4 of the algorithm. The reader should not be surprised to hear that only minor modications are needed to the standard lexicographic sort Algorithm 3.2 of [1]. They leave the order of its complexity unchanged. See [7] for the details. 5 Conclusion Signicant recent attention has been given to the problems of nding, for a given family of sets, the minimal and/or maximal sets in the partial order induced by the subset relation, and of computing the partial order itself. Heretofore, complex or at least messy techniques were used in the known subquadratic solutions, where the problem size is the sum of the cardinalities of the sets in the family. This paper has developed a comparatively simple algorithm whose worst-case complexity of O(N 2 = log N) matches the best known results. It is expected to be very competitive in practical applications. In doing so, we have exploited an interesting variant on lexicographic order (though this is inessential to the main result). It remains to be seen whether there is an algorithm with worst-case complexity o(n 2 = log N). The best known worst-case lower bound is (N 2 = log 2 N) for any algorithm that explicitly computes the partial order see [8, 6]. References [1] A. V. Aho, J. E. Hopcroft, and J. D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, Mass., [2] M. Dietzfelbinger, A. Karlin, K. Mehlhorn, F. Meyer auf der Heide, H. Rohnert, and R. E. Tarjan, Dynamic perfect hashing: upper and lower bounds, SIAM J. Comput. 23 (1994), 738{761. [3] R. Paige and R. Tarjan, Three partition renement algorithms, SIAM J. Comput. 16 (1987), 973{989. [4] P. Pritchard, Opportunistic algorithms for eliminating supersets, Acta Inform. 28 (1991), 733{754. [5] P. Pritchard, An old sub-quadratic algorithm for nding extremal sets, Technical Report ECS-LFCS , Dept of Computer Science, University of Edinburgh, September

8 [6] P. Pritchard, On computing the subset graph of a collection of sets, Technical Report CIT-95-03, School of Computing and Information Technology, Grith University, March [7] P. Pritchard, Lezigzagraphic order (avec un application), forthcoming Technical Report, School of Computing and Information Technology, Grith University, [8] D. M. Yellin and C. S. Jutla, Finding extremal sets in less than quadratic time, Inform. Process. Lett. 48 (1993), 29{34. 8

A fast algorithm to generate necklaces with xed content

A fast algorithm to generate necklaces with xed content Theoretical Computer Science 301 (003) 477 489 www.elsevier.com/locate/tcs Note A fast algorithm to generate necklaces with xed content Joe Sawada 1 Department of Computer Science, University of Toronto,

More information

Turing Machines, diagonalization, the halting problem, reducibility

Turing Machines, diagonalization, the halting problem, reducibility Notes on Computer Theory Last updated: September, 015 Turing Machines, diagonalization, the halting problem, reducibility 1 Turing Machines A Turing machine is a state machine, similar to the ones we have

More information

Efficient Cryptanalysis of Homophonic Substitution Ciphers

Efficient Cryptanalysis of Homophonic Substitution Ciphers Efficient Cryptanalysis of Homophonic Substitution Ciphers Amrapali Dhavare Richard M. Low Mark Stamp Abstract Substitution ciphers are among the earliest methods of encryption. Examples of classic substitution

More information

Hashing. Martin Babka. January 12, 2011

Hashing. Martin Babka. January 12, 2011 Hashing Martin Babka January 12, 2011 Hashing Hashing, Universal hashing, Perfect hashing Input data is uniformly distributed. A dynamic set is stored. Universal hashing Randomised algorithm uniform choice

More information

1 Introduction A priority queue is a data structure that maintains a set of elements and supports operations insert, decrease-key, and extract-min. Pr

1 Introduction A priority queue is a data structure that maintains a set of elements and supports operations insert, decrease-key, and extract-min. Pr Buckets, Heaps, Lists, and Monotone Priority Queues Boris V. Cherkassky Central Econ. and Math. Inst. Krasikova St. 32 117418, Moscow, Russia cher@cemi.msk.su Craig Silverstein y Computer Science Department

More information

On Controllability and Normality of Discrete Event. Dynamical Systems. Ratnesh Kumar Vijay Garg Steven I. Marcus

On Controllability and Normality of Discrete Event. Dynamical Systems. Ratnesh Kumar Vijay Garg Steven I. Marcus On Controllability and Normality of Discrete Event Dynamical Systems Ratnesh Kumar Vijay Garg Steven I. Marcus Department of Electrical and Computer Engineering, The University of Texas at Austin, Austin,

More information

2. ALGORITHM ANALYSIS

2. ALGORITHM ANALYSIS 2. ALGORITHM ANALYSIS computational tractability asymptotic order of growth survey of common running times Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos

More information

Algorithms for pattern involvement in permutations

Algorithms for pattern involvement in permutations Algorithms for pattern involvement in permutations M. H. Albert Department of Computer Science R. E. L. Aldred Department of Mathematics and Statistics M. D. Atkinson Department of Computer Science D.

More information

A shrinking lemma for random forbidding context languages

A shrinking lemma for random forbidding context languages Theoretical Computer Science 237 (2000) 149 158 www.elsevier.com/locate/tcs A shrinking lemma for random forbidding context languages Andries van der Walt a, Sigrid Ewert b; a Department of Mathematics,

More information

immediately, without knowledge of the jobs that arrive later The jobs cannot be preempted, ie, once a job is scheduled (assigned to a machine), it can

immediately, without knowledge of the jobs that arrive later The jobs cannot be preempted, ie, once a job is scheduled (assigned to a machine), it can A Lower Bound for Randomized On-Line Multiprocessor Scheduling Jir Sgall Abstract We signicantly improve the previous lower bounds on the performance of randomized algorithms for on-line scheduling jobs

More information

Rank and Select Operations on Binary Strings (1974; Elias)

Rank and Select Operations on Binary Strings (1974; Elias) Rank and Select Operations on Binary Strings (1974; Elias) Naila Rahman, University of Leicester, www.cs.le.ac.uk/ nyr1 Rajeev Raman, University of Leicester, www.cs.le.ac.uk/ rraman entry editor: Paolo

More information

Longest Common Prefixes

Longest Common Prefixes Longest Common Prefixes The standard ordering for strings is the lexicographical order. It is induced by an order over the alphabet. We will use the same symbols (,

More information

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Massimo Franceschet Angelo Montanari Dipartimento di Matematica e Informatica, Università di Udine Via delle

More information

I would like to thank BRICS and, in particular, Erik Meineche Schmidt for giving me the opportunity to teach this mini-course at Aarhus University. Le

I would like to thank BRICS and, in particular, Erik Meineche Schmidt for giving me the opportunity to teach this mini-course at Aarhus University. Le BRICS Mini-Course on Competitive Online Algorithms Susanne Albers MPI, Saarbrucken Aarhus University August 27 {29, 1996 I would like to thank BRICS and, in particular, Erik Meineche Schmidt for giving

More information

arxiv: v1 [cs.ds] 15 Feb 2012

arxiv: v1 [cs.ds] 15 Feb 2012 Linear-Space Substring Range Counting over Polylogarithmic Alphabets Travis Gagie 1 and Pawe l Gawrychowski 2 1 Aalto University, Finland travis.gagie@aalto.fi 2 Max Planck Institute, Germany gawry@cs.uni.wroc.pl

More information

Asymptotic redundancy and prolixity

Asymptotic redundancy and prolixity Asymptotic redundancy and prolixity Yuval Dagan, Yuval Filmus, and Shay Moran April 6, 2017 Abstract Gallager (1978) considered the worst-case redundancy of Huffman codes as the maximum probability tends

More information

3.1 Asymptotic notation

3.1 Asymptotic notation 3.1 Asymptotic notation The notations we use to describe the asymptotic running time of an algorithm are defined in terms of functions whose domains are the set of natural numbers N = {0, 1, 2,... Such

More information

Quiz 1 Solutions. (a) f 1 (n) = 8 n, f 2 (n) = , f 3 (n) = ( 3) lg n. f 2 (n), f 1 (n), f 3 (n) Solution: (b)

Quiz 1 Solutions. (a) f 1 (n) = 8 n, f 2 (n) = , f 3 (n) = ( 3) lg n. f 2 (n), f 1 (n), f 3 (n) Solution: (b) Introduction to Algorithms October 14, 2009 Massachusetts Institute of Technology 6.006 Spring 2009 Professors Srini Devadas and Constantinos (Costis) Daskalakis Quiz 1 Solutions Quiz 1 Solutions Problem

More information

1. Introduction Bottom-Up-Heapsort is a variant of the classical Heapsort algorithm due to Williams ([Wi64]) and Floyd ([F64]) and was rst presented i

1. Introduction Bottom-Up-Heapsort is a variant of the classical Heapsort algorithm due to Williams ([Wi64]) and Floyd ([F64]) and was rst presented i A Tight Lower Bound for the Worst Case of Bottom-Up-Heapsort 1 by Rudolf Fleischer 2 Keywords : heapsort, bottom-up-heapsort, tight lower bound ABSTRACT Bottom-Up-Heapsort is a variant of Heapsort. Its

More information

A version of for which ZFC can not predict a single bit Robert M. Solovay May 16, Introduction In [2], Chaitin introd

A version of for which ZFC can not predict a single bit Robert M. Solovay May 16, Introduction In [2], Chaitin introd CDMTCS Research Report Series A Version of for which ZFC can not Predict a Single Bit Robert M. Solovay University of California at Berkeley CDMTCS-104 May 1999 Centre for Discrete Mathematics and Theoretical

More information

Weighted Activity Selection

Weighted Activity Selection Weighted Activity Selection Problem This problem is a generalization of the activity selection problem that we solvd with a greedy algorithm. Given a set of activities A = {[l, r ], [l, r ],..., [l n,

More information

CMSC 451: Lecture 7 Greedy Algorithms for Scheduling Tuesday, Sep 19, 2017

CMSC 451: Lecture 7 Greedy Algorithms for Scheduling Tuesday, Sep 19, 2017 CMSC CMSC : Lecture Greedy Algorithms for Scheduling Tuesday, Sep 9, 0 Reading: Sects.. and. of KT. (Not covered in DPV.) Interval Scheduling: We continue our discussion of greedy algorithms with a number

More information

STGs may contain redundant states, i.e. states whose. State minimization is the transformation of a given

STGs may contain redundant states, i.e. states whose. State minimization is the transformation of a given Completely Specied Machines STGs may contain redundant states, i.e. states whose function can be accomplished by other states. State minimization is the transformation of a given machine into an equivalent

More information

Space-Efficient Re-Pair Compression

Space-Efficient Re-Pair Compression Space-Efficient Re-Pair Compression Philip Bille, Inge Li Gørtz, and Nicola Prezza Technical University of Denmark, DTU Compute {phbi,inge,npre}@dtu.dk Abstract Re-Pair [5] is an effective grammar-based

More information

Improved Approximate String Matching and Regular Expression Matching on Ziv-Lempel Compressed Texts

Improved Approximate String Matching and Regular Expression Matching on Ziv-Lempel Compressed Texts Improved Approximate String Matching and Regular Expression Matching on Ziv-Lempel Compressed Texts Philip Bille 1, Rolf Fagerberg 2, and Inge Li Gørtz 3 1 IT University of Copenhagen. Rued Langgaards

More information

Finding Succinct. Ordered Minimal Perfect. Hash Functions. Steven S. Seiden 3 Daniel S. Hirschberg 3. September 22, Abstract

Finding Succinct. Ordered Minimal Perfect. Hash Functions. Steven S. Seiden 3 Daniel S. Hirschberg 3. September 22, Abstract Finding Succinct Ordered Minimal Perfect Hash Functions Steven S. Seiden 3 Daniel S. Hirschberg 3 September 22, 1994 Abstract An ordered minimal perfect hash table is one in which no collisions occur among

More information

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Massimo Franceschet Angelo Montanari Dipartimento di Matematica e Informatica, Università di Udine Via delle

More information

An Optimal Lower Bound for Nonregular Languages

An Optimal Lower Bound for Nonregular Languages An Optimal Lower Bound for Nonregular Languages Alberto Bertoni Carlo Mereghetti Giovanni Pighizzini Dipartimento di Scienze dell Informazione Università degli Studi di Milano via Comelico, 39 2035 Milano

More information

Fast Sorting and Selection. A Lower Bound for Worst Case

Fast Sorting and Selection. A Lower Bound for Worst Case Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 0 Fast Sorting and Selection USGS NEIC. Public domain government image. A Lower Bound

More information

Sorting n Objects with a k-sorter. Richard Beigel. Dept. of Computer Science. P.O. Box 2158, Yale Station. Yale University. New Haven, CT

Sorting n Objects with a k-sorter. Richard Beigel. Dept. of Computer Science. P.O. Box 2158, Yale Station. Yale University. New Haven, CT Sorting n Objects with a -Sorter Richard Beigel Dept. of Computer Science P.O. Box 258, Yale Station Yale University New Haven, CT 06520-258 John Gill Department of Electrical Engineering Stanford University

More information

CSC173 Workshop: 13 Sept. Notes

CSC173 Workshop: 13 Sept. Notes CSC173 Workshop: 13 Sept. Notes Frank Ferraro Department of Computer Science University of Rochester September 14, 2010 1 Regular Languages and Equivalent Forms A language can be thought of a set L of

More information

University of Waterloo. W. F. Smyth. McMaster University. Curtin University of Technology

University of Waterloo. W. F. Smyth. McMaster University. Curtin University of Technology WEAK REPETITIONS IN STRINGS L. J. Cummings Faculty of Mathematics University of Waterloo W. F. Smyth Department of Computer Science & Systems McMaster University School of Computing Curtin University of

More information

Chapter 1. Comparison-Sorting and Selecting in. Totally Monotone Matrices. totally monotone matrices can be found in [4], [5], [9],

Chapter 1. Comparison-Sorting and Selecting in. Totally Monotone Matrices. totally monotone matrices can be found in [4], [5], [9], Chapter 1 Comparison-Sorting and Selecting in Totally Monotone Matrices Noga Alon Yossi Azar y Abstract An mn matrix A is called totally monotone if for all i 1 < i 2 and j 1 < j 2, A[i 1; j 1] > A[i 1;

More information

Upper and Lower Bounds on the Number of Faults. a System Can Withstand Without Repairs. Cambridge, MA 02139

Upper and Lower Bounds on the Number of Faults. a System Can Withstand Without Repairs. Cambridge, MA 02139 Upper and Lower Bounds on the Number of Faults a System Can Withstand Without Repairs Michel Goemans y Nancy Lynch z Isaac Saias x Laboratory for Computer Science Massachusetts Institute of Technology

More information

Online Interval Coloring and Variants

Online Interval Coloring and Variants Online Interval Coloring and Variants Leah Epstein 1, and Meital Levy 1 Department of Mathematics, University of Haifa, 31905 Haifa, Israel. Email: lea@math.haifa.ac.il School of Computer Science, Tel-Aviv

More information

Problem. Problem Given a dictionary and a word. Which page (if any) contains the given word? 3 / 26

Problem. Problem Given a dictionary and a word. Which page (if any) contains the given word? 3 / 26 Binary Search Introduction Problem Problem Given a dictionary and a word. Which page (if any) contains the given word? 3 / 26 Strategy 1: Random Search Randomly select a page until the page containing

More information

in (n log 2 (n + 1)) time by performing about 3n log 2 n key comparisons and 4 3 n log 4 2 n element moves (cf. [24]) in the worst case. Soon after th

in (n log 2 (n + 1)) time by performing about 3n log 2 n key comparisons and 4 3 n log 4 2 n element moves (cf. [24]) in the worst case. Soon after th The Ultimate Heapsort Jyrki Katajainen Department of Computer Science, University of Copenhagen Universitetsparken 1, DK-2100 Copenhagen East, Denmark Abstract. A variant of Heapsort named Ultimate Heapsort

More information

THIS paper is aimed at designing efficient decoding algorithms

THIS paper is aimed at designing efficient decoding algorithms IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 45, NO. 7, NOVEMBER 1999 2333 Sort-and-Match Algorithm for Soft-Decision Decoding Ilya Dumer, Member, IEEE Abstract Let a q-ary linear (n; k)-code C be used

More information

1. Problem I calculated these out by hand. It was tedious, but kind of fun, in a a computer should really be doing this sort of way.

1. Problem I calculated these out by hand. It was tedious, but kind of fun, in a a computer should really be doing this sort of way. . Problem 5.2-. I calculated these out by hand. It was tedious, but kind of fun, in a a computer should really be doing this sort of way. 2 655 95 45 243 77 33 33 93 86 5 36 8 3 5 2 4 2 2 2 4 2 2 4 4 2

More information

On the Exponent of the All Pairs Shortest Path Problem

On the Exponent of the All Pairs Shortest Path Problem On the Exponent of the All Pairs Shortest Path Problem Noga Alon Department of Mathematics Sackler Faculty of Exact Sciences Tel Aviv University Zvi Galil Department of Computer Science Sackler Faculty

More information

On Boyer-Moore Preprocessing

On Boyer-Moore Preprocessing On Boyer-Moore reprocessing Heikki Hyyrö Department of Computer Sciences University of Tampere, Finland Heikki.Hyyro@cs.uta.fi Abstract robably the two best-known exact string matching algorithms are the

More information

Module 1: Analyzing the Efficiency of Algorithms

Module 1: Analyzing the Efficiency of Algorithms Module 1: Analyzing the Efficiency of Algorithms Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS 39217 E-mail: natarajan.meghanathan@jsums.edu What is an Algorithm?

More information

Alon Orlitsky. AT&T Bell Laboratories. March 22, Abstract

Alon Orlitsky. AT&T Bell Laboratories. March 22, Abstract Average-case interactive communication Alon Orlitsky AT&T Bell Laboratories March 22, 1996 Abstract and Y are random variables. Person P knows, Person P Y knows Y, and both know the joint probability distribution

More information

Bloom Filters, general theory and variants

Bloom Filters, general theory and variants Bloom Filters: general theory and variants G. Caravagna caravagn@cli.di.unipi.it Information Retrieval Wherever a list or set is used, and space is a consideration, a Bloom Filter should be considered.

More information

Efficient Enumeration of Regular Languages

Efficient Enumeration of Regular Languages Efficient Enumeration of Regular Languages Margareta Ackerman and Jeffrey Shallit University of Waterloo, Waterloo ON, Canada mackerma@uwaterloo.ca, shallit@graceland.uwaterloo.ca Abstract. The cross-section

More information

2. (25%) Suppose you have an array of 1234 records in which only a few are out of order and they are not very far from their correct positions. Which

2. (25%) Suppose you have an array of 1234 records in which only a few are out of order and they are not very far from their correct positions. Which COT 6401 The Analysis of Algorithms Midterm Test Open books and notes Name - SSN - 1. (25%) Suppose that the function F is dened for all power of 2 and is described by the following recurrence equation

More information

Restricted b-matchings in degree-bounded graphs

Restricted b-matchings in degree-bounded graphs Egerváry Research Group on Combinatorial Optimization Technical reports TR-009-1. Published by the Egerváry Research Group, Pázmány P. sétány 1/C, H1117, Budapest, Hungary. Web site: www.cs.elte.hu/egres.

More information

Abstract. We show that a proper coloring of the diagram of an interval order I may require 1 +

Abstract. We show that a proper coloring of the diagram of an interval order I may require 1 + Colorings of Diagrams of Interval Orders and -Sequences of Sets STEFAN FELSNER 1 and WILLIAM T. TROTTER 1 Fachbereich Mathemati, TU-Berlin, Strae des 17. Juni 135, 1000 Berlin 1, Germany, partially supported

More information

A robust APTAS for the classical bin packing problem

A robust APTAS for the classical bin packing problem A robust APTAS for the classical bin packing problem Leah Epstein Asaf Levin Abstract Bin packing is a well studied problem which has many applications. In this paper we design a robust APTAS for the problem.

More information

arxiv: v1 [cs.ds] 25 Nov 2009

arxiv: v1 [cs.ds] 25 Nov 2009 Alphabet Partitioning for Compressed Rank/Select with Applications Jérémy Barbay 1, Travis Gagie 1, Gonzalo Navarro 1 and Yakov Nekrich 2 1 Department of Computer Science University of Chile {jbarbay,

More information

Ecient and improved implementations of this method were, for instance, given in [], [7], [9] and [0]. These implementations contain more and more ecie

Ecient and improved implementations of this method were, for instance, given in [], [7], [9] and [0]. These implementations contain more and more ecie Triangular Heaps Henk J.M. Goeman Walter A. Kosters Department of Mathematics and Computer Science, Leiden University, P.O. Box 95, 300 RA Leiden, The Netherlands Email: fgoeman,kostersg@wi.leidenuniv.nl

More information

Computation Theory Finite Automata

Computation Theory Finite Automata Computation Theory Dept. of Computing ITT Dublin October 14, 2010 Computation Theory I 1 We would like a model that captures the general nature of computation Consider two simple problems: 2 Design a program

More information

Kybernetika. Daniel Reidenbach; Markus L. Schmid Automata with modulo counters and nondeterministic counter bounds

Kybernetika. Daniel Reidenbach; Markus L. Schmid Automata with modulo counters and nondeterministic counter bounds Kybernetika Daniel Reidenbach; Markus L. Schmid Automata with modulo counters and nondeterministic counter bounds Kybernetika, Vol. 50 (2014), No. 1, 66 94 Persistent URL: http://dml.cz/dmlcz/143764 Terms

More information

Alphabet Friendly FM Index

Alphabet Friendly FM Index Alphabet Friendly FM Index Author: Rodrigo González Santiago, November 8 th, 2005 Departamento de Ciencias de la Computación Universidad de Chile Outline Motivations Basics Burrows Wheeler Transform FM

More information

Sequential programs. Uri Abraham. March 9, 2014

Sequential programs. Uri Abraham. March 9, 2014 Sequential programs Uri Abraham March 9, 2014 Abstract In this lecture we deal with executions by a single processor, and explain some basic notions which are important for concurrent systems as well.

More information

Balanced Allocation Through Random Walk

Balanced Allocation Through Random Walk Balanced Allocation Through Random Walk Alan Frieze Samantha Petti November 25, 2017 Abstract We consider the allocation problem in which m (1 ε)dn items are to be allocated to n bins with capacity d.

More information

On the optimality of Allen and Kennedy's algorithm for parallelism extraction in nested loops Alain Darte and Frederic Vivien Laboratoire LIP, URA CNR

On the optimality of Allen and Kennedy's algorithm for parallelism extraction in nested loops Alain Darte and Frederic Vivien Laboratoire LIP, URA CNR On the optimality of Allen and Kennedy's algorithm for parallelism extraction in nested loops Alain Darte and Frederic Vivien Laboratoire LIP, URA CNRS 1398 Ecole Normale Superieure de Lyon, F - 69364

More information

The idea is that if we restrict our attention to any k positions in x, no matter how many times we

The idea is that if we restrict our attention to any k positions in x, no matter how many times we k-wise Independence and -biased k-wise Indepedence February 0, 999 Scribe: Felix Wu Denitions Consider a distribution D on n bits x x x n. D is k-wise independent i for all sets of k indices S fi ;:::;i

More information

An implementation of deterministic tree automata minimization

An implementation of deterministic tree automata minimization An implementation of deterministic tree automata minimization Rafael C. Carrasco 1, Jan Daciuk 2, and Mikel L. Forcada 3 1 Dep. de Lenguajes y Sistemas Informáticos, Universidad de Alicante, E-03071 Alicante,

More information

Theory of Computation

Theory of Computation Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation 1 / 33 Lecture 20: Overview Incompressible strings Minimal Length Descriptions Descriptive Complexity Dr. Sarmad Abbasi

More information

Chazelle (attribution in [13]) obtained the same result by generalizing Pratt's method: instead of using and 3 to construct the increment sequence use

Chazelle (attribution in [13]) obtained the same result by generalizing Pratt's method: instead of using and 3 to construct the increment sequence use Average-Case Complexity of Shellsort Tao Jiang McMaster University Ming Li y University of Waterloo Paul Vitanyi z CWI and University of Amsterdam Abstract We prove a general lower bound on the average-case

More information

Searching. Constant time access. Hash function. Use an array? Better hash function? Hash function 4/18/2013. Chapter 9

Searching. Constant time access. Hash function. Use an array? Better hash function? Hash function 4/18/2013. Chapter 9 Constant time access Searching Chapter 9 Linear search Θ(n) OK Binary search Θ(log n) Better Can we achieve Θ(1) search time? CPTR 318 1 2 Use an array? Use random access on a key such as a string? Hash

More information

Efficient Sequential Algorithms, Comp309

Efficient Sequential Algorithms, Comp309 Efficient Sequential Algorithms, Comp309 University of Liverpool 2010 2011 Module Organiser, Igor Potapov Part 2: Pattern Matching References: T. H. Cormen, C. E. Leiserson, R. L. Rivest Introduction to

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

1 Ordinary points and singular points

1 Ordinary points and singular points Math 70 honors, Fall, 008 Notes 8 More on series solutions, and an introduction to \orthogonal polynomials" Homework at end Revised, /4. Some changes and additions starting on page 7. Ordinary points and

More information

protocols such as protocols in quantum cryptography and secret-key agreement by public discussion [8]. Before we formalize the main problem considered

protocols such as protocols in quantum cryptography and secret-key agreement by public discussion [8]. Before we formalize the main problem considered Privacy Amplication Secure Against Active Adversaries? Ueli Maurer Stefan Wolf Department of Computer Science Swiss Federal Institute of Technology (ETH Zurich) CH-8092 Zurich, Switzerland E-mail addresses:

More information

Three-dimensional Stable Matching Problems. Cheng Ng and Daniel S. Hirschberg. Department of Information and Computer Science

Three-dimensional Stable Matching Problems. Cheng Ng and Daniel S. Hirschberg. Department of Information and Computer Science Three-dimensional Stable Matching Problems Cheng Ng and Daniel S Hirschberg Department of Information and Computer Science University of California, Irvine Irvine, CA 92717 Abstract The stable marriage

More information

CISC 876: Kolmogorov Complexity

CISC 876: Kolmogorov Complexity March 27, 2007 Outline 1 Introduction 2 Definition Incompressibility and Randomness 3 Prefix Complexity Resource-Bounded K-Complexity 4 Incompressibility Method Gödel s Incompleteness Theorem 5 Outline

More information

Lecture 1: Asymptotics, Recurrences, Elementary Sorting

Lecture 1: Asymptotics, Recurrences, Elementary Sorting Lecture 1: Asymptotics, Recurrences, Elementary Sorting Instructor: Outline 1 Introduction to Asymptotic Analysis Rate of growth of functions Comparing and bounding functions: O, Θ, Ω Specifying running

More information

Portland, ME 04103, USA IL 60637, USA. Abstract. Buhrman and Torenvliet created an oracle relative to which

Portland, ME 04103, USA IL 60637, USA. Abstract. Buhrman and Torenvliet created an oracle relative to which Beyond P NP = NEXP Stephen A. Fenner 1? and Lance J. Fortnow 2?? 1 University of Southern Maine, Department of Computer Science 96 Falmouth St., Portland, ME 04103, USA E-mail: fenner@usm.maine.edu, Fax:

More information

Strategies for Stable Merge Sorting

Strategies for Stable Merge Sorting Strategies for Stable Merge Sorting Preliminary version. Comments appreciated. Sam Buss sbuss@ucsd.edu Department of Mathematics University of California, San Diego La Jolla, CA, USA Alexander Knop aknop@ucsd.edu

More information

Almost Optimal Sublinear Time Parallel. Lawrence L. Larmore. Wojciech Rytter y. Abstract

Almost Optimal Sublinear Time Parallel. Lawrence L. Larmore. Wojciech Rytter y. Abstract Almost Optimal Sublinear Time Parallel Recognition Algorithms for Three Subclasses of Contet Free Languages Lawrence L. Larmore Wojciech Rytter y Abstract Sublinear time almost optimal algorithms for the

More information

Chapter 2 Source Models and Entropy. Any information-generating process can be viewed as. computer program in executed form: binary 0

Chapter 2 Source Models and Entropy. Any information-generating process can be viewed as. computer program in executed form: binary 0 Part II Information Theory Concepts Chapter 2 Source Models and Entropy Any information-generating process can be viewed as a source: { emitting a sequence of symbols { symbols from a nite alphabet text:

More information

COMP 355 Advanced Algorithms

COMP 355 Advanced Algorithms COMP 355 Advanced Algorithms Algorithm Design Review: Mathematical Background 1 Polynomial Running Time Brute force. For many non-trivial problems, there is a natural brute force search algorithm that

More information

Lecture and notes by: Alessio Guerrieri and Wei Jin Bloom filters and Hashing

Lecture and notes by: Alessio Guerrieri and Wei Jin Bloom filters and Hashing Bloom filters and Hashing 1 Introduction The Bloom filter, conceived by Burton H. Bloom in 1970, is a space-efficient probabilistic data structure that is used to test whether an element is a member of

More information

2.1 Computational Tractability. Chapter 2. Basics of Algorithm Analysis. Computational Tractability. Polynomial-Time

2.1 Computational Tractability. Chapter 2. Basics of Algorithm Analysis. Computational Tractability. Polynomial-Time Chapter 2 2.1 Computational Tractability Basics of Algorithm Analysis "For me, great algorithms are the poetry of computation. Just like verse, they can be terse, allusive, dense, and even mysterious.

More information

Counting and Constructing Minimal Spanning Trees. Perrin Wright. Department of Mathematics. Florida State University. Tallahassee, FL

Counting and Constructing Minimal Spanning Trees. Perrin Wright. Department of Mathematics. Florida State University. Tallahassee, FL Counting and Constructing Minimal Spanning Trees Perrin Wright Department of Mathematics Florida State University Tallahassee, FL 32306-3027 Abstract. We revisit the minimal spanning tree problem in order

More information

Cardinality Networks: a Theoretical and Empirical Study

Cardinality Networks: a Theoretical and Empirical Study Constraints manuscript No. (will be inserted by the editor) Cardinality Networks: a Theoretical and Empirical Study Roberto Asín, Robert Nieuwenhuis, Albert Oliveras, Enric Rodríguez-Carbonell Received:

More information

Johns Hopkins Math Tournament Proof Round: Automata

Johns Hopkins Math Tournament Proof Round: Automata Johns Hopkins Math Tournament 2018 Proof Round: Automata February 9, 2019 Problem Points Score 1 10 2 5 3 10 4 20 5 20 6 15 7 20 Total 100 Instructions The exam is worth 100 points; each part s point value

More information

Problem 1: (Chernoff Bounds via Negative Dependence - from MU Ex 5.15)

Problem 1: (Chernoff Bounds via Negative Dependence - from MU Ex 5.15) Problem 1: Chernoff Bounds via Negative Dependence - from MU Ex 5.15) While deriving lower bounds on the load of the maximum loaded bin when n balls are thrown in n bins, we saw the use of negative dependence.

More information

A Linear Time Algorithm for Ordered Partition

A Linear Time Algorithm for Ordered Partition A Linear Time Algorithm for Ordered Partition Yijie Han School of Computing and Engineering University of Missouri at Kansas City Kansas City, Missouri 64 hanyij@umkc.edu Abstract. We present a deterministic

More information

Primary classes of compositions of numbers

Primary classes of compositions of numbers Annales Mathematicae et Informaticae 41 (2013) pp. 193 204 Proceedings of the 15 th International Conference on Fibonacci Numbers and Their Applications Institute of Mathematics and Informatics, Eszterházy

More information

Kirsten Lackner Solberg. Dept. of Math. and Computer Science. Odense University, Denmark

Kirsten Lackner Solberg. Dept. of Math. and Computer Science. Odense University, Denmark Inference Systems for Binding Time Analysis Kirsten Lackner Solberg Dept. of Math. and Computer Science Odense University, Denmark e-mail: kls@imada.ou.dk June 21, 1993 Contents 1 Introduction 4 2 Review

More information

A GREEDY APPROXIMATION ALGORITHM FOR CONSTRUCTING SHORTEST COMMON SUPERSTRINGS *

A GREEDY APPROXIMATION ALGORITHM FOR CONSTRUCTING SHORTEST COMMON SUPERSTRINGS * A GREEDY APPROXIMATION ALGORITHM FOR CONSTRUCTING SHORTEST COMMON SUPERSTRINGS * 1 Jorma Tarhio and Esko Ukkonen Department of Computer Science, University of Helsinki Tukholmankatu 2, SF-00250 Helsinki,

More information

Ahlswede Khachatrian Theorems: Weighted, Infinite, and Hamming

Ahlswede Khachatrian Theorems: Weighted, Infinite, and Hamming Ahlswede Khachatrian Theorems: Weighted, Infinite, and Hamming Yuval Filmus April 4, 2017 Abstract The seminal complete intersection theorem of Ahlswede and Khachatrian gives the maximum cardinality of

More information

Spanning and Independence Properties of Finite Frames

Spanning and Independence Properties of Finite Frames Chapter 1 Spanning and Independence Properties of Finite Frames Peter G. Casazza and Darrin Speegle Abstract The fundamental notion of frame theory is redundancy. It is this property which makes frames

More information

Generating Permutations and Combinations

Generating Permutations and Combinations Generating Permutations and Combinations March 0, 005 Generating Permutations We have learned that there are n! permutations of {,,, n} It is important in many instances to generate a list of such permutations

More information

c 1998 Society for Industrial and Applied Mathematics Vol. 27, No. 4, pp , August

c 1998 Society for Industrial and Applied Mathematics Vol. 27, No. 4, pp , August SIAM J COMPUT c 1998 Society for Industrial and Applied Mathematics Vol 27, No 4, pp 173 182, August 1998 8 SEPARATING EXPONENTIALLY AMBIGUOUS FINITE AUTOMATA FROM POLYNOMIALLY AMBIGUOUS FINITE AUTOMATA

More information

Circuit depth relative to a random oracle. Peter Bro Miltersen. Aarhus University, Computer Science Department

Circuit depth relative to a random oracle. Peter Bro Miltersen. Aarhus University, Computer Science Department Circuit depth relative to a random oracle Peter Bro Miltersen Aarhus University, Computer Science Department Ny Munkegade, DK 8000 Aarhus C, Denmark. pbmiltersen@daimi.aau.dk Keywords: Computational complexity,

More information

Notes on Logarithmic Lower Bounds in the Cell Probe Model

Notes on Logarithmic Lower Bounds in the Cell Probe Model Notes on Logarithmic Lower Bounds in the Cell Probe Model Kevin Zatloukal November 10, 2010 1 Overview Paper is by Mihai Pâtraşcu and Erik Demaine. Both were at MIT at the time. (Mihai is now at AT&T Labs.)

More information

COMP 355 Advanced Algorithms Algorithm Design Review: Mathematical Background

COMP 355 Advanced Algorithms Algorithm Design Review: Mathematical Background COMP 355 Advanced Algorithms Algorithm Design Review: Mathematical Background 1 Polynomial Time Brute force. For many non-trivial problems, there is a natural brute force search algorithm that checks every

More information

Introduction to Hash Tables

Introduction to Hash Tables Introduction to Hash Tables Hash Functions A hash table represents a simple but efficient way of storing, finding, and removing elements. In general, a hash table is represented by an array of cells. In

More information

An Approximation Algorithm for Constructing Error Detecting Prefix Codes

An Approximation Algorithm for Constructing Error Detecting Prefix Codes An Approximation Algorithm for Constructing Error Detecting Prefix Codes Artur Alves Pessoa artur@producao.uff.br Production Engineering Department Universidade Federal Fluminense, Brazil September 2,

More information

arxiv: v1 [math.co] 25 Apr 2018

arxiv: v1 [math.co] 25 Apr 2018 Nyldon words arxiv:1804.09735v1 [math.co] 25 Apr 2018 Émilie Charlier Department of Mathematics University of Liège Allée de la Découverte 12 4000 Liège, Belgium echarlier@uliege.be Manon Stipulanti Department

More information

CPSC 518 Introduction to Computer Algebra Schönhage and Strassen s Algorithm for Integer Multiplication

CPSC 518 Introduction to Computer Algebra Schönhage and Strassen s Algorithm for Integer Multiplication CPSC 518 Introduction to Computer Algebra Schönhage and Strassen s Algorithm for Integer Multiplication March, 2006 1 Introduction We have now seen that the Fast Fourier Transform can be applied to perform

More information

A General Lower Bound on the I/O-Complexity of Comparison-based Algorithms

A General Lower Bound on the I/O-Complexity of Comparison-based Algorithms A General Lower ound on the I/O-Complexity of Comparison-based Algorithms Lars Arge Mikael Knudsen Kirsten Larsent Aarhus University, Computer Science Department Ny Munkegade, DK-8000 Aarhus C. August

More information

ON SENSITIVITY OF k-uniform HYPERGRAPH PROPERTIES

ON SENSITIVITY OF k-uniform HYPERGRAPH PROPERTIES ON SENSITIVITY OF k-uniform HYPERGRAPH PROPERTIES JOSHUA BIDERMAN, KEVIN CUDDY, ANG LI, MIN JAE SONG Abstract. In this paper we present a graph property with sensitivity Θ( n), where n = ( v 2) is the

More information

9 Union Find. 9 Union Find. List Implementation. 9 Union Find. Union Find Data Structure P: Maintains a partition of disjoint sets over elements.

9 Union Find. 9 Union Find. List Implementation. 9 Union Find. Union Find Data Structure P: Maintains a partition of disjoint sets over elements. Union Find Data Structure P: Maintains a partition of disjoint sets over elements. P. makeset(x): Given an element x, adds x to the data-structure and creates a singleton set that contains only this element.

More information