Algorithm Search⌘K

Problemcore

Apportionment problem

Also called seat apportionment.

Allocate a fixed number of integer seats to states or parties in proportion to their populations or vote counts.

The apportionment problem asks how to divide a fixed number of seats among states or parties in proportion to their populations or votes. The exact share, the quota, is almost never an integer, so some rounding rule must decide who gets the extra seats. The main rules are the largest remainder method of Hamilton and the divisor methods of D'Hondt, Sainte-Lague and Huntington-Hill. The Balinski-Young theorem shows that no rule has all the fairness properties one would like.

In plain words

A parliament has a fixed number of seats, and each state or party should get seats in proportion to its size. If a state has a tenth of the people, it should get a tenth of the seats. But a tenth of the seats is usually not a whole number, and seats cannot be split. So the fractions must be rounded, and the rounded numbers must still add up to the total. There are many ways to do this. They differ in who gets the last seats, and some of them behave in strange ways: a state can lose a seat when the parliament grows, or when it grows faster than another state.

Definition

The input is the populations p=(p1,…,pn)p = (p_1, \ldots, p_n), nonnegative integers with sum P>0P > 0, and the house size h≥0h \ge 0. An apportionment is a vector of integers a=(a1,…,an)≥0a = (a_1, \ldots, a_n) \ge 0 with ∑iai=h\sum_i a_i = h. The quota of state ii is

qi=h piP,q_i = \frac{h \, p_i}{P},

and the quotas sum to hh. A method maps every input (p,h)(p, h) to an apportionment, or to a set of them when ties are allowed. Common requirements on a method ff are:

  • Quota. ⌊qi⌋≤ai≤⌈qi⌉\lfloor q_i \rfloor \le a_i \le \lceil q_i \rceil for every ii. Lower quota and upper quota are the two halves.
  • House monotone. f(p,h+1)≥f(p,h)f(p, h + 1) \ge f(p, h) in every entry. A method that fails this shows the Alabama paradox.
  • Population monotone. If pi′≥pip'_i \ge p_i and pj′≤pjp'_j \le p_j, then it is not the case that ai′<aia'_i < a_i and aj′>aja'_j > a_j, where a=f(p,h)a = f(p, h) and a′=f(p′,h)a' = f(p', h). A method that fails this shows the population paradox.
  • Anonymous and homogeneous. The result does not depend on the order of the states, and multiplying all populations by the same factor does not change it.

A divisor method is given by a rounding rule d(a)d(a) with a≤d(a)≤a+1a \le d(a) \le a + 1: it picks a divisor λ>0\lambda > 0 and gives state ii the number pi/λp_i/\lambda rounded up when it exceeds d(⌊pi/λ⌋)d(\lfloor p_i/\lambda \rfloor), with λ\lambda chosen so that the seats sum to hh.

Variants

  • Party lists. The units are parties and the weights are votes. A legal threshold, such as 5 percent of the votes, often removes small parties first.
  • Minimum seats. The US House gives every state at least one seat; other bodies use a minimum and a maximum per unit.
  • Biproportional apportionment. Seats are divided among parties and districts at once, so that both the row sums and the column sums are fixed.
  • Degressive proportionality. Some bodies, such as the European Parliament, give small units more seats per person on purpose.
  • Ranked ballots. If voters rank candidates and not parties, proportional results come from rules such as the single transferable vote, which is a different problem.

Examples

Four states have populations 100000, 80000, 30000 and 20000, with quotas 1.74,1.39,0.52,0.351.74, 1.39, 0.52, 0.35 for h=4h = 4 and 3.48,2.78,1.04,0.703.48, 2.78, 1.04, 0.70 for h=8h = 8. The four methods give:

method h=4h = 4 h=8h = 8
Hamilton (2, 1, 1, 0) (3, 3, 1, 1)
D'Hondt (2, 2, 0, 0) (4, 3, 1, 0)
Sainte-Lague (2, 1, 1, 0) (3, 3, 1, 1)
Huntington-Hill (1, 1, 1, 1) (3, 3, 1, 1)

D'Hondt favors the large states, Huntington-Hill gives every state a seat, and the other two lie between. At h=8h = 8, D'Hondt gives state 1 four seats against a quota of 3.48, so it breaks upper quota.

Hamilton's method shows the paradoxes on small inputs. With populations (3,3,1)(3, 3, 1) it gives (1,1,1)(1, 1, 1) for h=3h = 3 but (2,2,0)(2, 2, 0) for h=4h = 4. With h=5h = 5, populations (5,1,3)(5, 1, 3) give (3,0,2)(3, 0, 2), and populations (6,1,6)(6, 1, 6) give (2,1,2)(2, 1, 2): state 1 grew and state 3 grew much faster, and state 1 lost a seat to state 2, which did not grow.

Known algorithms

  • Hamilton's method gives each state ⌊qi⌋\lfloor q_i \rfloor seats and the rest to the largest remainders. It meets quota but is neither house nor population monotone. With integer arithmetic it takes O(nlog⁡n)O(n \log n) time by sorting, or O(n)O(n) with a selection algorithm.
  • Divisor methods give the seats one at a time to the largest pi/d(ai)p_i/d(a_i). A heap gives O(n+hlog⁡n)O(n + h \log n) time. They are house and population monotone, but each one fails quota on some input with 4 or more states. The D'Hondt method (d(a)=a+1d(a) = a + 1) meets lower quota, and Adams's method (d(a)=ad(a) = a) meets upper quota.
  • The quota method of Balinski and Young (1975) gives the seats one at a time like D'Hondt, but only to states that would stay within upper quota. It meets quota and is house monotone, but it is not population monotone.

Bounds

Every method must read all nn populations, so Ω(n)\Omega(n) time is needed. Hamilton's method meets this bound with linear-time selection, and Cheng and Eppstein (2014) give an O(n)O(n) time algorithm for every divisor method, independent of hh; the heap method is slower when hh is much larger than nn. On the side of axioms, the Balinski-Young theorem shows that no method is both within quota and population monotone for 4 or more states. The proof of Balinski and Young assumes that a larger state never gets fewer seats; Gölz, Peters and Procaccia drop that assumption with 5 states. With 3 states, Webster's method is both. Balinski and Young also show that, in their setting, the divisor methods are the only population monotone methods.

Reductions

  • Hamilton to selection. After the floors are given, the s=h−∑i⌊qi⌋<ns = h - \sum_i \lfloor q_i \rfloor < n extra seats go to the ss largest remainders, which is a selection problem.
  • Divisor methods to separable convex allocation. The D'Hondt method minimizes ∑iai(ai+1)/pi\sum_i a_i(a_i + 1)/p_i and Webster's method minimizes ∑iai2/pi\sum_i a_i^2/p_i, over integers a≥0a \ge 0 with sum hh. Each cost is a sum of marginal costs that increase, so the greedy rule that takes the cheapest next seat is optimal.
  • Divisor methods to selection in sorted lists. The seats are the hh largest numbers in the nn sorted lists pi/d(0),pi/d(1),…p_i/d(0), p_i/d(1), \ldots. Cheng and Eppstein solve this by finding a good divisor and then correcting by O(n)O(n) seats.

Applications

  • The US House of Representatives divides its 435 seats among the states after each census with the Huntington-Hill method.
  • Many countries with party list voting use the D'Hondt method or the Sainte-Lague method to turn votes into seats.
  • Rounding a list of percentages or a budget split so that it still sums to the total is the same problem. Hamilton's method is common there.

References

  1. Michel L. Balinski and H. Peyton Young, Fair Representation: Meeting the Ideal of One Man, One Vote, 2nd edition, Brookings Institution Press, 2001, Chapter 3 (The Methods of Jefferson and Hamilton), Chapter 10 (Staying within the Quota) and Appendix A (The Theory of Apportionment)
  2. Michel L. Balinski and H. Peyton Young, The quota method of apportionment, American Mathematical Monthly 82(7) (1975), 701-730, the quota and house monotonicity conditions and a method that meets both
  3. Zhanpeng Cheng and David Eppstein, Linear-time algorithms for proportional apportionment, Proc. 25th International Symposium on Algorithms and Computation (ISAAC 2014), LNCS 8889, 581-592, divisor methods in O(n) time, independent of the number of seats
  4. Paul Gölz, Dominik Peters and Ariel D. Procaccia, In this apportionment lottery, the house always wins, Operations Research 74(1) (2026), 390-407, Section 3.1, Theorem 1 (no method satisfies quota and population monotonicity for 5 states) and the definitions of the axioms

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a known algorithm
  • a contract.yaml