Abstract
Given a partition of an n element set into equivalence classes, we consider time-space tradeoffs for representing it to support the query that asks whether two given elements are in the same equivalence class. This has various applications including for testing whether two vertices are in the same connected component in an undirected graph or in the same strongly connected component in a directed graph.
We consider the problem in several models.
-
Concerning labeling schemes where we assign labels to elements and the query is to be answered just by examining the labels of the queried elements (without any extra space): if each vertex is required to have a unique label, then we show that a label space of \(\sum_{i=1}^n \lfloor{n \over i} \rfloor\) is necessary and sufficient. In other words, \(\lg n + \lg \lg n + O(1)\) bits of space are necessary and sufficient for representing each of the labels. This slightly strengthens the known lower bound and is in contrast to the known necessary and sufficient bound of \(\lceil \lg n \rceil\) for the label length, if each vertex need not get a unique label.
-
Concerning succinct data structures for the problem when the n elements are to be uniquely assigned labels from label set {1,…, n}, we first show that \(\Theta(\sqrt n)\) bits are necessary and sufficient to represent the equivalence class information. This space includes the space for implicitly encoding the vertex labels. We can support the query in such a structure in \(O(\lg n)\) time in the standard word RAM model.
We then develop structures where the queries can be answered
-
in \(O(\lg \lg n)\) time using \(O(\sqrt n \lg n/\lg \lg n)\) bits, and
-
in O(1) time using \(O({\sqrt n} \lg n)\) bits of space.
-
We also develop a dynamic structure that uses \(O(\sqrt n \lg n)\) bits to support equivalence queries and unions in \(O(\lg n/\lg \lg n)\) worst case time or O(α(n)) expected amortized time where α(n) is the inverse Ackermann function.
Work done while the first and the third authors were on sabbatical at the University of Waterloo, Canada; research supported by NSERC and Canada Research Chairs Programme.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Alstrup, S., Ben-Amram, A.M., Rauhe, T.: Worst-case and amortised optimality in union-find. In: Proceedings of the 31st ACM Symposium on Theory of Computing (STOC), pp. 499–506 (1999)
Alstrup, S., Bille, P., Rauhe, T.: Labeling schemes for small distances in trees. SIAM Journal on Discrete Math. 19(2), 448–462 (2005)
Andersson, A., Miltersen, P.B., Thorup, M.: Fusion trees can be implemented with AC0 instructions only. Theoretical Computer Science 215, 337–344 (1999)
Barbay, J., Castelli Aleardi, L., He, M., Munro, J.I.: Succinct representation of labeled graphs. Algorithmica 62(1-2), 224–257 (2012)
Barbay, J., Gagie, T., Navarro, G., Nekrich, Y.: Alphabet partitioning for compressed rank/select and applications. In: Cheong, O., Chwa, K.-Y., Park, K. (eds.) ISAAC 2010, Part II. LNCS, vol. 6507, pp. 315–326. Springer, Heidelberg (2010)
Blum, N.: On the single-operation worst-case time complexity of the disjoint set union problem. SIAM Journal on Computing 15(4), 1021–1024 (1986)
Blandford, D.K., Blelloch, G.E.: Compact representations of ordered sets. In: Proceedings of ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 11–19 (2004)
Brodnik, A., Munro, J.I.: Membership in constant time and almost-minimum space. SIAM Journal on Computing 5, 1627–1640 (1999)
Delpratt, O., Rahman, N., Raman, R.: Compressed prefix sums. SOFSEM (1), 235–247 (2007)
Dietzfelbinger, M., Karlin, A., Mehlhorn, K., Meyer auf der Heide, F., Rohnert, H., Tarjan, R.E.: Dynamic perfect hashing: upper and lower bounds. SIAM Journal on Computing 23 (4), 738–761 (1994)
Farzan, A., Munro, J.I.: Succinct representations of arbitrary graph. In: Proceedings of the European Symposium on Algorithms, pp. 393–404 (2008)
Franceschini, G., Muthukrishnan, S.M., Pǎtraşcu, M.: Radix sorting with no extra space. In: Arge, L., Hoffmann, M., Welzl, E. (eds.) ESA 2007. LNCS, vol. 4698, pp. 194–205. Springer, Heidelberg (2007)
Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. J. Comput. Syst. Sci. 47(3), 424–436 (1993)
Grossi, R., Orlandi, A., Raman, R., Srinivasa Rao, S.: More haste, less waste: lowering the redundancy in fully indexable dictionaries. In: Proceedings of the 26th international symposium on Theoretical Aspects of Computer Science, STACS, pp. 517–528 (2009)
Gupta, A., Hon, W.-K., Shah, R., Vitter, J.S.: Compressed data structures: dictionaries and data-aware measures. Theoretical Computer Science 387(3), 313–331 (2007)
Hagerup, T.: Sorting and searching on the word RAM. In: Meinel, C., Morvan, M. (eds.) STACS 1998. LNCS, vol. 1373, pp. 366–398. Springer, Heidelberg (1998)
Hardy, G.H., Ramanujan, S.: Asymptotic formulae in combinatory analysis. Proceedings of the London Mathematical Society 17, 75–115 (1918)
Katz, M., Katz, N.A., Korman, A., Peleg, D.: Labeling schemes for flow and connectivity. SIAM Journal on Computing 34(1), 23–40 (2004)
Munro, J.I., Nicholson, P.K.: Succinct posets. In: Epstein, L., Ferragina, P. (eds.) ESA 2012. LNCS, vol. 7501, pp. 743–754. Springer, Heidelberg (2012)
Raman, R.: Generating random graphs efficiently. In: Dehne, F., Fiala, F., Koczkodaj, W.W. (eds.) ICCI 1991. LNCS, vol. 497, pp. 149–160. Springer, Heidelberg (1991)
Raman, R., Raman, V., Rao, S.S.: Succinct indexable dictionaries with applications to encoding k-ary trees, multisets and prefix sums. ACM Transactions on Algorithms 3, 25 (2007)
Smid, M.H.M.: A data structure for the union-find problem having good single-operation complexity, ALCOM: Algorithms Review, Newsletter of the ESPRIT II Basic Research Actions Program (1990)
Willard, D.E.: Log-logarithmic worst-case range queries are possible in space Θ(N). Information Processing Letters 17 (2), 81–84 (1983)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lewenstein, M., Munro, J.I., Raman, V. (2013). Succinct Data Structures for Representing Equivalence Classes. In: Cai, L., Cheng, SW., Lam, TW. (eds) Algorithms and Computation. ISAAC 2013. Lecture Notes in Computer Science, vol 8283. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-45030-3_47
Download citation
DOI: https://doi.org/10.1007/978-3-642-45030-3_47
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-45029-7
Online ISBN: 978-3-642-45030-3
eBook Packages: Computer ScienceComputer Science (R0)