STV (was Re: ternary operator vote)

Alex Martelli aleax at
Wed Feb 12 10:47:24 CET 2003

Laura Creighton wrote:

   [learned discourse about voting procedures, snipped]

Since you all seem to be experienced with voting procedures, I take
the occasion to ask -- what's wrong with Single Transferable Vote?
Seems particularly simple for this kind of thing, where the point is
choosing either "no change" or one specific kind of change out of N.

How it would work here: each voter picks any number of alternatives
(including "no change") *in his or her order of preference*.  Now,
first-preferences of each voter are counted; if one choice (maybe
"no change") gets over 50%, that's it.  Otherwise, the alternative
with the least number of first-preferences is dropped, and the
voters who picked it are each assigned to his or her SECOND
preference.  Repeat until one alternatives gets over 50%.  If all
of a voter's expressed preferences have been dropped, that voter
doesn't count any more -- e.g. if I express three preferences (again
possibly including "no change") when there are 10 candidates, it
means "and apart from these three, all other stink IMO", i.e. it
means that if those three hadn't been on the ballot, I'd abstain.

Here's a _simplistic_ Python implementation for clarity.  Assume
I have the votes as a list of lists -- one item per voter, each
item being a list of that voter's preferences, and all the
alternatives are identified by hashables, e.g. strings:

def stv(votes):
    while True:
        tally = {}
        total = 0
        for preferences in votes:
           if not preferences: continue
           vote = preferences[0]
           tally[vote] = 1 + tally.get(vote, 0)
           total += 1
        auxlist = [ (tally[vote], vote) for vote in tally ]
        if auxlist[0][0] * 2 > total:
            return auxlist[0][1]
        remove_vote = auxlist[-1][1]
        for preferences in votes:
            try: preferences.remove(remove_vote)
            except ValueError: pass

Needs enhancements for various possible anomalies such as
two votes being exactly tied at the top (50% each) or at
the bottom, but, roughly, this is the idea.

So what are the problems with it?  I can't see any way this
procedure would induce me to distort my order of preference,
including my preference for "no change" if any; and it seems
guaranteed to pick the one choice, including possibly "no
change", that best reflects voters' expressed preferences.

I'm aware of two technical problems with STV that do not
seem to apply here:
  1. with multiple-winner elections it may get a bit hairy
     (I think it's still the best, but that's not germane)
  2. it may compromise voting secrecy in secret ballots, if
     nasty observers get to see the exact voting orders that
     appear even without overt identification with voters (the
     "mafia threat" problem that led us, in Italy, to change
     the old system of multiple preferences per person)
and one objection which I've always despised:
  3. voters are too stupid to understand what it means to
     express their entire order of preference
(surely we can agree [3] cannot apply to Pythonistas!-).

Any other issues?  If not, why not adopt this scheme?


More information about the Python-list mailing list