back to article Buggy vote-counting software borks Australian election

The body overseeing elections in the Australian state of New South Wales (NSW) has acknowledged researchers' claims of a bug in the software it uses to count votes. The NSW Electoral Commission (NSWEC) has corrected an error detected and described by researchers Andrew Conway and Vanessa Teague, and verified by computer …

  1. Anonymous Coward
    Anonymous Coward

    WTF?

    Am I understand this correctly, that Australia is using some wacky voting method so complex that they can't actually count all the votes, so they are counting a random sample of votes and extrapolating based that?

    And I thought the US system was bad.

    1. a_yank_lurker

      Re: WTF?

      The worst parts of the US system are the ability for some to register and vote in multiple jurisdictions and the voting of the dead. Because there is no national voter registration records ii is possible for a snow bird to be registered in two different states which is very illegal. Also, some jurisdictions only purge the voter rolls is someone has not voted for several years but do not cross check to see if the voter is dead.

      But the Aussie system sounds like a system that one that is recipe for fraud.

      1. tom dial Silver badge

        Re: WTF?

        Multiple voting across jurisdictions would be a problem of possible significance mostly in presidential elections, and to a smaller degree in state wide elections such as those for governer or US senator. The most likely offenders would be students who, due to great indignation some years past, were allowed to register and vote at their college or university while retaining their voting status at their former (and often summer) residence. I thought about doing that about 50 years ago, but decided against it. Since then it has become a bit more difficult as states have coordinated comparison of their voting lists

        The Australian system does not seem notably more vulnerable to fraud, but does seem to depend on the voters trusting the election administrators rather more than is usual in the US.

      2. Anonymous Coward
        Anonymous Coward

        Lack of national voter registration

        I've never seen any indication that voting in multiple jurisdictions is a real issue. Unless there is some way to suggest that either democrats or republicans are more likely to do this, to whatever extent it happens it probably cancels out.

        Voting of the dead is a separate issue, mostly made possible by easy access to absentee ballots (and a lack of a good system for all levels of government to know when someone dies)

        I'd rather have those problems than taking a sample of all votes cast and claiming that's equivalent to actually counting them all.

      3. Dr_N

        Re: WTF?

        "The worst parts of the US system are the ability for some to register and vote in multiple jurisdictions and the voting of the dead. "

        Sounds like you've fallen for the trumped-up excuses used by some states to justify removing people's voting rights.

        John Oliver on US voting:

        https://youtu.be/rHFOwlMCdto

      4. cray74

        Re: WTF?

        The worst parts of the US system are the ability for some to register and vote in multiple jurisdictions and the voting of the dead.

        Something that rarely happens in practice. Cases of voter fraud - especially the kind of voter fraud targeted by new ID laws - are very rare in the US.

        1. Anonymous Coward
          Anonymous Coward

          Re: WTF?

          Yes, the ID laws are all about reducing turnout amongst poor/black voters more likely to vote democrat, the excuses are just that. If you want to commit voting fraud it is SO much easier to do it with absentee ballots, and ID laws don't address that.

          If you don't have an ID, rather than getting one to vote in person, you should just request an absentee ballot. Then you can vote, whether you are a legitimate voter who doesn't have an ID for whatever reason, or are one of those fabled unicorns who are taking advantage of the system of not checking IDs to fraudulently vote in person.

          Given the penalties for voter fraud if you are caught (though granted it would be hard to catch you, whether IDs are checked or not) I can't imagine anyone wanting to do it in person where it would be easy to build a case against you. If you use absentee ballots to do it, you would have plausible deniability - "I didn't request that ballot or send it in, someone else must have requested it be sent to my address, stole it from my mailbox, and sent it in themselves". Unless authorities had staked out your house or been able to lift fingerprints or DNA from the ballot, they could not prove beyond the reasonable doubt created by your statement and convict you. So wear gloves when you vote an illegal absentee ballot, just in case!

        2. tom dial Silver badge

          Re: WTF?

          In the US the system is full of holes and vulnerabilities. The reason fraud rarely is caught is that it is not often an issue (because most elections are not very close) and therefore is not much looked for. In addition, checking for the types of voting fraud mentioned is quite difficult. As another poster mentioned, there is no easy way to connect deaths and voter registration lists. Although some states, maybe most, share voter lists in an attempt to identify multiple jurisdiction registrations, that undertaking is afflicted with the difficult problem of name comparison that banks and S&Ls worked through several decades ago. For example, there may or may not be duplicates among A D Smith, Albert D Smith, Albert Donald Smith, A Donald Smith, A David Smith, Arthur David Smith (and quite a few other possible variations), and it would be a substantial effort as well to read death notices and be certain of removing registrations of those, and only those, who are deceased. Photo IDs, which are available at no direct cost in all or nearly all states that require them, partly address the issue.

    2. John Savard

      Re: WTF?

      The system they're using is called "Single Transferable Vote".

      It works like this: You mark your ballot with 1 next to your favorite candidate, 2 next to your second choice, and so on as far as you wish.

      Counting the ballots goes like this:

      First, look at the 1s on the ballots, and treat them as if they were Xs. If a candidate has over 50% of the vote, he wins.

      If that doesn't happen, take the candidate who has the lowest number of votes, and treat the 2s on the ballots with a 1 for that eliminated candidate as Xs, in addition to the 1s on the other ballots, and count again.

      Repeat; you will have a winner after you eliminate all but two candidates.

      This is not a super-complicated algorithm, and the idea that they couldn't count all the ballots on a computer is... ludicrous. It would even be ludicrous if they were using 1950s tab equipment powered by vacuum tubes, never mind a modern-day microprocessor.

      So, no, they're not guilty of using a voting system too complicated to count the ballots. They're guilty of being stupid and lazy.

      1. glen waverley
        Headmaster

        Re: WTF?

        John savard "If a candidate has over 50% of the vote, he wins."

        Sorry, what you describe is preferential voting for single member electorates. But what the article and the great Antony Green are describing is a counting system for multi member electorates, like NSW upper house or NSW local councils. AKA proportional representation.

        The crucial difference is quotas. If a candidate gets more than 1/(vacancies+1), she is elected. Then her surplus votes above the quota get distributed to the candidate who got her 2 vote. If that 2nd candidate now has a quota, he is elected and the third prefs (from candidate 1) are now distributed. And so on until all vacancies are filled.

        The question is: what are her excess votes? 1) Do you just put the ballot papers on a pile till you get to a quota, then look at the 2s, 3s etc of the next ballots you come across? 2) Or do you check all papers and then distribute the papers at a reduced value? (There is a formula but I can't be bothered looking it up now.)

        Method 1 worked in pre computer days, especially for large (whole of state) electorates. Method 2 works in our present computer days. (The electoral commission does have to key every ballot paper into a counting system, but that can be done, even with Tasmania's Robson rotation or the ACT's scrimble scramble.)

        But seems NSW entrenched method 1 just as computers started to take over in the mid-late 1970s.

        Irish readers may be more familiar than US or UK readers with how to count ballots for multi member electorates. The Dail uses much the same system as Oz senate, local councils and Tas and ACT assemblies.

      2. Adam 1
        Pint

        Re: WTF?

        @John Savard,

        The algorithm you describe is for the house of representatives vote, but the Senate works differently because there are multiple "winners".

        The way it works is that a quota is established by determining the number of voters divided by the number of positions+1. In say NSW, there are just shy of 5 million voters and there are 12 senators in this election. Therefore the quota in NSW is going to be (5M/13) + 1 ~384616

        In the first pass, everyone's first preference is counted.

        For those people/parties that exceed that magic number, they get a seat (or 2 or 3 or whatever until the remaining are below that magic number). Say a party got 500,000 votes. They would pick up a seat, and 115,384 votes would be transferred at a weighting of 115,384/500000 = ~23% to the second pick of all of those 500,000 people.

        That action itself may even allow another person/party to reach quota and give them a seat. Once all the "transfers" are done, the candidate with the lowest count is eliminated ("excluded"), and their votes are transferred to the next preference of the voter.

        If this causes someone else to reach quota, the transfer happens again (recursively if that causes another to reach quota too).

        If no-one else can reach quota, the next lowest is eliminated and their votes head down to the next preference.

        And round the circle we go again.

        At the end of this process, all positions will be filled.

        The process is complicated, but does hopefully provide a representative result. The big complaint (apart from a sore head trying to take all that in) is that those preference flows for the majority of people who vote "above the line" are opaque as a result of the horse trading that goes on between the parties.

        The basic reason for this process though is that similar leaning parties would otherwise end up splitting the vote.

      3. Sgt_Oddball

        Re: WTF?

        Give most competent DB jockeys half a day and they should be able to come up with something that would work.

        Even I've got some half plausible ideas already using all of the votes. No random sampling required.

  2. Brian Miller
    Big Brother

    What, me, do math?

    "Counting votes under STV can be laborious, so some jurisdictions decide to just grab a random sample of votes and then use software to extrapolate results based on that sample."

    Right, let's just make up numbers and use what best fits our fantasies. Both vote counting and math are hard, so we'll just skip over them. Nobody will mind...

    At least the dead didn't rise from their graves and go vote.

    Right?

    1. Anonymous Coward
      Anonymous Coward

      Re: What, me, do math?

      No, its a hard problem, I mean 1 million peoples vote can barely fit in a home PC with 8GB of ram, and it takes many many nanoseconds to computer the full vote.

      Plus extrapolation works... that's why all those 'momentum' stock traders are zillionaires...

      Yeh, seriously WTF. Is the system so fake they don't even pretend to count the vote? I would expect a full manual paper check aswell, otherwise you're one hacker away from appointing Boaty Mc Boatface as president of Australia.

      You wonder why they don't just use a newspaper poll and skip the vote altogether.

      1. John H Woods Silver badge

        Re: What, me, do math?

        "No, its a hard problem, I mean 1 million peoples vote can barely fit in a home PC with 8GB of ram, and it takes many many nanoseconds to computer the full vote."

        STV makes counting complicated --- it's not like FPP. And the order on the ballot paper has to be randomized, especially in locations where voting is mandatory, to avoid "donkey voting" so that the papers cannot all be identical.

        1. Anonymous Coward
          Anonymous Coward

          Re: What, me, do math?

          "STV makes counting complicated --- it's not like FPP. And the order on the ballot paper has to be randomized, especially in locations where voting is mandatory, to avoid "donkey voting" so that the papers cannot all be identical"

          Yet you do it on a sample, so the algo is there. It's whether you run it on 10000 votes or 10 million, and 10 million is nothing at all to a computer. It's a 2N or 3N problem not an N^P problem.

          Randomizing is nothing but assigning a random number to each record then sorting by that random number. To do that on even a Smartphone is so trivial as to be a non-existant problem. (Added: Quacking for qsort reveals 4.5 million records takes 0.06 of a second on a typical PC using stock quick sort.)

    2. Christoph

      Re: What, me, do math?

      "At least the dead didn't rise from their graves and go vote."

      No, this is Australia, not Chicago

  3. Anonymous Coward
    Facepalm

    Counting votes under STV can be laborious.

    "Counting votes under STV can be laborious, so some jurisdictions decide to just grab a random sample of votes and then use software to extrapolate results based on that sample."

    Have they tried testing the software on a known good set of data before using it on a live election? Have they tried scanning the paper votes into the computer, performing OCR on the data and executing the vote on the entire dataset?

    1. John H Woods Silver badge

      Re: Counting votes under STV can be laborious.

      "Have they tried scanning the paper votes into the computer, "

      Note that, as per my earlier comment, STV papers cannot all be identical: the order of the candidates has to be permuted.

      1. Fuzz

        Re: Counting votes under STV can be laborious.

        I presume that the voting boxes and the names of the candidates are still lined up though? This would be a simple task for OCR. The text to read is from a known list so the hard part is recognising all possible ways that a person can write numbers. I reckon that even allowing for mistakes it would still be more accurate than extrapolating the results from a sample.

        1. Anonymous Coward
          Anonymous Coward

          Re: Counting votes under STV can be laborious.

          OCR? Add a barcode next to each name, and scan the boxed for entry/choice. We use to have these things back in school, automated checked exams.

  4. Dave Lawton
    Boffin

    Counting is HARD

    Isn't that why we use computers to do it for us ?

  5. MrDamage Silver badge

    Undocumented Feature

    The computer checks the history of each candidate looking for anything approaching morals, ethics, compassion, honesty and integrity.

    If sum=0, goto parliament.

    1. Anonymous Coward
      Thumb Up

      Re: Undocumented Feature

      So then it is superior to the US system, as all our candidates with sum < 0 would fail that test and be ineligible for office!

  6. Adam 1

    open source now

    There's is no excuse for proprietary closed source vote counting systems.

    In 2013, about 1000 votes in Western Australia were lost. Due to the preference flows, it got a choke point about a zillion candidates down where a handful of preferences of voters of certain micro parties multiplied out to a radically different results. After computer modeling of likely patterns, they determined that those lost votes really could have changed the senate make up. So millions were wasted again asking that state to vote again.

    The AEC really needs to step in here and support efforts to build a citizen reviewable, auditible, block chained vote counting system. Transparency is the key to free and fair elections.

    Oh, and Antony Green is a bloody genius.

  7. James O'Shea

    We want the Neville Shute Voting System

    M'man Nev proposed the following:

    1 everybody gets a vote just for being alive and over 21 (it was some time back, I'm sure that he'd go with 18 if he was alive today)

    2 you get an extra vote if you have 'higher education'

    3 you get an extra vote if you have spent 'x' years earning your living outside the country.

    4 you (and your spouse) get extra votes for raising at least two children to the age of 14. Vote goes away if you get divorced before at least two make it to 14.

    5 you get an extra vote if you, personally, have made more than 'x' dollars in one year. Inheritance doesn't count. Winning the lottery doesn't count.

    6 you get an extra vote if you're clergy. Any kind of clergy. Nev restricted it to Christian clergy, but any 'real' job at any church counted. I suppose that Jews, Muslims, and Pastafarians could agitate to get a vote there, too. Jedi and even Sith would be in, so long as you didn't mention medi-chlorians. Ever. Atheists, sorry, by definition you don't have a church. No sixth vote for you.

    7 you get the seventh vote if HM the Queen gives it to you.

    Hmm. I'd have four votes. Five if I could suck up to Liz Saxe-Coburg-Gotha hard enough, something unlikely to happen. And I'd wear a colander on my head if that got me a sixth. Not carrying a lightsaber, though.

    http://www.abelard.org/iqedfran/in_the_wet.php

    Now, doing things _that_ way would make counting the vote interesting... Every area with a military base would swarm with people who have two votes (lots would have been deployed overseas for more than 'x' years, and that counts) or three (all the officers would be have at least a bachelor's degree; chaplains would have four or more, being over 21, made their living overseas more than 'x' years, have a degree assuming that seminary or whatever counts, and being clergy...) while most Hollywood types would have only one or two (degree in advanced metrics of tofu-hunting doesn't count, not enough overseas service, 14 years not 14 months so divorced too soon, not clergy, wrong type of queen likes you...)

    1. dvd

      Re: We want the Neville Shute Voting System

      Possibly the worst Neville Shute novel ever. He wrote some classics but this was a stinker.

      Basically an extended treatise on how to gerimander the voting system too keep the evil socialists out of power.

    2. Anonymous Coward
      Anonymous Coward

      Re: We want the Neville Shute Voting System

      How about if you get no votes if:

      1) You work for the government

      2) Receive aid from the government

      That would go a long way toward eliminating the machine style politics of Chicago - and in my generation - the Federal government.

      1. tom dial Silver badge

        Re: We want the Neville Shute Voting System

        Actually, it would not do that. The political machines of old depended heavily on making sure the government ran decently, Chicago being the last major example. As late as the early 1960s under the Daley machine it was arguably the best run large city in the US. At that time, and earlier, the streets were maintained, the garbage collected, and if you had a problem that the city government you could call the Alderman's office and stand a reasonable chance of getting the problem solved. At that time, too, it was customary for the machine's precinct workers to hand out $2 per voter with the instruction to go vote - the recipient knew which candidate to vote for.

        There was graft, to be sure, in things like minimum-show jobs, various forms of self enrichment among the higher ranked members of the political class, and contracts where the low bidder had information that the others did not. As long as it didn't get out of hand and the essential city government functions were maintained it was tolerable.

  8. JustWondering
    Unhappy

    Really?

    This sounds like it would simplify malfeasance for those so inclined.

  9. bep

    News to me

    I thought they actually counted all the votes. That's what they should do, even if it is hard. Otherwise they should get out of the job of being the Australian Electoral Commission.

    1. glen waverley

      Re: News to me

      bep "Otherwise they should get out of the job of being the Australian Electoral Commission."

      Actually, the AEC *do* count every vote. It's the NSW Electoral Commission who are made to use the sample method. Two different organisations reporting to two different governments.

      The joys of living in a federation.

  10. Anonymous Coward
    Anonymous Coward

    Vegas Baby!

    "Counting votes under STV can be laborious, so some jurisdictions decide to just grab a random sample of votes and then use software to extrapolate results based on that sample." It can be laborious - oh the horror of it all! Statistical validity notwithstanding, election officials should not play dice with an election.

  11. Wandering Reader

    Wrong end of the stick

    Computers would be able to count up any number of STV votes very easily. The hard part is getting the paper votes into the database. Hence the temptation to sample instead.

    Human verified OCR is the way to go.

  12. michaelxmcmahon

    report sounds garbled

    I think the report is garbled. It's not true that STV grabs random samples of votes to count. That would be ridiculous. What does happen in some STV systems where candidate surpluses need to be transferred on to others, and where votes need to be transferred in entire units, then an element of randomness creeps in because only a fraction of the potential votes that can be transferred, actually get transferred and the ones that are to be transferred can be chosen at random.

    However, there are other variants of STV where this is not necessary - in systems where all possible transferable votes get transferred with a fractional value. In that case, there is no random selection.

    What's curious here is that an electronic counting system would actually be easier to implement without the random element. So, the question arises why did they implement it that way? The answer might be to retain consistency with existing manual procedures. This is what was done in Ireland during its ill fated e-voting experiment with STV elections.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like