Joe Ganley

I make software and sometimes other things.

 

Due to Blogger's termination of support for FTP, this blog is no longer active.

It is possible that some links from here, particularly those within the site, are now broken. If you encounter one of those, your best bet is to go to the new front page and hunt for it from there.

Most, but not all, of the blog's posts are on this page; the archives are here.

 
A New York Times article mentions offhand that a Presidential election could be won with just 22% of the popular vote, and Kottke wonders if this could possibly be true. It is. For example: Sort the states by decreasing electoral votes per voter, then greedily remove states from the bottom of the list until you are left with 270 electoral votes. If a candidate won each of those states (the ones shown in red) by just one vote, he/she would win the election with just 21.56% of the popular vote (note that this requires more than half the votes in Maine and Nebraska, which aren't winner-take-all). This might be the source of the NYT mention, but the scenario there requires about 700,000 more votes than mine, and he also missed the Maine/Nebraska subtlety. I used the same raw data as in that article.

Labels: , ,

Comments (0)
 
My daughter brought home a fun math problem last week; it took a little mental effort to solve, and I haven't found a solution on the web, so I thought I'd post one.

The problem is this: What is the largest n such that 1005! is evenly divisible by 10n? Put another way, how many 0's does the expansion of 1005! end with?

Highlight the following blank space for the solution:

Imagine writing out the expansion of 1005!, and then replacing each number with its prime factorization. The prime factors of 10 are 5 and 2, so our question is equivalent to asking how many (5,2) pairs this expansion contains. It is easy to see that it contains far more 2's than 5's, so the question becomes: How many 5's are in the expansion? Every number in the original expansion of 1005! that is divisible by 5 contributes a 5 in the prime-factorization expansion; there are 201 of these. However, every number that is divisible by 52, i.e. 25, contributes a second 5; this adds 40 more. Every number that is divisible by 53, i.e. 125, contributes a third 5; add 8 more. Finally, the one number that is divisible by 54, i.e. 625, contributes a fourth 5, adding one more and bringing the total count to n = 250.

Labels: ,

Comments (0)
 
My wife called me into the room the other day because the Numb3rs episode that she was watching had mentioned Steiner trees (the principal subject of my Ph.D. dissertation). As usual for that show, they got the math half wrong and half ornamented with extraneous jargon, but still it was a tiny thrill to see Steiner trees mentioned on TV.

Labels: ,

Comments (0)
 
SnowflakeIt struck me the other day that fuse beads could be a good way to teach my daughter about cellular automata, so we used them to build this snowflake cellular automaton.

Labels: ,

Comments (0)