Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/2935764.2935768acmconferencesArticle/Chapter ViewAbstractPublication PagesspaaConference Proceedingsconference-collections
research-article

Just Join for Parallel Ordered Sets

Published: 11 July 2016 Publication History

Abstract

Ordered sets (and maps when data is associated with each key) are one of the most important and useful data types. The set-set functions union, intersection and difference are particularly useful in certain applications. Brown and Tarjan first described an algorithm for these functions, based on 2-3 trees, that meet the optimal Θ(m log (n/m+1)) time bounds in the comparison model (n and m ≤ n are the input sizes). Later Adams showed very elegant algorithms for the functions, and others, based on weight-balanced trees. They only require a single function that is specific to the balancing scheme---a function that joins two balanced trees---and hence can be applied to other balancing schemes. Furthermore the algorithms are naturally parallel. However, in the twenty-four years since, no one has shown that the algorithms, sequential or parallel are asymptotically work optimal. In this paper we show that Adams' algorithms are both work efficient and highly parallel (polylog span) across four different balancing schemes---AVL trees, red-black trees, weight balanced trees and treaps. To do this we use careful, but simple, algorithms for Join that maintain certain invariants, and our proof is (mostly) generic across the schemes.
To understand how the algorithms perform in practice we have also implemented them (all code except Join is generic across the balancing schemes). Interestingly the implementations on all four balancing schemes and three set functions perform similarly in time and speedup (more than 45x on 64 cores). We also compare the performance of our implementation to other existing libraries and algorithms.

References

[1]
S. Adams. Implementing sets effciently in a functional language. Technical Report CSTR 92--10, University of Southampton, 1992.
[2]
S. Adams. Efficient sets--a balancing act. Journal of functional programming, 3(04):553--561, 1993.
[3]
G. Adelson-Velsky and E. M. Landis. An algorithm for the organization of information. Proc. of the USSR Academy of Sciences, 145:263--266, 1962. In Russian, English translation by Myron J. Ricci in Soviet Doklady, 3:1259--1263, 1962.
[4]
Y. Akhremtsev and P. Sanders. Fast parallel operations on search trees. arXiv preprint arXiv:1510.05433, 2015.
[5]
R. Bayer. Symmetric binary b-trees: Data structure and maintenance algorithms. Acta Informatica, 1:290--306, 1972.
[6]
G. Blelloch, D. Ferizovic, and Y. Sun. Parallel ordered sets using join. arXiv preprint arXiv:1602.02120, 2016.
[7]
G. E. Blelloch and M. Reid-Miller. Fast set operations using treaps. In Proc. ACM Symposium on Parallel Algorithms and Architectures (SPAA), pages 16--26, 1998.
[8]
N. Blum and K. Mehlhorn. On the average number of rebalancing operations in weight-balanced trees. Theoretical Computer Science, 11(3):303--320, 1980.
[9]
R. D. Blumofe and C. E. Leiserson. Space-efficient scheduling of multithreaded computations. SIAM J. on Computing, 27(1):202--229, 1998.
[10]
R. P. Brent. The parallel evaluation of general arithmetic expressions. Journal of the ACM, 21(2):201--206, Apr. 1974.
[11]
N. G. Bronson, J. Casper, H. Chafi, and K. Olukotun. A practical concurrent binary search tree. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP), pages 257--268, 2010.
[12]
M. R. Brown and R. E. Tarjan. A fast merging algorithm. Journal of the ACM (JACM), 26(2):211--226, 1979.
[13]
E. D. Demaine, A. López-Ortiz, and J. I. Munro. Adaptive set intersections, unions, and differences. In In Proceedings of the 11th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2000.
[14]
S. Erb, M. Kobitzsch, and P. Sanders. Parallel bi-objective shortest paths using weight-balanced b-trees with bulk updates. In Experimental Algorithms, pages 111--122. Springer, 2014.
[15]
L. Frias and J. Singler. Parallelization of bulk operations for STL dictionaries. In Euro-Par 2007 Workshops: Parallel Processing, HPPC 2007, UNICORE Summit 2007, and VHPC 2007, pages 49--58, 2007.
[16]
Y. Hirai and K. Yamamoto. Balancing weight-balanced trees. Journal of Functional Programming, 21(03):287--307, 2011.
[17]
F. K. Hwang and S. Lin. A simple algorithm for merging two disjoint linearly ordered sets. SIAM J. on Computing, 1(1):31--39, 1972.
[18]
J. Katajainen. Efficient parallel algorithms for manipulating sorted sets. In Proceedings of the 17th Annual Computer Science Conference. University of Canterbury, 1994.
[19]
H. T. Kung and P. L. Lehman. Concurrent manipulation of binary search trees. ACM Trans. Database Syst., 5(3):354--382, 1980.
[20]
K. S. Larsen. AVL trees with relaxed balance. J. Comput. Syst. Sci., 61(3):508--522, 2000.
[21]
S. Marlow et al. Haskell 2010 language report. Available online http://www. haskell. org/(May 2011), 2010.
[22]
D. R. Musser, G. J. Derge, and A. Saini. STL tutorial and reference guide: C
[23]
programming with the standard template library. Addison-Wesley Professional, 2009.
[24]
A. Natarajan and N. Mittal. Fast concurrent lock-free binary search trees. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP), pages 317--328, 2014.
[25]
J. Nievergelt and E. M. Reingold. Binary search trees of bounded balance. SIAM J. Comput., 2(1):33--43, 1973.
[26]
H. Park and K. Park. Parallel algorithms for red--black trees. Theoretical Computer Science, 262(1):415--435, 2001.
[27]
W. J. Paul, U. Vishkin, and H. Wagener. Parallel dictionaries in 2--3 trees. In Proc. Intl. Colloq. on Automata, Languages and Programming (ICALP), pages 597--609, 1983.
[28]
R. Seidel and C. R. Aragon. Randomized search trees. Algorithmica, 16:464--497, 1996.
[29]
D. D. Sleator and R. E. Tarjan. Self-adjusting binary search trees. Journal of the ACM (JACM), 32(3):652--686, 1985.
[30]
M. Straka. Adams' trees revisited. In Trends in Functional Programming, pages 130--145. Springer, 2012.
[31]
R. E. Tarjan. Data Structures and Network Algorithms. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 1983.

Cited By

View all
  • (2024)Concurrent Data Structures Made EasyProceedings of the ACM on Programming Languages10.1145/36897758:OOPSLA2(1814-1842)Online publication date: 8-Oct-2024
  • (2024)The Functional Essence of Imperative Binary Search TreesProceedings of the ACM on Programming Languages10.1145/36563988:PLDI(518-542)Online publication date: 20-Jun-2024
  • (2024)CPMA: An Efficient Batch-Parallel Compressed Set Without PointersProceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3627535.3638492(348-363)Online publication date: 2-Mar-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
SPAA '16: Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures
July 2016
492 pages
ISBN:9781450342100
DOI:10.1145/2935764
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 July 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. AVL tree
  2. balanced binary search tree
  3. difference
  4. intersection
  5. join
  6. parallel algorithm
  7. red-black tree
  8. set functions
  9. split
  10. treap
  11. union
  12. weight-balanced tree

Qualifiers

  • Research-article

Funding Sources

  • The Intel Science and Technology Center
  • NSF

Conference

SPAA '16

Acceptance Rates

Overall Acceptance Rate 447 of 1,461 submissions, 31%

Upcoming Conference

SPAA '25
37th ACM Symposium on Parallelism in Algorithms and Architectures
July 28 - August 1, 2025
Portland , OR , USA

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)48
  • Downloads (Last 6 weeks)3
Reflects downloads up to 16 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Concurrent Data Structures Made EasyProceedings of the ACM on Programming Languages10.1145/36897758:OOPSLA2(1814-1842)Online publication date: 8-Oct-2024
  • (2024)The Functional Essence of Imperative Binary Search TreesProceedings of the ACM on Programming Languages10.1145/36563988:PLDI(518-542)Online publication date: 20-Jun-2024
  • (2024)CPMA: An Efficient Batch-Parallel Compressed Set Without PointersProceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3627535.3638492(348-363)Online publication date: 2-Mar-2024
  • (2024)Teaching Parallel Algorithms Using the Binary-Forking Model2024 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW)10.1109/IPDPSW63119.2024.00080(346-351)Online publication date: 27-May-2024
  • (2024)Analyzing the Performance: B-trees vs. Red-Black Trees with Caching StrategiesAdvancements in Smart Computing and Information Security10.1007/978-3-031-59107-5_5(53-64)Online publication date: 2-May-2024
  • (2023)Effective Verifiable Index Structure for High Contention Workload2023 4th International Conference on Computer Engineering and Application (ICCEA)10.1109/ICCEA58433.2023.10135381(663-668)Online publication date: 7-Apr-2023
  • (2023)Parallel-Batched Interpolation Search TreeParallel Computing Technologies10.1007/978-3-031-41673-6_9(109-125)Online publication date: 15-Aug-2023
  • (2023)New Routines for Faster Balancing of AVL TreesIntelligent Computing10.1007/978-3-031-37717-4_2(7-15)Online publication date: 1-Sep-2023
  • (2022)Space-efficient random walks on streaming graphsProceedings of the VLDB Endowment10.14778/3565816.356583516:2(356-368)Online publication date: 23-Nov-2022
  • (2022)Joinable Parallel Balanced Binary TreesACM Transactions on Parallel Computing10.1145/35127699:2(1-41)Online publication date: 11-Apr-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media