Search arXivSearch

arXiv · 1302.3437

Modulated String Searching

Abstract

In his 1987 paper entitled "Generalized String Matching", Abrahamson introduced {\em pattern matching with character classes} and provided the first efficient algorithm to solve it. The best known solution to date is due to Linhart and Shamir (2009). Another broad yet comparatively less studied class of string matching problems is that of numerical string searching, such as, e.g., the `less-than' or $L_1$-norm string searching. The best known solutions for problems in this class are based on FFT convolution after some suitable re-encoding. The present paper introduces {\em modulated string searching} as a unified framework for string matching problems where the numerical conditions can be combined with some Boolean/numerical decision conditions on the character classes. One example problem in this class is the {\em locally bounded $L_1$-norm} matching problem on character classes: here the "match" between a character at some position in the text and a set of characters at some position in the pattern is assessed based on the smallest $L_1$ distance between the text character and one of those pattern characters. The two positions "match" if the (absolute value of the) difference between the two characters does not exceed a predefined constant. The pattern has an occurrence in an alignment with the text if the sum of all such differences does not exceed a second predefined constant value. This problem requires a pointwise evaluation of the quality of each match and has no known solution based on the previously mentioned algorithms.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Alberto Apostolico, Péter L. Erdős, István Miklós, Johannes Siemons. 2013-07-25. Modulated String Searching. https://doi.org/10.1016/j.tcs.2013.10.013

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Cluster deletion in cographs, permutation graphs, and graphs with bounded clique number

The Cluster Deletion problem asks for a minimum-size edge set whose deletion turns a graph into a disjoint union of complete graphs. Equivalently, the Clique Partition problem asks for a partition of the vertex set into cliques that maximizes the number of edges within the parts. We give a simpler proof of a result of Gao, Hare, and Nastos (Discete Mathematics, 2013), that Cluster Deletion is polynomial-time solvable on cographs. In addition, we show that the natural linear programming formulation of Clique Partition is exact on cographs. We then show that Cluster Deletion is NP-complete on permutation graphs, which are a superclass of cographs. This answers an open question of Konstantinidis and Papadopoulos (Algorithmica, 2021). We also exhibit a permutation graph on nine vertices for which the linear programming formulation is not exact. Finally, for graphs with clique number at most $c$, we give a polynomial-time $2\binom{c}{2}/(\binom{c}{2}+1)$-approximation algorithm for Clique Partition. More generally, the algorithm runs in polynomial time on every graph class for which a maximum clique can be found in polynomial time. For each fixed $c\geq 3$, we also construct infinitely many examples attaining the stated approximation ratio. The same examples show that, for Cluster Deletion , the algorithm is a $2$-approximation and no better, for every fixed $c \geq 3$.

cs.DS

Should Tables Be Sorted? Revisited with a Large Language Model

We revisit the implicit membership problem in Yao's full-table model [Yao, 1981] and obtain, to our knowledge, the first quantitative improvements to his 45-year-old Ramsey bounds, most notably reducing the two-probe bound from tower-type to polynomial. In this model, an $n$-set $S\subseteq\{1,\ldots,m\}$ is stored as a permutation in an $n$-cell table, and queries decide whether $x\in S$. Let $G_q(n)$ be the largest universe size admitting a $q$-probe membership scheme for all $n$-sets. Yao determined the one-probe case exactly, proving $G_1(n)=2n-2$ for $n>2$, but the behavior for $q\ge2$ remained wide open. Fiat and Naor [1993] constructed schemes for universes of size $\exp(n^c)$ for some constant $c>0$ and sufficiently large constant $q$. For the first adaptive case, $q=2$, we prove $G_2(n)=O(n^2(\log n)^2)$. For every fixed integer $q\ge3$, we show that $G_q(n)$ is at most a tower of height $q-1$ with top $n^{1+o(1)}$; in particular, $G_3(n)\le\exp(n^{1+o(1)})$. The two-probe proof avoids Ramsey theory altogether; for larger fixed $q$, we use Ramsey theory only to make the first $q-1$ probes follow a fixed pattern, and then handle the last probe by the same non-Ramsey argument. Somewhat surprisingly, for each fixed $q$, we also show that implicit membership is as hard as implicit search up to a polynomial loss in universe size. Implicit search must return the cell containing $x$ when present and reject otherwise. For the analogous search threshold $H_q(n)$, we prove $H_q(n)\le G_q(n)\le n^q(H_q(n)+1)^{q+1}$ for every $q,n$. Thus, for every fixed $q$, one threshold is at most $\exp(n^{O(1)})$ if and only if the other is. The proofs were first generated by ChatGPT 5.5 Pro without mathematical hints; the membership-search equivalence emerged while pursuing an improved four-probe bound. The authors have validated and edited the proofs and assume responsibility for all content.

cs.DS

A deterministic $(2 + \varepsilon)$-approximation for directed feedback vertex sets in tournaments

We nearly settle the polynomial-time approximability of the Directed Feedback Vertex Set problem in tournaments. This problem is Vertex Cover-hard, and thus cannot have a $(2 - \varepsilon)$-approximation for any $\varepsilon > 0$ in polynomial time assuming the Unique Games Conjecture. In the past 28 years, several works have attempted to attain this approximability barrier of 2, and have designed algorithms with smaller and smaller approximation factors. This includes a $5/2$-approximation by Cai, Deng and Zang (FOCS 1998, SICOMP 2001); a $7/3$-approximation by Mnich, Vassilevska Williams and V{é}gh (ESA 2016), another $7/3$-approximation by Aprile, Drescher, Fiorini and Huynh (DAM 2023), and a $9/4$-approximation by Ghorbani and Mnich (ICALP 2026). Our main result improves upon all of those works: we give the first deterministic polynomial-time $(2+\varepsilon)$-approximation for Directed Feedback Vertex Set in tournaments, for all $\varepsilon > 0$. We thereby almost answer an open question by Lokshtanov, Misra, Mukherjee, Panolan, Philip and Saurabh (SODA 2020) who asked for a deterministic 2-approximation in polynomial time. Furthermore, we extend our result to the broader class of quasi-transitive digraphs

cs.DS