CS Paper Radar

Daily listing

2026-11-23 · cs.DB

14 papers first submitted this day (UTC) in cs.DB — Databases. arXiv announces a day's submissions the next evening, so the newest day fills up over ~24 h.

Score = weighted mean ofCitations 20%Upvotes 10%Code stars 10%Venue 15%Code/data 10%Novelty 15%Momentum 15%Substance 5%how it works

Theory & Algorithms 1

Location-Aware Matching Statistics

cs.DS cs.DB ·2026-11-23 ·Lorraine A. K. Ayad, Grigorios Loukides, Solon P. Pissis
Abstract

Edit distance is the standard measure of string similarity, but its quadratic-time complexity is prohibitive for long strings. Popular linear-time alternatives, such as the $q$-gram distance, or the average common substring measure (ACS) that is based on matching statistics (MS), consider the substrings shared by the two input strings but not where they occur in each string. Yet in many real-world applications, e.g., when comparing document versions or co-recorded time series, a shared substring is really relevant only if its occurrences are close in position. We introduce Location-Aware Matching Statistics (LAMAS). Given strings $X$ and $Y$ and a displacement tolerance $d$, LAMAS reports, for every position $i$ of $Y$, the longest substring starting at $i$ that occurs in $X$ at a position $j$ with $|j-i|\le d$, together with the displacement $(j-i)$. MS is the special case of LAMAS with unbounded $d$. Our main result is an algorithm that solves LAMAS in $\mathcal{O}(n)$ time and space for strings of length at most $n$ and any $d$; this is optimal and matches the complexity of MS. The algorithm reduces LAMAS to predecessor and successor queries over a sliding window of suffix ranks and answers them in linear total time via a window decomposition and interval union-find. Experiments on 20 real datasets and synthetic data show that LAMAS substantially improves over MS and $q$-gram distance in similarity-based classification, top-$K$ retrieval, and clustering. It is competitive with edit distance and a constrained dynamic time warping variant in classification and generally outperforms a state-of-the-art method for top-$K$ retrieval under edit distance. Finally, our implementation of the main algorithm for LAMAS scales linearly in $n$ and does not slow down as $d$ grows.

0.31