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.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.