English

Palindromic k-Factorization in Pure Linear Time

Data Structures and Algorithms 2020-07-07 v3

Abstract

Given a string ss of length nn over a general alphabet and an integer kk, the problem is to decide whether ss is a concatenation of kk nonempty palindromes. Two previously known solutions for this problem work in time O(kn)O(kn) and O(nlogn)O(n\log n) respectively. Here we settle the complexity of this problem in the word-RAM model, presenting an O(n)O(n)-time online deciding algorithm. The algorithm simultaneously finds the minimum odd number of factors and the minimum even number of factors in a factorization of a string into nonempty palindromes. We also demonstrate how to get an explicit factorization of ss into kk palindromes with an O(n)O(n)-time offline postprocessing.

Keywords

Cite

@article{arxiv.2002.03965,
  title  = {Palindromic k-Factorization in Pure Linear Time},
  author = {Mikhail Rubinchik and Arseny M. Shur},
  journal= {arXiv preprint arXiv:2002.03965},
  year   = {2020}
}

Comments

accepted to MFCS 2020

R2 v1 2026-06-23T13:37:14.402Z