Английская Википедия:Bertrand's ballot theorem

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Short description Шаблон:More footnotes needed In combinatorics, Bertrand's ballot problem is the question: "In an election where candidate A receives p votes and candidate B receives q votes with p > q, what is the probability that A will be strictly ahead of B throughout the count?" The answer is

<math>\frac{p-q}{p+q}.</math>

The result was first published by W. A. Whitworth in 1878, but is named after Joseph Louis François Bertrand who rediscovered it in 1887.[1][2]

In Bertrand's original paper, he sketches a proof based on a general formula for the number of favourable sequences using a recursion relation. He remarks that it seems probable that such a simple result could be proved by a more direct method. Such a proof was given by Désiré André,[3] based on the observation that the unfavourable sequences can be divided into two equally probable cases, one of which (the case where B receives the first vote) is easily computed; he proves the equality by an explicit bijection. A variation of his method is popularly known as André's reflection method, although André did not use any reflections.[4]

Bertrand's ballot theorem is related to the cycle lemma. They give similar formulas, but the cycle lemma considers circular shifts of a given ballot counting order rather than all permutations.

Example

Suppose there are 5 voters, of whom 3 vote for candidate A and 2 vote for candidate B (so p = 3 and q = 2). There are ten equally likely orders in which the votes could be counted:

  • AAABB
  • AABAB
  • ABAAB
  • BAAAB
  • AABBA
  • ABABA
  • BAABA
  • ABBAA
  • BABAA
  • BBAAA

For the order AABAB, the tally of the votes as the election progresses is:

Candidate A A B A B
A 1 2 2 3 3
B 0 0 1 1 2

For each column the tally for A is always larger than the tally for B, so A is always strictly ahead of B. For the order AABBA the tally of the votes as the election progresses is:

Candidate A A B B A
A 1 2 2 2 3
B 0 0 1 2 2

For this order, B is tied with A after the fourth vote, so A is not always strictly ahead of B. Of the 10 possible orders, A is always ahead of B only for AAABB and AABAB. So the probability that A will always be strictly ahead is

<math>\frac{2}{10}=\frac{1}{5},</math>

and this is indeed equal to <math>\frac{3-2}{3+2}</math> as the theorem predicts.

Equivalent problems

Favourable orders

Rather than computing the probability that a random vote counting order has the desired property, one can instead compute the number of favourable counting orders, then divide by the total number of ways in which the votes could have been counted. (This is the method used by Bertrand.) The total number of ways is the binomial coefficient <math>\tbinom{p+q}{p}</math>; Bertrand's proof shows that the number of favourable orders in which to count the votes is <math>\tbinom{p+q-1}{p-1}-\tbinom{p+q-1}{p}</math> (though he does not give this number explicitly). And indeed after division this gives <math>\tfrac{p}{p+q}-\tfrac{q}{p+q}=\tfrac{p-q}{p+q}</math>.

Random walks

Another equivalent problem is to calculate the number of random walks on the integers that consist of n steps of unit length, beginning at the origin and ending at the point m, that never become negative. As n and m have the same parity and <math>n\ge m\ge 0</math>, this number is

<math>\binom{n}{\tfrac{n+m}2}-\binom{n}{\tfrac{n+m}2+1} = \frac{m+1}{\tfrac{n+m}2+1}\binom{n}{\tfrac{n+m}2}.</math>

When <math>m=0</math> and <math>n</math> is even, this gives the Catalan number <math>\frac1{\tfrac{n}2+1}\binom{n}{\tfrac{n}2}</math>. Thus the probability that the a random walk is never negative and returns to origin at time <math>n</math> is <math>2^{-n}\frac1{\tfrac{n}2+1}\binom{n}{\tfrac{n}2}</math>. By Stirling's formula, when <math>n\to \infty</math>, this probability is <math>\sim \frac{\sqrt 2}{n^{3/2}}</math>.

[Note that <math>m,n</math> have the same parity as follows: let <math>P</math> be the number of "positive" moves, i.e., to the right, and let <math>N</math> be the number of "negative" moves, i.e., to the left. Since <math>P+N=n</math> and <math>P-N=m</math>, we have <math>P=\frac{n+m}{2}</math> and <math>N=\frac{n-m}{2}</math>. Since <math>P</math> and <math>N</math> are integers,<math>m,n</math> have the same parity]

Proof by reflection

For A to be strictly ahead of B throughout the counting of the votes, there can be no ties. Separate the counting sequences according to the first vote. Any sequence that begins with a vote for B must reach a tie at some point, because A eventually wins. For any sequence that begins with A and reaches a tie, reflect the votes up to the point of the first tie (so any A becomes a B, and vice versa) to obtain a sequence that begins with B. Hence every sequence that begins with A and reaches a tie is in one-to-one correspondence with a sequence that begins with B, and the probability that a sequence begins with B is <math>q/(p+q)</math>, so the probability that A always leads the vote is

<math> = 1- </math> the probability of sequences that tie at some point
<math> = 1- </math> the probability of sequences that tie at some point and begin with A or B
<math> = 1- 2 \times (</math> the probability of sequences that tie at some point and begin with B <math>)</math>
<math> = 1- 2 \times (</math> the probability that a sequence begins with B <math>)</math>
<math> = 1-2\frac{q}{p+q}=\frac{p-q}{p+q}</math>

Proof by induction

Another method of proof is by mathematical induction:

  • We loosen the condition <math>p > q</math> to <math>p \geq q</math>. Clearly, the theorem is correct when <math>p = q</math>, since in this case the first candidate will not be strictly ahead after all the votes have been counted (so the probability is 0).
  • Clearly the theorem is true if p > 0 and q = 0 when the probability is 1, given that the first candidate receives all the votes; it is also true when p = q > 0 as we have just seen.
  • Assume it is true both when p = a − 1 and q = b, and when p = a and q = b − 1, with a > b > 0. (We don't need to consider the case <math>a = b</math> here, since we have already disposed of it before.) Then considering the case with p = a and q = b, the last vote counted is either for the first candidate with probability a/(a + b), or for the second with probability b/(a + b). So the probability of the first being ahead throughout the count to the penultimate vote counted (and also after the final vote) is:
<math>{a \over (a+b)}{(a-1)-b \over (a+b-1)}+{b \over (a+b)}{a-(b-1) \over (a+b-1)}={a-b \over a+b}.</math>
  • And so it is true for all p and q with p > q > 0.

Proof by the cycle lemma

A simple proof is based on the cycle lemma of Dvoretzky and Motzkin.[5] Call a ballot sequence dominating if A is strictly ahead of B throughout the counting of the votes. The cycle lemma asserts that any sequence of <math>p</math> A's and <math>q</math> B's, where <math>p> q</math>, has precisely <math>p-q</math> dominating cyclic permutations. To see this, just arrange the given sequence of <math>p+q</math> A's and B's in a circle and repeatedly remove adjacent pairs AB until only <math>p-q</math> A's remain. Each of these A's was the start of a dominating cyclic permutation before anything was removed. So <math>p-q</math> out of the <math>p+q</math> cyclic permutations of any arrangement of <math>p</math> A votes and <math>q</math> B votes are dominating.

Proof by martingales

Let <math>n= p+q</math>. Define the "backwards counting" stochastic process

<math display="block">X_k = \frac{S_{n-k}}{n-k}; \quad k = 0, 1, ..., n-1</math> where <math>S_{n-k}</math> is the lead of candidate A over B, after <math>n-k</math> votes have come in.

Claim: <math>X_k</math> is a martingale process.

Given <math>X_k</math>, we know that <math>S_{n-k} = (n-k)X_k</math>, so of the first <math>n-k</math> votes, <math>\frac{X_k + 1}2 (n-k)</math> were for candidate A, and <math>\frac{-X_k + 1}2 (n-k)</math> were for candidate B.

So, with probability <math>\frac{X_k + 1}2</math>, we have <math>S_{n-k-1} = S_{n-k} -1</math>, and <math>X_{k+1} = \frac{n-k}{n-k-1}X_k - \frac{1}{n-k-1}</math>. Similarly for the other one. Then compute to find <math>E[X_{k+1}|X_k] = X_k</math>.

Define the stopping time <math>T</math> as either the minimum <math>k</math> such that <math>X_k =0</math>, or <math>n-1</math> if there's no such <math>k</math>. Then the probability that candidate A leads all the time is just <math>E[X_T]</math>, which by the optional stopping theorem is <math>E[X_T] = E[X_0] = \frac{p-q}{p+q}</math>

Bertrand's and André's proofs

Bertrand expressed the solution as

<math>\frac{2m-\mu}{\mu}</math>

where <math>\mu=p+q</math> is the total number of voters and <math>m=p</math> is the number of voters for the first candidate. He states that the result follows from the formula

<math>P_{m+1,\mu+1}=P_{m,\mu}+P_{m+1,\mu},</math>

where <math>P_{m,\mu}</math> is the number of favourable sequences, but "it seems probable that such a simple result could be shown in a more direct way". Indeed, a more direct proof was soon produced by Désiré André. His approach is often mistakenly labelled "the reflection principle" by modern authors but in fact uses a permutation. He shows that the "unfavourable" sequences (those that reach an intermediate tie) consist of an equal number of sequences that begin with A as those that begin with B. Every sequence that begins with B is unfavourable, and there are <math>\tbinom{p+q-1}{q-1}</math> such sequences with a B followed by an arbitrary sequence of (q-1) B's and p A's. Each unfavourable sequence that begins with A can be transformed to an arbitrary sequence of (q-1) B's and p A's by finding the first B that violates the rule (by causing the vote counts to tie) and deleting it, and interchanging the order of the remaining parts. To reverse the process, take any sequence of (q-1) B's and p A's and search from the end to find where the number of A's first exceeds the number of B's, and then interchange the order of the parts and place a B in between. For example, the unfavourable sequence AABBABAA corresponds uniquely to the arbitrary sequence ABAAAAB. From this, it follows that the number of favourable sequences of p A's and q B's is

<math>\binom{p+q}{q}-2\binom{p+q-1}{q-1}=\binom{p+q}{q}\frac{p-q}{p+q}</math>

and thus the required probability is

<math>\frac{p-q}{p+q}</math>

as expected.

Variant: ties allowed

The original problem is to find the probability that the first candidate is always strictly ahead in the vote count. One may instead consider the problem of finding the probability that the second candidate is never ahead (that is, with ties are allowed). In this case, the answer is

<math>\frac{p+1-q}{p+1}.</math>

The variant problem can be solved by the reflection method in a similar way to the original problem. The number of possible vote sequences is <math>\tbinom{p+q}{q}</math>. Call a sequence "bad" if the second candidate is ever ahead, and if the number of bad sequences can be enumerated then the number of "good" sequences can be found by subtraction and the probability can be computed.

Represent a voting sequence as a lattice path on the Cartesian plane as follows:

  • Start the path at (0, 0)
  • Each time a vote for the first candidate is received move right 1 unit.
  • Each time a vote for the second candidate is received move up 1 unit.

Each such path corresponds to a unique sequence of votes and will end at (p, q). A sequence is 'good' exactly when the corresponding path never goes above the diagonal line y = x; equivalently, a sequence is 'bad' exactly when the corresponding path touches the line y = x + 1.

Файл:AndreReflection.svg
'Bad' path (blue) and its reflected path (red)

For each 'bad' path P, define a new path P′ by reflecting the part of P up to the first point it touches the line across it. P′ is a path from (−1, 1) to (pq). The same operation applied again restores the original P. This produces a one-to-one correspondence between the 'bad' paths and the paths from (−1, 1) to (pq). The number of these paths is <math>\tbinom{p+q}{q-1}</math> and so that is the number of 'bad' sequences. This leaves the number of 'good' sequences as

<math>\binom{p+q}{q} - \binom{p+q}{q-1} = \binom{p+q}{q}\frac{p+1-q}{p+1}.</math>

Since there are <math>\tbinom{p+q}{q}</math> altogether, the probability of a sequence being good is <math>\tfrac{p+1-q}{p+1}</math>.

In fact, the solutions to the original problem and the variant problem are easily related. For candidate A to be strictly ahead throughout the vote count, they must receive the first vote and for the remaining votes (ignoring the first) they must be either strictly ahead or tied throughout the count. Hence the solution to the original problem is

<math>\frac{p}{p+q}\frac{p-1+1-q}{p-1+1}=\frac{p-q}{p+q}</math>

as required.

Conversely, the tie case can be derived from the non-tie case. Note that the number of non-tie sequences with p+1 votes for A is equal to the number of tie sequences with p votes for A. The number of non-tie votes with p + 1 votes for A votes is <math>\tfrac{p + 1 - q}{p + 1 + q} \tbinom{p + 1 + q}{q} </math>, which by algebraic manipulation is <math>\tfrac{p + 1 - q}{p + 1} \tbinom{p + q}{q} </math>, so the fraction of sequences with p votes for A votes is <math>\tfrac{p + 1 - q}{p + 1}</math>.

Notes

Шаблон:Reflist

References

External links

  1. Шаблон:Citation.
  2. J. Bertrand, Solution d'un problème, Comptes Rendus de l'Académie des Sciences de Paris 105 (1887), 369.
  3. D. André, Solution directe du problème résolu par M. Bertrand, Comptes Rendus de l’Académie des Sciences, Paris 105 (1887) 436–437.
  4. Renault, Marc, Lost (and found) in translation: André's actual method and its application to the generalized ballot problem. Amer. Math. Monthly 115 (2008), no. 4, 358--363.
  5. Шаблон:Citation