Election example under maxPhragmén

Here is the wiki page for the method.
I don't want to say too much in case I accidentally influence you, so I'm not going to interpret the method from the wiki page, or say what I think the result would be. The following are the approval ballots, with A and B the parties, fielding unlimited candidates.
2 voters: A
1 voter: B
1 voter: ABSay there are 100 seats. How many seats would each party win under maxPhragmén?

Hi,
as far as I can see maxPhragmén could select any allocation giving between 50 and 75 seats to party A.

@spelunker Thanks for looking at it. I actually found that it would give all seats to A, so I'd be interested to see where we differ. The reason I asked on this forum was that it didn't seem like it could possibly be right, but I'll go through my working now.
Phragménbased methods use the concept of "loads". Basically if an elected candidate is approved by v voters, then each of these voters will receive 1/v load plus what they also get from other candidates. MaxPhragmén elects the set of candidates that gives the minimum max load on a single voter. Going to the example:
2 voters: A
1 voter: B
1 voter: ABIn terms of max load, we only need to look at the AB voter, because whatever the A:B proportion, their load will be at least as high as anyone else's.
If party A gets a seats, party B will get 100a (because there are 100 seats).
There are 3 A voters and 2 B voters, so each elected A candidate will add 1/3 to the load on the A voters, and each elected B candidate will add 1/2 to the load of the B voters.
Therefore the load on the AB voter (the max load) will be a/3 + (100a)/2. And we want to minimise that. So just put that into Wolfram Alpha and we have a straightline graph that decreases as a gets higher. That is to say that the max load strictly goes down as the number of seats awarded to party A goes up. The best result under MaxPhragmén therefore is that party A gets all 100 seats.
Have I done this wrong? How did you get your allocation?

@tobypereira
Hi Toby,I understand where our differences come from. The description in the electoral wiki is very vague and slightly wrong. In maxPhragmen, as defined in the paper, the load of a candidate is not necessarily distributed evenly among its approvers, but can instead be split arbitrarily. In our example, for 100 seats, a total load of 100 must be split among 4 voters. The best possible maximum load is 25 = 100/4. Let's say for 50 seats going to A and 50 to B, we can give the 50 A load entirely to the first two voters and the 50 B load entirely to the last two voters. This would give a max load of exactly 25, which is optimal. You can do something similar with any allocation, giving 50–75 seats to A.
If we take your definition, your calculation is correct. However, that method is not proportional as your example shows.

@spelunker OK, thanks for that. That explains why I read that it and varPhragmén both pass perfect representation as well!

@tobypereira I came up with 67 seats for A and 33 seats for B, but that was based on the example in the Wikipedia wiki not Electowiki. That example suggests a cumulative cost tally for each party that is added on to after each seat is apportioned. Party A would have a starting cost of 1/3 or 2/6 and B would be 1/2 or 3/6. When A is selected 1/3 or 2/6 is added to A's cost and (1/2)/3 or 1/6 is added to B's cost to reflect the fraction of B's voters who also voted for A. When B is selected 1/2 or 3/6 is added to B's cost and (1/3)/2 or 1/6 is added to A's. Each round goes to the candidate with the lowest cumulative cost. So the first round would go to A, the second round would be a tie, the third round would go to the one who wasn't chosen to break the tie, the fourth to A, the fifth a tie, and so on.

maxPhragmen doesn't have rounds, it's optimized globally and does provide "perfect representation."
seqPhragmen does have rounds and will indeed converge to a ratio of
2A:B
as the number of seats grows in this example, and does not provide perfect representation. 
Thanks for the replies everyone. My confusion was because I wasn't aware that the load could be spread arbitrarily. Interestingly I think this is equivalent to the idea of partially or wholly removing approvals that are detrimental to a candidate set's "score", which I suggested years ago, but seems to be a case of reinventing the wheel. There's quite a good discussion of Phragmén's voting methods in this paper by Svante Janson.