Concurrent disjoint set union

Siddhartha V. Jayanti, Robert E. Tarjan

Research output: Contribution to journalArticlepeer-review

7 Scopus citations

Abstract

We develop and analyze concurrent algorithms for the disjoint set union (“union-find”) problem in the shared memory, asynchronous multiprocessor model of computation, with CAS (compare and swap) or DCAS (double compare and swap) as the synchronization primitive. We give a deterministic bounded wait-free algorithm that uses DCAS and has a total work bound of O(m·(log(npm+1)+α(n,mnp))) for a problem with n elements and m operations solved by p processes, where α is a functional inverse of Ackermann’s function. We give two randomized algorithms that use only CAS and have the same work bound in expectation. The analysis of the second randomized algorithm is valid even if the scheduler is adversarial. Our DCAS and randomized algorithms take O(log n) steps per operation, worst-case for the DCAS algorithm, high-probability for the randomized algorithms. Our work and step bounds grow only logarithmically with p, making our algorithms truly scalable. We prove that for a class of symmetric algorithms that includes ours, no better step or work bound is possible. Our work is theoretical, but Alistarh et al (In search of the fastest concurrent union-find algorithm, 2019), Dhulipala et al (A framework for static and incremental parallel graph connectivity algorithms, 2020) and Hong et al (Exploring the design space of static and incremental graph connectivity algorithms on gpus, 2020) have implemented some of our algorithms on CPUs and GPUs and experimented with them. On many realistic data sets, our algorithms run as fast or faster than all others.

Original languageEnglish (US)
Pages (from-to)413-436
Number of pages24
JournalDistributed Computing
Volume34
Issue number6
DOIs
StatePublished - Dec 2021

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • Hardware and Architecture
  • Computer Networks and Communications
  • Computational Theory and Mathematics

Keywords

  • Algorithms
  • Concurrent
  • Data structures
  • Linearizable
  • Union find
  • Wait free

Fingerprint

Dive into the research topics of 'Concurrent disjoint set union'. Together they form a unique fingerprint.

Cite this