Abstract
This paper deals with a new method of coding unlabeled trees, the resulting code being a string of integers. For a tree onn vertices both the coding and the decoding algorithm work in time 0(n). Givenn the “mean length” of code strings is shorter than with other existing integer string codes. The new coding method is used to derive an algorithm for generating all unlabeled trees of a given size without repetition.
Zusammenfassung
In dieser Arbeit stellen wir ein neues Kodierungsverfahren für freie Bäume vor. Wie bei anderen Methoden werden Tupel aus ganzen Zahlen zur Kodierung verwendet. Sowohl der Kodierungs- als auch der Dekodierungsalgorithmus arbeiten in Zeit 0(n), wennn die Knotenzahl bedeutet. Die “mittlere Kodelänge” des neuen Verfahrens ist kleiner als bei vergleichbaren bekannten Verfahren. Das Verfahren wird zur Herleitung eines Algorithmus verwendet, der die Kodetupel aller freien Bäume gegebenen Umfangs ohne Wiederholung herstellt.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Aho, V. A., Hopcroft, J. E., Ullman, J. D.: The Design and Analysis of Computer Algorithms. Reading, Mass.: Addison-Wesley 1974.
Beyer, T., Hedetniemi, S. M.: Constant time generation of rooted trees. SIAM J. Comp.9, 706 (1980).
Chaiken, S., Dewdney, A. K., Slater, P. J.: An optimal diagonal tree code. SIAM J. Alg. Disc. Meth.4, 42 (1983).
Dewdney, A. K.: Diagonal tree codes. Information and Control40, 235 (1979).
Hopcroft, J. E., Tarjan, J. E.: Isomorphism of planar graphs. In: Complexity of Computer Computations (Miller, R. E., Thatcher, J. W., eds.). New York: Plenum Press 1972.
Hopcroft, J. E., Wong, J. K.: A linear time algorithm for isomorphism of planar graphs. In: Proceedings 6th Annual STOC Symposium, pp. 172–184, 1974.
Jovanović, A., Danilović, D.: A new algorithm for solving the isomorphism problem. Computing32, 187 (1984).
Knop, J. V., Müller, W. R., Jericević, Z., Trinjastić, N.: Computer enumeration and generation of trees and rooted trees. J. Chem. Inf. Comput. Sci.21, 91 (1981).
Patrinos, A. N., Hakimi, S. L.: The distance matrix of a graph and its tree realization. Quart. Appl. Math.30, 255 (1972).
Read, R. C.: How to grow trees. In: Proceedings Calgary Int. Conf. on combinatorial structures and their applications. New York: Gordon & Breach 1969.
Read, R. C.: The coding of various kinds of trees. In: Graph Theory and Computing (Read, R. C., ed.), pp. 153–182. New York: Academic Press 1972.
Read, R. C.: Every one a winner or How to avoid isomorphism search when cataloguing combinatorial structures. Ann. Discr. Math.2, 107 (1978).
Robinson, R. W., Schwenk, A. J.: The distribution of degrees in a large random tree. Discr. Math.12, 359 (1975).
Smolenskii, Y. A.: A method for linear recording of graphs. USSR Comp. Math. and Math. Phys.2, 396 (1963).
Zaks, S., Richards, D.: Generating trees and other combinatorial objects lexicographically. SIAM J. Comp.8, 73 (1979).
Zaks, S.: Lexicographic generation of ordered trees. Theoretical Computer Sci.10, 63 (1980).
Zaretskii, K.: Constructing a tree on the basis of a set of distances between the hanging vertices. Uspekhi Nat. Nauk.20, 90 (1965).
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Tinhofer, G., Schreck, H. Linear time tree codes. Computing 33, 211–225 (1984). https://doi.org/10.1007/BF02242268
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF02242268