Блог пользователя catalystgma

Автор catalystgma, история, 16 месяцев назад, По-английски

Hello,

I wanted to ask if anybody knows about a subquadratic time complexity algorithm for figuring out the longest square substring of a string $$$s$$$. (i.e. $$$tt = ?$$$ s.t $$$\exists \, u, v$$$ s.t $$$s = uttv$$$, $$$|t|$$$ is maximized)

For example, if:

  • s = mississippi, tt = ssissi or tt = ississ.

  • s = aaaaa, tt = aaaa.

  • s = bababooey, tt = baba.

  • s = foopoopoofoo, tt = poopoo.

The related problem is much better documented (Longest Square Subsequence).

Sorry if the answer is trivial/known. Thank you for your help.

  • Проголосовать: нравится
  • +10
  • Проголосовать: не нравится

»
16 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Main-Lorentz algorithm can find all the square substrings (not only the longest) in $$$O(n \log n)$$$.