Abstract

We present an efficient algorithm for isometrically embedding weighted trees into low-dimensional ℓ∞-normed spaces. The proposed algorithm takes an n-vertex weighted tree as input and maps each of its vertices onto an integer-valued vector in Rd, where d=Θ(logn). The overall running time of the proposed algorithm is Θ(nlog2n). We also present many applications of this algorithm in the context of competitive programming, including novel tasks for which we do not know any alternative efficient solution. Essentially, the low dimensionality of the resulting vectors allows the efficient answering of various distance-related queries. By means of experiment, we have also compared different implementations of the proposed algorithm with regards to both running time and dimensionality of the resulting embedding for different classes of trees.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call