Abstract
Known algorithms computing a canonical form for trees in linear time use specialized canonical forms for trees and no canonical forms defined for all graphs. For a graph \(G=(V,E)\) the maximal canonical form is obtained by relabelling the vertices with \(1,\ldots ,|V|\) in a way that the binary number with \(|V|^2\) bits that is the result of concatenating the rows of the adjacency matrix is maximal. This maximal canonical form is not only defined for all graphs but even plays a special role among the canonical forms for graphs due to some nesting properties allowing orderly algorithms. We give an \(O(|V|^2)\) algorithm to compute the maximal canonical form of a tree.
Similar content being viewed by others
References
G. Brinkmann, Fast generation of cubic graphs. J. Graph Theory 23(2), 139–149 (1996)
Z. Du, Wiener indices of trees and monocyclic graphs with given bipartition. Int. J. Quantum Chem. 112, 1598–1605 (2012)
I.A. Faradžev, Constructive enumeration of combinatorial objects, in Colloques Internationaux C.N.R.S. No260—Problèmes Combinatoires et Théorie des Graphes, (Orsay, 1976), pp. 131–135
R. Grund, Konstruktion schlichter graphen mit gegebener gradpartition. Bayreuth. Math. Schriften 44, 73–104 (1993)
G. Li, F. Ruskey, The advantages of forward thinking in generating rooted and free trees, in 100th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), (1999), pp. 939–940
M. Meringer, Fast generation of regular graphs and construction of cages. J. Graph Theory 30(2), 137–146 (1999)
R.C. Read (ed.), Graph Theory and Computing (Academic Press, New York, 1972)
R.C. Read, Every one a winner. Ann. Discrete Math. 2, 107–120 (1978)
M. Suzuki, H. Nagamochi, T. Akutsu, Efficient enumeration of monocyclic chemical graphs with given path frequencies. J. Cheminform. 6, 31 (2014)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Brinkmann, G. Computing the maximal canonical form for trees in polynomial time. J Math Chem 56, 1437–1444 (2018). https://doi.org/10.1007/s10910-018-0867-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10910-018-0867-8