Article I, Section 2 of the U.S. constitution prescribes the composition of the House of Representatives as follows:

Representatives and direct Taxes shall be apportioned among the several States which may be included within this Union, according to their respective Numbers, which shall be determined by adding to the whole Number of free Persons, including those bound to Service for a Term of Years, and excluding Indians not taxed, three fifths of all other Persons. The actual Enumeration shall be made within three Years after the first Meeting of the Congress of the United States, and within every subsequent Term of ten Years, in such Manner as they shall by Law direct. The Number of Representatives shall not exceed one for every thirty Thousand, but each State shall have at Least one Representative; …

(The elided text explicitly specified the number of representatives allocated to the original states before the first census was performed. This clause was subsequently modified by the 14th Amendment, but the changes do not affect this discussion.)

The framers of the U.S. Constitution included lawyers, soldiers, merchants, doctors, and an inventor, but no programmers. If there had been a programmer there, I’d hope that this clause wouldn’t have been included without the objection, “Wait a minute—you’re computing a rational number (state population [however determined] divided by the total population of the country) and storing it into an integer (number of representatives per state). How does the rounding work?”

As so often happens with ill- or incompletely-specified algorithms, this blew up the first time it was tried, and in 1792 Congress passed an apportionment act to specify how the 1790 census results would be applied to determine how many representatives the states received. It chose the “Jefferson method”, which discards fractional parts:

n=\lfloor f\rfloor

where f is the state’s population divided by a quota which is adjusted so that no n is smaller than one.

After the 1840 census, the Webster method was adopted, which uses the convention of rounding up fractional parts of 0.5 and greater and rounding down smaller fractional parts.

n=\lfloor f\rceil=\lfloor f+0.5\rfloor

After the next census, in 1850, Congress patched the code once again, adopting the Hamilton/Vinton method, which first computes the number of seats, discarding fractional parts. This will usually assign fewer seats than specified for the body, so the remaining seats are then assigned in decreasing order of the fractional parts of states’ seat allocation: the states with the greatest fractional parts will each receive one additional seat until the specified number is reached.

In 1911, Congress reverted the patch and returned to the Webster method, which had been used in 1840, and this remained in effect until 1941, when it was replaced by the Huntington-Hill method of equal proportions, which remains in effect to the present day.

As programmers are well aware, when you find a chunk of code that’s been “fixed” repeatedly over an extended period of time, with each successive “refinement” found to produce unsatisfactory results, that usually indicates you don’t really understand the problem or, perhaps, that what you’re trying to do is impossible. In the case of apportioning seats (or in the mathematically equivalent case of allocating seats in an electoral system with proportional representation), the “bugs” show up as “apportionment paradoxes”. With all of these schemes for allocating seats, bizarre and seemingly unfair outcomes are possible. For example, with the Hamilton method, there are cases where increasing the number of seats to be allocated can cause a state to lose one of its existing seats. This became a contentious issue after 1850 as additional states were added to the Union. Another paradox can result in a small state with a rapidly growing population losing a seat to a large state with slower growth. In other circumstances an apportionment rule may change the number of seats allocated to a state to a value greater than or less than the adjacent integers to the fractional value, violating the quota rule.

Can this code be fixed? No—in 1983, mathematicians Michel Balinski and Peyton Young proved a theorem that any apportionment system which does not violate the quota rule will, when allocating to three or more states, always manifest one or more of the apportionment paradoxes.

Or, as the first FORTRAN compiler I used in 1967 put it, “`ASSIGNMENT OF REAL TO INTEGER MAY RESULT IN TRUNCATION`”.

4 Likes

Not to worry. Now the problem has been solved – at least for the US. The Canadian-owned Dominion computers in some Eastern European country deliver the desired answer, and questioning it is not allowed in polite company. The assigned seats are allocated to “Representatives” who have committed to not rocking the boat or listening to the people in their strangely-shaped “Districts”. Truly, we have reached electoral Nirvana!

4 Likes