### Abstract

A palindrome is a string that reads the same forward and backward. A palindromic substring P of a string S is called a shortest unique palindromic substring (SUPS) for an interval [s,t] in S, if P occurs exactly once in S, this occurrence of P contains interval [s,t], and every palindromic substring of S which contains interval [s,t] and is shorter than P occurs at least twice in S. The SUPS problem is, given a string S, to preprocess S so that for any subsequent query interval [s,t] all the SUPSs for interval [s,t] can be answered quickly. We present an optimal solution to this problem. Namely, we show how to preprocess a given string S of length n in O(n) time and space so that all SUPSs for any subsequent query interval can be answered in O(α+1) time, where α is the number of outputs. We also discuss the number of SUPSs in a string.

Original language | English |
---|---|

Pages (from-to) | 122-132 |

Number of pages | 11 |

Journal | Journal of Discrete Algorithms |

Volume | 52-53 |

DOIs | |

Publication status | Published - Sep 1 2018 |

### Fingerprint

### All Science Journal Classification (ASJC) codes

- Theoretical Computer Science
- Discrete Mathematics and Combinatorics
- Computational Theory and Mathematics

### Cite this

**Algorithms and combinatorial properties on shortest unique palindromic substrings.** / Inoue, Hiroe; Nakashima, Yuto; Mieno, Takuya; Inenaga, Shunsuke; Bannai, Hideo; Takeda, Masayuki.

Research output: Contribution to journal › Article

*Journal of Discrete Algorithms*, vol. 52-53, pp. 122-132. https://doi.org/10.1016/j.jda.2018.11.009

}

TY - JOUR

T1 - Algorithms and combinatorial properties on shortest unique palindromic substrings

AU - Inoue, Hiroe

AU - Nakashima, Yuto

AU - Mieno, Takuya

AU - Inenaga, Shunsuke

AU - Bannai, Hideo

AU - Takeda, Masayuki

PY - 2018/9/1

Y1 - 2018/9/1

N2 - A palindrome is a string that reads the same forward and backward. A palindromic substring P of a string S is called a shortest unique palindromic substring (SUPS) for an interval [s,t] in S, if P occurs exactly once in S, this occurrence of P contains interval [s,t], and every palindromic substring of S which contains interval [s,t] and is shorter than P occurs at least twice in S. The SUPS problem is, given a string S, to preprocess S so that for any subsequent query interval [s,t] all the SUPSs for interval [s,t] can be answered quickly. We present an optimal solution to this problem. Namely, we show how to preprocess a given string S of length n in O(n) time and space so that all SUPSs for any subsequent query interval can be answered in O(α+1) time, where α is the number of outputs. We also discuss the number of SUPSs in a string.

AB - A palindrome is a string that reads the same forward and backward. A palindromic substring P of a string S is called a shortest unique palindromic substring (SUPS) for an interval [s,t] in S, if P occurs exactly once in S, this occurrence of P contains interval [s,t], and every palindromic substring of S which contains interval [s,t] and is shorter than P occurs at least twice in S. The SUPS problem is, given a string S, to preprocess S so that for any subsequent query interval [s,t] all the SUPSs for interval [s,t] can be answered quickly. We present an optimal solution to this problem. Namely, we show how to preprocess a given string S of length n in O(n) time and space so that all SUPSs for any subsequent query interval can be answered in O(α+1) time, where α is the number of outputs. We also discuss the number of SUPSs in a string.

UR - http://www.scopus.com/inward/record.url?scp=85056567701&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85056567701&partnerID=8YFLogxK

U2 - 10.1016/j.jda.2018.11.009

DO - 10.1016/j.jda.2018.11.009

M3 - Article

VL - 52-53

SP - 122

EP - 132

JO - Journal of Discrete Algorithms

JF - Journal of Discrete Algorithms

SN - 1570-8667

ER -