[EM] Biproportional representation (was Re: Preferential voting system where a candidate may win multiple seats)

Kristofer Munsterhjelm km_elmet at t-online.de
Mon Sep 2 00:55:57 PDT 2013

On 07/29/2013 07:22 PM, Vidar Wahlberg wrote:
> On Mon, Jul 29, 2013 at 01:36:49PM +0200, Kristofer Munsterhjelm wrote:
>> On 07/28/2013 04:37 PM, Vidar Wahlberg wrote:
>>> Upper apportionment:
>>> - Party seats are apportioned using unmodified Sainte-Laguë based on
>>>    national votes. If desirable the first divisor may be modified, or a
>>>    election threshold may be set to prevent fragmentation, but I've not
>>>    done this.
>> Apportionment according to divisor methods can be done in two ways:
>> either explicitly (like Sainte-Laguë) or by a round-and-adjust
>> method (like Webster). If I understand you correctly, your
>> biproportional program uses the Webster method, i.e. you pick x so
>> that
>> SUM k=1...n round(support[k] * x)
>> equals the desired number of seats.
>> I don't know how to turn a given explicit divisor method into a
>> given rounding method, so how would you implement modified
>> Sainte-Laguë this way?
> I may misunderstand you here, but in the upper apportionment I used
> unmodified Sainte-Laguë. That is, exactly how it's done in counties
> today (excluding leveling seat), just on the national vote count and
> with 169 seats.
> As of modifying Sainte-Laguë that would only mean modifying the first
> divisor, which would have very little impact when 169 seats are to be
> apportioned. Although, I did try this and that resulted in "Miljøpartiet
> de Grønne" not winning a seat.

Oh, I see. I thought you meant that the iteration procedure itself used 
unmodified Sainte-Laguë but could be altered to use modified 
Sainte-Laguë if so desired.

If you're talking about the upper apportionment (i.e. the setting of the 
targets), then I understand you. Any method could be used to set the 
targets. For that matter, one could set the target to something not 
produced by a divisor method at all, although then it's not certain that 
the iterative process will find a solution.

I'm not sure what you mean by "exactly how it's done in counties today", 
though. If you mean that the apportionment of seats to counties (i.e. 
how many seats each district gets in the district target) is done by 
unmodified Sainte-Laguë, that's right. But the apportionment of seats to 
parties within each county (e.g. how many seats AP should get in Oslo 
according to the current system) is done by modified Sainte-Laguë.

> Since my last mail I've implemented preferential election (redo upper
> apportionment until all parties have at least n seats, each rerun
> excluding the party with least votes, transfering them to the next
> preference). I chose to use "n seats" instead of "x percent" as I only
> entered data for the 10 largest parties and thus would have to hard code
> the total amount of votes to get a correct vote percentage, but I
> digress.

I note that this would also support what I call CPO-SL because it, too, 
returns as output which parties are to be excluded. So one would just 
run CPO-SL on the national ballots, find out which parties to exclude, 
do that, and then count support by first preference votes of the 
uneliminated parties.

It would not be the same thing as running CPO-SL on each county to find 
more balanced councils there, though. Making a biproportional version of 
CPO-SL would be an interesting puzzle: I think that one would use 
something like minimax to balance the district concerns and the national 
concerns, but that is in any case a digression.

>>> - District seats are determined externally and thus not apportioned in
>>>    this implementation.
>> A similar trick could be used to implement a threshold if desired.
>> It would be complicated, though, something like:
>> 1. Do a county-by-county count.
>> 2. Parties below the threshold have their number of seats fixed to
>> the number of seats they got "directly".
>> 3. Fixing these parties' number of seats, determine the number of
>> seats for the other parties by national Sainte-Laguë: each party
>> gets a seat as in Sainte-Laguë, but when a party below the threshold
>> have got all their seats according to 2., remove that party from the
>> count.
>> 4. Use the result as the target for the number of party seats.
>> I'd still rather use an absolute but lower threshold, though; or
>> none at all, like you're doing.
> Regretably I'm not quite following you here. To try to explain the
> method in short:
> In upper apportionment you decide how many seats each party gets, this
> is the final result and will not be changed (but where they receive the
> seats is yet to be decided). Seats in districts/counties are determined
> externally. Here is the only place we use Sainte-Laguë. If we want some
> sort of threshold or preferential election, it must be done here.

Yes, that's what I'm saying. If the upper apportionment can be given 
outside the system itself, you can set it however you want. Say you want 
a threshold where all parties that get less than 4% national support 
only get as many seats as they would have got on a county-by-county 
basis (as is the case today).

Then you would use another method, not national Sainte-Laguë, to 
determine how many seats each party gets for the upper apportionment. 
This would then be the party target, and the iterative procedure would 
after this step work as usual.

The particular example I gave there would seek to emulate the "county 
only threshold" by finding out the number of seats per party per county. 
For any party that gets less than 4% nationwide support, the number of 
seats they would get would be fixed to this number. For instance, 
Venstre would be fixed to get only 2 seats since its support of 3.88% 
fell short of the 4%. Then, after those parties' seat numbers have been 
fixed, the other parties would get seats as by ordinary (or modified) 

However, I did actually calculate the upper party apportionment with a 
threshold like the above, and the party target I ended up with was 
almost identical to the actual 2009 outcome. The only difference was 
that Arbeiderpartiet got one seat less and Høyre got one more; so that 
shows that, given the 4% threshold, the current leveling seat system is 
already pretty good at meeting the target. At least it is so for the 
2009 outcome, though one may argue that outcome is not representative 
because it included unusually few parties.

> In the lower apportionment each party initially receives "169 *
> partyVotesInDistrict / totalVotes" seats (rounded to nearest integer).
> After this the amount of seats a party/district should receive is
> corrected using party multipliers & district multipliers. There's no
> Sainte-Laguë or anything else, only rounding the fraction to the nearest
> integer. You'll see the fraction I'm talking about in the table at the
> end of this mail.

Consider a uniproportional apportionment problem that works this way, 
where there's only one district but many parties. That superdistrict 
would have 169 seats, then each party would initially receive round(169 
* partyVotes / totalVotes), right?

After this, you would adjust the factor for the single superdistrict so 
that the sum is 169. Call the factor for that superdistrict, x.

So what we really have here is that each party receives round(169 * 
partyVotes * x / totalVotes). Then x is adjusted to make the sum come 
out as 169.

Since division and multiplication by constants can be pulled into the x, 
we can simplify to round(partyVotes * x). The objective is then to find 
x so that the sum for all parties is 169.

But that is just Webster's method! And Webster's method is equivalent to 
Sainte-Laguë. So internally, the lower apportionment consists of 
alternating a Webster apportionment "across" (for the districts) and 
"down" (for the parties), adjusting the factors until convergence. 
That's what I mean by that the method uses Sainte-Laguë internally.

To give more examples, if you'd want the lower apportionment to be based 
on D'Hondt, you would round down instead of rounding off (i.e. use floor 
instead of round). This would make the uniproportional problem algorithm 
reduce to Jefferson's method, which is equivalent to D'Hondt. The 
factor-adjusting logic would probably have to be changed to take that 
into account, though. Similarly, you could make a biproportional 
apportionment method based on Warren's "rounding plus constant" method 
described on http://www.rangevoting.org/BishopSim.html , if that were to 
be desired.

Another way to see the correspondence is to consider what kind of party 
target (upper apportionment) would be reached on the initial round with 
the one superdistrict example. If you round off, as the algorithm is 
usually described, that's the Sainte-Laguë apportionment. If you round 
down, you get the D'Hondt apportionment, and so on.

>>> The PDF I used as reference says you should use the maximum multiplier
>>> when you're to increase the number of seats, and the minimum multiplier
>>> when you're to decrease the number of seats. I'm not entirely sure why
>>> this is recommended, if someone have insight on this then please share.
>> I would guess this makes the method converge more quickly, but I'm
>> not sure. Perhaps try and see if it does?
> This is likely. I gave it a shot and it converged on an answer after
> just 6 iterations (3 party multipliers, 3 district multipliers).
> With the current code this is not as robust as the average when
> considering the issues rounding errors give, but as you mention later
> rounding errors could be fixed by using rational numbers.
> I don't think the D language got rational numbers yet so I'll probably
> have to figure out something on my own if I can't find any useful
> resources (or switch language, but I've grown fond of the D language for
> tasks like this).

I did a cursory search and it doesn't seem like rational number support 
is planned for D. I suppose you could use a mathematical language (e.g. 
MATLAB or Mathematica's); or on the other end of things, use C or C++ 
with GNU MP's rational number functions or classes. But since the 
algorithm already works the way you have implemented it, that would more 
be a perfectionist/100% thing, or something one would do for a library 

>> On the other hand, one could argue that one should use the minimal
>> multiplier when increasing and the maximal when decreasing. Say
>> there's a somewhat sophisticated opponent that objects by saying
>> "You got the current outcome by multiplying the votes by certain
>> adjustment factors. Well, I can make Rødt get every single seat with
>> the right adjustment factors, too, so this is not democratic".
>> Against an objection like that, the closer the factors are to 1, the
>> better; and so, when increasing the strength of a party (or
>> district) to increase the number of seats, one should increase it by
>> as little as possible that gets the job done, and similarly when
>> decreasing.
> Well, no, you can't make Rødt win every single seat in the lower
> apportionment, because in the upper apportionment both party seats and
> district seats are decided and those decisions are final.

Right. I was thinking in context of the opposition not having access to 
the upper apportionment, but in the real world, that would most likely 
be published.

Do you think there could be similar arguments even when the upper 
apportionment is published? If so, it couldn't argue that the outcome is 
unfair with respect to the upper apportionment, since the upper 
apportionment is set and it's easy to verify that the lower 
apportionment results match. So the arguments, I suppose, would either 
have to be that the upper apportionment is not desirable (e.g. weights 
districts too much or permits fringe parties to get seats), or that the 
balancing act distorts the "fair" outcome too much (e.g. "a majority 
voted for X in this district, yet Y got more seats. Is this democracy?").

> I don't have a heavy math background, but I don't think there are that
> many possible solutions when your only tools are to either multiply
> seats for party in all districts or seats in district for all parties,
> you can't increase/decrease seats for one party in one district without
> either modifying seats in all district for that party or modifying seats
> for all parties in that district.

If the problem was fed to a malicious algorithm (i.e. a game theory 
adversary with its own goals), then I guess the only thing it could do, 
with the upper apportionment fixed, would be to unfairly distribute the 
seats. For instance, it might fill Oslo entirely with MPs from 
Arbeiderpartiet. This would not contradict the party target (if other 
counties got fewer AP MPs to compensate), nor would it contradict the 
county target (since Oslo would still get as many seats as it used to).

I might be wrong, though.

>> The method itself will partly make votes unequal by weighting them
>> to match the district totals you have already specified. However, it
>> will not be quite as biased as just preweighting all the vote
>> counts, since the party axis is based on the unweighted votes.
> This can not be entirely correct. As said, the party seats are decided
> counting all votes on a national basis. All votes are weighted equally.
> On the other hand, this means that voters in Oslo decide at a greater
> degree which parties win a seat in Finnmark than previously, and I
> expect this to be the greatest argument against this method.
> Consider it like this: If nearly all the voters of Finnmark votes for a
> party that only enters the election with a party list in Finnmark, then
> that party will not receive all 5 seats (ignoring leveling seat for the
> sake of simplicity), because when the votes are counted on a national
> level that party is only likely to receive 2 or 3 seats.
> On the other hand, it's arguably not democratic that a vote in Finnmark
> currently is weighted up about twice as much as a vote in Oslo.

Yes, that's what I meant. The votes are sort of "half unequal". They're 
equal in that an Oslo vote counts as much as a Finnmark vote for any 
given party. However, they're unequal in that Finnmark gets more MPs per 
thousand people than does Oslo. To reconcile these discrepancies, the 
method would override Finnmark county results more often than it would 
override Oslo county results. In a way, the method counters bias in one 
direction with bias in the other.

As an extreme way of considering this (though I'm not sure if I 
mentioned it earlier), consider a completely unfair district 
apportionment, where Finnmark gets every seat but one, connected with a 
fair party apportionment, where each party gets its Sainte-Lague worth. 
If given to the biproportional algorithm, you would get a result that is 
fair with respect to parties (e.g. Arbeiderpartiet would get 33% of the 
seats if it got 33% of the votes), but where almost every single MP 
would come from Finnmark.
That is sort of what would happen today (and I think what happens with 
levelling seats), but not nearly as exaggerated in my example. The 
districts get more MPs than their population-wise fair share, but the 
party proportionality is based on the nationwide results.

More information about the Election-Methods mailing list