Computing maximum hamiltonian paths in complete graphs with tree metric

  • Authors:
  • Wojciech Rytter;Bartosz Szreder

  • Affiliations:
  • Dept. of Mathematics, Computer Science and Mechanics, University of Warsaw, Warsaw, Poland,Dept. of Math. and Informatics, Copernicus University, Toruń, Poland;Dept. of Mathematics, Computer Science and Mechanics, University of Warsaw, Warsaw, Poland

  • Venue:
  • FUN'12 Proceedings of the 6th international conference on Fun with Algorithms
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.