I know that all of these sequences will eventually terminate.
Are you sure? I wrote a little program to compute the number of ways of stopping after n bits, and so find the probabilities, and I got this result. Columns are string length, number of ways of stopping at that length, probability of stopping at that length, and probability of stopping at at most that length. Expected length conditional on terminating appears to top out at about 1.4743 (sum of product of first and third column).
(ETA: Table edited to fix an error and add the second column.)
Eyeballing a plot of the fourth column doesn’t suggest it’s going to reach 1, but it might be some extraordinarily slow-growing thing.
The recurrence for computing the number of ways of stopping is a sort of generalised Fibonacci: each value is the sum of approximately the last half of the preceding values.
Are you sure? I wrote a little program to compute the number of ways of stopping after n bits, and so find the probabilities, and I got this result. Columns are string length, number of ways of stopping at that length, probability of stopping at that length, and probability of stopping at at most that length. Expected length conditional on terminating appears to top out at about 1.4743 (sum of product of first and third column).
(ETA: Table edited to fix an error and add the second column.)
Eyeballing a plot of the fourth column doesn’t suggest it’s going to reach 1, but it might be some extraordinarily slow-growing thing.
The recurrence for computing the number of ways of stopping is a sort of generalised Fibonacci: each value is the sum of approximately the last half of the preceding values.
What prompts asking the question here?
I have repeated the calculation and confirm the results.
What is interesting, the sequence in the second column satisfies a recurrence relation
T(4n+2) = 2T(4n) - T(2n)
T(4n) = 2T(4n-2)
(and trivially T(2n+1) = T(2n), not included in the table).