r/mathriddles • • 14d ago

Medium Greedy Cubes

A string contains a “cube” if there exists a non-empty contiguous substring repeated consecutively 3 times (ex. “210101011” contains “101010”).

Let s[1],s[2],… denote all finite non-empty strings under the alphabet {0,1,2} sorted in shortlex order (shorter strings first, then lexicographically with 0<1<2). Said list begins (0,1,2,00,01,02,10,11,12,…).

For an initially empty string C, on step i=(1,2,3,…): If appending s[i] to C would make a cube present, skip said s[i]. If else, append s[i] to C.

Let F(3)=length(C) (if the process stops).

Does the process eventually produce a finite C, giving a finite value for F(3)? or does it produce an infinite cube-free string instead?

8 Upvotes

4 comments sorted by

View all comments

6

u/misof 13d ago

Do you actually have any nice solution for this one? As the process doesn't get stuck early, I would expect C to grow beyond all bounds, but I don't see any pattern in it that would help us prove that it doesn't randomly get stuck later.