Abstract

We are given integers 0⩽G1⩽G2≠0 and a sequence Sn=〈a1,a2,…,an〉 of n integers. The goal is to compute the minimum number of insertions and deletions necessary to transform Sn into a valid sequence, where a sequence is valid if it is nonempty, all elements are integers, and all the differences between consecutive elements are between G1 and G2. For this problem from the database theory literature, previous dynamic programming algorithms have running times O(n2) and O(A⋅nlogn), for a parameter A unrelated to n. We use a geometric data structure to obtain a O(nlognloglogn) running time.

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

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.