Space of possible elections

For a given type of ballot, number of voters and number of candidates, there is a finite and computable number of potential elections that can possibly occur. Due to the combinatorial nature of the problem this number is typically extremely large, even for modest electorate sizes.

Nevertheless, understanding the construction of this space of possible elections may be helpful to others looking for analyzing elections computationally, and may also be instructive for generating alternative parameterizations and analyses of election models.

This article details the space of possible elections for certain ballot types, as well as presents expressions for the total number of possible elections.

= Notation and parameters =

Throughout this article, the following conventions will be used:


 * $$n$$: the number of voters
 * $$c$$: the number of candidates
 * $$r$$: the number of possible scores in a rated ballot
 * $$\mathcal{B}$$: the set of possible ballots
 * $$\mathcal{E}(\mathcal{B}, n, c)$$: the set of possible elections using ballots from $$\mathcal{B}$$, $$c$$ candidates and $$n$$ voters
 * $$|\cdot|$$: the cardinality (or size) of a set, e.g. $$|\mathcal{B}|$$ is the number of possible ballots.
 * $$p(k)$$: the set of partitions for the integer $$k$$, with $$|p(k)|$$ the partition number of $$k$$.
 * $$C(k)$$: the set of compositions (ordered partitions) for the integer $$k$$, with $$|C(k)|$$ the number of compositions of $$k$$.
 * $$\alpha \in p(k)$$: a specific partition of $$p(k)$$
 * $$\kappa \in C(k)$$: a specific composition of $$C(k)$$
 * $$\binom{N}{k} = \frac{N!}{(N-k)!k!}$$: the binomial coefficient, the number of non-ordered ways to pick $$k$$ elements out of $$N$$, without replacement.

= Number of possible ballots =

Since each voter may cast any of a finite set of valid ballots, we must first determine how many valid ballots are available.

Single-mark ballots
Under single-mark ballots (1), like in plurality voting, the number of ballots is trivially $|\mathcal{B}^1(c)| = c$.

Cardinal (rated) systems
Let $$\mathcal{B}^C(c,r)$$ be the set of cardinal (C) ballots with $$r$$ possible evaluations for candidates. In this case, the total number of ballots is

$$|\mathcal{B}^C(c,r)| = r^c$$

For approval voting, $$r = 2$$.


 * {| class="wikitable"


 * $$c$$ || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10
 * $|\mathcal{B}^C(c,2)|$ || 2 || 4 || 8 || 16 || 32 || 64 || 128 || 512 || 1,024
 * $|\mathcal{B}^C(c,5)|$ || 25 || 125 || 625 || 3,125 || 15,625 || 78,125 || 390,625 || 1,953,125 || 9,765,625
 * $|\mathcal{B}^C(c,6)|$ || 36 || 216 || 1,296 || 7,776 || 46,656 || 279,936 || 1,679,616 || 1,0077,696 || 60,466,176
 * $|\mathcal{B}^C(c,10)|$ || 100 || 1,000 || 10,000 || 100,000 || 1,000,000 || 10,000,000 || 100,000,000 || 1,000,000,000 || 10,000,000,000
 * $|\mathcal{B}^C(c,11)|$ || 121 || 1,331 || 14,641 || 161,051 || 1,771,561 || 19,487,171 || 214,358,881 || 2,357,947,691 || 25,937,424,601
 * }
 * $|\mathcal{B}^C(c,6)|$ || 36 || 216 || 1,296 || 7,776 || 46,656 || 279,936 || 1,679,616 || 1,0077,696 || 60,466,176
 * $|\mathcal{B}^C(c,10)|$ || 100 || 1,000 || 10,000 || 100,000 || 1,000,000 || 10,000,000 || 100,000,000 || 1,000,000,000 || 10,000,000,000
 * $|\mathcal{B}^C(c,11)|$ || 121 || 1,331 || 14,641 || 161,051 || 1,771,561 || 19,487,171 || 214,358,881 || 2,357,947,691 || 25,937,424,601
 * }
 * $|\mathcal{B}^C(c,11)|$ || 121 || 1,331 || 14,641 || 161,051 || 1,771,561 || 19,487,171 || 214,358,881 || 2,357,947,691 || 25,937,424,601
 * }

If blanks are allowed, they can be considered an extra degree of rating (so 0-5 scores + blank makes 7 total evaluations).

Ordinal (ranked) systems
For ranked (>) systems, we must consider the possibility of equal rankings vs. strict rankings. Partial rankings may also be possible, which leads to a more complex computation.

Full strict rankings
Let $$\mathcal{B}^{>}(c)$$ be the set of ranked ballots with strict, full rankings. In this case, the total number of ballots is simply


 * $$|\mathcal{B}^{>}(c)| = c!$$

These are the factorials or permutation numbers (OEIS sequence A000142).


 * {| class="wikitable"


 * $$c$$ || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10
 * $|\mathcal{B}^{>}(c)|$ || 2 || 6 || 24 || 120 || 720 || 5,040 || 40,320 || 362,880 || 3,628,800
 * }
 * $|\mathcal{B}^{>}(c)|$ || 2 || 6 || 24 || 120 || 720 || 5,040 || 40,320 || 362,880 || 3,628,800
 * }

Partial strict rankings
If limited to top $$k$$ candidates, the number is


 * $$|\mathcal{B}^{>\emptyset}_{k}(c)| = \frac{c!}{(c-k)!}$$

But if voters are allowed to cast arbitrary partial rankings, the number becomes


 * $$|\mathcal{B}^{>\emptyset}(c)| = \sum_{k=1}^{c} |\mathcal{B}^{>\emptyset}_{k}(c)| = \sum_{k=1}^{c} \frac{c!}{(c-k)!} = \mathrm{e} \Gamma(c+1,1) - 1$$

Here, $$\Gamma(x, z) = \int_{z}^{\infty} t^{x-1} \mathrm{e}^{-t} \mathrm{d}t$$ is the incomplete gamma function, and $$\mathrm{e}$$ is Euler's number.

These are OEIS sequence A007526.


 * {| class="wikitable"


 * $$c$$ || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10
 * $|\mathcal{B}^{>\emptyset}(c)|$ || 4 || 15 || 64 || 325 || 1,956 || 13,699 || 109,600 || 986,409 || 9,864,100
 * }
 * $|\mathcal{B}^{>\emptyset}(c)|$ || 4 || 15 || 64 || 325 || 1,956 || 13,699 || 109,600 || 986,409 || 9,864,100
 * }

Full rankings, equality allowed
Let $$\mathcal{B}^{\ge}(c)$$ be the set of ranked ballots with full rankings, possibly with equalities. Every equality creates an equivalence class between candidates, within which the order does not matter. There can be at least 1 equivalence class (all candidates are ranked equal), and at most $$c$$ (all candidates different).

The equivalence classes are determined by the compositions $$\kappa \in C(c)$$. For example, for $$c = 3$$ we may have the compositions (3), (2,1), (1,2) and (1,1,1), giving the ballots of the form (_ = _ = _), (_ = _ > _), (_ > _ = _) and (_ > _ > _). Thus, there are $$\ell = |\kappa|$$ equivalence classes in a given composition, the size of each is given by $$\kappa_i$$.

Each of the "slots" in a ballot may be filled with a candidate, but the order should not matter within an equivalence. Therefore, for the 1st equivalence with $$\kappa_1$$ slots, there are $\binom{c}{\kappa_1}$ possible choices of candidates. For the second, $\binom{c-\kappa_1}{\kappa_2}$, for the third $\binom{c-\kappa_1-\kappa_2}{\kappa_3}$ and so on, exhausting the possibilities at every level.

The total number of ballots is then given by


 * $$|\mathcal{B}^{\ge}(c)| = \sum_{\kappa \in C(c)} \binom{c}{\kappa_1} \binom{c - \kappa_1}{\kappa_2} \cdots \binom{c - \sum_{i=1}^{\ell-1} \kappa_i}{\kappa_\ell}$$

These are known as Fubini numbers or ordered Bell numbers (OEIS sequence A000670).


 * {| class="wikitable"


 * $$c$$ || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10
 * $|\mathcal{B}^{\ge}(c)|$ || 3 || 13 || 75 || 541 || 4,683 || 47,293 || 545,835 || 7,087,261 || 102,247,563
 * }
 * $|\mathcal{B}^{\ge}(c)|$ || 3 || 13 || 75 || 541 || 4,683 || 47,293 || 545,835 || 7,087,261 || 102,247,563
 * }

Remarks
In addition to what was outlined above, specific voting systems may induce further structure to the ballots. For example, a cardinal system which normalizes ballots would reduce the number of possible ballots significantly. A cardinal system based entirely on margins would have a different number of effective ballots, despite the ballots themselves being different. Similar things may happen under ranked systems under additional constraints.

One may also want to exclude some ballots for having no effect. For example, the ballot with all equal ratings or rankings will have no effect in most voting systems. However, these ballots are only a vanishingly small number from the total possible ballots.

= The space of possible elections =

Each of the $$n$$ voters may cast any one of the $$|\mathcal{B}|$$ ballots, but since voters casting identical ballots are exchangeable the number of elections is smaller than $$|\mathcal{B}|^n$$.

The number of total unique elections depends on the possible partitions of the $$n$$ voters into different groups, each casting identical ballots. For each partition $$\alpha \in p(n)$$ of the $$n$$ voters we have $$|\alpha|$$ groups of voters, each casting a unique ballot. Therefore, we have to pick a different possible ballot for each of these groups. For the first group there are $$|\mathcal{B}|$$ possibilities, for the second $$|\mathcal{B}| - 1$$, for the third $$|\mathcal{B}| - 2$$ and so on. If the number of ballots is smaller than the number of voters, this sum must be truncated. Therefore, the total number of unique elections is then given by

$$|\mathcal{E}(\mathcal{B},n,c)| = \sum_{\begin{array}{c} \alpha \in p(n) \\ |\alpha| \le |\mathcal{B}| \end{array}} \frac{|\mathcal{B}|!}{(|\mathcal{B}| - |\alpha|)!}$$

As the partition number may be approximated by $|p(n)| \approx \frac{1}{4n\sqrt{3}} \exp \left( \pi \sqrt{\frac{2n}{3}} \right)$, we can estimate for cardinal elections


 * $$|\mathcal{E}(\mathcal{B}^C(c,r),n,c)| \approx \frac{1}{n} \mathrm{e}^\sqrt{n} (r^c)!$$

and for full strict ranking elections

$$|\mathcal{E}(\mathcal{B}^{>}(c),n,c)| \approx \frac{1}{n} \mathrm{e}^\sqrt{n} (c!)!$$

These numbers are exceptionally large for even modest number of candidates and voters.

= Final remarks =

Note that impartial culture models of voters do not sample this space uniformly, as there are many ballot combinations which produce identical elections due to the exchange symmetry between voters casting the same ballot.

If there are more ballots than voters, the impartial culture model would on average split the voters into as many groups as there are voters, each voter casting a unique ballot. Due to strong correlations between voters and candidates in real-life elections, most possible ballots are not expected to occur. The structure outlined here can be used to develop alternative sampling models which are agnostic to specific models of utility or voter distributions.

Furthermore, if candidates themselves are also exchangeable we obtain the number of unique election 'scenarios'. Due to potentially distinct number of candidates in each ballot this computation is usually more convoluted. As a rule of thumb for ballots which specify all candidates, divide the number by $$c!$$.

The impartial anonymous culture model (also known as Dirichlet model) also fails to capture this structure properly, as sampling this space uniformly would in general produce too many unique ballots. The ideal approach would be to generate a random integer partition of voters and sample it through the Dirichlet model.

= References & external links =


 * Impartial culture


 * T. Nicolaus Tideman, Florenz Plassmann. The Structure of the Election-Generating Universe


 * Ya. V. Uspensky. Asymptotic expressions of numerical functions occurring in problems concerning the partition of numbers into summands. Bull. Acad. Sci. de Russie, 14(6):199–218, 1920


 * Online Encyclopedia of Integer Sequences