Abstract
The classical set union problem is to manipulate a partition of U = {1,2,...,n} under the operations find and union. We study a variant of this problem, where backtracking over the union operations is possible with the deunion operation. An implementation is developed to on-line perform an intermixed sequence of m finds, k unions and at most k deunions in O((m+k) log log n) steps. An O(k + m log n) method is also given. The problem considered is motivated by questions arising in the implementation of the programming language Prolog.
Preview
Unable to display preview. Download preview PDF.
References
H.N.Gabow and R.E.Tarjan: A linear-time algorithm for a special case of disjoint set union. Proceedings of the 15th ACM Symposium on Theory of Computing (1983), 246–251.
C.J.Hogger: Introduction to Logic Programming. Academic Press, 1984.
H.Mannila and E.Ukkonen: On the complexity of unification sequences. Third International Conference on Logic Programming, London, July 14–18, 1986, to appear.
R.E. Tarjan: Efficiency of a good but not linear disjoint set union algorithm. J.ACM 22, 2 (April 1975), 215–225.
R.E. Tarjan: A class of algorithms which require nonlinear time to maintain disjoint sets. J. Computer and System Sciences 18 (1979), 110–127.
R.E. Tarjan: Amortized computational complexity. SIAM J. Alg. Disc. Meth. 6 (1985), 306–318.
R.E. Tarjan and J. van Leeuwen: Worst-case analysis of set union algorithms. J.ACM 31, 2 (April 1984), 245–281.
J. van Leeuwen and T. van der Weide: Alternative path compression techniques. Techn. Rep. RUU-CS-77-3, Rijksuniversiteit Utrecht, Utrecht, The Netherlands.
D.H.D. Warren and L.M. Pereira: Prolog — the language and its implementation compared with LISP. ACM SIGPLAN Notices 12, 3 (August 1977), 109–115.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1986 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mannila, H., Ukkonen, E. (1986). The set union problem with backtracking. In: Kott, L. (eds) Automata, Languages and Programming. ICALP 1986. Lecture Notes in Computer Science, vol 226. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-16761-7_73
Download citation
DOI: https://doi.org/10.1007/3-540-16761-7_73
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-16761-7
Online ISBN: 978-3-540-39859-2
eBook Packages: Springer Book Archive