0% found this document useful (0 votes)
2 views

Bertrands Ballot Theorem

The article formalizes Bertrand's Ballot Theorem, which states that in an election with two candidates A and B, where A receives n votes and B receives k votes (with n > k), the probability that A maintains more votes than B during the counting is (n - k)/(n + k). This theorem is part of a larger effort to formalize 100 significant theorems in mathematics. The paper includes various propositions and definitions related to elections and dominated elections.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Bertrands Ballot Theorem

The article formalizes Bertrand's Ballot Theorem, which states that in an election with two candidates A and B, where A receives n votes and B receives k votes (with n > k), the probability that A maintains more votes than B during the counting is (n - k)/(n + k). This theorem is part of a larger effort to formalize 100 significant theorems in mathematics. The paper includes various propositions and definitions related to elections and dominated elections.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Special Issue: 25 years of the Mizar Mathematical Library

FORMALIZED MATHEMATICS
Vol. 22, No. 2, Pages 119–123, 2014
DOI: 10.2478/forma-2014-0014 degruyter.com/view/j/forma

Bertrand’s Ballot Theorem1

Karol Pąk
Institute of Informatics
University of Białystok
Sosnowa 64, 15-887 Białystok
Poland

Summary. In this article we formalize the Bertrand’s Ballot Theorem


based on [17]. Suppose that in an election we have two candidates: A that receives
n votes and B that receives k votes, and additionally n ­ k. Then this theorem
states that the probability of the situation where A maintains more votes than
B throughout the counting of the ballots is equal to (n − k)/(n + k).
This theorem is item #30 from the “Formalizing 100 Theorems” list mainta-
ined by Freek Wiedijk at http://www.cs.ru.nl/F.Wiedijk/100/ .

MSC: 60C05 03B35


Keywords: ballot theorem; probability
MML identifier: BALLOT 1, version: 8.1.03 5.23.1210

The notation and terminology used in this paper have been introduced in the
following articles: [24], [1], [14], [15], [18], [4], [5], [10], [21], [6], [12], [3], [11],
[25], [26], [16], [8], [13], [23], and [9].

1. Preliminaries

From now on D, D1 , D2 denote non empty sets, d, d1 , d2 denote finite


0-sequences of D, and n, k, i, j denote natural numbers.
Now we state the propositions:
(1) XFS2FS(dn) = XFS2FS(d)n.
(2) rng d = rng XFS2FS(d).
(3) Let us consider a finite 0-sequence d1 of D1 and a finite 0-sequence d2 of
D2 . If d1 = d2 , then XFS2FS(d1 ) = XFS2FS(d2 ).
1
The paper has been financed by the resources of the Polish National Science Centre granted
by decision no DEC-2012/07/N/ST6/02147.
c 2014 University of Białystok
CC-BY-SA License ver. 3.0 or later
119 ISSN 1426–2630(Print), 1898-9934(Online)

- 10.2478/forma-2014-0014
Downloaded from PubFactory at 08/08/2016 10:53:46PM
via free access
120 karol pąk

(4) If XFS2FS(d1 ) = XFS2FS(d2 ), then d1 = d2 . Proof: For every i such


that i < len d1 holds d1 (i) = d2 (i) by [2, (13), (11)]. 
(5) Let us consider a finite sequence d of elements of D.
Then XFS2FS(FS2XFS(d)) = d.
(6) Let us consider a finite sequence f and objects x, y. Suppose
(i) rng f ⊆ {x, y}, and
(ii) x 6= y.
Then f −1 ({x}) + f −1 ({y}) = len f .
(7) Let us consider functions f , g. Suppose f is one-to-one. Let us consider
an object x. If x ∈ dom f , then Coim(f · g, f (x)) = Coim(g, x). Proof:
Set f3 = f · g. Coim(f3 , f (x)) ⊆ Coim(g, x) by [6, (11), (12)]. 
(8) Let us consider a real number r and a real-valued finite sequence f . Sup-
pose rng f ⊆ {0, r}. Then f = r · f −1 ({r}). Proof: Define P[natural
P

number] ≡ for every real-valued finite sequence f such that len f = $1 and
rng f ⊆ {0, r} holds f = r · f −1 ({r}). P[0] by [8, (72)]. For every n
P

such that P[n] holds P[n + 1] by [22, (55)], [8, (74)], [25, (70)], [2, (11)].
For every n, P[n] from [2, Sch. 2]. 

2. Properties of Elections

In the sequel A, B denote objects, v denotes an element of {A, B}n+k , and


f , g denote finite sequences.
Let us consider A, n, B, and k. The functor Election(A, n, B, k) yielding a
subset of {A, B}n+k is defined by
(Def. 1) v ∈ it if and only if v −1 ({A}) = n.
Let us note that Election(A, n, B, k) is finite. Now we state the propositions:
(9) Election(A, n, A, 0) = {n 7→ A}. Proof: Election(A, n, A, 0) ⊆ {n 7→ A}
by [19, (29)], [9, (33)], [21, (9)]. 
(10) If k > 0, then Election(A, n, A, k) is empty.
Let us consider A and n. Let k be a non empty natural number. Let us
observe that Election(A, n, A, k) is empty. Now we state the proposition:
(11) Election(A, n, B, k) = Choose(Seg(n+k), n, A, B). Proof: Election(A, n,
B, k) ⊆ Choose(Seg(n + k), n, A, B) by [7, (2)]. 
Let us assume that A 6= B. Now we state the propositions:
(12) v ∈ Election(A, n, B, k) if and only if v −1 ({B}) = k. The theorem is a
consequence of (6).
n+k
(13) Election(A, n, B, k) = n . The theorem is a consequence of (11).

- 10.2478/forma-2014-0014
Downloaded from PubFactory at 08/08/2016 10:53:46PM
via free access
Bertrand’s ballot theorem 121

3. Properties of Dominated Elections

Let us consider A, n, B, and k. Let v be a finite sequence. We say that v is


an (A, n, B, k)-dominated-election if and only if
(Def. 2) (i) v ∈ Election(A, n, B, k), and
(ii) for every i such that i > 0 holds (vi)−1 ({A}) > (vi)−1 ({B}).
Let us assume that f is an (A, n, B, k)-dominated-election. Now we state
the propositions:
(14) A 6= B.
(15) n > k. The theorem is a consequence of (14) and (12).
Now we state the propositions:
(16) If A 6= B and n > 0, then n 7→ A is an (A, n, B, 0)-dominated-election.
(17) If f is an (A, n, B, k)-dominated-election and i < n−k, then f a (i 7→ B)
is an (A, n, B, (k + i))-dominated-election. The theorem is a consequence
of (14) and (12).
(18) Suppose f is an (A, n, B, k)-dominated-election and g is an (A, i, B,
j)-dominated-election. Then f a g is an (A, (n + i), B, (k + j))-dominated-
election. The theorem is a consequence of (14), (12), and (15).
Let us consider A, n, B, and k. The functor DominatedElection(A, n, B, k)
yielding a subset of Election(A, n, B, k) is defined by
(Def. 3) f ∈ it if and only if f is an (A, n, B, k)-dominated-election.
(19) If A = B or n ¬ k, then DominatedElection(A, n, B, k) is empty. The
theorem is a consequence of (14) and (15).
(20) If n > k and A 6= B, then n 7→ Aa (k 7→ B) ∈ DominatedElection(A, n, B,
k). The theorem is a consequence of (17) and (16).
(21) If A 6= B, then DominatedElection(A, n, B, k) =
DominatedElection(0, n, 1, k). Proof: Set T = [A 7−→ 0, B 7−→ 1]. De-
fine P[object, object] ≡ for every f such that f = $1 holds T · f = $2 .
For every object x such that x ∈ DominatedElection(A, n, B, k) the-
re exists an object y such that y ∈ DominatedElection(0, n, 1, k) and
P[x, y] by [25, (27), (26)], [5, (92)], (7). Consider C being a function from
DominatedElection(A, n, B, k) into DominatedElection(0, n, 1, k) such that
for every object x such that x ∈ DominatedElection(A, n, B, k) holds
P[x, C(x)] from [7, Sch. 1]. DominatedElection(0, n, 1, k) ⊆ rng C by [25,
(27), (26)], [5, (92)], (7). 
(22) Let us consider a finite sequence p of elements of N. Then p is a (0, n, 1,
k)-dominated-election if and only if p is an (n+k)-tuple of {0, 1} and n > 0
and p = k and for every i such that i > 0 holds 2 · (pi) < i. Proof:
P P

If p is a (0, n, 1, k)-dominated-election, then p is an (n + k)-tuple of {0, 1}

- 10.2478/forma-2014-0014
Downloaded from PubFactory at 08/08/2016 10:53:46PM
via free access
122 karol pąk

and n > 0 and p = k and for every i such that i > 0 holds 2 · (pi) < i
P P

by (8), (12), (15), [25, (70)]. 1· p−1 ({1}) = k. p−1 ({1}) + p−1 ({0}) = len p.
1 · (pi)−1 ({1}) = (pi). (pi)−1 ({1}) + (pi)−1 ({0}) = len(pi). 
P

(23) If f is an (A, n, B, k)-dominated-election, then f (1) = A. The theorem


is a consequence of (15).
(24) Let us consider a finite 0-sequence d of N. Then d ∈ Domin0 (n + k, k) if
and only if h0i a XFS2FS(d) ∈ DominatedElection(0, n + 1, 1, k). Proof:
Set X1 = XFS2FS(d). Set Z = h0i. Set Z1 = Z a X1 . Reconsider D = d as a
finite 0-sequence of R. XFS2FS(d) = XFS2FS(D). If d ∈ Domin0 (n+k, k),
then Z1 ∈ DominatedElection(0, n + 1, 1, k) by [15, (20)], (2), [4, (31),
(22)]. Z1 is an (n + 1 + k)-tuple of {0, 1}. For every k such that k ¬ dom d
holds 2 · (dk) ¬ k by [20, (14)], [8, (76)], (1), (3). d is dominated by 0.
P
P
d = k. 
(25) Domin0 (n + k, k) = DominatedElection(0, n + 1, 1, k). Proof: Set D =
Domin0 (n + k, k). Set B = DominatedElection(0, n + 1, 1, k). Set Z = h0i.
Define F[object, object] ≡ for every finite 0-sequence d of N such that
d = $1 holds $2 = Z a XFS2FS(d). For every object x such that x ∈ D
there exists an object y such that y ∈ B and F[x, y]. Consider f being
a function from D into B such that for every object x such that x ∈ D
holds F[x, f (x)] from [7, Sch. 1]. 
(26) Domin0 (n + k, k) = DominatedElection(0, n + 1, 1, k). Proof: Set D =
Domin0 (n + k, k). Set B = DominatedElection(0, n + 1, 1, k). Set Z = h0i.
Define F[object, object] ≡ for every finite 0-sequence d of N such that
d = $1 holds $2 = Z a XFS2FS(d). For every object x such that x ∈ D
there exists an object y such that y ∈ B and F[x, y]. Consider f being
a function from D into B such that for every object x such that x ∈ D
holds F[x, f (x)] from [7, Sch. 1]. 
n−k n+k
(27) If A 6= B and n > k, then DominatedElection(A, n, B, k) = n+k · k .
The theorem is a consequence of (21) and (26).

4. Main Theorem

(28) Bertrand’s Ballot Theorem:


n−k
If A 6= B and n ­ k, then P(DominatedElection(A, n, B, k)) = n+k . The
theorem is a consequence of (13), (19), and (27).

References
[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.
[2] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathe-
matics, 1(1):41–46, 1990.

- 10.2478/forma-2014-0014
Downloaded from PubFactory at 08/08/2016 10:53:46PM
via free access
Bertrand’s ballot theorem 123

[3] Grzegorz Bancerek. The ordinal numbers. Formalized Mathematics, 1(1):91–96, 1990.
[4] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite
sequences. Formalized Mathematics, 1(1):107–114, 1990.
[5] Czesław Byliński. Finite sequences and tuples of elements of a non-empty sets. Formalized
Mathematics, 1(3):529–536, 1990.
[6] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):
55–65, 1990.
[7] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164,
1990.
[8] Czesław Byliński. The sum and product of finite sequences of real numbers. Formalized
Mathematics, 1(4):661–668, 1990.
[9] Czesław Byliński. Some basic properties of sets. Formalized Mathematics, 1(1):47–53,
1990.
[10] Agata Darmochwał. Finite sets. Formalized Mathematics, 1(1):165–167, 1990.
[11] Artur Korniłowicz. On the real valued functions. Formalized Mathematics, 13(1):181–187,
2005.
[12] Rafał Kwiatek. Factorial and Newton coefficients. Formalized Mathematics, 1(5):887–890,
1990.
[13] Beata Padlewska. Families of sets. Formalized Mathematics, 1(1):147–152, 1990.
[14] Karol Pąk. Cardinal numbers and finite sets. Formalized Mathematics, 13(3):399–406,
2005.
[15] Karol Pąk. The Catalan numbers. Part II. Formalized Mathematics, 14(4):153–159, 2006.
doi:10.2478/v10037-006-0019-7.
[16] Jan Popiołek. Introduction to probability. Formalized Mathematics, 1(4):755–760, 1990.
[17] M. Renault. Four proofs of the ballot theorem. Mathematics Magazine, 80(5):345–352,
December 2007.
[18] Andrzej Trybulec. Domains and their Cartesian products. Formalized Mathematics, 1(1):
115–122, 1990.
[19] Andrzej Trybulec. Enumerated sets. Formalized Mathematics, 1(1):25–34, 1990.
[20] Andrzej Trybulec. On the decomposition of finite sequences. Formalized Mathematics, 5
(3):317–322, 1996.
[21] Andrzej Trybulec. Binary operations applied to functions. Formalized Mathematics, 1
(2):329–334, 1990.
[22] Wojciech A. Trybulec. Non-contiguous substrings and one-to-one finite sequences. For-
malized Mathematics, 1(3):569–573, 1990.
[23] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.
[24] Tetsuya Tsunetou, Grzegorz Bancerek, and Yatsuka Nakamura. Zero-based finite sequ-
ences. Formalized Mathematics, 9(4):825–829, 2001.
[25] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1
(1):73–83, 1990.
[26] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186,
1990.

Received June 13, 2014

- 10.2478/forma-2014-0014
Downloaded from PubFactory at 08/08/2016 10:53:46PM
via free access

You might also like