# Electoral Math and Computer Science Rocks!

I wish I taught a computer science course so I could introduce this problem.

How many unique ways are there to acquire at least 270 electoral votes without any excess?

For example, one combination would be to win California, Connecticut, the District of Columbia, Hawaii, Illinois, Maine, Massachusetts, Michigan, Minnesota, New Hampshire, New Jersey, New York, Ohio, Oregon, Pennsylvania, Rhode Island, Vermont, Washington and Wisconsin. That would be equal to 272 electoral votes (not coincidentally, these are the John Kerry states plus Ohio).

Note that there are no excess electoral votes in this combination: if you remove one of the states with three electoral votes, the number falls to 269, which is below the 270-EV cut-off. So winning all of these states plus North Dakota would not qualify, since the candidate has superfluous electoral votes. On the other hand, replacing Vermont with North Dakota would make for a unique combination.

Not only is an awesome math/computer science problem, but I have to say that I totally love the response that it generated in the comments. (Plus, Isabel Lugo’s solution is just so damn sleek.) Minus a minor spat in the comments, this is totally one heck of a sick blog post.