Betty's scheme is biased for every . The output occurs precisely when the first tosses are heads: the algorithm stops there and appends tails. ThusFor comparison, take the output . Its first symbols contain heads and tails, so neither stopping threshold has been reached. The next symbol is the th head, at which point the last tail is appended. Its unique generating prefix has length , givingThereforeThe faster stopping rule does not produce a uniform distribution on a finite set of balanced binary sequences. For example, at the six outputs have the following exact probabilities:
| Output | Betty | Uniform target |
|---|---|---|
HHTT | ||
HTHT | ||
HTTH | ||
THHT | ||
THTH | ||
TTHH |
For , the two possible outputs each have probability , so that special case is uniform. For , simply return the empty output.
Articles by others on the same topic
There are currently no matching articles.