Apportionment Algorithems Visualized

Here is a ternary plot:

I’m using this chart to plot 3 groups of voters. How cyan, yellow, or magenta a region on that plot is (I originally did RGB but they looked cooler when I inverted the colors) corresponds to how large each group of voters are. In the fallowing plots, each group of voters are voting for their preferred party (in the future, I might make these groups of voters have different considerations of types of rated ballots and test this with some cardinal PR methods) and each plot shows how many seats in a 3 winner election each party would win under a different apportionment method.




Droop Quota Least Remainder


In these maps, you can see geometrically why the divisor methods pass participation and why some of their cardinal PR counterparts pass IIB (adding irrelevant ballots doesn’t change the election result): all of the borders that mark where party A would loose a seat and party B would gain a seat are on a line that if it were to be extended would pass through the point marking a 100% consideration of party C voters, meaning that moving closer to C by adding more irrelevant C voters doesn’t change whether a seat should go from A to B or vise versa.

These plots also hint at why the largest remainder methods pass the quota rule ( |the number of seats a party gets - (the percentage of the votes they get * the number of seats)| < 1 ): the boundaries of where party A steals a seat from party B are perpendicular to an edge in which the position on that edge corresponds to what percentage of the vote A gets and what percentage B gets when there are no C voters. If you add a line parallel to this line, but closer to C, it will show two things, the ratio of A votes to B votes and how many more votes A has then B. The percentage of the way you are along the line shows you the ratios, how ever you can alternatively compare the margins by taking the absolute distance between two points on this line. House monotonicity is a criteria comparing the margin of votes a party has over or under the quota and these methods have boundaries on areas where the margin of votes one candidate has to another don’t change.

This is super interesting. Did you do this on your own or is this taken from somewhere? I am colour blind so I am having trouble interpreting the meaning of each colour. Can you provide a legend?

Would you be interested in adding this to electowiki maybe under a Balinski–Young theorem page. You could base it off of the wikipediapage

I am also trying to reconcile the different Apportionment methods with the three interpretation methods of PR (Theile, Phragmen and Monroe). SSS is Hamilton but also Monroe (I Think). RRV is Jefferson and Theile. What is sequential Monroe? If it is Hamilton then does that mean it suffers this flaw?

I mostly made it except for for the part that turns the pixel color values into an image file, I just copied the code from this video since I’m not failure with the format for ppm files. Unfortunately it creates the files in ppm format since the more common image file formats like png require writing a header section of the file that has various bits that you need to set so creating ppm files is alot easier. To get them as pngs I have to take the ppm images to this free online ppm to png converter (it’s not actually free since there is a limit to how many files it will let you convert for free without purchasing an account but when it gets to that point I just delete that page’s cookies so it doesn’t remember how many times I used it).

In each of the apportionment method ternary plots (which plot 3 variables that sum to a constant using barycentric coordinates) plots, regions in each corner represent all the of compositions of voters in which that method will award all the seats to the party corresponding to that corner. The two regions adjacent to each corner region depict all the electorates in which that party wins all but one of the seats and which of the other two corners each of those two regions are closer two depict which of the other two parties wins that remaining seat. If you pick one of those two regions and go to one of the next to adamant regions, that party will lose another seat to one of the two other regions depending on what direction you moved in.

3,0,0,           2,0,1,           1,0,2,           0,0,3,
          2,1,0,           1,1,1,           0,1,2,
                     1,2,0,           0,2,1

I’ll also try to add boundries to the different regions in the future if you have problems seeing some of those. If you are blue yellow colorblind you can also turn on the blue light filter on your computer or phone so you can see the different shades.

Monroe reduces to Hamiton.



These ternary plots are also what I used in the derivation of PAV from some desirable criteria I told you about on loomio (though for that I was using paper and graph paper and doing it all manually). In the future I’m planning on to use this code to plot multi-winner voting methods under different groups of voters to see how their different flaws look geometrically.

Can your code tune the number of winners?


“Post must be at least 20 characters”