Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. How hard can tallying ranked voting be?

How hard can tallying ranked voting be?

Scheduled Pinned Locked Moved The Lounge
comtutorialquestionannouncement
10 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    swampwiz
    wrote on last edited by
    #1

    My understanding of ranked voting is that a voter puts down his choices as an ordered set, and for the first round, the #1 votes are tallied; if no one has 50%+1, then the lowest vote-getter gets discarded, and everyone who had him as #1 simply have everyone else move up a place, and the process repeats. As long as there aren't too many candidates - and indeed, there is hardly ever more than 6 candidates who get more than 2% of the vote - than a complete list pertaining to the permutations of the candidates could be released, and done so as they are counted, like a canonical election. I use the number 6 because 6! - 720 is still a digestible number. In fact, the law could be written so only that the first round eliminates everyone outside of the top-6. For example, using this 6 number, the state's Secretary of State :-\ could release the vote total of every permutation of the 6, and election-nerds like the gang at 538.com or the NY Times' (infamous) needle could crank the numbers as they see fit trying to put out the probabilities for the 6 at that instance.

    S M P J 4 Replies Last reply
    0
    • S swampwiz

      My understanding of ranked voting is that a voter puts down his choices as an ordered set, and for the first round, the #1 votes are tallied; if no one has 50%+1, then the lowest vote-getter gets discarded, and everyone who had him as #1 simply have everyone else move up a place, and the process repeats. As long as there aren't too many candidates - and indeed, there is hardly ever more than 6 candidates who get more than 2% of the vote - than a complete list pertaining to the permutations of the candidates could be released, and done so as they are counted, like a canonical election. I use the number 6 because 6! - 720 is still a digestible number. In fact, the law could be written so only that the first round eliminates everyone outside of the top-6. For example, using this 6 number, the state's Secretary of State :-\ could release the vote total of every permutation of the 6, and election-nerds like the gang at 538.com or the NY Times' (infamous) needle could crank the numbers as they see fit trying to put out the probabilities for the 6 at that instance.

      S Offline
      S Offline
      Slacker007
      wrote on last edited by
      #2

      how is it possible to discuss political elections without getting political?

      1 Reply Last reply
      0
      • S swampwiz

        My understanding of ranked voting is that a voter puts down his choices as an ordered set, and for the first round, the #1 votes are tallied; if no one has 50%+1, then the lowest vote-getter gets discarded, and everyone who had him as #1 simply have everyone else move up a place, and the process repeats. As long as there aren't too many candidates - and indeed, there is hardly ever more than 6 candidates who get more than 2% of the vote - than a complete list pertaining to the permutations of the candidates could be released, and done so as they are counted, like a canonical election. I use the number 6 because 6! - 720 is still a digestible number. In fact, the law could be written so only that the first round eliminates everyone outside of the top-6. For example, using this 6 number, the state's Secretary of State :-\ could release the vote total of every permutation of the 6, and election-nerds like the gang at 538.com or the NY Times' (infamous) needle could crank the numbers as they see fit trying to put out the probabilities for the 6 at that instance.

        M Offline
        M Offline
        Matthew Dennis
        wrote on last edited by
        #3

        There are different ways of implementing Ranked Voting. [Ranked voting - Wikipedia](https://en.wikipedia.org/wiki/Ranked\_voting)

        "Time flies like an arrow. Fruit flies like a banana."

        1 Reply Last reply
        0
        • S swampwiz

          My understanding of ranked voting is that a voter puts down his choices as an ordered set, and for the first round, the #1 votes are tallied; if no one has 50%+1, then the lowest vote-getter gets discarded, and everyone who had him as #1 simply have everyone else move up a place, and the process repeats. As long as there aren't too many candidates - and indeed, there is hardly ever more than 6 candidates who get more than 2% of the vote - than a complete list pertaining to the permutations of the candidates could be released, and done so as they are counted, like a canonical election. I use the number 6 because 6! - 720 is still a digestible number. In fact, the law could be written so only that the first round eliminates everyone outside of the top-6. For example, using this 6 number, the state's Secretary of State :-\ could release the vote total of every permutation of the 6, and election-nerds like the gang at 538.com or the NY Times' (infamous) needle could crank the numbers as they see fit trying to put out the probabilities for the 6 at that instance.

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Ranking all (or all-minus-one) options would be tedious if there were many. I imagine that "ranking your top three" would simplify things considerably when there are a lot of options from which to choose. Maybe something like "top three or the SQRT of the number of options" would suffice?

          1 Reply Last reply
          0
          • S swampwiz

            My understanding of ranked voting is that a voter puts down his choices as an ordered set, and for the first round, the #1 votes are tallied; if no one has 50%+1, then the lowest vote-getter gets discarded, and everyone who had him as #1 simply have everyone else move up a place, and the process repeats. As long as there aren't too many candidates - and indeed, there is hardly ever more than 6 candidates who get more than 2% of the vote - than a complete list pertaining to the permutations of the candidates could be released, and done so as they are counted, like a canonical election. I use the number 6 because 6! - 720 is still a digestible number. In fact, the law could be written so only that the first round eliminates everyone outside of the top-6. For example, using this 6 number, the state's Secretary of State :-\ could release the vote total of every permutation of the 6, and election-nerds like the gang at 538.com or the NY Times' (infamous) needle could crank the numbers as they see fit trying to put out the probabilities for the 6 at that instance.

            J Offline
            J Offline
            Jon McKee
            wrote on last edited by
            #5

            If we use bit groupings for the ranks of each candidate, that would look something like: Bits per candidate: floor(log_2(candidateCount)) + 1 Bits per vote: candidateCount * bitsPerCandidate Total space for election: voters * bitsPerVote So given 300,000,000 voters with 12 candidates: space = 300,000,000 * 12 * (floor(log_2(12)) + 1) space = 14,400,000,000 bits or 1.8 GB Given the same amount of voters with 24 candidates: space = 300,000,000 * 24 * (floor(log_2(24)) + 1) space = 36,000,000,000 bits or 4.5 GB Space definitely isn't the issue. What about the algorithm? 1) Bin every vote by first-pick candidate. 2) If no bin is >50% of the votes, re-bin the lowest bin and repeat #2. 3) The >50% bin is your winner. I honestly don't see why this would be an issue. Worst case scenario something like v+(c-2)*(v/2) run-time where v is the vote count and c is the number of candidates. v/2 is just a napkin-math average since the redistributed bins would start out small and grow as the candidate list got shorter. Again, just a bunch of napkin math so I probably missed something but I never bought the "it's too hard to compute" excuse either :~ And I'm sure there are clever tricks to reduce the time required. EDIT: For reference, if processing a vote takes: 1 microsecond: 30 minutes to determine a winner @ 300M votes, 12 candidates 1 millisecond: 20 days, 20 hours to determine a winner @ 300M votes, 12 candidates And this is a single-threaded, un-optimized, brute-force approach.

            D 1 Reply Last reply
            0
            • J Jon McKee

              If we use bit groupings for the ranks of each candidate, that would look something like: Bits per candidate: floor(log_2(candidateCount)) + 1 Bits per vote: candidateCount * bitsPerCandidate Total space for election: voters * bitsPerVote So given 300,000,000 voters with 12 candidates: space = 300,000,000 * 12 * (floor(log_2(12)) + 1) space = 14,400,000,000 bits or 1.8 GB Given the same amount of voters with 24 candidates: space = 300,000,000 * 24 * (floor(log_2(24)) + 1) space = 36,000,000,000 bits or 4.5 GB Space definitely isn't the issue. What about the algorithm? 1) Bin every vote by first-pick candidate. 2) If no bin is >50% of the votes, re-bin the lowest bin and repeat #2. 3) The >50% bin is your winner. I honestly don't see why this would be an issue. Worst case scenario something like v+(c-2)*(v/2) run-time where v is the vote count and c is the number of candidates. v/2 is just a napkin-math average since the redistributed bins would start out small and grow as the candidate list got shorter. Again, just a bunch of napkin math so I probably missed something but I never bought the "it's too hard to compute" excuse either :~ And I'm sure there are clever tricks to reduce the time required. EDIT: For reference, if processing a vote takes: 1 microsecond: 30 minutes to determine a winner @ 300M votes, 12 candidates 1 millisecond: 20 days, 20 hours to determine a winner @ 300M votes, 12 candidates And this is a single-threaded, un-optimized, brute-force approach.

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #6

              Jon McKee wrote:

              1. Bin every vote by first-pick candidate.

              You called out the problem here without realizing it. They're binning sheets of paper in stacks and counting the stacks. :omg: :wtf: There's also a lot of paper dumped into the "needs fixing" bin, that they need to arrange for the voters to show up and un:elephant: before they can be counted. :doh: If it was being done electronically though you're right that a computer could spit out the total almost instantly. :rolleyes:

              Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius

              J 1 Reply Last reply
              0
              • D Dan Neely

                Jon McKee wrote:

                1. Bin every vote by first-pick candidate.

                You called out the problem here without realizing it. They're binning sheets of paper in stacks and counting the stacks. :omg: :wtf: There's also a lot of paper dumped into the "needs fixing" bin, that they need to arrange for the voters to show up and un:elephant: before they can be counted. :doh: If it was being done electronically though you're right that a computer could spit out the total almost instantly. :rolleyes:

                Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius

                J Offline
                J Offline
                Jon McKee
                wrote on last edited by
                #7

                Dan Neely wrote:

                You called out the problem here without realizing it. They're binning sheets of paper in stacks and counting the stacks.

                I'll never understand how in the US we've been successfully testing millions of kids every year via paper "ballots" (scantron sheets) that are tallied electronically, but when it comes to our literal democracy we suddenly have the IQ of broccoli :confused:

                D 1 Reply Last reply
                0
                • J Jon McKee

                  Dan Neely wrote:

                  You called out the problem here without realizing it. They're binning sheets of paper in stacks and counting the stacks.

                  I'll never understand how in the US we've been successfully testing millions of kids every year via paper "ballots" (scantron sheets) that are tallied electronically, but when it comes to our literal democracy we suddenly have the IQ of broccoli :confused:

                  D Offline
                  D Offline
                  Dan Neely
                  wrote on last edited by
                  #8

                  And what exactly do you have against broccoli?

                  Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius

                  J 1 Reply Last reply
                  0
                  • D Dan Neely

                    And what exactly do you have against broccoli?

                    Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius

                    J Offline
                    J Offline
                    Jon McKee
                    wrote on last edited by
                    #9

                    :laugh: I mean... it's tasty but I'd rather not let it make decisions for me ;P

                    R 1 Reply Last reply
                    0
                    • J Jon McKee

                      :laugh: I mean... it's tasty but I'd rather not let it make decisions for me ;P

                      R Offline
                      R Offline
                      RDM Jr
                      wrote on last edited by
                      #10

                      Given some of my coworkers, broccoli voting just might be an improvement over the current state of affairs.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups