Is $\text{BRANCH}(n)$ finite for $n > 2$?

94 Views Asked by At

Is $\text{BRANCH}(n)$ finite for $n > 2$? Define $\text{BRANCH}(n)$ as the maximum length of a string that is composed of at most $n$ unique characters AND meets the following condition:

Define a substring as all letters from positions $i$ to $2i$ (inclusive) (where $i= 1, 2, 3...$). Then, a certain substring must not be allowed to have previous substrings embedded in it, or else the branch stops.

$\text{BRANCH}(1) = 3$, since the longest string is aaa. The first substring from positions $1$ to $2$ is aa. The theoretical substring from positions $2$ to $4$ would be aaa. However, since aa(substring from $1$ to $2$) is embedded inside aaa (substring from $2$ to $4$), we cannot make our string aaaa and stop at aaa.

$\text{BRANCH}(2) = 11$, since the longest string is abbbaaaaaaa. At positions $1$ to $2$, we have substring ab. At positions $2$ to $4$, we have substring bbb. ab isn't embedded in this, we move on.

At positions $3$ to $6$, we have substring bbaa. None of ab or bbb are embedded in this, we move on.

At positions $4$ to $8$, we have substring baaaa. None of ab, bbb, and bbaa are embedded in this, we move on.

At positions $5$ to $10$, we have substring aaaaaa. None of ab, bbb, bbaa, and baaaa are embedded in this, we move on.

However, there's a problem here, since the next sequence from $6$ to $12$ will embed at least one of the previous substrings, so we just add a letter at position $11$ and stop.

I can reason that $$\text{BRANCH}(3)\geq1+10\sum_{i=1}^{10}\sum_{j=1}^{10-i}{10 \choose i}{10 - i \choose j}=570021$$ The true value for $\text{BRANCH}(3)$, if finite, is likely much larger. Moreover, is there any way to prove that $\text{BRANCH}(n)$ is contained by $\text{TREE}(n)$ (a "$1$-dimensional" version of $\text{TREE}(n)$)?.

EDIT: For clarification on "embedding"

For any substring $S_i$: [$i$, $2i$], there is a set of previous substrings {$S_k$: [$k$, $2k$]}, where $k = 1,2,..., i-1$. If any member of this set is a valid substring of $S_i$ (that is, if it's the same as $S_i$ from positions $a$ to $b$ for any $a$ and $b$ where $0 \leq a < b \leq i+1$), then that member is "embedded" in $S_i$ and the sequence ends at length $2i - 1$. As an example, consider the string abaaab. The substring $S_3$ from position $3$ to $6$ is aaab. In the set of previous substrings {$S_1$,$S_2$} = {ab, baa}, $S_1$(ab) is the same as $S_3$(aaab) from position $3$ to $4$, so $S_1$ is embedded in $S_3$.

1

There are 1 best solutions below

0
On

For a given $n\geq 2$, let $S=(s_1,s_2,\ldots)$ be an infinite sequence of elements in $\{3,\ldots,n+2\}$.

For $i\geq 1$, let $S_i:=S[i:2i]$ be the subsequence $S_i=(s_i,s_{i+1},\ldots,s_{2i})$. We build a rooted tree $T_i$ on $i+1$ vertices as follow. Start with $T_i$ being a single vertex, the root of $T_i$. For $k$ in $0,\ldots,i$:

  1. Let $v$ be any vertex of $T_i$ at distance $k$ from the root.
  2. Add $s_{k+i}$ vertices all adjacent with $v$

This process stops with a rooted tree, with bounded degree $\Delta(T_i)\leq n+2$, and with no vertices of degree $2$. Ignoring the leaves, it has degree sequence exactly $S_i$ (ordered by distance to the root).

By Kruskal tree theorem, there exist $i < j$ such that and $T_i$ is homeomorphic to a subtree of $T_j$. Given that $T_j$ contains no vertex of degree $2$, then $T_i$ is isomorphic to a subtree of $T_j$. Which imlies that $S_i$ is contained in $S_j$. QED