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

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

I am exploring the following combinatorial question about binary strings and would like insights, ideas, or references from the community.

For a binary string S of length N, define its border sequence as the strictly increasing sequence of integers x (1 ≤ x ≤ N) such that the prefix of S of length x equals the suffix of S of length x.

Formally: x is in the sequence if S[1..x] = S[N−x+1..N]

Note that x = N is always included.

Example: S = "01010" (N = 5) Border sequence = (1, 3, 5)

Now define f(N) as the number of distinct border sequences that occur among all binary strings of length N. We count only unique sequences, not strings.

https://oeis.org/A005434

Is there an optimal way to find this for given N rather than brute enumeration?

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

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

firstly what is the size of N?