Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Complex vote-counting schemes such as proportional representation single transferable voting (PR-STV) are used in many jurisdictions around the world. There are many variants, but the core algorithm is well-known [6]. For want of a better term, we use the appellation “VanillaSTV” to refer to such methods.

The parliamentary legislation that governs STV elections typically dates back to when counting was done by hand. Hand-counting STV elections is notoriously error-prone so most jurisdictions use a significantly “simplified” version of the VanillaSTV method that is easier to count manually. Again, for want of a better term, we use the appellation “ManualSTV” to describe such versions.

Computers are increasingly being used for electronic vote-casting and vote-counting because they have the potential to be cheaper, faster and more accurate than hand-counting. When moving to e-counting, electoral commissions invariably choose to implement some versions of ManualSTV for three main reasons: (i) it is mandated by the legislation and any changes require the passage of new legislation; (ii) doing so allows them to transfer the considerable in-house experience in hand-counting to the software vendor during design and testing; and (iii) hand-counting remains as an acceptable back-up if the software fails.

For example, the Australian Capital Territory (ACT) has used an electronic vote-casting system and electronic vote-counting system called eVACS in the past four elections. In 2001 and 2004, e-casting collected approximately 10% of the ballots, rising to 25% in 2012. The eVACS system e-counted all ballots since 2001, with the paper ballots either manually entered (2001 and 2004) or digitally scanned (2008 and 2012). The counting module of this system is publicly available for scrutiny [4]. The official legislation which it attempts to capture is also publicly available [3], and is quite algorithmic. Compared to VanillaSTV, the legislation, and hence eVACS, contains various “simplifications” which make it easier to count votes by hand. Thus, eVACS implements a significantly “simplified” hand-counting version of VanillaSTV, which we call ManualACT.

Here, we analyse the effects of the numerous “simplifications” that are included in ManualACT. We give small examples to show how these “simplifications” lead to counter-intuitive results. We then highlight where these “simplifications” have played a role in previous ACT elections to prove that they are not just theoretical possibilities. Our hope is that election commissions will cease to use computers to simulate STV hand-counting and instead recommend that Parliament changes the legislation to allow them to implement the appropriate variant of VanillaSTV.

2 Notations and Definitions for STV

We first begin with an informal description of STV counting. As usual, we first tally the first preferences for all candidates. All candidates that obtain a pre-defined quota of votes are elected and the votes that are surplus to requirements (i.e. above the quota) are distributed to their next preference. If no candidates obtain the quota then some candidate is selected as the weakest candidate for exclusion and the votes for the excluded candidate are distributed to their next preference. Thus a conventional STV algorithm contains the following two important mutually exclusive operations that distribute votes:

  • Exclusion: distribution of votes of excluded candidate \(c \);

  • Surplus distribution: distribution of surplus votes of elected candidate \(c \).

Informally, each of these operations corresponds to a “count” of the scrutiny. That is, given a multi-set of input ballots, \(\mathcal {E} \), each of these mutually exclusive operations returns a different multi-set of ballots \(\mathcal {E} '\). Each ballot in \(\mathcal {E} \) appears in \(\mathcal {E} '\) except that \(c \) is deleted from its position in that ballot, if it appears in that ballot, and the “weight” of that ballot may change. Of course, if \(c \) is the only candidate on the ballot in \(\mathcal {E} \) then this ballot becomes “exhausted”. We say that ballot papers from \(\mathcal {E} \) in which \(c \) is the first preference are pruned in \(\mathcal {E} '\) because candidates that follow immediately after \(c \) receive, in \(\mathcal {E} '\), (a fraction of the) votes from \(c \) under various conditions of the particular STV version. In VanillaSTV, exclusion is one operation, but in ManualACT, an exclusion may consist of many “partial exclusions” [3].

More formally, let \(\mathcal {C} = \{ c _1 , \dots , c _k\}\) be a set of \(k \ge 1\) distinct candidates. A preference \(\mathsf {pref} = [ p_1, p_2, \dots , p_l ]\) is a list of \(l \le k\) distinct candidates from \(\mathcal {C} \): that is, \(p_i \ne p_j\) for all \(i \ne j\). In some versions of STV, l must equal k in each ballot, meaning that “partial preferences” are forbidden. Here, we allow partial preferences. A \(\mathsf {weight} \) is a rational number between 0 and 1 (inclusive). A ballot \(b = \langle \mathsf {pref}, \mathsf {weight} \rangle \) is a pair consisting of a preference (list) and weight. The initial weight in every ballot is 1. If a ballot \(b=\langle \mathsf {pref}, \mathsf {weight} \rangle \), then \(b.\mathsf {pref} \) is \(\mathsf {pref} \) and \(b.\mathsf {weight} \) is \(\mathsf {weight} \). An election \(\mathcal {E} = \{ b _1, \ldots , b _m \}\) is a set of \(m > 0\) ballots.

We write the list \([ p_1, p_2, \dots , p_l ] \) of preferences as \( p_1> p_2> \dots > p_l\) to capture the intuition that it is a linear order of preferences from most preferred to least. If we want to specify only the head of the preference list then we write the list as \(p_1::ps\) where \(:\) \(:\) is the operation on lists that adds the element \(p_1\) to the front of the list \(ps = [p_2, \dots , p_l]\). Candidate \(p_i\) has a higher preference than candidate \(p_j\) in \(b.\mathsf {pref} \) if \(i < j\). The candidate \(p_1\) has the highest preference in ballot \(b \) in election \(\mathcal {E} \) and is called the first preference of \(b \) in \(\mathcal {E} \). In this case, ballot \(b \) favours candidate \(p_1\) in \(\mathcal {E} \). A continuing ballot is one whose preference (list) is of length greater than 1. For ballots, the appellations “exhausted” and “continuing” are opposites, hence an exhausted ballot is non-continuing and vice-versa.

For an election \(\mathcal {E} \), the total \(tt (c,\mathcal {E})\) of a candidate \(c \) is the sum of the weights of those ballots of \(\mathcal {E} \) that favour \(c \): that is,

$$tt (c,\mathcal {E}) = \sum \{ b.\mathsf {weight} \mid b \in \mathcal {E} \text{ and } b.\mathsf {pref} = c:: ps \text { for some } ps \}. $$

The quota \(q \) is the minimum total a candidate is required to reach in order to be elected. There are numerous ways to compute a quota and it is calculated to ensure that the number of elected candidates cannot exceed the number of vacant seats. In the versions of STV that we consider, a candidate can be elected without a quota when the number of remaining candidates equals the number of vacant seats because all other candidates have been elected or excluded. Here, we use the Droop quota which is defined as the greatest integer less than the number:

$$ {(\text {total number of initial ballots} /\text {(number of vacant seats + 1)}) + 1}. $$

The surplus \(sp (c,\mathcal {E})\) of an elected candidate \(c \) is the difference between \(c \)’s total and the quota q:

$$ sp (c,\mathcal {E}) = tt (c,\mathcal {E}) - ~q . $$

If c is elected, each ballot \(b = \langle [c, p_2, \dots , p_l], wt \rangle \) that favours \(c \) is “pruned” so it favours the next continuing candidate \(p_i\) with some new weight as described below: thus \(p_i\) is not necessarily \(p_2\).

Different versions of STV declare candidates to be elected at different moments in the scrutiny. As soon as some candidate \(c \) is declared a winner, \(c \) stops receiving surplus votes from other winners since \(c \) is no longer a continuing candidate. Declared winners whose surpluses are not yet distributed are called pending winners.

The candidates with the lowest total are the weakest candidates and one of them is selected for exclusion if no candidate reaches the quota. There are many different ways to select such a weakest candidate.

Therefore, at certain moments of scrutiny, that depend upon the vote counting method, each candidate’s total is compared with the quota to determine whether the candidate is a winner (elected), is excluded or is a continuing candidate who has neither been elected nor excluded.

To distribute the surplus of an elected candidate \(c \), we compute the transfer value \(tv (c,\mathcal {E}) = sp (c,\mathcal {E})/ denom \), where the value of \( denom \) depends on the vote counting method. Although \( denom \) can be 0 in both VanillaSTV and ManualACT, the transfer value \(tv (c,\mathcal {E}) \ne 0\) in both. However, as we shall see, for all \(c \) and all elections \(\mathcal {E} \), \(tv (c,\mathcal {E}) \le 1\) in VanillaSTV, but not in ManualACT.

In VanillaSTV, a count is any one of the two fundamental operations that distribute votes: that is, either the surplus distribution of a winner or the distribution of votes of an excluded (weakest) candidate. In ManualACT, although each surplus distribution is one count, the exclusion of the weakest candidate consists of multiple “partial exclusions”, and each of these is a count, as described next.

2.1 Vote Distribution in VanillaSTV

We now describe formally how each of these operations transforms an election \(\mathcal {E} \) into an election \(\mathcal {E} '\) for VanillaSTV. We first define how to distribute the votes of some candidate \(c \) (who may be either a winner or the weakest candidate):

  • If ballot b favours c, then “prune” the preference \(b.\mathsf {pref} = [c, p_2, \dots , p_l]\) in \(\mathcal {E} \) into \(b.\mathsf {pref} = [p_i, \dots , p_l]\) in \(\mathcal {E} '\), where \(p_i\) is the next continuing candidate of \([c, p_2, \dots , p_l]\) and let \(b.\mathsf {weight} = w\) in \(\mathcal {E} \) become \(b.\mathsf {weight} = w \times x\) in \(\mathcal {E} '\), where x is determined by whether \(c \) is a winner or the weakest candidate in \(\mathcal {E} \), as explained shortly.

  • If ballot b does not favour c, but c appears in \(b.\mathsf {pref} \), then delete \(c \) from \(b.\mathsf {pref} \).

Surplus distribution of a winner \(c \) is the distribution of the votes of c but with \(x = tv (c, \mathcal {E})\) where \( denom \) is the sum of the weights of all continuing ballots that favour c. Thus, in VanillaSTV, a ballot cannot gain weight. Exclusion of the weakest candidate \(c \) is the same but with \(x=1\). Thus, in VanillaSTV, the next preferred candidate gets the full current weight of ballot b.

2.2 Vote Distribution in ManualACT

We now describe formally how each of these operations transforms an election \(\mathcal {E} \) into an election \(\mathcal {E} '\) for ManualACT.

In ManualACT, \( denom \) is the number of all continuing ballots in the “last parcel” of \(c \), as described next. For an elected candidate \(c \), the ballots whose votes are distributed to \(c \) in the count that resulted in \(c \) reaching quota and being declared elected, constitute \(c \)’s last parcel. That is, for all candidates c and d, if distributing d’s votes in \(\mathcal {E} \) results in \(\mathcal {E} '\) and \(c \) reaches quota (and is therefore declared elected) in \(\mathcal {E} '\), the last parcel of \(c \) in \(\mathcal {E} '\) contains any ballot \(\langle [d, d_1, \dots , d_m, c, c_{1}, \dots , c_{l-m-2}], wt \rangle \) in \(\mathcal {E} \) where \(d_1, \dots d_m\) are winners with pending surplus distributions who all met quota in \(\mathcal {E} \) (with d). In \(\mathcal {E} '\) this ballot appears as the ballot \(\langle [c, c_{1}, \dots , c_{l-m-2}], wt' \rangle \). If c reaches quota when \(\mathcal {E} '\) is the first count, there is no such \(\mathcal {E} \), so all ballots that favour c constitute c’s last parcel.

We first define how to distribute the votes of some elected candidate \(c \):

  • If ballot b favours c, then “prune” the preference \(b.\mathsf {pref} = [c, p_2, \dots , p_l]\) in \(\mathcal {E} \) into \(b.\mathsf {pref} = [p_i, \dots , p_l]\) in \(\mathcal {E} '\), where \(p_i\) is the next continuing candidate of \([c, p_2, \dots , p_l]\) and update the weight \(b.\mathsf {weight} \) to be \(min(b.\mathsf {weight}, tv (c, \mathcal {E}))\), where \(tv (c, \mathcal {E}) = sp (c, \mathcal {E})/ denom \) and \( denom \) is the number of continuing ballots in the last parcel of \(c \).

  • If ballot b does not favour c, but c appears in \(b.\mathsf {pref} \), then delete \(c \) from \(b.\mathsf {pref} \).

The partial distribution of the votes of the weakest candidate \(c \) is defined as:

  • If ballot b favours c, and \(b.\mathsf {weight} = x\) then “prune” the preference \(b.\mathsf {pref} = c{:}{:}ps\) to \(b.\mathsf {pref} = ps\) (even if ps is the empty list) and do not change \(b.\mathsf {weight} \), where the parameter x is defined below.

  • If ballot b does not favour c, but c appears in \(b.\mathsf {pref} \), then delete \(c \) from \(b.\mathsf {pref} \).

To exclude the weakest candidate \(c \), distribute the votes of \(c \) as follows: for every different value w of \(\mathsf {weight} \) that appears in the ballots that favour \(c \), apply partial distribution with \(x = w\) to all ballots.

Finally, given an election \(\mathcal {E} \) with n vacancies and a set \(\mathcal {C} \) of at least n distinct candidates, a vote counting algorithm returns from \(\mathcal {C} \) a set \(\mathcal {W} \) of n distinct winners.

2.3 Illustrative Example of VanillaSTV to Highlight Notation

Example 1

Table 1 shows two elections: \(\mathcal {E} \) and \(\mathcal {E} '\). The set of candidates of both \(\mathcal {E} \) and \(\mathcal {E} '\) is \(\mathcal {C} = \{A, B, C\}\). Election \(\mathcal {E} \) consists of four ballots and the quota is \(q =2\). Ballots \(b_1-b_3\) are continuing ballots. Ballot \(b _1\) has preferences \(A> B > C\) (favouring A) and weight 1. Ballot \(b _2\) has preferences \(B> C > A\) (favouring B) and weight 1/2. Ballot \(b _3\) has preferences \(C > B\) (favouring C) and weight 1. Ballot \(b _4\) favours C and C is the only preference of \(b _4\). Therefore, \(b _4\) is not continuing. The weight of \(b _4\) is 1/3. The total \(tt (A,\mathcal {E})\) of candidate A in \(\mathcal {E} \) is 1 since the only ballot that favours A has weight 1. The total \(tt (B,\mathcal {E})\) is 1/2 since the only ballot that favours B has weight 1/1. Since \(b _3\) and \(b _4\) both favour C, the total \(tt (C,\mathcal {E})\) is the sum of their weights \(b _3.\mathsf {weight} = 1 \) and \(b _4.\mathsf {weight} = 1/3\): that is, \({tt (C,\mathcal {E}) } = 1/3 + 3/3 = 4/3\).

Nobody is elected in \(\mathcal {E} \) because the totals of all candidates are below the quota \(q = 2\). The weakest candidate in \(\mathcal {E} \) is B because it has the smallest total 1/2. Therefore, B is excluded. The double vertical line denotes the count that distributes votes of B. By distributing votes of B this count converts \(\mathcal {E} \) to \(\mathcal {E} '\).

Table 1. Example of an STV exclusion of the weakest candidate

3 Comparison of VanillaSTV and Variations of ManualACT

We now present examples of counting votes with the methods VanillaSTV, ManualACT and ManualACT modified in certain ways. Each example is accompanied by a table that shows distributions of votes. When using ManualACT, the column marked LP shows whether a ballot is or not in the last parcel of the winning candidate. If an election is obtained from an election \(\mathcal {E} _i\) by distributing the surplus of candidate \(c \) but there is still a candidate whose surplus distribution is pending, it is called a quasi-election and marked as \(\mathcal {E} _i^c \). All quasi-elections are elections. Initially all ballots have weight 1.

Fig. 1.
figure 1

Differences in VanillaSTV and ManualACT related to distribution of surpluses.

Fig. 2.
figure 2

Differences in VanillaSTV and ManualACT related to exclusion.

Figures 1 and 2 summarise, respectively, the differences between VanillaSTV and ManualACT regarding surplus distribution and candidate exclusion.

Table 2. Example 2: Distribution of votes according to VanillaSTV

3.1 Example of VanillaSTV

Example 2

We begin with an example that helps to highlight the differences in the distribution of votes between VanillaSTV and ManualACT. We analyse each election of Table 2 in turn.

Election \(\mathcal {E} _1\). In election \(\mathcal {E} _1\), two candidates, A and B, with \(tt (A,\mathcal {E} _1) = 8\) and \(tt (B,\mathcal {E} _1) = 6\), reach quota \(q = 4\), with surpluses 4 and 2 respectively. Their respective transfer values are therefore \(4/8=1/2\) and \(2/6=1/3\). The surplus of the winner with the highest surplus, i.e. A, is distributed first leading to \(\mathcal {E} _1^A\).

Election \(\mathcal {E} _1^A\). Although candidate C has a total \(tt (C,\mathcal {E} _1^A)\) of \(8*1/2 + 3*1 = 7\) votes and thus \(tt (C,\mathcal {E} _1^A) > q \), C is not yet declared elected because candidate B has a pending surplus (hence, \(\mathcal {E} _1^A\) is a quasi-election).

Election \(\mathcal {E} _2\). In election \(\mathcal {E} _2\) surplus \(sp (B,\mathcal {E} _1)\) is distributed and ballots \(b_9\) to \(b_{14}\) are pruned as the result of this distribution. Their weight is attenuated by the transfer value \(tv (B, \mathcal {E} _1)= 1/3\) and their first preference is C. Tallying C’s ballots, we find that C’s total is now \(8*1/2 + 6*1/3 + 3*1= 9\). There are no pending candidates and C is therefore declared a winner. Its surplus is \(9-4 = 5\), giving us a transfer value of 5/9.

Election \(\mathcal {E} _3\). In election \(\mathcal {E} _3\), C’s surplus is distributed. Ballots \(b_9\) to \(b_{14}\) now get their previous weight 1/3 attenuated by the transfer value 5/9 of C, giving them a weight of 5/27. Ballots \(b_{15}\) to \(b_{17}\) now get their previous weight 1 attenuated similarly, giving them a weight of 5/9. The total of D is \(20/27 + 27/27 = 47/27 < 4\) and the total of E is \(10/27 + 15/9 + 1 = 10/27 + 45/27 + 27/27 = 82/27 < 4\). Thus D is the weakest candidate and is excluded.

Since E is the only continuing candidate, and there is only one vacancy left, E is elected automatically. Thus the set \(\mathcal {W} \) of winners is \(\{A, B, C, E\}\).

3.2 Effects of the Last Parcel Simplification

In Example 3, we apply ManualACT to the same ballots as in Example 2. Table 3 illustrates this. For each ballot paper, a mark in form of a tick \(\checkmark \) next to it signifies that this ballot paper was pruned in the previous count and therefore belongs to the last parcel of a candidate that wins in the current election as the result of the count. In the initial election \(\mathcal {E} _1\), all ballots are marked by definition.

Example 3

We describe each column in turn.

Table 3. Example 3: Distribution of votes according to ManualACT

Election \(\mathcal {E} _1\). Two candidates, A and B, with \(tt (A,\mathcal {E} _1) = 8\) and \(tt (B,\mathcal {E} _1) = 6\), reach quota \(q =4\), with surpluses 4 and 2 respectively. The surplus of the winner A with the highest surplus is distributed first, giving \(\mathcal {E} _1^A\).

Election \(\mathcal {E} _1^A\). Since all (continuing) ballots are marked with a \(\checkmark \) in \(\mathcal {E} _1\), all of them that favour the winner A are involved in the distribution of the surplus of A. The denominator \( denom \) of the transfer value is the number of continuing ballot papers that favour A and is equal to 8: thus \(tv (A,\mathcal {E} _1) = 4/8 = 1/2\). The old weights of ballots involved in the surplus distribution are replaced with the transfer value \(tv (A, \mathcal {E} _1)\). Therefore, the weights of the ballots \(b_1\) to \(b_{14}\) in \(\mathcal {E} _1^A\) are equal to 1/2.

For all continuing candidates in \(\mathcal {E} _1^A\), the weights of the ballots that favour these candidates sum to integers. Thus, there is no rounding down and their totals are equal to these sums.

Note that although weights of ballots in elections \(\mathcal {E} _1^A\) in Tables 2 and 3 happen to be the same, they are obtained differently. In Table 2, they are obtained not by simply assigning \(tv (A, \mathcal {E} _1)\) to them, but by multiplying their weights in \(\mathcal {E} _1\), which are equal to 1, by \(tv (A, \mathcal {E} _1)\).

After every count, ManualACT checks for new winners and declares them. Candidate C’s total \(tt (C, \mathcal {E} _1^A) = 8*1/2 + 3*1 = 7\) reaches quota 4 in \(\mathcal {E} _1^A\). C is immediately declared elected and therefore stops receiving votes. The surplus of C is distributed only after the distribution of the surplus of B because B was elected earlier.

Election \(\mathcal {E} _2\). The distribution of \(sp (B, \mathcal {E} _1)\) leads to \(\mathcal {E} _2\). Ballots \(b_{9}\) to \(b_{14}\) are marked \(\checkmark \) in \(\mathcal {E} _2\), because they are the pruned ballots. But notice that C has disappeared from these ballots because C was elected in \(\mathcal {E} _1^A\), is not a continuing candidate any more and cannot receive votes. The sum of the weights of the ballots \(b_{1}-b_{8}\), that favour C, is an integer 7. Thus, \(tt (C,\mathcal {E} _2)=7\). However, the sum of the ballots \(b_{9}-b_{12}\), that favour D, is \(4/3 + 1 = 7/3\). Rounding this down gives us \(tt (D,\mathcal {E} _2)=2\).

Election \(\mathcal {E} _3\). Only ballots \(b_{1}-b_{8}\) are marked in \(\mathcal {E} _1^A\), the election where C became a winner, because these ballots form the last parcel for C. Thus only these eight ballots are involved the distribution of surplus \(sp (C, \mathcal {E} _1^A)=3\) and computing the denominator of the transfer value of C. Continuing ballots \(b_{15}-b_{17}\), highlighted with , are no longer involved in the scrutiny, although they favour C. Their next preferences are never considered in further counting, thus robbing E of some votes.

Since the number of continuing ballots in the last parcel of C is equal to 0, \( denom =0\) and cannot be used in the formula \(tv (C,\mathcal {E} _2) = sp (C, \mathcal {E} _2)/ denom \). Nevertheless, the transfer value does not play a role in further scrutiny because no ballot receives (a fraction of) \(s(C,\mathcal {E} _2)\) anyway, since there are no continuing ballots in the last parcel of C. Three ballots \(b_{15}-b_{17}\) of the true surplus of C are lost.

No candidate reaches the quota in \(\mathcal {E} _3\), the weakest candidate (with the smallest total) E is excluded and the only remaining candidate D wins the last vacant seat.

The set of winners \(\{A, B, C, D\}\) according to ManualACT is different from the set \(\{A, B, C, E\}\) of winners according to VanillaSTV.

3.3 \(\texttt {\texttt {ManualACT}}^{\lnot \texttt {LP}}\): ManualACT Without the Last Parcel

Example 4

Table 4 shows totals and distribution of the votes of the same initial election \(\mathcal {E} _1\), as in Examples 3 and 2, but this time using method \(\texttt {\texttt {ManualACT}}^{\lnot \texttt {LP}}\). \(\texttt {\texttt {ManualACT}}^{\lnot \texttt {LP}}\) is identical to ManualACT with the only exception that there is no notion of “Last Parcel” in \(\texttt {\texttt {ManualACT}}^{\lnot \texttt {LP}}\). That is, when a candidate wins with a surplus, all continuing ballots which favour this candidate are taken into consideration in \(\texttt {\texttt {ManualACT}}^{\lnot \texttt {LP}}\) for computing the transfer value and distributing the surplus of this candidate. Therefore, ballots do not need to be marked with a \(\checkmark \) in Table 4.

Table 4. Example 4: Distribution of votes according to \(\texttt {\texttt {ManualACT}}^{\lnot \texttt {LP}}\)

As before, there are 19 ballot papers, 4 vacancies and the Droop quota is equal to 4. In \(\texttt {\texttt {ManualACT}}^{\lnot \texttt {LP}}\), elections \(\mathcal {E} _1^A\) and \(\mathcal {E} _2\) are identical to those in ManualACT. They diverge when the surplus of C is distributed. Since all continuing ballots that favour C are considered, ballots \(b_{15}-b_{17}\) in are involved in \(\texttt {\texttt {ManualACT}}^{\lnot \texttt {LP}}\) in computing \(tv (C,\mathcal {E} _1^A)\) and distributing \(sp (C,\mathcal {E} _1^A)\).

The denominator \( denom =3\) of the transfer value \(tv (C,\mathcal {E} _1^A)\) is equal to the number of continuing ballots \((b_{15}-b_{17})\), and the transfer value \(tv (C,\mathcal {E} _1^A)\) is therefore equal to \(3/3 = 1\). Consequently, E, being the next preference after C in ballots \(b_{15}-b_{17}\), gains 3 surplus votes of C in \(\mathcal {E} _3\), reaches the quota and becomes the fourth winner.

Because ballots \(b_{15}-b_{17}\) remain in scrutiny according to \(\texttt {\texttt {ManualACT}}^{\lnot \texttt {LP}}\), their second preferences are taken into consideration and lead to the victory of E.

figure a

3.4 Effects of Declaring Winners at Different Moments in ManualACT

In ManualACT, candidates are declared winners as soon as their totals reach the quota as a result of a count (i.e. either surplus distribution or partial exclusion), even if there are still candidates pending for surplus distribution. If the newly declared winners have surpluses, they are placed at the end of the queue of pending candidates. ManualACT declares winners as soon as they meet the quota to prevent them from receiving further votes. In the case of exclusion, this, however, leads to an unbalanced distribution of votes of the excluded candidate. In the case of surplus distribution, this leads to an unbalanced distribution of surpluses of candidates that were declared winners in the same election. Examples 5 and 6 illustrate this situation.

ManualACT: Declaring Winners After Every Count

Example 5

This example applies ManualACT to an election consisting of 21 ballot papers. There are 4 vacant seats and the Droop quota is equal to 5. Table 5 shows the initial election \(\mathcal {E} _1\), as well as totals and distribution of votes.

In \(\mathcal {E} _1\), candidates A and B reach quota with totals 10 and 9 respectively. First the algorithm distributes the surplus of the candidate A with the most votes. In \(\mathcal {E} _1^A\), total \(tt (C,\mathcal {E} _1^A)\) is above the quota, so C is declared elected. Thus C no longer receives surplus votes, including those from B.

Distributing the surplus of B leads to \(\mathcal {E} _2\). Ballots \(b_{11}-b_{19}\) in \(\mathcal {E} _2\) have C as the next preference after B. Since C is declared elected in \(\mathcal {E} _1^A\), surplus votes from B in these ballots go to the next continuing preference D.

In \(\mathcal {E} _3\), the surplus of C is distributed. No candidate reaches the quota in \(\mathcal {E} _3\). The candidate E with the lowest total gets excluded and D gets elected as the only remaining candidate for the only remaining seat.

The distribution of surplus votes of B to D instead of C in election \(\mathcal {E} _2\) deserves special attention. Both A and B simultaneously reach the quota in the initial election \(\mathcal {E} _1\). The next preference on all of their ballots is C. Therefore, the distribution of surplus votes from A to C and the distribution of surplus votes from B to C should be treated equally. However, this is not the case in ManualACT. By skipping the second preference C (marked in ) in ballots \(b_{11}-b_{19}\) when \(sp (B,\mathcal {E} _1)\) is distributed, candidate D obtains a higher total in election \(\mathcal {E} _2\) than it would obtain if C were not skipped when distributing the surplus votes of B.

Table 5. Example 5: Declaring winners after every count i.e. ManualACT

If C received this missing fraction of the surplus of B in \(\mathcal {E} _2\), the fourth winner would be E. Example 6 shows this in detail.

Table 6. Example 6: \(\texttt {\texttt {ManualACT}}^{\texttt {DWD}}\): ManualACT but declaring winners after all surpluses are distributed

\({{\mathbf {\mathtt{{\texttt {ManualACT}}}}}}^{{{\mathbf {\mathtt{{DWD}}}}}}\): D eclaring W inners after all surpluses are D istributed

Example 6

\(\texttt {\texttt {ManualACT}}^{\texttt {DWD}}\) is identical to ManualACT except that new winners are declared only after all pending surpluses are distributed. Table 6 shows totals and preference distributions using the initial election \(\mathcal {E} _1\) from Example 5.

Elections \(\mathcal {E} _1^A\) are identical in Tables 5 and 6. But C is not declared elected in \(\mathcal {E} _1^A\) in Table 6, because there is still a pending winner, B.

Ballots \(b_{11}-b_{19}\) are involved in distributing \(sp (B,\mathcal {E} _1)\) and B’s surplus votes go to candidate C in \(\mathcal {E} _2\). There are no more pending winners, therefore candidates that have reached the quota can be declared winners in \(\mathcal {E} _2\). Thus, C gets elected in \(\mathcal {E} _2\) and C’s surplus is distributed in the next count. Since A and B are declared winners simultaneously, the last parcel of C contains ballots from both A and B that contribute votes to C’s victory. Thus, the last parcel of C consists of ballots \(b_{1}-b_{19}\). \(\mathcal {E} _3\) is the result of distributing \(sp (C,\mathcal {E} _2)\).

No candidate reaches the quota in election \(\mathcal {E} _3\). Since D has a lower total, it is excluded, and E becomes the fourth winner.

Note that D’s total is lower than E’s total in this example, because they both were equally regarded as the third preferences in ballots \(b_{1}-b_{19}\), taking into consideration that the first preferences of these ballots were declared winners in the same election \(\mathcal {E} _1\) and their second preferences are identical. D appears in a smaller number of ballots than E and therefore eventually loses to E.

Note that although ballots \(b_{1}-b_{10}\) and \(b_{11}-b_{19}\) had different weights in \(\mathcal {E} _2\), their weights become identical in \(\mathcal {E} _3\) and are equal to 6/19. This happens because in ManualACT, and hence in \(\texttt {\texttt {ManualACT}}^{\texttt {DWD}}\), the new weights of ballots involved in the surplus distribution of C all become equal to the transfer value of C (unless the current weight is smaller than the transfer value, the weight remains unchanged then).

figure b

4 Examples from Real ACT Elections

We now show that the issues that we have raised so far do manifest themselves in real elections in the ACT using our own independent implementation of ManualACT.

4.1 Last Parcel Anomalies

We now illustrate three inter-related anomalies which arise because of the use of the notion of the last parcel, which does not exist in VanillaSTV.

As Fig. 1 shows, VanillaSTV and ManualACT consider different sets of ballot papers when distributing the surplus of an elected candidate \(c \): while VanillaSTV considers all continuing ballot papers that favour \(c \), ManualACT considers only continuing ballot papers from the last parcel of \(c \). If there is a large difference between the cardinality of these sets, then ManualACT can disenfranchise voters whose ballots favour \(c \) without being in the last parcel of \(c \). Effectively, these ballots are mistakenly deemed to be exhausted as shown in Example 3.

A real instance of this phenomenon happens in Count 36 of the Brindabella scrutiny of the ACT Legislative Election 2012 [1] where Mick Gentelman’s total is 12522 and the quota is 10594. This means that Mick Gentleman’s surplus is \(1928 = 12522 - 10594\). The number of continuing ballot papers from his last parcel is equal to 955, so they remain in scrutiny and are allowed to contribute to their next preference with a certain transfer value. But there were 2470 other continuing ballot papers that contributed to the total of Mick Gentleman (i.e. had Mick Gentleman as the first preference) but which were not in his last parcel. Thus 2470 voters were denied their next preference even though their ballot was not actually exhausted.

As we pointed out in Sect. 2, for an elected candidate \(c \), each ballot that favours \(c \) is given a transfer value \(tv (c,\mathcal {E}) = sp (c,\mathcal {E})/ denom \) where \( denom \) is a function that depends on the vote counting approach. In ManualACT, \( denom \) is the number of the continuing ballots in the last parcel of \(c \). Thus \(s(c,\mathcal {E}) / denom \) may be greater than 1. Moreover, if \( denom =0\), we get a “division by zero” error. The ACT Electoral Act is silent about the division by zero error but to handle both situations, the Electoral Act [3] (subclause 1C(4)) says: “However, if the transfer value of a ballot paper \(\langle \dots \rangle \) would be greater than the transfer value of the ballot paper when counted for the successful candidate, the transfer value of that ballot paper is the transfer value of the ballot paper when counted for the successful candidate.” eVACS attempts to handle this situation by assigning 1 to the transfer value of \(c \) instead of \(s(c,\mathcal {E})/ denom \), if \( denom = 0\) or if \(s(c,\mathcal {E})/ denom > 1\) [4]. Without further action, the next preferred candidate on the ballot papers that favour \(c \) would effectively receive a full vote, so eVACS resets the transfer value of these ballot papers to their original value rather than 1, thereby implementing subclause 1C(4).

In the Mick Gentleman example mentioned above, since 1928/955 is greater than 1, the transfer value of Mick Gentleman is assigned value 1. That is, without further action, the 955 ballots from Mick Gentleman’s last parcel would suddenly increase in weight from some fraction \(n/m < 1\) to 1. As stated above, eVACS detects this event and resets the transfer value of these 955 ballots to n/m, leading to the following two oddities:

  1. 1.

    These 955 voters contributed n/m of a vote to elect Mick Gentleman and can now contribute to their next preferred candidate without any reduction in their weight n/m;

  2. 2.

    Of Mick Gentleman’s 1928 surplus votes, at least \(1928 - 955 = 973\) were lost simply because their corresponding ballots do not belong to the last parcel for Mick Gentleman. That is, votes can “disappear” during scrutiny.

Another real instance of this phenomenon happens in Count 43 of preferences distribution of electorate Molonglo of the ACT Legislative Assembly Election 2012 [2]. In this count, the surplus votes of Simon Corbell are distributed. His surplus is equal to 1278 and there are 648 continuing ballot papers from his last parcel. Since \(1278/648 > 1\), the transfer value of Simon Corbell becomes 1. All 648 ballots of Simon Corbell that are considered for the distribution have weight 12554/23872. This weight is smaller than 1, therefore the weight of these ballots remains 12554/23872. Therefore, only \(648 * (12554/23872) \approx 340.775\) of the surplus votes were distributed. The remaining \(1278 - 648 * (12554/23872) \approx 937.22\) surplus votes were lost. Moreover, 648 voters were allowed to “double dip” by contributing 12554/23872 of a vote to Simon Corbell, and also to their next preferred candidate.

4.2 Loss by Fraction

According to the ACT Legislation [3], each candidate is associated with a number, called “total votes”, that changes as the scrutiny proceeds. The “total votes” of a candidate is defined in the Legislation as “the sum of all votes allotted to the candidate”. However, as we show below, the manner of computing “total votes” in ManualACT means they do not equal the sum of all votes allotted to the candidate.

The following two statements from the Legislation seem to instruct us to use “count votes” of a candidate for computing his or her “total votes”, although it is not stated precisely. “6(3) The count votes for each continuing candidate shall be determined and allotted to him or her. 6(4) After the allotment under subclause (3), the continuing candidates’ total votes shall be calculated and, if the total votes of a candidate equal or exceed the quota, the candidate is successful.”

Section 1A of Schedule 4 of the Legislation defines the notion of “count votes” as the result of multiplying “the number of ballot papers to be dealt with at a count that record the next available preference for the candidate” and “the transfer value of those ballots” and disregarding any fraction. The fraction is disregarded because it is easier to deal with natural numbers when counting by hand.

Indeed, eVACS computes totals of candidates in the following way that interprets the above mentioned statements 6(3) and 6(4) of the Legislation. Here is an extract from [4]: “25) \(\langle \dots \rangle \) Calculate the sum of the Vote Values of all ballots in the candidate’s Pile for this Count, and truncate it to an integer (i.e. 700.9999 becomes 700). Set the candidate’s Total for this Count to the candidate’s Total for the last Count plus the truncated sum.”

More mathematically: let \(\lfloor CV^c \rfloor \) denote “count votes” of candidate \(c \). Assume candidate A obtained initially N votes and then obtained his or her part of surpluses of candidates \(c _1, \dots , c _k\). Then “total votes” of A is equal to \(N + \lfloor CV^{c _1} \rfloor + \dots + \lfloor CV^{c _k} \rfloor \). Because of all the truncations, “total votes” of a candidate defined by statements 6(3) and 6(4) is in fact lower than the sum of the weights of the ballots allotted to the candidate.

In other words, the numbers that appear in the ACT scrutiny tables do not correspond exactly to the actual distribution of votes.

The impact of this truncation of “total values” can be substantial as demonstrated below by running a variant of the ManualACT that does not round down the “count votes” on the Brindabella Legislative Assembly Election 2012.

Example 7

Using ManualACT, consider the Brindabella Distribution of Preferences [1, Table 2]. After Brendan Smyth’s surplus votes are distributed, no candidate reaches quota \(q = 10594\) and Rebecca Cody is chosen for exclusion with the lowest “total votes”: 6257. Amanda Bresnan has a slightly higher value of “total votes” of 6261 so she continues in the scrutiny. In the first partial exclusion of Rebecca Cody’s votes, Mick Gentleman reaches quota with “total votes” 12522. Eventually, after fully excluding Rebecca Cody, distributing the surplus votes of Mick Gentleman and excluding Amanda Bresnan, Andrew Wall becomes the final winner as the only continuing candidate in the scrutiny with “total votes” 10541.

Applying ManualACT without truncation of totals to the same election, Amanda Bresnan has a fractionally lower total (48855454926329/\(7794085572=6268.27284292\)) than Rebecca Cody (87405572581/\(13942908=6268.81942999\)) after the distribution of Brendan Smyth’s votes and is therefore selected for exclusion. About 1830.5 votes from Amanda Bresnan go to Mick Gentleman, giving him a total 39279302005211/3897042786 = 10079.2585974 after Amanda Bresnan’s full distribution. Then Rebecca Cody is excluded and her first partial exclusion brings 5566 votes to Mick Gentleman and Mick Gentleman becomes the winner with 60970242152087/3897042786 = 15645.2585974 votes.

Thus, in ManualACT, the truncation of totals causes Mick Gentleman to obtain \(15645.2585974-10541=5104.2585974\) fewer votes than if totals are not truncated. The totals of other winners are also reduced due to truncation. Table 7 shows the number of votes of all winners in both approaches.

Table 7. Winner totals in Brindabella 2012 ACT Legislative Assembly Election

Note also that, in this example, the rounding of totals has an effect on the order of exclusion of candidates Rebecca Cody and Amanda Bresnan. In another election this may lead to different winners.

4.3 Effects of Rounding

We now describe another important observation about numbers that appear in the ACT scrutiny sheets. As explained in Sect. 2, ManualACT excludes a candidate not at once, but in several partial exclusions. The number of such partial exclusions is equal to the number of different weights that exist in the continuing ballots that favour the candidate. Each partial exclusion of a candidate reduces his or her total. The legislation does not define how the total of this candidate should be recomputed. But it is reasonable to expect that the sum of the weights of the remaining ballots in favour of this candidate should be equal to the candidate’s total after the partial exclusion. This is not the case in the ACT scrutiny tables produced by eVACS [4]. eVACS classifies ballots that favour the candidate to be excluded into groups/piles according to weights of these ballots. Then eVACS performs partial exclusions of the candidate in a consecutive order starting with the pile with the highest weight. After each partial exclusion eVACS recalculates the candidate’s total in the following way: “36) Set Group Sum to 0. For each pile forming the Group: Multiply the number of Ballots in this pile by their vote value and truncate to an integer (i.e. 700.9999 becomes 700). Add this value to the Group Sum. 36b) Subtract this Group Sum from the excluding candidate’s Total for previous Count to give the excluding candidate’s Total for this Count.” Note that “candidate’s Total for previous Count” is a truncated value.

Example 8

In Count 7 of the Brindabella 2012 ACT Election, Ben Murphy who has the lowest (truncated) number of votes 754 is chosen to be excluded. There are 825 ballot papers in scrutiny that favour Ben Murphy at that election. Of these papers 702 papers have weight 1 and 123 papers have weight 7972/18443.

Since some ballots for Ben Murphy have one weight, and other ballots for Ben Murphy have a different weight, his full exclusion takes two counts. The first partial exclusion transfers votes of Ben Murphy to the next continuing candidates in the ballots with weight 1. According to statements 36) and 36b) of eVACS, the “Group Sum” of these ballots is equal to \(\lfloor 702*1 \rfloor = \lfloor 702 \rfloor = 702\) (“Multiply the number of Ballots in this pile by their vote value and truncate to an integer”). Then the “Total” of Ben Murphy after the first partial exclusion is \(754-702 = 52\) (“Subtract this Group Sum from the excluding candidate’s Total for previous Count”).

The second partial exclusion deals with ballots that have transfer value 7972/18443. The “Group Sum” of these ballots is equal to \(\lfloor 123*(7972/18443) \rfloor = \lfloor 53.166838367 \rfloor = 53\). Then the “Total” of Ben Murphy after the second and final partial exclusion is \(52-53 = -1\). A negative number!

Analogously, other excluded candidates end up with negative “Totals” in the Scrutiny. For example, Rebecca Cody ends up with total \(-8\), Val Jeffrey with \(-5\), Karl Maftoum with \(-7\), Nicole Lawder with \(-4\).

These negative numbers of excluded candidates do not appear in ACT’s scrutiny tables because eVACS does not print totals of candidates that are fully excluded, as can be seen from the following extract of void report_votes_transferred from [5], where static void draw_empty draws an empty cell.

figure c

The discrepancy between “Totals” which appear on the ACT’s scrutiny tables and the actual sum of weights of ballots that still remain in scrutiny as these candidates are partially excluded does not influence the outcome. However, this discrepancy is yet another example of mathematical imprecision that happens when the hand counting approach is implemented literally.

5 Further Work and Conclusion

There are many other variations of STV in use in Australia and around the world. Many of them have their own “simplifications”. For example, the province of New South Wales uses a version of STV where the surplus votes are sampled randomly to obtain the votes to transfer. All these versions require further analysis. Regardless, we have hopefully shown that the legislation governing ACT elections needs to be thoroughly revised to eliminate the “simplifications” that pander to hand-counting since ACT Elections now use full e-counting.