Student or educator? Sign up with your school email and get 6 months of Pro free.
Cited by 11Algorithms and Data Compressionsemigroups and automata theoryGenome Rearrangement Algorithms

The DOI matches its Crossref record; 55 of the 55 references it cites were found in a registry or an index; none of the 29 sources its claims cite is checked for support yet.

Longest Gapped Repeats and Palindromes

Open access
Dumitran, Marius, Gawrychowski, Paweł, Manea, Florin·2017·Discrete Mathematics & Theoretical Computer Science

Abstract

A gapped repeat (respectively, palindrome) occurring in a word $w$ is a factor $uvu$ (respectively, $u^Rvu$) of $w$. In such a repeat (palindrome) $u$ is called the arm of the repeat (respectively, palindrome), while $v$ is called the gap. We show how to compute efficiently, for every position $i$ of the word $w$, the longest gapped repeat and palindrome occurring at that position, provided that the length of the gap is subject to various types of restrictions. That is, that for each position $i$ we compute the longest prefix $u$ of $w[i..n]$ such that $uv$ (respectively, $u^Rv$) is a suffix of $w[1..i-1]$ (defining thus a gapped repeat $uvu$ -- respectively, palindrome $u^Rvu$), and the length of $v$ is subject to the aforementioned restrictions. Comment: This is an extension of the conference papers "Longest $\alpha$-Gapped Repeat and Palindrome", presented by the second and third authors at FCT 2015, and "Longest Gapped Repeats and Palindromes", presented by the first and third authors at MFCS 2015

Overview

CoChat Summary

TL;DR

The paper gives algorithms to construct longest previous gapped repeat/palindrome tables for each position of a word under several gap restrictions. It obtains linear or near-linear bounds for bounded-gap and position-dependent lower bounds, and \(O(\alpha n)\) bounds for \(\alpha\)-gapped repeats and palindromes.

Key findings

  • For gap length between \(g\) and \(G\), the longest previous reverse-factor array \(LPrF_{g,G}[\cdot]\) can be built in \(O(n)\) time, while the longest previous factor array \(LPF_{g,G}[\cdot]\) can be built in \(O(n\log n)\) time; consequently the longest gapped palindrome is found in linear time and the longest gapped repeat in \(O(n\log n)\) time.
  • For a position-dependent lower bound \(g(i)\), both \(LPrF_g[\cdot]\) and \(LPF_g[\cdot]\) can be constructed in linear time, and the longest gapped palindrome or repeat satisfying \(|v|\ge g(i)\) is found in linear time.
  • For \(\alpha\)-gapped repeats \(uvu\) and palindromes \(u^Rvu\) with \(|uv|\le \alpha |u|\), the arrays \(LRep_\alpha[\cdot]\) and \(LPal_\alpha[\cdot]\) can be constructed in \(O(\alpha n)\) time; the longest such repeat or palindrome can also be found in \(O(\alpha n)\) time.
  • The paper notes that the number of maximal \(\alpha\)-gapped repeats or palindromes is \(\Theta(\alpha n)\), and it uses algorithms from prior work that find all such maximal structures in optimal \(\Theta(\alpha n)\) time.

Methods

  • The algorithms are string-data-structure based, using suffix arrays, LCP queries, dictionaries of basic factors, runs, interval union-find structures, and weighted level ancestor queries; for palindromes, suffix arrays are built for \(w0w^R\).
  • For Problem 1(a), a sliding window over ranges of length \(\delta=G-g\) and interval union-find give linear time; Problem 1(b) splits by arm length \(2^k\), uses basic-factor occurrence representations, and runs in \(O(n\log n)\).
  • Problem 2 is reduced to maintaining ordered lists via \(L^+[i]\) chains and solving offline union-find/weighted-level-ancestor queries in linear time; Problem 3 uses block encodings, lemmas for compact occurrence reporting, and the set of all maximal \(\alpha\)-gapped repeats/palindromes to compute the arrays in \(O(\alpha n)\).

Limitations

  • Stated in the paper: it remains open whether Problem 1(b) can be solved faster, whether the longest gapped repeats with gap between \(g\) and \(G\) can be found in linear time, whether the longest \(\alpha\)-gapped repeat or palindrome can be found faster than \(O(\alpha n)\), and whether the Problem 3 arrays can be constructed without first producing all maximal \(\alpha\)-gapped repeats and palindromes.
  • Evident from the text: no implementation or empirical evaluation is reported; the results are asymptotic and rely on the unit-cost RAM with logarithmic word size and integer-alphabet assumptions.
  • Evident from the text: the bounded-gap repeat table \(LPF_{g,G}[\cdot]\) has \(O(n\log n)\) complexity, so it is not linear like the corresponding palindrome table.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

Crossref · 10.23638/dmtcs-19-4-4

Cites

55 of 55 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Figures

Image 1
From the PDF
Fig. 2 Proof of Theorem 1: Construction of the ranges J 1 , J 2 , J 3 for some range I k , and of the sliding window J ′ i ∪ J ′′ i for some i ∈ I k
Fig. 2 Proof of Theorem 1: Construction of the ranges J 1 , J 2 , J 3 for some range I k , and of the sliding window J ′ i ∪ J ′′ i for some i ∈ I kFrom the PDF
Fig. 3 Proof of Theorem 2: Occurrences of w [ i..i + 2 k -1] inside w [ i -G -2 k +1 ..i -g -1] : one separate occurrence, and a run containing three occurrences. The separate occurrence can be prolonged to produce a gapped palindrome uvu , which is not, however, long enough as it does not reach the range between i -G and i -g . The rightmost occurrence in the run produces the gapped repeat w [ i..i + 2 k -1] v ′ w [ i..i + 2 k -1] , which fulfils the conditions imposed on the gap.
Fig. 3 Proof of Theorem 2: Occurrences of w [ i..i + 2 k -1] inside w [ i -G -2 k +1 ..i -g -1] : one separate occurrence, and a run containing three occurrences. The separate occurrence can be prolonged to produce a gapped palindrome uvu , which is not, however, long enough as it does not reach the range between i -G and i -g . The rightmost occurrence in the run produces the gapped repeat w [ i..i + 2 k -1] v ′ w [ i..i + 2 k -1] , which fulfils the conditions imposed on the gap.From the PDF
Image 4
From the PDF
Fig. 5 Proof of Theorem 7: Segment of w , split into blocks of length log n . In this segment, z is a k -block of length 2 k log n . For each factor y , of length 2 k -1 log n , occurring in the first log n symbols of z (not necessarily a sequence of blocks), we find the occurrences of y that correspond to sequences of 2 k -1 blocks, and start at most (8 α +2) | y | = (4 α +1) · 2 k log n symbols (or, alternatively, (4 α +1) · 2 k blocks) to the left of the considered z . These y factors may appear as runs or as separate occurrences. Some of them can be extended to form an α -gapped repeat u 1 vu 2 = uvu such that the respective occurrence of y has the same offset in u 1 as the initial y in u 2 .
Fig. 5 Proof of Theorem 7: Segment of w , split into blocks of length log n . In this segment, z is a k -block of length 2 k log n . For each factor y , of length 2 k -1 log n , occurring in the first log n symbols of z (not necessarily a sequence of blocks), we find the occurrences of y that correspond to sequences of 2 k -1 blocks, and start at most (8 α +2) | y | = (4 α +1) · 2 k log n symbols (or, alternatively, (4 α +1) · 2 k blocks) to the left of the considered z . These y factors may appear as runs or as separate occurrences. Some of them can be extended to form an α -gapped repeat u 1 vu 2 = uvu such that the respective occurrence of y has the same offset in u 1 as the initial y in u 2 .From the PDF
Fig. 6 Proof of Theorem 8: Segment of w , split into blocks of length log n . In this segment, z is a k -block of length 2 k log n . For each factor y , of length 2 k -1 log n , occurring in the first log n symbols of z (not necessarily a sequence of blocks), we find the occurrences of y R that correspond to sequences of 2 k -1 blocks, and start at most (8 α +2) | y | = (4 α +1) · 2 k log n symbols (or, alternatively, (4 α +1) · 2 k blocks) to the left of the considered z . These y R factors may appear as runs or as separate occurrences. Some of them can be extended to form an α -gapped palindrome u R vu such that the respective occurrence of y R is the mirror image of the initial y in u 2 .
Fig. 6 Proof of Theorem 8: Segment of w , split into blocks of length log n . In this segment, z is a k -block of length 2 k log n . For each factor y , of length 2 k -1 log n , occurring in the first log n symbols of z (not necessarily a sequence of blocks), we find the occurrences of y R that correspond to sequences of 2 k -1 blocks, and start at most (8 α +2) | y | = (4 α +1) · 2 k log n symbols (or, alternatively, (4 α +1) · 2 k blocks) to the left of the considered z . These y R factors may appear as runs or as separate occurrences. Some of them can be extended to form an α -gapped palindrome u R vu such that the respective occurrence of y R is the mirror image of the initial y in u 2 .From the PDF
Fig. 7 Proof of Theorem 9: p = uvu is a maximal α -gapped palindrome (here α = 2 ) with | v | = δ and | u | = ℓ . We define r = ⌊ ( α -1) ℓ -δ α +1 ⌋ = ⌊ ℓ -δ 3 ⌋ . This allows us to define the interval I p , where the right arm of an α -gapped palindrome obtained from p may start. Further, y R v ′′ y is an example of such an α -gapped palindrome; t R v ′ t is a gapped palindrome obtained from p , which is not α -gapped: it's right arm does not start in I p . The interval I p has weight j + ℓ -1 .
Fig. 7 Proof of Theorem 9: p = uvu is a maximal α -gapped palindrome (here α = 2 ) with | v | = δ and | u | = ℓ . We define r = ⌊ ( α -1) ℓ -δ α +1 ⌋ = ⌊ ℓ -δ 3 ⌋ . This allows us to define the interval I p , where the right arm of an α -gapped palindrome obtained from p may start. Further, y R v ′′ y is an example of such an α -gapped palindrome; t R v ′ t is a gapped palindrome obtained from p , which is not α -gapped: it's right arm does not start in I p . The interval I p has weight j + ℓ -1 .From the PDF

Verification

Claims the paper makes

0 Valid · 5 Not valid · 27 Not checked · 89 Own results and interpretations

85 more claims

Create a free account to see all 121 claims and to verify the 13 references still open.

See all claims — free account
  • It may state two separate claims as one. 13
  • The quote only partly states this claim. 3
  • Probably not a substantial claim. 18

Create a free account to see these claims.

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

3 of 3

Citations

Cites

Show all 55 references

Research works printed but not linked: 8

  1. H. Bannai, T. I, S. Inenaga, Y. Nakashima, M. Takeda, and K. Tsuruta. The Runs Theorem. CoRR , abs/1406.0263, 2014. · arXiv
  2. M. Crochemore and W. Rytter. Sqares, cubes, and time-space efficient string searching. Algorithmica , 13 (5):405-425, 1995.
  3. M. Crochemore, R. Kolpakov, and G. Kucherov. Optimal bounds for computing α -gapped repeats. In Proc. LATA 2016 , volume 9618 of LNCS , pages 245-255, 2016.
  4. M. Dumitran and F. Manea. Longest gapped repeats and palindromes. In Proc. MFCS 2015 , volume 9234 of LNCS , pages 205-217. Springer, 2015.
  5. A. Ehrenfeucht and G. Rozenberg. Finding a Homomorphism Between Two Words is NP-Complete. Inf. Process. Lett. , 9(2):86-88, 1979.
  6. N. J. Fine and H. S. Wilf. Uniqueness theorem for periodic functions. Proceedings of the American Mathematical Society , 16:109-114, 1965.
  7. P. Gawrychowski and F. Manea. Longest α -gapped repeat and palindrome. In Proc. FCT 2015 , volume 9210 of LNCS , pages 27-40. Springer, 2015.
  8. J. Justin. On a paper by Castelli, Mignosi, Restivo. ITA , 34(5):373-377, 2000.

Cited by

See all 11

Metadata

Authors
Dumitran, M., Gawrychowski, P., & Manea, F.
Affiliations
University of Wrocław (PL)
Venue
Discrete Mathematics & Theoretical Computer Science
Published
2017-10-13
Volume
Vol. 19 no. 4, FCT '15
Issue
special issue FCT'15
ISSN
1365-8050 (ISSN-L)
OpenAlex
W2950226630
Cited by
11
References
55
Citations by year
2025: 1 · 2021: 4 · 2019: 1 · 2018: 2
FWCI
0.84
Type
journal article
Language
en
Open access
Locations
  • Discrete Mathematics & Theoretical Computer Science (publishedVersion, cc-by)
  • arXiv (Cornell University) (submittedVersion, cc-by)
  • DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion, cc-by-sa)
  • arXiv (Cornell University) (cc-by)
  • Entrepôt pour orphelin (cc-by-nd)
  • Discrete Mathematics & Theoretical Computer Science (cc-by)
Funders
Deutsche Forschungsgemeinschaft (596676)
Topics
  • Physical Sciences › Mathematics › Theoretical Computer Science › Algorithms and Data Compression
  • Physical Sciences › Computer Science › Computational Theory and Mathematics › semigroups and automata theory
  • Life Sciences › Biochemistry, Genetics and Molecular Biology › Genetics › Genome Rearrangement Algorithms
Keywords
palindromes, string algorithms

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

A language model drew the claims from the paper on 2026-11-14, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-11-14 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: Longest Gapped Repeats and Palindromes. https://app.cochat.ai/papers/10.23638/dmtcs-19-4-4
The paper
Dumitran, M., Gawrychowski, P., & Manea, F. (2017). Longest Gapped Repeats and Palindromes. Discrete Mathematics & Theoretical Computer Science. https://doi.org/10.23638/dmtcs-19-4-4

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.