1

Define $f(k)$ to be the maximal natural number $n$ such that there exist $n$ strings $s_1,\dots,s_n$ from the alphabet $\{1,2\}$ such that no letter is repeated more than $3$ times in a row, for all $1\leq i \leq n$, the string $s_i$ has length $i+k$, and each string $s_i$ does not contain any $s_j$ for $j<i$ as a (contiguous) substring.

Examples:

$f(0)=2$, witnessed by $[1,22]$

$f(1)\ge5$, witnessed by $[11,222,1212,12212,221221]$

What are the values of $f(2)$, $f(3)$, $f(4)$ if they are not infinite?
I don't know how people approximate huge numbers, and I'm guessing $f(2)$ is really big

Alex Kruckman
  • 76,357

1 Answers1

0

$f(5)$ does not exist, as witnessed by the following sequence: (with spaces added for clarity)

s_1 = 112 112
s_2 = 112 2 112
s_3 = 112 12 112
s_4 = 112 122 112
s_5 = 112 2 122 112
s_6 = 112 12 122 112
s_7 = 112 122 122 112
s_8 = 112 2 122 122 112
s_9 = 112 12 122 122 112
...

This sequence is defined by starting with $s_1=``112112"$, then cycling through the operations of adding "2", "1", and "1" after the third character. Any string $s_{3k+1}$ will start with "112", then have $k$ copies of "122", then end with "112" again.

It should satisfy the contiguous substring rule since any $s_j$ begins and ends with "112", yet there are only two places where "112" may show up in any later string $s_i$. This approach is based on this earlier related answer except with blocks of three characters instead of two.


In the question you also asked about the values $f(2)$, $f(3)$, and $f(4)$. These also do not exist, since when starting with only 3, 4, or 5 characters, you can stall for a few characters and then start the above $f(5)$ sequence. For example:

s_1 = 111
s_2 = 1222
s_3 = 22211
s_4 = 112 112
s_5 = 112 2 112
...
s_(k+3) = (the value of s_k from the f(5) sequence), k>0
...
C7X
  • 1,187