-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Issue Description:
The algorithm lacks the mandatory tie-breaking procedures required by the Scottish STV rules. When a tie occurs (either
for the highest surplus or the lowest vote count), the implementation handles it arbitrarily.
Current Behavior:
The max() and min() utility functions select the first candidate they encounter in the tally object that matches the
target value. This makes the outcome of a tie dependent on the arbitrary order of object keys, which is not compliant
with the statute.
Expected Behavior:
The Scottish Local Government Elections Order 2007 specifies a clear tie-breaking ladder:
- Rule 49 (Surplus Tie): If two candidates have an equal surplus, the surplus of the candidate with the most votes at
the earliest stage where they had unequal votes is transferred first. - Rule 51 (Elimination Tie): If two candidates are tied for the lowest vote count, the candidate with the fewest votes
at the earliest stage where they had unequal votes is eliminated. - By Lot: If the candidates' votes were equal at all stages, the tie must be resolved "by lot", i.e. randomly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels