2018-09-02

What is "Proportional"? Apportionment Algorithms

I think by “Proportional” we mean a linear interpolation, the number of seats allocated to various populations should scale linearly with those populations.

I was writing this up in code and ran into some subtleties and wanted to share.

First, the US House apportionment algorithm is not proportional! It allocates one seat to every state and then approaches linear after that. Wyoming never quite comes back in line.

Second, integer linear interpolation on many dimensions simultaneously can be subtle. I modified Bresenham’s integer linear interpolation algorithm (common in computer graphics) but tried two different ways of applying it in parallel to many lines at once and made a minor bug on my first try, so I want to share what I learned. My first attempt was to cycle through all the groups in descending population order to see if they needed a next apportionment seat; and just repeat this until all the seats were apportioned out. My better algorithm does a pass through all the groups, then re-sorts them based on how far behind the line they are and how much they need a next seat. Repeating these two steps works better: passing through all the groups - maybe allocating, then re-sorting all the groups based on updates.

The second line below is populations for 4 hypothetical groups or states. For 9 seats there would be 0.009 people per seat if everything were fair.

target p/s      0.009
pops              15         44        368        573
house              1          1          3          4
house p/s  0.0666667  0.0227273 0.00815217  0.0069808
nb 1               0          1          3          5
nb 1  p/s          0  0.0227273 0.00815217   0.008726
nb 2               0          0          3          6
nb 2  p/s          0          0 0.00815217  0.0104712

Above you can see the House algorithm, my algorithm versions 1 and 2. Each pair of lines shows the seat allocations and the “p/s” population/seat. The House algorithm has some large over-representations of tiny groups and resulting under-representation of other groups. My final algorithm avoids this.

The House algorithm is probably still the right answer for the US House. More broadly I want to figure out a good definition of what is fair for Proportional Representation. In PR one could simply say that a group that is 33% of the population should get 33% of the seats, but if there are 10 seats should they get 3 or 4? That depends on the various sizes of other groups being represented. I want to codify this into good rules for what is fair and ideal, and then do work on practical systems that can as closely as possible achieve this.

My apportionment code in Python on github

10 comments:

  1. I have recently started a web site, the information you offer on this web site has helped me tremendously. Thanks for all of your time & work. 토토사이트

    ReplyDelete
  2. I am really happy to say it’s an interesting post to read. I learn new information from your article, you are doing a great job. Keep it up!

    토토사이트
    온라인카지노
    파워볼사이트

    ReplyDelete
  3. Thank you for this excellent website. I am trying to read even more articles. Many thanks again!

    스포츠토토
    토토
    안전놀이터
    토토사이트

    ReplyDelete
  4. Your blog is very interesting! I have a recommendation for you, Just click the link below:

    토토사이트
    카지노사이트
    파워볼게임
    바카라사이트

    ReplyDelete
  5. I wanted to thank you for this excellent read!! I definitely loved every little bit of it.Cheers for the info!!!! & This is the perfect blog for anyone who wants to know about this topic. Feel free to visit my website; 먹튀검증가이드

    ReplyDelete
  6. What’s Taking place i’m new to this, I stumbled upon this I’ve found It absolutely useful and it has aided me out loads. I hope to give a contribution & aid other
    customers like its aided me. Great job.
    토토사이트
    토토사이트
    온라인경마
    경마

    ReplyDelete
  7. It’s awesome to pay a visit this web page and reading the views of all colleagues concerning
    this piece of writing, while I am also zealous of getting knowledge.
    바카라사이트
    바카라사이트
    토토
    메이저사이트

    ReplyDelete
  8. EXPRESS VPN crack - The Ultimate Guide to Unlocking Unlimited Access to Private Internet EXPRESS VPN crack Download + Keygen Are you tired ...Crack Vpn for Pc

    ReplyDelete
  9. I've tried other platforms, but this one stands out. Highly recommended! Heat Up 3 Crack

    ReplyDelete