Papers
Topics
Authors
Recent
Search
2000 character limit reached

Independent String Races Analysis

Updated 26 January 2026
  • Independent string races are a probabilistic framework where players monitor independent i.i.d. streams to detect target patterns.
  • The analysis employs generating functions, border-polynomial methods, and Hadamard products to derive exact waiting times and win probabilities.
  • Under bias, paradoxical effects such as mean waiting time reversals and non-transitive win cycles emerge, challenging typical stochastic dominance.

Independent string races are a probabilistic framework in which each of two or more players observes their own independent stream of i.i.d. trials over a finite alphabet, seeking the first occurrence of a designated target string. The fundamental question is to compute for two given patterns the probability that one appears before the other, under various conditions (such as fair or biased sources). This setting arises as a natural variant and generalization of non-transitive phenomena in pattern matching, including classical problems like Penney’s Ante, but with independence rather than shared randomness, leading to profound regularities and paradoxes in waiting-time behaviors and win-odds (Riis et al., 23 Jan 2026).

1. Formal Model and Problem Definition

Let A\mathcal{A} denote a finite alphabet of size ss, with each symbol aAa \in \mathcal{A} occurring independently at each time with probability pa>0p_a > 0. Each player receives an infinite, independent sequence of i.i.d. symbols. Fix two target strings, A=a1a2aLAA = a_1 a_2 \dots a_{L_A} and B=b1b2bLBB = b_1 b_2 \dots b_{L_B}. Define for each player the stopping time τT\tau_T as the first time an observed length-LTL_T block matches TT exactly. The contest is to determine, for each (A,B)(A,B) pair, the win probability:

ss0

where ties are assigned to either player with equal probability.

This setup contrasts with the “shared-stream” or “Penney’s game” scenario, where non-transitivity arises from dependent observations. Here, independence deeply influences the possible ordinal relations among patterns.

2. Waiting-Time Generating Functions and Marginals

The marginal law of ss1 for a string ss2 is captured through the border-polynomial apparatus. A border of ss3 is any ss4 where the prefix of length ss5 matches the suffix of length ss6. The set of all such borders, ss7, determines the border polynomial:

ss8

The probability generating function (pgf) for the stopping time ss9 is:

aAa \in \mathcal{A}0

with a continued-fraction formula:

aAa \in \mathcal{A}1

where

aAa \in \mathcal{A}2

and aAa \in \mathcal{A}3. The mean waiting time is given by:

aAa \in \mathcal{A}4

In the special case of a fair source (aAa \in \mathcal{A}5 for all aAa \in \mathcal{A}6), this specializes to:

aAa \in \mathcal{A}7

3. Head-to-Head Odds and the Hadamard Product Method

The independence of Alice’s and Bob’s streams enables the full factorization of joint events, and the analysis of head-to-head odds relies crucially on generating functions and Hadamard products. For string aAa \in \mathcal{A}8, define:

  • aAa \in \mathcal{A}9, with pa>0p_a > 00
  • pa>0p_a > 01
  • pa>0p_a > 02
  • pa>0p_a > 03

The Hadamard (termwise) product of two series, pa>0p_a > 04, is used to combine occurrence probabilities at each pa>0p_a > 05. Then

  • pa>0p_a > 06
  • pa>0p_a > 07

Thus, pa>0p_a > 08 is expressible as a combination of Hadamard products of the individual pattern pgfs and their tails, all reducible to closed-form rational functions in pa>0p_a > 09 and the bias parameters.

4. Stochastic Dominance and Total Pre-Order for Fair Dice

Comparisons between patterns are formalized through stochastic dominance: A=a1a2aLAA = a_1 a_2 \dots a_{L_A}0 if A=a1a2aLAA = a_1 a_2 \dots a_{L_A}1 for all A=a1a2aLAA = a_1 a_2 \dots a_{L_A}2. The crucial result for the fair-source case (A=a1a2aLAA = a_1 a_2 \dots a_{L_A}3) is:

  • The following are equivalent for any A=a1a2aLAA = a_1 a_2 \dots a_{L_A}4:
    • Equality holds if and only if A=a1a2aLAA = a_1 a_2 \dots a_{L_A}8 and A=a1a2aLAA = a_1 a_2 \dots a_{L_A}9 have identical border sets and thus identical stopping time distributions.

This result implies that, under fairness, stochastic dominance yields a total preorder, with the ordering completely determined by the sum of border lengths (in base B=b1b2bLBB = b_1 b_2 \dots b_{L_B}0), which in turn equals the mean waiting time. The difference-factorization lemma,

B=b1b2bLBB = b_1 b_2 \dots b_{L_B}1

shows that the sign (and hence order) is lexicographically determined by border polynomials.

5. Breakdown Under Bias: Incomparability and Non-Transitivity

For biased binary sources (B=b1b2bLBB = b_1 b_2 \dots b_{L_B}2), the total preorder property fails. Explicitly:

  • Total comparability under stochastic dominance, over all binary patterns, holds iff B=b1b2bLBB = b_1 b_2 \dots b_{L_B}3.
  • For B=b1b2bLBB = b_1 b_2 \dots b_{L_B}4, there exist patterns (e.g., B=b1b2bLBB = b_1 b_2 \dots b_{L_B}5, B=b1b2bLBB = b_1 b_2 \dots b_{L_B}6 for large B=b1b2bLBB = b_1 b_2 \dots b_{L_B}7) where neither B=b1b2bLBB = b_1 b_2 \dots b_{L_B}8 stochastically dominates B=b1b2bLBB = b_1 b_2 \dots b_{L_B}9 nor vice versa, though their mean waiting times are still ordered.
  • The lack of total comparability means that expectation does not always predict win probability orderings, and intransitivities may arise.

Bias thus fundamentally disrupts transitive and monotonic relationships observed in the fair setting.

6. Bias-Driven Phenomena: Mean-Reversal and Non-Transitive Cycles

With τT\tau_T0, two principal paradoxes manifest:

  1. Reversal between mean waiting time and win probability: For given patterns, the pattern with longer mean waiting time can nevertheless win more often head-to-head. For example, for τT\tau_T1 and τT\tau_T2, the unique crossover for win probability occurs at τT\tau_T3, but the means cross at τT\tau_T4, yielding an interval where τT\tau_T5 but τT\tau_T6.
  2. Existence of non-transitive cycles: There exist triples τT\tau_T7 and a fixed bias τT\tau_T8 such that τT\tau_T9, LTL_T0, and LTL_T1. Explicit examples include:
    • For unequal biases: LTL_T2, LTL_T3; LTL_T4, LTL_T5; LTL_T6, LTL_T7.
    • For equal biases and different lengths: LTL_T8, LTL_T9, TT0 form a 3-cycle for TT1.
    • Extension to TT2 (three-sided dice): Patterns TT3, TT4, TT5 and biases in an open region of the simplex.

Comprehensive computational classification up to length TT6 for binary strings under common bias finds sixteen distinct non-transitive families and two-pattern reversals exhaust the open TT7-interval except near TT8.

7. Implications and Classification of Fairness Dichotomy

The fundamental insight is that fair sources (coins or TT9-sided dice with uniform probabilities) are exceptional. For these, mean waiting times totally order all strings by stochastic dominance, and all independent head-to-head races are transitive and expectation-ordered. Any departure from fairness—however slight—allows reversals between orderings by mean and by win probability, and admits non-transitive cycles even for short patterns.

This dichotomy precisely characterizes the interface between regular, predictable races and the array of paradoxes familiar in the study of runs and pattern waiting times. The combinatorial and analytic frameworks developed, particularly the border-polynomial and Hadamard-product calculus, provide exact rational expressions for all relevant quantities in independent string races, enabling both rigorous theorems and exhaustive computational classifications (Riis et al., 23 Jan 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Independent String Races.