2

There are many questions and answers throughout concerning longest run of heads after $n$ flips of a fair coin. For example, this question has multiple detailed answers. A good reference listed was "The Longest Run of Heads" by Schilling where:

Consider $n$ independent tosses of a fair coin, and let $R_n$ represent the length of the longest run of heads. [...] $$E[R_n] \sim \log_2[n]$$

My Question: What if the coins are not arranged in a linear fashion, but in a circle? For example, HHTH has longest length of heads as 2 (linear), but arranged in a circle you can also consider it to be HHHT which has longest length of 3. Alternatively, can also think of two-colored beads on a necklace.

For numerical experiments:

Longest Run, with counts of when $R_n=k$ for $k=\{0,\dots,20\}$ among all $2^{20}$ combinations of flipping 20 coins

{1, 17710, 205606, 324020, 239231, 133751, 67249, 32392, 15309, 7163, \
3328, 1536, 704, 320, 144, 64, 28, 12, 5, 2, 1}

And expected value of 3.72925.

For second experiment, for each of the $2^{20}$ combinations looked at $R_n$ for all 20 possible 'rotations' of the circles of coins. If you define $S_n=\operatorname{max}(R_n)$ to be taken over all rotations, here are the counts when $S_n=k$ for $k=\{0,\dots,20\}$

{1, 15126, 181204, 305049, 242395, 145440, 78240, 40280, 20370, \
10230, 5120, 2560, 1280, 640, 320, 160, 80, 40, 20, 20, 1}

And expected value of 3.9182

Example: 145,440 combinations out of $2^{20}$ had longest length of heads be 5 when all 20 coins where in a circle, or two-colored beads in a necklace.

Is $S_n \sim \log_2[n]$ also as well ? I found many references on longest run of heads, but did not see any when arranged in a circle were also taken into account.

sheppa28
  • 929
  • 1
    My guess is that they have the same order. If you take the same sequence of coins and form both a "line" and a "circle" with them, they'll have the same value of $R_n$ unless the longest run of heads in the circle happens to wrap around from the front to the back, which should be unlikely as $n$ becomes large -- perhaps likelihood of around $\log_2(n) / n$ as a heuristic? But, of course, my gut instinct could be wrong; it often is. – Aaron Montgomery Oct 11 '19 at 03:07
  • The longest run in the circle ($S_n$) should be at least as large as the longest run in linear ($R_n$), as it contains the original sequence depending on where you start in the circle. This might suggest multiplying instead of dividing, $n log_2(n)$? I also don't know. – sheppa28 Oct 11 '19 at 13:12
  • 1
    Right: it's true that $S_n \geq R_n$ if you couple a particular line of coin flips with a circle of coin flips. However, my conjecture is that the probability of the "$>$" part tends to $0$ as $n \to \infty$. In other words, it will be overwhelmingly likely that we just have $S_n = R_n$ for large $n$, and in the cases when we don't, $S_n$ won't be that much larger that $R_n$. If I'm right, , this would imply that $\lim \frac{S_n}{R_n} = 1$. (Same caveat as before: I might be wrong, and this should all be proved, but I'm relatively confident that this is a sketch of the proof.) – Aaron Montgomery Oct 11 '19 at 15:04
  • Thanks for further explaining. That rationale and limit going to one does seem plausible. – sheppa28 Oct 11 '19 at 15:21
  • 2
    Certainly $E[S_n] \le 2 E[R_n]$ because, on a sample point basis, even the worst cut can only cut longest run in half. So the order is certainly $O(\log_2 n)$. My guess is same as @AaronMontgomery that $E[S_n] = E[R_n]$ for the leading term. The main gap in Aaron's argument is that a longer $S$ will be more likely to be the victim of a cut. However, one would think not only the average run is $\log_2 n$, but also most runs are concentrated around the average value, e.g. something like $P(R_n > 10 \times E[R_n]) \to 0$ as $n \to \infty$. That would (almost) complete Aaron's proof. – antkam Oct 11 '19 at 19:40

0 Answers0