# Algorithms and combinatorial properties on shortest unique palindromic substrings

Research output: Contribution to journalArticle

1 Citation (Scopus)

### 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 122-132 11 Journal of Discrete Algorithms 52-53 https://doi.org/10.1016/j.jda.2018.11.009 Published - Sep 1 2018

Strings
Interval
Query
Palindrome
Optimal Solution
Output

### All Science Journal Classification (ASJC) codes

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

### Cite this

In: Journal of Discrete Algorithms, Vol. 52-53, 01.09.2018, p. 122-132.

Research output: Contribution to journalArticle

@article{dc42506f5f9645dda78c182a1fa6bcf4,
title = "Algorithms and combinatorial properties on shortest unique palindromic substrings",
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.",
author = "Hiroe Inoue and Yuto Nakashima and Takuya Mieno and Shunsuke Inenaga and Hideo Bannai and Masayuki Takeda",
year = "2018",
month = "9",
day = "1",
doi = "10.1016/j.jda.2018.11.009",
language = "English",
volume = "52-53",
pages = "122--132",
journal = "Journal of Discrete Algorithms",
issn = "1570-8667",
publisher = "Elsevier",

}

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

AN - SCOPUS:85056567701

VL - 52-53

SP - 122

EP - 132

JO - Journal of Discrete Algorithms

JF - Journal of Discrete Algorithms

SN - 1570-8667

ER -