Up: Issue 9 Next: Paper 2

Voting matters - Issue 9, May 1998

STV with constraints

I D Hill

David Hill is the author of the computer program certified for use in the Church of England elections.

1. Introduction

Elections sometimes include constraints such as, for example, saying that those elected must include at least a given number of each sex. How is it to be done?

The traditional way is set out, for example, in the ERS booklet by Grey and Fitzgerald, that preceded the later rules by Newland and Britton. I have sometimes heard their method referred to rather rudely as "the naïve rules". Basically they are the same as those in the Church of England's 1981 regulations and say: (1) that if a point is reached in the count where a specified maximum number of candidates of the constrained type has been elected, then any other candidate of that type must be excluded as soon as possible; (2) that if a point is reached where the number unexcluded of the constrained type equals a specified minimum, then any such candidate not yet elected must be guarded, such that when choosing a candidate for exclusion at any later point, the lowest non-guarded one must be chosen.

Multiple constraints

Grey and Fitzgerald make no mention of the possibility of more than one constraint or how such is to be handled. The Church of England's 1981 regulations, however, specified that the same rules should be applied to each constraint independently. It was pointed out that this could lead to trouble because two constraints may interfere with each other. The example used was: suppose there are 3 seats to be filled, and one constraint requires at least 2 women, while another requires at least 2 black people. If the available candidates are 2 black men, 2 white women and 1 black woman, where no-one has a quota and the last-named has fewest votes, she would be excluded by looking at each constraint separately, whereas that exclusion makes it impossible for the constraints to be met. It might be objected that such requirements are unlikely but: (a) regulations must allow for all possibilities; (b) however unlikely for a complete election, such a thing could easily arise at a late stage of something larger.

In consequence, the Church of England's 1990 regulations gave no specific rule for handling multiple constraints but left it to the presiding officer to do as seemed right at the time.

An alternative for a single constraint

An alternative approach has been devised by Colin Rosenstiel and colleagues for use by the Liberal Democrats in their internal elections, where STV is to be used with a constraint on the minimum number of each sex to be elected. Their method is (a) to run STV with the correct number of seats and no constraints. If more of one sex are found to be required, then (b) to rerun with more and more seats until it is found which extra candidates of that sex to elect, and (c) to rerun with fewer and fewer seats until it is found which candidates of the other sex to exclude. There are some difficulties, but on the whole this seems at first glance to be an elegant solution for a single constraint, though it is not feasible unless the count is to be by computer and it is not easy to see how it could cope with more than one constraint. It should be noted, however, that it is incompatible with any promise to voters that their later preferences cannot upset their earlier ones.

Although attractive at first sight, I have now come to the opinion that this method is wrong in principle. Indeed this opinion relates to any scheme that starts with ordinary STV and says that, if that produces a result that meets the constraints, it should be accepted. Such a method is always wrong. This opinion may seem odd; does it mean that there is something wrong with ordinary STV? Yes, of course there is. We know well that a perfect electoral method is impossible. The main fault with ordinary STV lies in its "exclude the lowest" rule, which can lead to unjustified exclusion on occasions. The justification of the rule is that it seems to be impossible to find a better one without violating the promise that a voter's later choices cannot upset that voter's earlier choices. It is generally thought to be better to accept the fault than to violate that.

Excluding the lowest is on the grounds that we must exclude someone and that candidate looks, on current evidence, the least likely to succeed. But if we have a constraint that makes it totally impossible for some other candidate to succeed, it is plain daft not to exclude that candidate first.

A simple example can explain the point clearly. Suppose 4 candidates for 2 seats. A and B are men, C and D are women. The votes are:

19 ABD.
 8 CD..
 3 DC..
giving a quota of 10. A is elected at once and passes his surplus to B, but with no further surplus someone must be excluded and, without constraints, it is most sensible to exclude D, who looks the least likely to succeed, and make a fair fight between B and C for the second seat, which C wins.

Suppose, however, that there is a constraint to say that 1 man and 1 woman must be elected. A and C, as by plain STV, are 1 man and 1 woman, but the reasoning by which they were chosen is now quite inadmissible. It cannot be said that D "looks the least likely to succeed" because, no matter what happens, it is absolutely certain that B cannot succeed and a fair fight between B and C is impossible. The remaining seat must go to a woman and a fair fight between C and D is what is necessary. Excluding B, D beats C.

So, by plain STV, A and C are elected, 1 man and 1 woman. Yet, with the constraint of 1 man and 1 woman, it is right to elect A and D instead. This may seem remarkable, but if there is any flaw in the logic I should like to hear of it. The conclusion must be that the title "naïve method" has been wrongly ascribed.

Tackling multiple constraints

How then should multiple constraints be tackled? I believe that the traditional way for a single constraint is right but it needs to be extended to deal with multiple constraints as such, not with each single constraint independently. This is not easy, but if people will introduce multiple constraints, the difficulties are their fault.

The Grey and Fitzgerald rules must be extended to say that whenever a situation is reached such that certain candidates must be elected, or must fail to be elected, if all constraints are to be met then the appropriate action is required. It should be noted that such situations can be met even before vote counting starts, and it may even be that no solution is possible. Regulations need to deal with such cases.

It is superficially attractive to look at each possible set of candidates that could be elected and enquire of each set whether it meets all the constraints, classifying each set as positive or negative. At every stage, each set ruled out as inconsistent with those now elected or excluded would be reclassified as negative, any candidate appearing in every positive set would be marked as "guarded" (i.e. not to be excluded, but still to receive votes until reaching a quota), while any candidate appearing in no positive set would be at once excluded. However, if thoughtlessly implemented, this scheme could easily lead to a combinatorial explosion. For example to elect 20 candidates out of 40, there would be over 10,000,000,000 sets and if a computer could examine 1000 sets per second to classify them, it would take over 4 years merely to go through them once.

A more practicable scheme is to note that the candidates can be grouped according to which constraint features they possess. Usually there are many identical in such respects and looking at them individually is not necessary but only at the number in each group. With that simplification it has been found possible to implement a solution, but it remains sufficiently complicated that to try to do it without computer help is inadvisable. By hand and eye it is all too easy to miss the vital moment when constraints need to be applied, and if missed, disaster can ensue later.

A (disguised) real election

An example of this can be seen in an election that actually occurred though, for obvious reasons, I shall disguise it. I shall also simplify it a little.

Suppose an election in which there are 28 candidates for 14 seats. The candidates, with two-letter code-names for the groups are

 4 English men    (EM)
 7 English women  (EW)
11 Scottish men   (SM)
 3 Scottish women (SW)
 2 Welsh men      (WM)
 1 Welsh woman    (WW)
Constraints say that those elected have to be 7 English, 6 Scottish, 1 Welsh and additionally 7 men, 7 women.

Suppose that the first to be elected is a Welsh man. Anyone would at once see that the other Welsh man and the Welsh woman cannot now succeed so it is right to exclude them at once to let their supporters move elsewhere.

Suppose that the next to be elected are 2 English men and 2 English women, and that the next step after that is to exclude a Scottish woman. How many people would notice that this is a critical point, where everything will go wrong later unless constraints are applied? I think that few people would; without careful analysis it is hard to notice.

The point is that only 2 Scottish women remain, we have to elect 6 Scottish altogether, and have elected none as yet. Therefore we must elect at least 4 Scottish men. But we are restricted to 7 men in total and we have already elected 3. It follows that we must elect exactly 4 Scottish men, and that means that the 2 remaining Scottish women must now be guarded, and that the 2 remaining English men must be excluded as soon as possible, as they cannot now succeed without upsetting the constraints.

If such an election has to be carried out by hand, the best way is to prepare in advance, preferably with a computer to help, a list of all the possible ways, by groups not by individuals, in which a conformant result could be obtained. This can be done as soon as the candidates are known, when there is time to devote to it before the count. In the present instance, there are 8 possibilities:

   EM  EW  SM  SW  WM  WW
    0   7   6   0   1   0
    1   6   5   1   1   0
    1   6   6   0   0   1
    2   5   4   2   1   0
    2   5   5   1   0   1
    3   4   3   3   1   0
    3   4   4   2   0   1
    4   3   3   3   0   1
With such a list at hand during the count, its lines can be deleted as soon as they become impossible. Thus as soon as the first to be elected is found to be a Welsh man, any line with WM set to 0 goes out, leaving just
   EM  EW  SM  SW  WM  WW
    0   7   6   0   1   0
    1   6   5   1   1   0
    2   5   4   2   1   0
    3   4   3   3   1   0
The election of 2 English men and 2 English women leaves just
   EM  EW  SM  SW  WM  WW
    2   5   4   2   1   0
    3   4   3   3   1   0
and the second of these becomes untenable when only 2 Scottish women remain. Knowing that the first line is now the only way to meet the constraints shows the steps necessary much more clearly than could be seen without it. With a bit of practice, to follow such a list, as an indication of the interaction of the constraints with the STV count, becomes a little easier. However, it can never be really easy.

In case anyone should suggest that such a complicated example is implausible, I should repeat that it did actually occur except that I have disguised it and simplified it.

Conclusions

I believe that the approach given above is the best way, within STV, to implement constraints but that they should not be employed unless it cannot be avoided.

The mechanisms of STV are already designed to give voters what they want, so far as possible, in proportion to their numbers. It should be for the voters to decide what they want, not for anyone else to tell them what they ought to want.

The magazine Punch in 1845 included "Advice to persons about to marry - Don't". My advice on constraints is similar.


Up: Issue 9 Next: Paper 2