1.6 Tools Used for Constructing the Framework
2.1.3 Algorithmic Pattern
Every STV algorithm has a mechanism for advancing the counting process. The mechanism instructs on how to move from one state of computation to another un- til a final state is reached where winners are announced. The mechanism basically comprises a collection of defined actions to take and two sets of constraints, namely applicability and progress conditions defined for each action. Applicability restric- tions are the legislative clauses that specify to what states of computation and under what circumstances an action applies. On the other hand, the progress constraints are the legal clauses that determine the immediate consequences of applying the action by specifying the next state to which counting proceeds.
We revisit the STV of ACT presented earlier as an example. Step 4 requires the action of distributing the surplus votes of an elected candidate. In the second part of the protocol, it further explains under what conditions this action comes into ef- fect. For instance, Step 3 delineates two of the constraints on transferring votes of a successful candidate which are (a) there still exist vacancies to fill and (b) some candi- date(s) has already exceeded the quota so that there are votes to distribute in the first place. Moreover, it informs us of what an application of such a transfer brings about. For example, continuing candidates receive new votes and their tally subsequently changes. Finally, the Step 3 introduces an ordering on executing actions. If all vacan- cies have been filled, then an action for finishing the process executes. However, if there are vacancies, then either transferring applies or the action of eliminating.
The exact content of counting actions varies from one STV algorithm to another. For example, STV of ACT requires transferring only a portion, called last parcel, of the surplus votes of an elected candidate. But the STV used for the upper house elections in the Victoria state of Australia transfers all of the surplus votes rather than just the last parcel.
Also, the precise applicability and progress conditions differ among STV algo- rithms. For instance, the STV of ACT does not allow any action to precede or inter- vene application of transferring surplus of an elected candidate. In contrast, the STV
§2.1 The Generic STV 25
of the upper house elections in Tasmania state of Australia permits acts of counting ballots and electing before surplus of an elected candidate has been fully distributed. There are nonetheless common algorithmic patterns in the STV family. When we survey different STV algorithms some forms of action invariably stand out. The forms are generic in nature and need to be materialised with specific substance to be brought into effect for actual counting. The forms are universally present, regardless of how they are embodied with particular definitions given by various schemes so that concrete actions emerge. We recognise eight forms of action.
1. startto determine the formal ballots to be dealt with. 2. countto deal with the list of uncounted ballots
3. electto elect one or more candidates who have reached or exceeded the quota. 4. transfer-electedto distribute surplus votes of one or some of the already elected
candidates.
5. eliminateto exclude one or some candidates who are weaker than others from the process.
6. transfer-removedto distribute votes of one or some removed candidates. 7. elected-winto terminate counting by declaring the already elected candidates
as winners.
8. hopeful-win to terminate counting by announcing the already elected candi- dates and continuing ones as winners.
We also find commonalities in the applicability clauses among STV protocols. For example, in every STV whenever the vacancies are all filled, applicability condition defined for the finishing action applies and the counting process consequently comes to an end. As another example, whenever all of the uncounted ballots have been dealt with, there are surplus votes to distribute and there exists at least one empty seat, then transferring action applies to advance the procedure. We distil these common clauses to obtain, for each action, a minimal set of conditions that generally exist among the particular applicability constraints defined for actions in specific instances of STV.
Moreover, there are invariant patterns in the progress constraints pertinent to STV schemes. A careful examination of STV protocols shows that applying each action reduces the size of at least one of the following four objects: the list of all of the initially competing candidates minus those who have already been elected2; the list of continuing candidates; the number of ballots in the pile of the most recently elim- inated candidate; the introduced backlog; and the list of uncounted ballots. Using
2To elaborate more on this part, assume the list l consists of all of the candidates who initially
participated in the election. Then as tallying proceeds some candidates may be declared elected in which case the listlshortens.
a proper lexicographic ordering, this allows us to define a complexity measure on the set of machine states in such a way that each application of an action reduces the measure. The progress constraints of an action are therefore mainly the minimal conditions that ensure one of the above measure components decreases when apply- ing the action. For instance in every STV scheme a progress condition on eliminating action is that the length of the continuing candidates in the updated post-state which we move to is less than the length of the same list in the pre-state.
The minimal applicability and progress constraints together with the forms of action shape the core algorithmic mechanism of STV. The minimal constraints are universally applicable to each action as defined by specific STV schemes. One can therefore reasonably expect the minimal conditions to apply to the forms of action rather than simply instantiations of the forms. As a result the minimal conditions give a meaning to the forms of action.
The data structure and algorithmic pattern discussed characterise STV as a family. They relate individual members together through an intrinsic resemblance in light of the commonalities which they have in the data content and algorithmic behaviour. An algorithm therefore belongs to the STV family if two requirements are met. First the six underlying data pieces, namely ballots of the preferential format, concept of valid votes, a quota, candidates to compete, and more significantly discrete states as described must inhabit the data structure of that algorithm. Second the forms of action given earlier should be the only forms defined and allowed as steps which advance the states of the counting, and the minimal applicability and progress should be the mechanism behind counting procedure.
A new phenomena results from the previous paragraph. We can introduce a general form of STV simply by considering the common data structure inhabitant in STV schemes to reside as its data structure and having the underlying algorithmic content mentioned to be the main mechanism of its actions and instructions. We shall refer to this broadly specified STV template as generic or minimal STV, and demonstrate how a wide range of real STV schemes emerge from instantiations into the template.