Global Information Lookup Global Information

Longest palindromic substring information


In computer science, the longest palindromic substring or longest symmetric factor problem is the problem of finding a maximum-length contiguous substring of a given string that is also a palindrome. For example, the longest palindromic substring of "bananas" is "anana". The longest palindromic substring is not guaranteed to be unique; for example, in the string "abracadabra", there is no palindromic substring with length greater than three, but there are two palindromic substrings with length three, namely, "aca" and "ada". In some applications it may be necessary to return all maximal palindromic substrings (that is, all substrings that are themselves palindromes and cannot be extended to larger palindromic substrings) rather than returning only one substring or returning the maximum length of a palindromic substring.

Manacher (1975) invented an -time algorithm for listing all the palindromes that appear at the start of a given string of length . However, as observed e.g., by Apostolico, Breslauer & Galil (1995), the same algorithm can also be used to find all maximal palindromic substrings anywhere within the input string, again in time. Therefore, it provides an -time solution to the longest palindromic substring problem. Alternative -time solutions were provided by Jeuring (1994), and by Gusfield (1997), who described a solution based on suffix trees. A faster algorithm can be achieved in the word RAM model of computation if the size of the input alphabet is in . In particular, this algorithm runs in time using space.[1] Efficient parallel algorithms are also known for the problem.[2]

The longest palindromic substring problem should not be confused with the different problem of finding the longest palindromic subsequence.

  1. ^ Charalampopoulos, Panagiotis; Pissis, Solon P.; Radoszewski, Jakub (Jun 2022). Bannai, Hideo; Holub, Jan (eds.). Longest Palindromic Substring in Sublinear Time. Combinatorial Pattern Matching. Leibniz International Proceedings in Informatics (LIPIcs). Vol. 223. Schloss Dagstuhl. doi:10.4230/LIPIcs.CPM.2022.20. Here: Theorem 1, p.20:2.
  2. ^ Crochemore & Rytter (1991), Apostolico, Breslauer & Galil (1995).

and 8 Related for: Longest palindromic substring information

Request time (Page generated in 3.5682 seconds.)

Longest palindromic substring

Last Update:

that is also a palindrome. For example, the longest palindromic substring of "bananas" is "anana". The longest palindromic substring is not guaranteed...

Word Count : 2189

Longest common substring

Last Update:

, find a longest string which is substring of both S {\displaystyle S} and T {\displaystyle T} . A generalization is the k-common substring problem. Given...

Word Count : 1063

Palindrome

Last Update:

completely. It is possible to find the longest palindromic substring of a given input string in linear time. The palindromic density of an infinite word w over...

Word Count : 4981

Palindrome tree

Last Update:

solve the longest palindromic substring, the k-factorization problem (can a given string be divided into exactly k palindromes), palindromic length of...

Word Count : 1019

Optimal substructure

Last Update:

has an optimal substructure. Longest common subsequence problem Longest increasing subsequence Longest palindromic substring All-Pairs Shortest Path Any...

Word Count : 742

Suffix tree

Last Update:

operations can be performed quickly, such as locating a substring in S {\displaystyle S} , locating a substring if a certain number of mistakes are allowed, and...

Word Count : 3691

Suffix automaton

Last Update:

representing the substring index of a given string which allows the storage, processing, and retrieval of compressed information about all its substrings. The suffix...

Word Count : 8575

Cryptic crossword

Last Update:

the riddle of Chinese characters, where partial characters instead of substrings are clued and combined. Clues given to the solver are based on various...

Word Count : 11885

PDF Search Engine © AllGlobal.net