How Compression and Approximation Affect Efficiency in String Distance Measures
Arun Ganesh, Tomasz Kociumaka, Andrea Lincoln, Barna Saha
Abstract
Real-world data often comes in compressed form. Analyzing compressed data directly (without first decompressing it) can save space and time by orders of magnitude. In this work, we focus on fundamental sequence comparison problems and try to quantify the gain in time complexity when the underlying data is highly compressible. We consider grammar compression, which unifies many practically relevant compression schemes such as the Lempel-Ziv family, dictionary methods, and others. For two strings of total length N and total compressed size n, it is known that the edit distance and a longest common subsequence (LCS) can be computed exactly in time O (nN ), as opposed to O(N 2 ) for the uncompressed setting. Many real-world applications need to align multiple sequences simultaneously, and the fastest known exact algorithms for median edit distance and LCS of k strings run in O(N k ) time, whereas the one for center edit distance has a time complexity of O(N 2k ). This naturally raises the question if compression can help to reduce the running time significantly for k ≥ 3, perhaps to O(N k/2 n k/2 ) or, more optimistically, to O(N n k-1 ). 1 Unfortunately, we show new lower bounds that rule out any improvement beyond Ω(N k-1 n) time for any of these problems assuming the Strong Exponential Time Hypothesis (SETH), where again N and n represent the total length and the total compressed size, respectively. This answers an open question of Abboud, Backurs, Bringmann, and Künnemann (FOCS'17).
In presence of such negative results, we ask if allowing approximation can help, and we show that approximation and compression together can be surprisingly effective for both multiple and two strings.
We develop an O (N k/2 n k/2 )-time FPTAS for the median edit distance of k sequences, leading to a saving of nearly half the dimensions for highly-compressible sequences. In comparison, no O(N k-Ω(1) )-time PTAS is known for the median edit distance problem in the uncompressed setting. We obtain an improvement from O (N 2k ) to O (N k/2+o(k) n k/2 ) for the center edit distance problem. For two strings, we get an O (N 2/3 n 4/3 )-time FPTAS for both edit distance and LCS; note that this running time is o(N ) whenever n N 1/4 . In contrast, for uncompressed strings, there is not even a subquadratic algorithm for LCS that has less than polynomial gap in the approximation factor. Building on the insight from our approximation algorithms, we also obtain several new and improved results for many fundamental distance measures including the edit, Hamming, and shift distances.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext cdaee8b2-a146-4a5d-b541-ac9270314ceaCited by top-tier papers9
- Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed SpaceDominik Kempa, Tomasz KociumakaFOCS 2023 · 20 citations
- Near-Optimal Quantum Algorithms for Bounded Edit Distance and Lempel-Ziv FactorizationDaniel Gibney, Ce Jin, Tomasz Kociumaka, Sharma V. ThankachanSODA 2024 · 7 citations
- Estimating the Longest Increasing Subsequence in Nearly Optimal TimeAlexandr Andoni, Negev Shekel Nosatzki, Sandip Sinha, Clifford SteinFOCS 2022 · 4 citations
- Optimal Algorithms for Bounded Weighted Edit DistanceAlejandro Cassis, Tomasz Kociumaka, Philip WellnitzFOCS 2023 · 4 citations
- Locally Consistent Decomposition of Strings with Applications to Edit Distance SketchingSudatta Bhattacharya, Michal KouckýSTOC 2023 · 3 citations
Builds on7
- Resolution of the Burrows-Wheeler Transform ConjectureDominik Kempa, Tomasz KociumakaFOCS 2020 · 32 citations
- Edit Distance in Near-Linear Time: it's a Constant FactorAlexandr Andoni, Negev Shekel NosatzkiFOCS 2020 · 28 citations
- Reducing approximate Longest Common Subsequence to approximate Edit DistanceAviad Rubinstein, Zhao SongSODA 2020 · 24 citations
- Does preprocessing help in fast sequence comparisons?Elazar Goldenberg, Aviad Rubinstein, Barna SahaSTOC 2020 · 15 citations
- Constant factor approximations to edit distance on far input pairs in nearly linear timeMichal Koucký, Michael E. SaksSTOC 2020 · 5 citations
Related papers
- Grammar Boosting: A New Technique for Proving Lower Bounds for Computation over Compressed DataRajat De, Dominik KempaSODA 2024 · 2 citations
- Weighted Edit Distance Computation: Strings, Trees, and DyckDebarati Das, Jacob Gilbert, MohammadTaghi Hajiaghayi, Tomasz Kociumaka et al.STOC 2023 · 4 citations
- Faster Sublinear-Time Edit DistanceKarl Bringmann, Alejandro Cassis, Nick Fischer, Tomasz KociumakaSODA 2024 · 3 citations
- Approximation Schemes for Edit Distance and LCS in Quasi-Strongly Subquadratic TimeXiao Mao, Aviad RubinsteinSTOC 2026 · 4 citations
- Faster Approximate Pattern Matching: A Unified ApproachPanagiotis Charalampopoulos, Tomasz Kociumaka, Philip WellnitzFOCS 2020 · 2 citations
