Abstract
We design a linear time algorithm computing the maximum weight Hamiltonian path in a weighted complete graph K T , where T is a given undirected tree. The vertices of K T are nodes of T and weight(i, j) is the distance between i, j in T. The input is the tree T and two nodes u, v ∈ T, the output is the maximum weight Hamiltonian path between these nodes. The size n of the input is the size of T (however the total size of the complete graph K T is quadratic with respect to n). Our algorithm runs in \(\mathcal{O}(n)\) time. Correctness is based on combinatorics of alternating sequences. The problem has been inspired by a similar (but much simpler) problem in a famous book of Hugo Steinhaus.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Steinhaus, H.: One Hundred Problems in Elementary Mathematics. Dover Publications (September 1, 1979)
Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison-Wesley (1974)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman (1979)
Gibbons, A., Rytter, W.: Efficient parallel algorithms. Cambridge University Press (1988)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Rytter, W., Szreder, B. (2012). Computing Maximum Hamiltonian Paths in Complete Graphs with Tree Metric. In: Kranakis, E., Krizanc, D., Luccio, F. (eds) Fun with Algorithms. FUN 2012. Lecture Notes in Computer Science, vol 7288. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30347-0_34
Download citation
DOI: https://doi.org/10.1007/978-3-642-30347-0_34
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-30346-3
Online ISBN: 978-3-642-30347-0
eBook Packages: Computer ScienceComputer Science (R0)