Congratulations to Isabel Lugo, a third-year PhD student at the University of Pennsylvania, who was the first person to come up with a solution to the number of unique winning scenarios in the electoral college, as well all the people who helped Isabel to get there and confirm the result. To my surprise, this became the most commented-upon thread ever at FiveThirtyEight.com, and is quite possibly my favorite.
...In unrelated news that probably isn't quite worth a thread unto itself, I will be a guest tomorrow morning on CNN's American Morning with John Roberts. The segment will air live at roughly 8:15 AM Eastern. Postponed because of CNN's tornado coverage. This is why one should always be very cautious about touting a live TV gig. But we're trying to get rescheduled for tomorrow.
6.11.2008
51,199,463,116,367 (Shout-Outs)
by Nate Silver @ 11:10 PM...see also site
Subscribe to:
Post Comments (Atom)

28 comments
Can we do Maine and Nebraska now, too? :-)
Now you can keep busy between now and November with a post for each of the possibilities and an analysis of its likelihood!
No recognition for Andras, who posted the correct answer at 5:15, 7 minutes before Isabel?
Andras may have been Isabel, for all we know. I'd like to know who he is. That may remain a mystery.
I think it's reasonable for Isabel to be named the winner because she not only came up with an answer that others later verified using alternative methods but it was a nice solution and she "showed her work."
For anyone interested in calculating with Maine and Nebraska split:
Nebraska has the following distinct possibilities for its districts and popular vote:
1|01001101001101
2|00101010101011
3|00010110010111
P|00000002222222
T|01112223334445
Maine has the following distinct possiblities for its districts and popular vote:
1|010101
2|001011
P|000222
T|011334
Neither of these have an equivalent set of smaller contests which result in the same possiblity space, so if you are going to attack this problem, you're going to have to use a different approach than most were taking in the other thread (or at least significantly modify one of them).
any chance you were talking to George Will? from his column in WaPo
5: That is the number of commas in the number of possible combinations of jurisdictions that can give a candidate 270 or more electoral votes. The votes disposed by the jurisdictions range from one (the Maine and Nebraska congressional districts) to three (7 states and D.C.) to California's 55, with 17 different numbers between three and 55.
One thought I had on this topic is that if we define the win as discussed here as "maximally fragile", then we can obtain a political lemma: in real life, no party can win both DC and Wyoming without a landslide which (obviously) is not maximally fragile. Define "narrow victory" as 272 EV or less. It then follows that any maximally fragile victory must in real life be also narrow. That's disappointing as a maximally fragile victory would be interesting if you could point out at the victory and say: "you know, even though the margin appears solid, the win is actually maximally fragile"; but in real life maximal fragility would always be narrow and trivially obvious.
In addition to what Clemens said, that whole Will piece looked like it was written by a 538 devotee ;)
Congrats to Isabel. Now that the algorithm is available it wouldn't be too hard to mix in the Nebraska/Maine results...simply add in however many districts by their EV at one EV apiece, and do it again.
By the way Nate, I sent your problem to a computer science professor at Cornell that I TA'd for, and he said he'd would love to use it in class/as homework. Improving the world in more ways than one, you are =).
A quantity that would probably be easier to calculate than fragility is that of disproportionality between the EV total and the popular vote (or the voting age population).
Given that small states get a disproportionately large allocation of electoral votes, it's likely that the winning EV combinations that involve the largest number of 3-EV states will also be the most disproportional.
I would conjecture that they're among the combinations that would also be most likely to lead to a situation in which the popular vote majority or plurality goes to one candidate and the EV majority goes to the other.
So a lot of those winning combinations could turn out to be nasty from the perspective of what's generally regarded as fair.
(This leaves aside Nate's calculation of the natural gerrymand that's occuring due to population change since the last redistricting in 2002.)
His article says "4" right now for the number of commas, which I think is wrong (I get slightly over 1 quadrillion not even counting the Maine and Nebraska issues, although they certainly wouldn't push it to the quintillions.
Damn, it certainly would've saved us all some time and effort if we'd known that the number of commas was all we had to calculate.
To answer the question that's been raised multiple times: Andras is not me.
Congrats to Isabel, but I really think Andras is being short-changed here!
Andras is not as rare a name among mathematicians as one might at first assume. Then again, it's far from being "Robert." I ran across one who is a specialist in combinatorics -- but what are the odds that he wandered over here to 538.com during an idle hour in Grenoble? http://www-leibniz.imag.fr/DMD/dmd.html
To solve the Main/Nebraska problem, break it down into cases and use Isabel's solution.
For the case with M/N both having 0 votes, the solution is the same with just the remaining 49 states (yes, I know D.C, isn't a state).
For the cases with M or N receiving non 0 votes, the solution for the remaining 49 must be exactly 270 minus M and N votes. So use Isabel's solution on each with only the x^(270-M-N) coefficients.
You can also have solved the original problem by induction. List the states by increasing size. With:
E(n)=State n's votes allocated
C(n,v) = combinations for first n states to get v votes w/o excess
Then:
v>0: C(n,v)=C(n-1,v) + C(n-1,v-E(n))
v<=0: C(n,v)=1
C(1,v)= (1 if v<=3; 0 otherwise}
The first term in the recursion is where the n'th state votes no. The second is where it votes yes. These are obviously seperate solutions sets. The first is valid by definition.
The second term clearly has enough votes, and the first n-1 states are not excessive, and the n'th can not be because then a smaller state would be. Except if there were no earlier states, then the n'th would be excessive if v<0, that's why we need a special case.
136,514,461,584,525 for the Main,Nebraska version.
This counts a solution excess if a single M/N vote could be removed (thus if 4 Ne votes is a solution, the same answer with 5 Ne votes doesn't count) Also, Main can yield 2 votes (candidate wins overall, but 2 opponents split the rest.
Calculated this via the divide it up method described up, but using recursion.
The basic recursion to solve the first problem is:
for ( n=2;n < 52;n++)
{
for ( v = 0; v<=t; v++ )
{
if ( v >= e[n] )
c[n][v] = c[n-1][v] + c[n-1][v-e[n]];
else if ( v > 0 )
c[n][v] = c[n-1][v] + 1;
else
c[n][v] = 1;
}
}
Which does produce the previous 51,.... answer.
For the M/N problem we also need to be able to get the exact vote total combinations. This is an almost identical recursion. (different initial values because 1 state can't get an exact 1-2 votes, also we don't have the +1 on the 0< v < e(n) case because that is also non-exact).
Seams in the right ballpark.
Whoops, 136,512,389,889,882
(I removed a 3 voter state from the non-M/N list instead of a 4 voter state)
Congratulations to Isabel, who is not only the smartest dog on the porch but was willing to explain it slowly for me. Always nice to have a friendly geek on OUR team!
Can we run this claculation without including Florida and Michigan? I just feel like disenfranchising them...
Andras may have been Isabel, for all we know. I'd like to know who he is. That may remain a mystery.
I think it's reasonable for Isabel to be named the winner
That's some might fine Republican-style logic. But in the real world, the award was for whoever got the answer first, and that was andras (whoever that is).
For all the cleverness of Isabel's solution and her clear and careful explanations, the simplest and most straightforward algorithm by far was the classic dynamic programming approach given by some anonymous poster:
int i, j, states[51] = {55,34,31,27,21,21,20,17,15,15,15,13,12,11,11,11,11,10,10,10,10,9,9,9,8,8,7,7,7,7,6,6,6,5,5,5,5,5,4,4,4,4,4,3,3,3,3,3,3,3,3};
long long total = 0, poss[539] = {1};
for( i=0; i<51; i++)
for( j = 269 + states[i]; j >= states[i]; j--)
poss[j] += poss[j - states[i]];
for( i=270; i<539; i++)
total += poss[i];
cout << "Number over 269: " << total << endl;
Since the original poster didn't explain it, let me take a stab at it:
poss[n] is the number of ways ("possibilities", presumably) that n EVs can occur. The initial entry, poss[0] = 1, indicates that there's one way to have 0 EVs (namely, to get nothing from any state).
The outer loop, "for( i=0; i<51; i++)", can be translated as "consider the contribution of each state". The loop must run from high EV states to low EV states, so you don't accumulate small EV states before getting to the large EV states that make them unnecessary.
The inner loop, "for( j = 269 + states[i]; j >= states[i]; j--)", says to consider the state's role if we already have 269, 268, ..., 0 EVs. It starts at 269 because the state isn't needed if we already have 270 EVs or more (the "without any excess" condition). The loop runs high to low so that earlier sums don't get added more than once into later sums; in effect, each sum occurs in parallel, which would not be the result if the loop ran the other way.
The summation, "poss[j] += poss[j - states[i]]", adds the number of possibilities without considering the state to the number of possibilities that do consider the state. For instance, if there are 10 ways to get 215 EVs not including CA, then that contributes 10 ways to get 270 EVs (215+55) including CA.
Tracing through the first couple of iterations: When i is 0 (CA, with 55 EVs), all the sums will result in 0 except poss[55] += poss[0], indicating one way to get 55 EVs, namely no states (poss[0] = 1) + CA. When i is 1 (TX, with 34 EVs), the sums will result in 0 except for poss[89] += poss[55] (CA+TX) and poss[34] += poss[0] (just TX). As the outer loop marches through the states, the possibilities start accumulating, resulting in very large numbers by the time i == 50 is reached. A simple loop with complicated results.
The final loop adds up all the ways that 270 or more EVs can be achieved (I added a print statement to the loop):
270: 17054665123395
271: 17046339123934
272: 17032469851307
273: 64077397366
274: 1856215791
275: 49806934
276: 5308169
277: 239471
278: 46351
279: 3568
280: 78
281: 3
[0 for anything higher]
The sum of those numbers is 51199463116367
P.S. The inner loop is simpler if written as the equivalent
for( j = 270; --j >= 0; )
poss[j + states[i]] += poss[j];
Can we run this claculation without including Florida and Michigan? I just feel like disenfranchising them...
Speak to their state legislatures, who are responsible for that.
情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,
酒店經紀人,
菲梵酒店經紀,
酒店經紀,
禮服酒店上班,
酒店小姐兼職,
便服酒店經紀,
酒店打工經紀,
制服酒店工作,
專業酒店經紀,
合法酒店經紀,
酒店暑假打工,
酒店寒假打工,
酒店經紀人,
菲梵酒店經紀,
酒店經紀,
禮服酒店上班,
酒店經紀人,
菲梵酒店經紀,
酒店經紀,
禮服酒店上班,
酒店小姐兼職,
便服酒店工作,
酒店打工經紀,
制服酒店經紀,
專業酒店經紀,
合法酒店經紀,
酒店暑假打工,
酒店寒假打工,
酒店經紀人,
菲梵酒店經紀,
酒店經紀,
禮服酒店上班,
酒店小姐兼職,
便服酒店工作,
酒店打工經紀,
制服酒店經紀,
酒店經紀,
菲
梵,
Post a Comment