Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/800061.808753acmconferencesArticle/Chapter ViewAbstractPublication PagesstocConference Proceedingsconference-collections
Article
Free access

A linear-time algorithm for a special case of disjoint set union

Published: 01 December 1983 Publication History

Abstract

This paper presents a linear-time algorithm for the special case of the disjoint set union problem in which the structure of the unions (defined by a “union tree”) is known in advance. The algorithm executes an intermixed sequence of m union and find operations on n elements in 0(m+n) time and 0(n) space. This is a slight but theoretically significant improvement over the fastest known algorithm for the general problem, which runs in 0(mα(m+n, n)+n) time and 0(n) space, where α is a functional inverse of Ackermann's function. Used as a subroutine, the algorithm gives similar improvements in the efficiency of algorithms for solving a number of other problems, including two-processor scheduling, the off-line min problem, matching on convex graphs, finding nearest common ancestors off-line, testing a flow graph for reducibility, and finding two disjoint directed spanning trees. The algorithm obtains its efficiency by combining a fast algorithm for the general problem with table look-up on small sets, and requires a random access machine for its implementation. The algorithm extends to the case in which single-node additions to the union tree are allowed. The extended algorithm is useful in finding maximum cardinality matchings on nonbipartite graphs.

References

[1]
A.V. Aho, J.E. Hopcroft, J.D. Ullman The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, Mass., 1974.
[2]
A.V. Aho, J.E. Hopcroft, J.D. Ullman, "On finding lowest common ancestors in trees," SIAM J. Comp. 5 (1976), pp. 115-132.
[3]
E.W. Dijkstra, A Discipline of Programming, Prentice-Hall, Englewood Cliffs, New Jersey, 1976.
[4]
J. Doyle and R.L. Rivest, "Linear expected time of a simple union-find algorithm," Inf. Proc. Letters 5, 1976, pp. 146-148.
[5]
G.N. Frederickson, "Scheduling unit-time tasks with integer release times and deadlines," Tech. Rept. CS-81-27, Dept. of Computer Sci., Penn. State Univ., University Park, PA, 1982.
[6]
H.N. Gabow, "An efficient implementation of Edmonds' algorithm for maximum matching on graphs," J. ACM 23 (1976) pp. 221-234.
[7]
H.N. Gabow, "A linear-time recognition algorithm for interval dags," Inf. Proc. Letters 12 (1981), pp. 20-22.
[8]
H.N. Gabow, "An almost-linear algorithm for two-processor scheduling," J. ACM, 29, 3 (1982), pp. 766-780.
[9]
J.R. Gilbert and D.J. Rose, "A separator theorem for chordal graphs," Tech. Rept. TR 82-523, Dept. of Comp. Sci., Cornell Univ., Ithaca, New York, 1982.
[10]
H.N. Gabow and R.E. Tarjan, "A linear-time algorithm for a special case of disjoint set union," Bell Laboratories Report, July 1982.
[11]
D. Harel, "A linear time algorithm for the least common ancestors problem," Proc. 21st Annual Symp. on Found. Comp. Sci. (1980), pp. 308-319.
[12]
B. Havens, "Experiments on an asymptotically optimum, special purpose set merging algorithm," M.S. Thesis, Dept. of Computer Sci., Univ. of Colorado, Boulder, CO, 1983.
[13]
E. Horowitz, and S. Sahni, Fundamentals of Computer Algorithms, Computer Science Press, Potomac, MD, 1978.
[14]
D. Harel, R.E. Tarjan, "Fast algorithms for finding nearest common ancestors," SIAM J. Comput., submitted.
[15]
J.E. Hopcroft and J.D. Ullman, "Set merging algorithms," SIAM J. Comput. 2, 4, 1973, pp. 294-303.
[16]
D.E. Knuth and A. Schonhage, "The expected linearity of a simple equivalence algorithm," Theoretical Comp. Sci. 6 (1978), pp. 281-315.
[17]
W. Lipski, Jr. and F.P. Preparata, "Efficient algorithms for finding maximum matchings in convex bipartite graphs and related problems," Acta Informatica 15 (1981), pp. 329-346.
[18]
T. Lengauer and R.E. Tarjan, "A fast algorithm for finding dominators in a flowgraph," ACM Trans. on Prog. Lang. and Systems 1, 1, 1979, pp. 121-141.
[19]
S. Micali, private communication, May 1982.
[20]
S. Micali, and V.V. Vazirani. "An 0(@@@@ E) algorithm for finding maximum matching in general graphs," Proc. 21st Annual Symp. on Found. of Comp. Sci. (1980), pp. 17-27.
[21]
C.H. Papadimitriou and M. Yannakakis, "Scheduling interval-ordered tasks," SIAM J, Comput. 8, 3, 1979, pp. 405-409.
[22]
F.P. Preparata and W. Lipski Jr., "Three layers are enough," Proc. 23rd Annual Symp. on Foundations of Comp. Sci., 1982, pp. 350-357. Also personal communication, F.P. Preparata.
[23]
R. Sethi, "Scheduling graphs on two processors," SIAM J. Comp. 5 (1976), pp, 73-82.
[24]
R.E. Stearns and D.J. Rosenkrantz, "Table machine simulation." Proc. 10th Annual Symp. on Switching and Automata Theory, 1969, pp. 118-128.
[25]
R.E. Tarjan, "Testing flow graph reducibility," J. Comp. Sys. Sci 9 (1974), pp. 355-365.
[26]
R.E. Tarjan, "Efficiency of a good but not linear set union algorithm," J. ACM 22 (1975), pp. 215-225.
[27]
R.E. Tarjan, "Edge-disjoint spanning trees and depth-first search," Acta Informatica 6 (1976), pp. 171-185.
[28]
R.E. Tarjan, "Applications of path compression on balanced trees," J. ACM 26, 4 (1979), pp. 690-715.
[29]
R.E. Tarjan, "A class of algorithms which require non-linear time to maintain disjoint sets," J. Comp. Sys. Sci. 18 (1979), pp. 110-127.
[30]
J.E. Thornton, Design of a computer: The Control Data 6600, Scott, Foresman and Co., Glenview, Illinois, 1970.
[31]
R.E. Tarjan, J. van Leeuwen, "Worst-case analysis of set union algorithms," J. ACM, submitted.

Cited By

View all
  • (2024)Scheduling and Physical DesignProceedings of the 2024 International Symposium on Physical Design10.1145/3626184.3635290(219-225)Online publication date: 12-Mar-2024
  • (2024)rCanary: Detecting Memory Leaks Across Semi-Automated Memory Management Boundary in RustIEEE Transactions on Software Engineering10.1109/TSE.2024.344362450:9(2472-2484)Online publication date: Sep-2024
  • (2024)Linear Time Online Algorithms for Constructing Linear-size Suffix TrieTheoretical Computer Science10.1016/j.tcs.2024.114765(114765)Online publication date: Aug-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
STOC '83: Proceedings of the fifteenth annual ACM symposium on Theory of computing
December 1983
487 pages
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 December 1983

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Acceptance Rates

Overall Acceptance Rate 1,469 of 4,586 submissions, 32%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1,437
  • Downloads (Last 6 weeks)228
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Scheduling and Physical DesignProceedings of the 2024 International Symposium on Physical Design10.1145/3626184.3635290(219-225)Online publication date: 12-Mar-2024
  • (2024)rCanary: Detecting Memory Leaks Across Semi-Automated Memory Management Boundary in RustIEEE Transactions on Software Engineering10.1109/TSE.2024.344362450:9(2472-2484)Online publication date: Sep-2024
  • (2024)Linear Time Online Algorithms for Constructing Linear-size Suffix TrieTheoretical Computer Science10.1016/j.tcs.2024.114765(114765)Online publication date: Aug-2024
  • (2023)Modular Data Plane Verification for Compositional NetworksProceedings of the ACM on Networking10.1145/36291451:CoNEXT3(1-22)Online publication date: 28-Nov-2023
  • (2023)SafeDrop: Detecting Memory Deallocation Bugs of Rust Programs via Static Data-flow AnalysisACM Transactions on Software Engineering and Methodology10.1145/354294832:4(1-21)Online publication date: 26-May-2023
  • (2023)pGRASS-Solver: A Graph Spectral Sparsification-Based Parallel Iterative Solver for Large-Scale Power Grid AnalysisIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2023.323575442:9(3031-3044)Online publication date: Sep-2023
  • (2022)Edge connectivity augmentation in near-linear timeProceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing10.1145/3519935.3520038(137-150)Online publication date: 9-Jun-2022
  • (2022)feGRASS: Fast and Effective Graph Spectral Sparsification for Scalable Power Grid AnalysisIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2021.306064741:3(681-694)Online publication date: Mar-2022
  • (2021)pGRASS-Solver: A Parallel Iterative Solver for Scalable Power Grid Analysis Based on Graph Spectral Sparsification2021 IEEE/ACM International Conference On Computer Aided Design (ICCAD)10.1109/ICCAD51958.2021.9643489(1-9)Online publication date: 1-Nov-2021
  • (2021)A fast algorithm for quadratic resource allocation problems with nested constraintsComputers and Operations Research10.1016/j.cor.2021.105451135:COnline publication date: 1-Nov-2021
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media