We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs.DS

Change to browse by:

cs

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Data Structures and Algorithms

Title: Finding Top-k Longest Palindromes in Substrings

Abstract: Palindromes are strings that read the same forward and backward. Problems of computing palindromic structures in strings have been studied for many years with a motivation of their application to biology. The longest palindrome problem is one of the most important and classical problems regarding palindromic structures, that is, to compute the longest palindrome appearing in a string $T$ of length $n$. The problem can be solved in $O(n)$ time by the famous algorithm of Manacher [Journal of the ACM, 1975]. This paper generalizes the longest palindrome problem to the problem of finding top-$k$ longest palindromes in an arbitrary substring, including the input string $T$ itself. The internal top-$k$ longest palindrome query is, given a substring $T[i..j]$ of $T$ and a positive integer $k$ as a query, to compute the top-$k$ longest palindromes appearing in $T[i.. j]$. This paper proposes a linear-size data structure that can answer internal top-$k$ longest palindromes query in optimal $O(k)$ time. Also, given the input string $T$, our data structure can be constructed in $O(n\log n)$ time. For $k = 1$, the construction time is reduced to $O(n)$.
Subjects: Data Structures and Algorithms (cs.DS)
Cite as: arXiv:2210.02000 [cs.DS]
  (or arXiv:2210.02000v4 [cs.DS] for this version)

Submission history

From: Kazuki Mitani [view email]
[v1] Wed, 5 Oct 2022 03:17:49 GMT (141kb,D)
[v2] Thu, 6 Oct 2022 03:43:16 GMT (141kb,D)
[v3] Thu, 15 Jun 2023 04:04:10 GMT (684kb,D)
[v4] Sat, 17 Jun 2023 08:30:44 GMT (684kb,D)

Link back to: arXiv, form interface, contact.