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

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

We call a string $$$s$$$ of length $$$n$$$ good, if and only if $$$n \bmod 2 = 0$$$ and $$$s[1,\dfrac{n}{2}] = s[\dfrac{n}{2}+1,n]$$$ (i.e. there exists a string $$$t$$$ that $$$s = t + t$$$.)

You are given a string $$$s$$$. For each $$$r \in [1,n]$$$:

  • Find all good substrings ending at position $$$r$$$.
  • The guess is: Their length can be divided into $$$\mathcal O(\log n)$$$ consecutive intervals.

Is the guess correct?

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

»
5 месяцев назад, # |
  Проголосовать: нравится -7 Проголосовать: не нравится

I think YES I took some random cases and the answer did not exceed 5.

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

deleted

»
5 месяцев назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

What do you mean by consecutive intervals? Their lengths can only be even.

If you mean consecutive when we only look at even values, then this fails if the string is "abcd" repeated.

Also, if both $$$l, l+2$$$ are good lengths for a fixed $$$r$$$, then so is every even length from $$$2$$$ to $$$l+2$$$. Which means the consecutive intervals are only $$$2[1, k]$$$ and other singletons, so idk why it would be logarithmic.

Did I get the question correctly?

  • »
    »
    5 месяцев назад, # ^ |
      Проголосовать: нравится +4 Проголосовать: не нравится

    Yes You get the question correctly and thanks a lot.

    I came up with the guess by thininkng "the length will increase a lot or increase 1 from a good string to a longer good string", but a didn't consider strings like $$$\texttt{abcdabcdabcd}$$$ …

    Now there is another guess: their lengths can be divided into $$$\mathcal O(\log n)$$$ arithmetic progressions

    Is it correct now ? Thank you again

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

Maybe this will help?