Efficient parallel algorithms
Computers and Intractability: A Guide to the Theory of NP-Completeness
Computers and Intractability: A Guide to the Theory of NP-Completeness
The Design and Analysis of Computer Algorithms
The Design and Analysis of Computer Algorithms
Hi-index | 0.00 |
We design a linear time algorithm computing the maximum weight Hamiltonian path in a weighted complete graph KT, where T is a given undirected tree. The vertices of KT 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 KT 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.