Probabilistic analysis of set operations with constant-time set equality test

  • William Pugh
Theory Of Computing, Algorithms And Programming
Part of the Lecture Notes in Computer Science book series (LNCS, volume 468)


We analyze the implementation of set operations using binary tries. Our techniques are substantially simpler than previous techniques used for this problem, and allow us to analysis not only the expected performance but also the probability distribution of the performance. We show that by making use of constant-time equality tests, we can achieve better performance than any previously known method for performing set operations. In particular, for two sets A and B of n elements that differ in only k elements, we can perform any set operation such as AB in only O(k log n) expected time (without knowing in advance anything about the differences between A and B).


Analysis of algorithms Data structures Probabilistic analysis 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [All78]
    John Allen. Anatomy of LISP, McGraw Hill Book Company, NY, 1978.Google Scholar
  2. [DY90]
    Daniel Yellin, Representing Sets with Constant Time Equality Testing, ACM-SIAM Symposium on Discrete Algorithms, 64–73. January 1990.Google Scholar
  3. [GK76]
    Eiichi Goto and Yasumasa Kanada. Hashing Lemmas on Time Complexities with Applications to Formula Manipulation, Proceedings of the 1976 ACM Symposium on Symbolic and Algebraic Computation, pp 154–158.Google Scholar
  4. [Par78]
    Luis Isidoro Trabb Pardo. Set Representation and Set Intersection, Ph.D. thesis, Stanford University, 1978Google Scholar
  5. [SG76]
    M. Sassa and E. Goto. A hashing method for fast set operations. Inf. Proc. Let. 5(2):31–34, June 1976.Google Scholar
  6. [SL78]
    J.M. Spitzen and K.N. Levitt. An example of hierarchical design and proof, Communications of the ACM, 21(12):1064–1075, December 1978.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • William Pugh
    • 1
  1. 1.Institute for Advanced Computer Studies and Department of Computer ScienceUniversity of MarylandCollege Park

Personalised recommendations