Archive for the 'Math' Category

Ties (and the tying tiers who are tied)

Friday, November 21st, 2008

Via Electoral-Vote.com, we find a website with pictures of some of the disputed ballots in the Minnesota Senate recount. You can also vote on whether each ballot should count, though it’s just for fun. If Franken wins the recount, the eyes of the nation will be on the December 2 runoff election in Georgia, to see if the Democrats will wind up with the 60 seats they need to block a Republican filibuster.

In the presidential election, Missouri has finally reached a decision. The state has been won by John McCain, bringing the final electoral college count (barring any faithless electors) to 365-173. And in Iowa County, Iowa, we find an exact tie between Obama and McCain, with 4,173 votes each.

You see? You should have voted.

A Chain!

Friday, November 14th, 2008

Via the Shakespeare Geek, we find a website that uses a Markov chain to generate an alternate version of Hamlet. Check it out!

From what I can tell, the site works from a table of which words follow other words in the play, and how often. It then constructs a chain by looking at the last word (or few words) that were entered, and choosing a random word of those that actually follow that word (or few words) in the play.

For example, one place in the play has “Alas! poor Yorick. I knew him, Horatio.” Another part of the play has “I knew your father.” The Markov chain might generate “Alas! poor Yorick. I knew…” and then, only looking at the last two words “I knew” might follow up with “your father.” The final result would be “Alas! poor Yorick. I knew your father.”

This is a favorite example provided by the author, but there are a lot of funny possibilities. You can keep refreshing the page to get a new randomly-generated Hamlet.

Thanks, Rosencrantz and Guildenstern are dead:
Ere I could accuse me of the courtier, cousin, and with a look so piteous in purport
As I perceived it, if I gall him slightly,
Whips out his rapier, cries, ‘A rat, a touch,
The queen desires you to remain
Here is your only jig-maker. What it should be old as I will be laid to us, till I know not–lost all my best obey you, and, at a shot
So art thou to me all the battlements their ordnance fire: proclaim no shame
When Roscius was an actor in Rome,–
As of a dear father murder’d,
With mirth in funeral and with a crafty madness, like the herald Mercury
New-lighted on a roar? Not one now o’er
The triumph of his own scandal.

Enjoy!

Mandate!

Sunday, November 9th, 2008

I was looking over the current electoral map, and I realized something extraordinary. If Obama took the states where he won by 7 percentage points or more, and McCain took all of the states where Obama won by 6 points or less, Obama would still have won the election 291 - 247. This would put Ohio, Florida, Indiana, and North Carolina in the red, but it would not have changed the outcome. Ohio may have locked in the Obama victory, but it turns out that he didn’t need it.

Looking at a traditional electoral map can be deceiving, because the states are shown in proportion to their land area. If instead, you look at a cartogram, you can see how the states compare to each other by, say, population (shown below) and you can really get a sense of how much of the country went red or blue. Professor Mark Newman from the University of Michigan has some good examples on his site:



So, is all of this just post-election gloating, or am I making a larger point? Well, it’s mostly post-election gloating; it has been a long eight years. But there is a larger point as well. President Obama will enter office with an overwhelming mandate, not to mention a friendly Congress and an enthusiastic public. I know some of my good friends are determined to cling to their cynical views, and I understand where they are coming from, but let me ask them this: If the potential for the change you want were to come along, would you recognize it? Would you believe in it? Would you do everything you could to support it? Because if this isn’t it, I don’t think we’re ever going to see it.

Obama!

Tuesday, November 4th, 2008

As I write this, Ohio is being called for Barack Obama, which pretty much locks in his victory tonight.

And this is a historical moment for so many reasons. It’s not just that we are going to have an African-American president, which in itself is a monumental marker of progress. It’s also about voter turnout and enthusiasm. And even the most cynical among us are daring to hope for change in this country.

For me, what makes this election remarkable is that the undecided voter wasn’t much of a factor. In the past few campaigns, the two candidates were so close that both had to court undecided voters. This leads to pandering, wedge issues, and attack ad wars.

This election was different. Between Obama’s inspirational message, McCain’s coming unglued in the final weeks, the economy in crisis, and the overwhelming Bush fatigue felt by so many of us, it was a perfect storm for the Democratic candidate. As a result, Obama had such a commanding lead that he was able to take the high road and speak directly to the issues.

McCain also tried to campaign cleanly. I never had a problem with the Joe the Plumber strategy. It never bothered me that he wasn’t a licensed plumber, wasn’t about to buy a business, would not have seen a tax hike under Obama, and wasn’t named Joe. McCain was making a point about standing up for small businesses, and Joe the Plumber was convenient shorthand. That seems fair enough.

However, the constant attempts to paint Obama as not a real American were painful to watch. Sarah Palin campaigning across the country would suggest that Obama liked to pal around with terrorists. And then there were the attack ads that used code words to appeal to the worst qualities of the electorate. I don’t think this was in the spirit of what McCain was trying to accomplish with his candidacy. But in the end, the law requires the candidate to explicitly state “I approve this message.” Ironically, it’s John McCain whom we have to thank for that law.

All of that is behind us now. We may go to sleep tonight secure in the belief that we will wake up to morning in America. And President Obama will ride a massive wave of momentum into office, only to find a friendly Congress waiting for him. His first hundred days have the promise to be extraordinary. But we must not let our enthusiasm be replaced with complacency. Change is difficult under the best of circumstances, and there will be pressure to compromise. This is still our country. This is still our government. We must be as vigilant with President Obama as we were with President Bush.

But that comes later. Tonight, we celebrate.

I’m the Shakespeare Teacher, and I approve this message.

Question of the Week

Monday, October 6th, 2008

With just a month left until the election, polls indicate that Barack Obama has a healthy lead in both the popular vote and electoral college projections, and the Democrats in Congress are looking strong as well.

After 2004’s disappointment, I don’t want to put too much faith in the polls, but I am feeling cautiously optimistic.

But this week’s question isn’t about predicting the election. Let’s suppose hypothetically that Barack Obama does win next month. Let’s say that the election maintains a Democratic majority in the House, and Democrats wind up with 60 seats in the Senate (enough to block a filibuster).

This would basically put the Democrats in control of the agenda for at least two years, longer if the voters are pleased with the results.

So, the two questions I pose to my mostly liberal readership (but also my few conservative and moderate readers as well) is this:

If the Democrats were to take control, what would you like to see happen? What would you expect would actually happen?

Question of the Week

Monday, September 15th, 2008

Inspired by a video clip posted by Ro, I’m moved to examine the following question:

Right now, at this moment, what would you say is the percentage chance that Sarah Palin will become President of the United States in the next four years?

I’m going with 5%. That figure puts the election at about 50/50, and gives McCain a 90% chance of surviving his first term.

What do you think?

Conundrum: Non-Prime

Tuesday, July 22nd, 2008

I’m thinking of a two-digit number that is not a prime, the sum of two primes, or the product of two primes.

What number am I thinking of?

UPDATE: Question answered by Bronx Richie. See comments for answer.

Conundrum: Nim, Part II

Tuesday, June 17th, 2008

You have defeated Iachimo at his own game, and he’s not happy.

“I usually go first,” he says icily. “Surely you will allow me a rematch, and allow me to go first this time.”

You know that, with his standard set up using piles of 1, 2, 3, 4, and 5, he can force a win by going first, so you decline. But he comes up with a surprising offer: you can increase the number of piles.

As before, the piles will start at 1 coin and will increase by 1 coin until the desired number of piles is reached. So if you decide to increase to six piles, the coin amounts must be 1, 2, 3, 4, 5, and 6. You’ve only got a limited number of coins available, so you may not exceed ten piles.

Iachimo will go first and you will take turns drawing coins from the piles. On your turn, you may remove as many coins as you like from any one pile. The winner is the one who takes the last coin and leaves his opponent without a move.

“Double or nothing,” he dares you, with a bit of desperation in his voice. You’re not sure what would happen if you decline. It doesn’t matter, though, since you see a clear path to victory, even allowing Iachimo to go first.

How many piles do you set up? What’s your strategy for winning?

Conundrum: Nim, Part I

Tuesday, May 20th, 2008

Iachimo likes to hang out at the local tavern, drawing in tourists to play a game of Nim. You don’t like Iachimo. You don’t like him at all. You think he’s a huckster and a con man. You’d like nothing better than to beat him at his own game. You want to beat him at Nim.

In Nim, two opponents take turns drawing from several piles of coins. On your turn, you may remove as many coins as you like from any one pile. The winner is the one who takes the last coin and leaves his opponent without a move. The coins themselves are not on the line, but Iachimo likes to make the game more interesting with a modest wager.

As you enter the tavern, you notice that Iachimo is set up for business. He has stacked five piles of coins, numbered 1, 2, 3, 4, and 5. Each pile has the same number of coins as the pile number: 1, 2, 3, 4, and 5. He sees you coming and amiably offers you a friendly wager which you quickly accept.

“I’ll go first,” you smile, and before Iachimo can object, you make your move.

What’s your first move? What’s your strategy for winning?

Conundrum: Death of the Author

Tuesday, April 29th, 2008

One of my favorite pieces of trivia is that John Adams and Thomas Jefferson died on the same day. What’s truly remarkable about this is that it happened on July 4, 1826, which was the 50th anniversary of the famous signing of the Declaration of Independence. John Adams’s last words are reported to be “Thomas Jefferson survives” - he did not know that his long-time friend and rival had died a few hours earlier. For us, then, knowing that Jefferson died first is an essential part of the story of these great founding fathers.

But what of the founding fathers of Western literature? Recently, we celebrated April 23 as Shakespeare’s birthday, but we also know it as his death day. Shakespeare died in Stratford on April 23, 1616. We do not know the time of his death, or his last words.

Miguel de Cervantes, author of Don Quixote, might likewise be considered one of the founding fathers of Western literature. Cervantes died in Madrid on April 23, 1616. We do not know the time of his death, or his last words.

And yet, it is possible to say, with some degree of certainty, which of the two authors perished first. And that, dear readers, is today’s Conundrum.

Who died first: Shakespeare or Cervantes? How do you know?

Feel free to speculate as to last words too, if that sort of thing amuses you.

UPDATE: Question answered by Neel Mehta. See comments for answer.