On Time-Memory Tradeoffs for Maximal Palindromes with Wildcards and k-Mismatches
Pith reviewed 2026-05-09 22:33 UTC · model grok-4.3
The pith
Applying wildcard-LCE techniques yields continuous time-memory tradeoffs for maximal palindromes with wildcards and k-mismatches.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
By applying existing wildcard-LCE techniques, the authors obtain a continuous time-memory tradeoff for computing all maximal palindromes in a text with wildcards, including a non-trivial linear-space algorithm. The methods are generalized to the k-mismatches setting with or without wildcards, improving the best-known time-memory product in certain parameter ranges.
What carries the argument
Wildcard longest-common-extension (LCE) queries applied to palindrome-center detection and radius computation.
Load-bearing premise
Existing wildcard-LCE techniques can be applied directly to palindromes to produce the claimed continuous time-memory tradeoff and linear-space algorithm without hidden costs or restrictions.
What would settle it
A concrete input string containing wildcards on which the algorithm reports a different set of maximal palindromes than the exhaustive enumeration, or on which the achieved space-time product fails to meet the stated improvement.
Figures
read the original abstract
This paper addresses the problem of identifying palindromic factors in texts that include wildcards -- special characters that match all others. These symbols challenge many classical algorithms, as numerous combinatorial properties are not satisfied in their presence. We apply existing wildcard-LCE techniques to obtain a continuous time-memory tradeoff, and present the first non-trivial linear-space algorithm for computing all maximal palindromes with wildcards, improving the best known time-memory product in certain parameter ranges. Our main results are algorithms to find and approximate all maximal palindromes in a given text. We also generalize both methods to the $k$-mismatches setting, with or without wildcards.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper addresses computing all maximal palindromes (and their k-mismatch variants) in strings containing wildcards. It applies existing wildcard-LCE techniques to derive a continuous time-memory tradeoff and claims the first non-trivial linear-space algorithm, improving the time-memory product in certain parameter regimes. The results are generalized to the k-mismatches setting both with and without wildcards.
Significance. If the reduction from wildcard-LCE to maximal palindromes is correct and incurs no hidden asymptotic costs, the work supplies practical algorithmic improvements for a core string problem that arises in bioinformatics and pattern matching. The linear-space algorithm is a notable contribution for large inputs, and the continuous tradeoff fills a gap between prior discrete points. The paper explicitly builds on prior wildcard-LCE results rather than re-deriving them, which is a strength when the composition is verified.
minor comments (3)
- [Abstract] The abstract states that the linear-space algorithm is 'the first non-trivial' but does not quantify the improvement over the previous best time-memory product; a concrete comparison (e.g., O(n log n) time vs. prior O(n^{1.5})) would strengthen the claim.
- [Preliminaries] Notation for wildcard-LCE queries and palindrome centers is introduced without an explicit table of symbols; readers must infer the meaning of several subscripts from context in the technical sections.
- [Section 4] The generalization to k-mismatches is described at a high level; a short pseudocode block or explicit recurrence showing how the mismatch budget is propagated through the LCE calls would improve readability.
Simulated Author's Rebuttal
We thank the referee for the positive and accurate summary of our work on maximal palindromes with wildcards and k-mismatches. We are pleased that the contributions—the continuous time-memory tradeoff via wildcard-LCE techniques and the first non-trivial linear-space algorithm—are recognized as filling a gap in the literature and improving the time-memory product in relevant regimes. The generalization to the k-mismatches setting is also noted. Given the recommendation for minor revision and the absence of any specific major comments, we have no points requiring rebuttal or revision at this time.
Circularity Check
No significant circularity detected
full rationale
The paper's derivation explicitly applies existing external wildcard-LCE techniques to derive continuous time-memory tradeoffs and the first non-trivial linear-space algorithm for maximal palindromes (with and without k-mismatches). No self-definitional reductions, fitted inputs renamed as predictions, or load-bearing self-citations appear in the abstract or described results; the claims rest on prior independent methods rather than internal tautologies or ansatzes smuggled via author overlap. The generalization steps are presented as direct extensions without reducing to the input data or definitions by construction.
Axiom & Free-Parameter Ledger
axioms (1)
- domain assumption Strings are finite sequences over a finite alphabet that includes a wildcard symbol matching any character
Reference graph
Works this paper leans on
-
[1]
K. Abrahamson. Generalized string matching.SIAM Journal on Computing, 16(6):1039– 1051, 1987.doi:10.1137/0216067
-
[2]
M. Alzamel, C. Hampson, C.S. Iliopoulos, Z. Lim, S. Pissis, D. Vlachakis, and S. Watts. Maximal degenerate palindromes with gaps and mismatches.Theoretical Computer Science, 978:114182, 2023.doi:10.1016/j.tcs.2023.114182
-
[3]
A. Amir, Y. Aumann, G. Landau, M. Lewenstein, and N. Lewenstein. Pattern matching with swaps.Journal of Algorithms, 37:247–266, 2000.doi:10.1006/jagm.2000.1120
-
[4]
A. Amir and M. Itzhaki. Reconstructing General Matching Graphs. In35th Annual Symposium on Combinatorial Pattern Matching (CPM), pages 2:1–2:15, 2024.doi: 10.4230/LIPIcs.CPM.2024.2
-
[5]
A. Amir, M. Lewenstein, and E. Porat. Faster algorithms for string matching withk mismatches.Journal of Algorithms, 50(2):257–275, 2004.doi:10.1016/S0196-6774(03) 00097-X
-
[6]
A. Amir and B. Porat. Approximate on-line palindrome recognition, and applications. In Proc. 25th Annual Symposium on Combinatorial Pattern Matching (CPM), pages 21–29, 2014.doi:10.1007/978-3-319-07566-2_3
-
[7]
A. Apostolico, D. Breslauer, and Z. Galil. Optimal parallel algorithms for periods, palin- dromes and squares. InProc. 19th International Colloquium on Automata, Languages, and Programming (ICALP), volume 623, pages 296–307, 1992.doi:10.1007/3-540-55719-9_ 82
-
[8]
G. Bathie, P. Charalampopoulos, and T. Starikovskaya. Longest Common Extensions with Wildcards: Trade-Off and Applications. In32nd Annual European Symposium on Algo- rithms (ESA), volume 308, pages 19:1–19:17, 2024.doi:10.4230/LIPIcs.ESA.2024.19
-
[9]
G. Bathie, P. Charalampopoulos, and T. Starikovskaya. Pattern matching with mismatches and wildcards. In32nd Annual European Symposium on Algorithms (ESA), pages 20:1– 20:15, 2024.doi:10.4230/LIPIcs.ESA.2024.20
-
[10]
I. Boneh, D. Fried, S. Golan, and M. Kraus. Hamming distance oracle, 2024.arXiv: 2407.05430,doi:10.48550/arXiv.2407.05430
-
[11]
K. Borozdin, D. Kosolobov, M. Rubinchik, and A.M. Shur. Palindromic length in linear time. In28th Annual Symposium on Combinatorial Pattern Matching (CPM), volume 78, pages 23:1–23:12, 2017.doi:10.4230/LIPIcs.CPM.2017.23. 15
-
[12]
T.M. Chan, C. Jin, V.V. Williams, and Y. Xu. Faster algorithms for text-to-pattern hamming distances. InProc. 64th IEEE Symposium on Foundations of Computer Science (FOCS), pages 2188–2203, 2023.doi:10.1109/FOCS57990.2023.00136
-
[13]
P. Charalampopoulos, S.P. Pissis, and J. Radoszewski. Longest palindromic substring in sublinear time. In33rd Annual Symposium on Combinatorial Pattern Matching (CPM), volume 223, pages 20:1–20:9, 2022.doi:10.4230/LIPIcs.CPM.2022.20
-
[14]
P. Clifford and R. Clifford. Simple deterministic wildcard matching.Information Processing Letters, 101(2):53–54, 2007.doi:10.1016/j.ipl.2006.08.002
-
[15]
R. Cole, L. Gottlieb, and M. Lewenstein. Dictionary matching and indexing with errors and don’t cares. InProc. 36th Annual ACM Symposium on Theory of Computing (STOC), pages 91–100, 2004.doi:10.1145/1007352.1007374
-
[16]
R. Cole and R. Hariharan. Verifying candidate matches in sparse and wildcard matching. InProc. 34th Annual ACM Symposium on Theory of Computing (STOC), pages 592–601, 2002.doi:10.1145/509907.509992
-
[17]
M.J. Fischer and M.S. Paterson. String matching and other products. In R.M. Karp, editor,Complexity of Computation, volume 7 ofSIAM-AMS Proceedings, pages 113–125. American Mathematical Society, 1974. URL:dspace.mit.edu/handle/1721.1/148870, doi:10.5555/889566
-
[18]
Consciousness and Cognition20(2011) https://doi.org/10.1016/j
T. Flouri, E. Giaquinta, K. Kobert, and E. Ukkonen. Longest common substrings with kmismatches.Information Processing Letters, 115(6–8):643–647, 2015.doi:10.1016/j. ipl.2015.03.006
work page doi:10.1016/j 2015
-
[19]
Fuglsang
A. Fuglsang. Distribution of potential type II restriction sites (palindromes) in prokaryotes. Biochemical and Biophysical Research Communications, 310(2):280–285, 2003.doi:10. 1016/j.bbrc.2003.09.014
2003
-
[20]
Z. Galil. On converting on-line algorithms into real-time and on real-time algorithms for string matching and palindrome recognition.SIGACT News, pages 26–30, 1975.doi: 10.1145/990502.990505
-
[21]
Z. Galil and R. Giancarlo. Improved string matching withkmismatches.SIGACT News, 17(4):52–54, 1986.doi:10.1145/8307.8309
-
[22]
Z. Galil and J. Seiferas. Recognizing certain repetitions and reversals within strings. In Proc. 17th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 236–252, 1976.doi:10.1109/SFCS.1976.25
-
[23]
M.S. Gelfand and E.V. Koonin. Avoidance of palindromic words in bacterial and archaeal genomes: a close connection with restriction enzymes.Nucleic Acids Research, 25:2430– 2439, 1997.doi:10.1093/nar/25.12.2430
-
[24]
P. Indyk. Deterministic superimposed coding with applications to pattern matching. In Proc. 38th IEEE Symposium on Foundations of Computer Science (FOCS), pages 127–136, 1997.doi:10.1109/SFCS.1997.646101
-
[25]
M. Itzhaki. Combinatorics of palindromes. InFundamentals of Computation Theory (FCT), pages 252–266, 2025.doi:10.1007/978-3-032-04700-7_19
-
[26]
M. Itzhaki. Asymptotically optimal representation of palindromic structure. InSOFSEM 2026: Theory and Practice of Computer Science, pages 128–143. Springer Nature Switzer- land, 2026.doi:10.1007/978-3-032-17801-5_10. 16
-
[27]
A. Kalai. Efficient pattern-matching with don’t cares. InProc. 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 655–656, 2002.doi:10.5555/545381. 545468
-
[28]
H. Kaplan, E. Porat, and N. Shafrir. Finding the position of thek-mismatch and approxi- mate tandem repeats. InProc. 12th Scandinavian Workshop on Algorithm Theory (SWAT), pages 90–101, 2006.doi:10.1007/11785293_11
-
[29]
T. Kasai, G. Lee, H. Arimura, S. Arikawa, and K. Park. Linear-time longest-common-prefix computation in suffix arrays and its applications. InProc. 12th Symposium on Combinato- rial Pattern Matching (CPM), pages 181–192, 2001.doi:10.1007/3-540-48194-X_17
-
[30]
D.E. Knuth, J.H. Morris, and V.R. Pratt. Fast pattern matching in strings.SIAM Journal on Computing, 6:323–350, 1977.doi:10.1137/0206024
-
[31]
R. Kolpakov and G. Kucherov. Searching for gapped palindromes.Theoretical Computer Science, 410(51):5365–5373, 2009.doi:10.1016/j.tcs.2009.09.013
-
[32]
G.M. Landau and U. Vishkin. Efficient string matching in the presence of errors. InProc. 26th IEEE Symposium on Foundations of Computer Science (FOCS), pages 126–136, 1985. doi:10.1109/SFCS.1985.22
-
[33]
A. Lenz, A. Wachter-Zeh, and E. Yaakobi. Duplication-correcting codes.Designs, Codes and Cryptography, 87(2):277–298, 2019.doi:10.1007/s10623-018-0523-0
-
[34]
Lisnic, I.K
B. Lisnic, I.K. Svetec, H. Saric, I. Nikolic, and Z. Zgaga. Palindrome content of the yeast Saccharomyces cerevisiae genome.Current Genetics, 47:289–297, 2005.doi:10.1007/ s00294-005-0573-5
2005
-
[35]
W. Maass. Quadratic lower bounds for deterministic and nondeterministic one-tape tur- ing machines (extended abstract). InProc. 16th Annual ACM Symposium on Theory of Computing (STOC), pages 401–408, 1984.doi:10.1145/800057.808706
-
[36]
G. Manacher. A new linear-time “on-line” algorithm for finding the smallest initial palin- drome of a string.Journal of the ACM, 22(3):346–351, 1975.doi:10.1145/321892.321896
-
[37]
M. Rubinchik and A.M. Shur. EERTREE: An efficient data structure for processing palindromes in strings.European Journal of Combinatorics, 68:249–265, 2018.doi: 10.1016/j.ejc.2017.07.021
-
[38]
Slisenko
A.O. Slisenko. Recognition of palindromes by multihead turing machines. InProceedings of the Steklov Institute of Mathematics, volume 129, pages 30–202. American Mathematical Society, 1973
1973
-
[39]
D. Sokol. 2-dimensional palindromes with k mismatches.Information Processing Letters, 164:106019, 2020.doi:10.1016/j.ipl.2020.106019
-
[40]
S.K. Srivastava and H.S. Robins. Palindromic nucleotide analysis in human T cell receptor rearrangements.PLoS One, 7(12):e52250, 2012.doi:10.1371/journal.pone.0052250. 17
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.