Archive for June, 2011

Dollar Nim

The following post was featured at the NYTimes Numberplay blog during the week of August 8‑15, 2011.

One-Pile Nim (a.k.a., Static Nim) is a game in which there is a pile of n objects, and each player can take up to k objects on her turn. The player who removes the last object wins. For example, on the TV show Survivor: Thailand in October 2002, the contestants were given an “immunity challenge” in which there were 21 flags, and a team could remove 1, 2, or 3 flags on a turn. (Using the notation above, n = 21 and = 3.) Avinash Dixit claims that “the actual players [on Survivor: Thailand] got almost all of their moves wrong,” but the strategy for winning this game is not terribly difficult to figure out. If you’re not familiar with the game, you might enjoy determining the strategy on your own, so I won’t spoil your fun.

While riding back from a camping trip yesterday, my wife was keeping my sons amused by playing mental math games with them. However, she was using mostly drill-and-kill exercises, where she would state an expression like 21 – 6, and one of them would shout, “15!” Before I was able to suggest that she play a game that involved more strategy and less rote mathematics, she offered the following.

• On alternating turns, players can remove any coin they like. (Well, technically, players remove a number of cents equal to the value of one of the four common U.S. coins — quarter, dime, nickel, penny — but such an overly complicated statement of the rules would have confused my sons.)
• The player who reduces the value to 0¢ wins.

That is, n = 100, and a player must choose to remove a value from the set {1, 5, 10, 25}.

I was duly impressed by my wife’s creation. (By “my wife’s creation,” I mean to refer to the game she made up, not to my sons, though the moniker would be equally applicable to the latter, and I must admit that I am often duly impressed by my sons, too.) It was a version of Nim that I had never seen before, and the optimal strategy was not obvious to me. Moreover, it had the characteristics of activities that I love to use with young kids: it causes them to practice some useful basic skill (in this case, calculating change for a dollar) for the purpose of trying to win a strategy game with more sophisticated mathematics.

My two sons, my wife, and I played Dollar Nim several times. During our third game, my wife took a dime to leave me with 29¢. “Daddy’s going to win,” Alex declared. Sure enough, I took a quarter to leave 4¢, and the outcome was decided. Both Alex and Eli had realized that if one of us was able to reduce the amount to 4¢, that person would win — everyone would be forced to take a penny.

Analyzing this game for two players is not terribly difficult, though once I had done it, I was intrigued by the patterns that appear in the optimal strategy. Analyzing the game for four players is a bit more difficult.

In the post on the NYTimes NumberPlay blog, Pradeep Mutalik offered the following extension question:

Since Dollar Nim is played with real money, it makes sense for the participants to keep the change they remove. This confers a reward for removing larger denominations. To offset this, the winner must be given an extra monetary reward. What should be the minimum prize money for the two-player game so that no matter what happens, the winner comes out ahead?

I’ll leave it as an exercise for the reader to determine the optimal strategy for the two- and four-player versions of this game, as well as to determine the answer to Pradeep’s question.

[Update, 6/30/11] The sequence of “unsafe” values for two-player Dollar Nim is now listed as A192333 in the Online Encyclopedia of Integer Sequences.

What’s So Funny? Oh, Nothing

If Charles Seife can write a book about nothing, and Jerry Seinfeld can have a show about nothing, then certainly I can create a blog post about nothing.

The following quote is attributed to Les Dawson:

There is a remote tribe that worships the number zero.
Is nothing sacred?

Here are some other jokes about nothing.

What do you get when you cross a pigeon and a zero?
A flying none!

Why was the number zero fired?
Because he added no value to his company.

Black holes are where God divided by zero.

Finally, here’s a longer joke about nothing that did not receive the approval of PETA.

A scientist is attempting to determine the relationship between the number of legs a frog has and how far it can jump. The scientist sets a frog on the ground and yells, “Jump, frog!” The frog launches itself a good distance. In his notebook, the scientist writes, “Frog with 4 legs: 6 feet.”

The scientist then removes the frog’s front legs and again yells, “Jump, frog!” Though hobbled, the frog still puts forth a reasonable effort. In his notebook, the scientist writes, “Frog with 2 legs: 2 feet.”

The scientist then removes the frog’s back legs and again yells, “Jump, frog!” Not surprisingly, the frog does not move. Again, the scientist yells, “Jump, frog!” And again, the frog does not move. In his notebook, the scientist writes, “Frog with 0 legs: Inconclusive results. The frog has become deaf.”

No animals were harmed in the telling of this joke.

Retail Tales

In tough economic times, lots of folks are counting quarters and pinching pennies. To attract new customers, retailers are offering significant discounts.

• A local bookstore is having a sale: All Math Titles, 1/3 Off. So I picked up a copy of Gödel, Escher.
• Skate Charm Insurance is offering fire-and-theft policies at rock-bottom prices. When asked how they could offer them so cheap, the actuaries responded, “Who would steal a burnt car?”
• Grocery stores in Northern Virginia are promoting lite beer as a good deal, because it has 20% fewer letters than light beer.
• A local gas station recently switched to metric, and I somehow feel better paying \$1 per liter instead of \$3.78 per gallon.

Nobody likes change, except a kid with a piggy bank.

What coin doubles in value when half is removed?
A half dollar.

Doc: Give me an update on the boy who swallowed four quarters.
Nurse: No change yet.

In the shameless plug department: NCTM members get a 25% discount off the retail price of Math Jokes 4 Mathy Folks at NCTM conferences, and everyone else can save 24% by buying from Amazon.

Interview: Beth Skipper, Beth’s Bookshelf

Although Beth Skipper doesn’t know if there is a particular math joke that kids like best, she does know that the cornier the joke, the better. She recently used an elementary joke as the title of a post on Beth’s Bookshelf, a blog that connects children’s literature and math concepts with teaching strategies.

The post What Ten Things Can You Always Count On? Your Fingers! referenced books containing math jokes, riddles and puns, including Riddle-Iculous Math by Joan Holub and Arithme-Tickle by J. Patrick Lewis.

Beth is the editor of Teaching Children Mathematics, a journal for elementary teachers published by the National Council of Teachers of Mathematics. Though she jokes that she is a crime-fighting superhero when not in the office, the truth is that she dedicates much of her free time to creating content for her blog. “Staying abreast of new titles as they are published is an ongoing challenge,” she noted, and she spends a fair amount of time monitoring announcements of new releases from publishers and scanning books that Amazon recommends. She also pores over fan mail. “I love it when my readers send me an e‑mail about a new book that they’ve come across,” she said.

I recently interviewed Beth to find out more about Beth’s Bookshelf.

Okay, an obligatory first question: What is your favorite math joke?

I like visual jokes. There is a shirt on Mental Floss that cracks me up. The text is “Please Excuse My Dear Aunt Sally,” the classic mnemonic device to help remember the order of operations, and the text is juxtaposed with an image of a woman that appears with her hair in curlers and a cigarette hanging out the corner of her mouth. Doesn’t everyone have a crazy, old “Aunt Sally” hidden somewhere amongst the branches of their family tree?

Why did you start blogging?

When I deliver professional development to teachers, I always include examples of children’s literature that are effective tools for teaching various math concepts. I don’t just give the audience a list of titles; I also try to include related teaching tips. Invariably, I get asked for more titles and tips that connect to mathematical ideas beyond the scope of the presentation. Following a recent event, I decided to search for sources that I could share. While I discovered many sites that post extensive lists of books, the sites did not go the next step and include teaching suggestions or links to related resources. I realized I could meet a need and share what I know about math and literature via a blog.

Who are your favorite children’s book authors?

In no particular order: Jon Scieszka, Dr. Seuss, Maurice Sendak, A. A. Milne, Shel Silverstein, Beatrix Potter, …

There are so many.

Which children’s book is your personal favorite?

My all-time favorites are Alice in Wonderland and Through the Looking Glass by Lewis Carroll.

When you were in the classroom, what is the best tip you received?

Always be prepared, but don’t let those ‘teachable moments’ slip away.

What is your best tip for an elementary teacher who wants to integrate math and literature?

Who are the most interesting people you’ve met while working on your blog?

I have been fortunate to meet authors Greg Tang (The Grapes of Math) and Joseph D’Agnese (Blockhead: The Life of Fibonacci).

If folks are only able to read one item that you’re written, which one would you want them to read?

[Ed. Note: Shameless plug approaching.] It would have to be the one that included Math Jokes 4 Mathy Folks.

And what about you? When not reading book for kids, which books do you like to read? Any favorite authors?

I’m very eclectic and usually juggle reading several different books at one time. For example, I just finished The Inner Circle by Brad Meltzer, and I am in the middle of The Help by Kathryn Stockett. Yesterday, I began reading Learning and Leading with Habits of Mind by Arthur L. Costa and Bena Kallick.

Father’s Day Reflections (and Other Transformations)

I just got a new stepladder. Don’t get me wrong, it’s a fine stepladder. I just wish I had gotten to know my real ladder.

I had the privilege of knowing my real father.

At age 15, my father faked a birth certificate and joined the Navy. When he was 18, he received a dishonorable discharge — after allowing him to fight in Japan during the last two years of World War II, the Navy finally learned that my dad was under age when he enlisted. So, what did he do? He joined the Army. Before he was 21, he had been to each of the 50 states and had traveled around the world 4 times.

My father had only a sixth-grade education, but he believed in the power of school and learning. It was not easy to get my dad to part with his money. When I was in third grade, my teacher asked me, “If you have two dollars, and you ask your father for another three dollars, how much will you have?”

“I’d have two dollars,” I told her.

“Young man,” she said, “you don’t know your arithmetic.”

“No, Mrs. Wargo,” I said, “you don’t know my father!”

But he often gave me \$20 for a good report card, and I was the first kid in my school to have a Commodore 64 with a disk drive. When I graduated high school, my family was subsisting on my father’s disability pension, and I considered working for a year to save money before enrolling in college. ”You’re too damned smart,” he said. “Send in the forms. We’ll make it work.”

My father passed away in December 1994. The last words he said to me were, “You’re my pride and joy.” Father’s Day is always a little rough for me, but it’s a good time to reflect. I continually ask myself, “Am I a man that my father would be proud of?”

Are you kidding? I have to believe my father is smiling down from Heaven, saying, “That’s my boy! Yeah, that geeky one there! He’s the author of a math joke book and math joke blog, ya know.”

For all you math dads (and sons, too), here’s some humor for today:

Son: Dad, can you do my homework for me?
Dad: I’m sorry, son, it wouldn’t be right.
Son: That’s okay. Can you try anyway?

I spent today with my twin four-year-old sons, hiking, doing KenKen (more on that later), playing the anagram game, and helping them figure out how the number of “cheers” we do with our glasses at the dinner table is related to the triangular numbers. What a great day. Happy Father’s Day!

The Gender Gap — Even in Online Dating

Women have it rough. The following is a typical — and valid — lament of most women:

I want to add to my income,
subtract from my weight,
divide and conquer,
and try like hell not to multiply.

As if it isn’t bad enough that the average female makes only 75.7% of her male counterpart (source). Now this.

According to OkTrends, the blog that provides dating research based on data from OkCupid.com, a profile about 130 words is fine for a man, but a woman will do better if she creates a profile that is closer to 800 words in length. And a woman should try to sound less intelligent — while there is no difference in the number of responses a man will get if his messages are written at a 4th-grade or 10th-grade level, the number of responses a woman gets will drop precipitously if her messages are written at a college level. What’s more, the analysts actually display the following advice for women:

If someone doesn’t think you’re hot, the next best thing for them to think is that you’re ugly.

The mathematics behind this statement is fascinating. The number of messages a woman receives can be estimated by the following formula:

M = 0.4m1 – .5m2 – .1m4 + .9m5 + k,

where M is the number of messages received, mn is the number of men who rated this woman n stars (on a scale of 1–5), and k is a constant.

Now take a look at that formula. The .9 coefficient for m5 implies that a woman will receive approximately one message for each five-star rating that she receives, but notice that the .4 coefficient for m1 implies that each one-star rating will also garner some messages. On the other hand, two- and four-star ratings actually decrease the number of messages she receives. (Since m3 is not included in the formula, three-star ratings apparently have little effect on the number of messages.)

Fascinating, no?

But a little game theory might help to explain this. Suppose you’re really diggin’ a woman’s profile, but most men give her a one-star rating. Well, that’s good news for you — it means less competition. On the other hand, a four-star rating may incorrectly imply that a woman is in high demand, so a typical guy — who thinks she’s cute (4 stars) but not hot (5 stars) — may not be willing to throw caution to the wind for a woman with whom he suspects he has little chance. (Sure, he may have even less chance with a five-star hottie, but it’s worth a try because she’s so hot!)

But, buck up, ladies. Despite all this depressing data, there is a silver lining: messages of just 50 words from a woman are most effective for soliciting a response from a guy, but a guy will have better luck with messages that are closer to 200 words in length. So, women may have to type more to create their profile, but at least they can type less when trying to make a connection.

All this objectication of women reminds me of a middle-aged mathematician I knew. When he walked into the house one afternoon, the following conversation occurred.

“I went to the doctor today, honey,” his wife said.

“Oh. How’d it go?” the mathematician asked.

“Well, he said that I have the spine of a 40-year-old,” she said.

“Oh,” he replied.

“And he said that I have the bones of a 30-year-old,” she continued.

“Hmm,” he replied again.

“And he said that I have the heart of a 20-year-old,” she said.

“Really?” asked the mathematician. He took all of this as unnecessary bragging, so finally he asked, “And did he say anything about your 55-year-old ass?”

“Actually, no,” she said. “Your name never came up.”

Conversation with a Statistician

Yesterday, I ran into a friend who’s a statistician. When I asked, “How’s your husband?” she responded, “Compared to whom?”

We chatted for a while, and she updated me on some recent research. Among the recent discoveries that she shared…

• Birthdays and cigarettes both improve health. Recent research has shown that people who celebrate the most birthdays live longest, and smokers are less likely to die of age-related illnesses.
• A team of researchers has discovered that marriage is the leading cause of divorce. There is a signficant correlation between those who get married and those who get divorced. It is also well known that 50% of marriages end in divorce… which means that if you don’t file for divorce, your wife will.
• It was recently discovered that 83.638867% of statistics have an unjustified level of precision, and 78.46% of all statistics are made up on the spot.

She also relayed this recent incident at the Census Bureau.

Checking some questionnaires, a census clerk was amazed to note that one of them listed 121 in the space for “Age of Mother, if Living” and 125 in the space for “Age of Father, if Living.”

Incredulously, the clerk said to the survey taker, “Both of your parents are alive and over 120 years old?”

“Well, no,” replied the survey taker, “but they would be — if living!”

Colin Adams likes to set up his students with jokes like this:

What do you get when cross a mosquito with a fishmonger?
Nothing. You can’t cross a vector (disease) with a scalar (fish scaler).

He tells several more jokes of the same ilk, then delivers the following:

What do you get when you cross a mathematician with a movie star?
Dream on. It’ll never happen.

Jokes are only one way that Colin tries to capture student interest. He also uses stories, plays, and fictional characters. “The trick is to get people’s attention long enough for them to see the beauty of the mathematics in front of them,” he explained. “I get a huge kick out of trying to come up with unusual ways to do that.”

One of his unusual ways is teaching class under the guise of Mel Slugbate, a sleazy real estate agent who sells property in hyperbolic space. Despite popular belief, Colin says that Mel is not a close personal friend. “He is my brother-in-law, and I am forced to spend time with him at family events. The worst real estate advice he ever gave me was, ‘Buy this house I have for sale.’”

While his humor may pique students’ curiosity, it certainly doesn’t hurt that Colin loves mathematics, too. In fact, it’s the primary reason he chose to become a professor. “The first time I proved something that no one else had ever proved, it was a rush. I really enjoyed that,” he said. “I still do.” He also loves that mathematics is free of personality issues when it comes to a proof. “You are either right or wrong,” he said.

In 1998, Colin was honored with the Haimo Distinguished Teaching Award, the highest teaching award given by the Math Association of America. Impressively, four of the 61 recipients of this award have been from Williams College. If you want to follow in Adams’s footsteps, an online masters degree in education can help you improve your math teaching skills.

I recently interviewed Colin to find out why he loves teaching and, hopefully, to learn a little about how to be mathematically funny.

I love to come up with different ways to teach. The trick is to get people’s attention long enough for them to see the beauty of the mathematics in front of them. So I get a huge kick out of trying to come up with unusual ways to do that. Stories, jokes, plays, characters.

What’s the funniest thing you’ve ever said during a lecture?

I honestly don’t know. The ones that are unplanned are the funniest, and then afterward I forget what it was that I said. I just remember there was a big laugh.

With you, Ed Burger, and Tom Garrity on the faculty, Williams College arguably has the funniest math department in America. Who would your students say is the funniest?

We all have very different styles. They would say Tom is the wackiest. Ed is the one who would be the most likely to succeed in the real comedy world. He is a natural stand-up comic. I am the one who plays a part, and I’m funniest when I’m not myself but am playing someone else. So, depending on the student’s taste, they might give a different answer.

Who is the funniest mathematician or professor you know? What’s the funniest thing that he or she ever said?

I would say Ed Burger. He is always on. I remember when he was giving a talk to parents during Parent’s Weekend at Williams. He was demonstrating how you can tie your feet together, then turn your pants inside out and put them back on while keeping your feet tied together the whole time, a topological demonstration. When he dropped his trousers with his feet tied together, he had on boxers with purple cows (the Williams mascot) all over them. He waited a second, and then said, “All junior faculty at Williams are required to wear these.” I couldn’t stop laughing.

Tell us about yourself. In particular, what things would you like my audience (a bunch of silly folks who like math jokes) to know about you?

Let’s see. Before I wanted to be a mathematician, I wanted to be a writer. But then I fell in love with mathematics. It has been a joy to be able to go back to my previous interest and write math humor.

Your list of math humor titles is impressive: the Streetwise Guides to Calculus, Riot at the Calc Exam, all of your “Mathematically Bent” columns. Which is your favorite, and why?

I love writing the “Mathematically Bent” column. It comes out four times a year, so I know I have about three months per column. Other than the constraint that it should be funny and involve mathematics, there are no constraints. So, I love the freedom that gives me. Every time I read a story, see a movie, hear an interesting anecdote, or follow the news, I think, “Is there a way to do this from a mathematical point of view? Can you write a funny math story based on that idea?”

If folks are only able to read one item that you’re written, which one would you want them to read?

How about Mangum, PI? It was a piece in the Mathematical Intelligencer that also appears in the book Riot at the Calc Exam and Other Mathematically Bent Stories. (Ed. Note: Colin was kind enough to share a copy of this story for readers of the MJ4MF blog. You can download it here.)

In addition to your writing, you also starred in a film, The Great Pi/e Debate with Tom Garrity, and you have several plays to your credit. Where is it hardest to be funny — on screen, in print, or on stage?

For me, screen and stage are the same, in that all of my videos are based on stage productions. But the same production on video is never quite as funny as it was live. I spend a lot of time writing my material before I perform it. I am not an extemporaneous performer. When I do come up with something on the fly and it’s funny, and it goes over well, that is the best feeling.

When not writing math books, which books do you like to read? Any favorite authors?

I like to read lots of different books. Some science writers (John McPhee), some novels (Dave Eggers), some stories (Stephen King), some nonfiction (Christopher Hitchens).

Impromptu Performance

After practice last night, my Ultimate Frisbee teammates and I headed to The Ugly Mug for a beer. As Kevin, one of our single teammates, was trying to capture the attention of Haley, our lovely and sassy young waitress, a little white lie crept into the conversation. Serving as Kevin’s wing man, Worm said to her, “Seriously, Kevin is the funniest guy I know. He does comedy shows.”

This is not entirely true. Though Kevin occasionally delivers a witty one‑liner, his act is not stage‑worthy. He is a political scientist, not a stand‑up comic.

A little later Haley, unaware of the fib, asked Kevin, “So, where you do you perform?”

Kevin just smiled. “I don’t do comedy shows,” he admitted. “Worm was just messing with you.”

“But he has written a joke book,” said Rob, pointing an almost accusatory finger in my direction.

“Yes,” I admitted. “But it’s a math joke book.”

“A math joke book?” Pause. “Really?” she asked again.

“Yes, really,” I said.

“You mean like that joke about — what is it? — something about 7, 8, and 9?”

“Why is 6 afraid of 7? Because 7 8 9,” I reminded her.

“You have a whole book of jokes like that?” she asked with a raised eyebrow.

“I do.”

“So, tell me another one.”

Were I young and single, I would have killed for this situation. I am absolutely certain that no woman at a bar ever asked me to be funny for her when I was in my mid-20′s. But being old and married, I politely declined.

“No, I don’t think so,” I said.

“C’mon!” my friends shouted.

This is the definition of pressure — surrounded by shouting friends, urging you to tell a math joke to an attractive young woman, while a bar full of Marines looks on. (Oh, hadn’t I mentioned the Marines? Our practice was at the Marine Corps Barracks in Washington, DC, and we were at the bar where off‑duty Marines get a drink. So, there were Marines in the bar. Lots of them. And those within ear shot were ready to be entertained by a good math joke… or at least by a numbers geek going down in flames trying to tell one.)

“No, no,” I said. “I couldn’t.”

“C’mon!” shouted some of the Marines.

(You ever tried saying, “No,” to a bar full of shouting Marines? Yeah, me, neither.)

“Okay, okay,” I agreed. “But just one.”

Surely in my repertoire of jokes I have one that would please this crowd. But which one?

The only one that came to mind was my favorite joke — but I didn’t think that a 23‑year‑old waitress or a bunch of Marines would appreciate a joke about actuaries. That’s when I remembered the Golden Rule of Joke Telling:

Got it.

So, this attractive young waitress goes to the doctor. The doctor says, “I’ve got some bad news for you, Haley.”

“You only have six weeks left to live.”

“Oh, my God,” Haley says. “That’s terrible news! Doctor, what should I do?”

“Are you married?” the doctor asks.

“No.”

“Then you should find a guy who wrote a book of math jokes, and marry him.”

“Why?” asks Haley. “Will that help me live longer?”

“Well, no,” says the doctor. “But it’ll feel longer!”

My friends hooted. “Well done!” Kevin shouted. Some of the Marines guffawed, and a few of the others chortled.

But the joke was for Haley, so I waited for her response.

“On that note…,” she said, and turned and walked back into the bar.

Ah, well. Win some, lose some.

So, I’m curious — what joke would you have told in that situation?

World IPv6 Day

World IPv6 day (June 8, 2011) is a global test of IPv6, a version of the Internet Protocol designed to succeed IPv4. As a test of IPv6, major web companies enabled IPv6 on their primary websites for a 24‑hour period.

In their most recognizable form, IPv4 addresses contains 32 bits in the format aaa.bbb.ccc.ddd, where each “octet”  may be any value 0 to 255. An example of an IPv4 address is 6.28.73.153, which happens to be an address for Fort Huachuca, Arizona. (I have no connection to Fort Huachuca, though. The numbers 6 and 28 are perfect numbers, 73 is the Chuck Norris of numbers, and 153 is my favorite number for reasons I’ve explained before.)

By contrast, IPv6 addresses contain 128 bits in the format ssss:tttt:uuuu:vvvv:wwww:xxxx:yyyy:zzzz, where each group contains four hexadecimal digits. An example of an IPv6 address is 1597:1729:2357:4096:6174:8008:9261:9999. (It is left as an exercise for the reader to determine why each of those four-digit numbers is interesting.) An even better example might be abba:acdc:dead:deaf:babe:face:fade:bead.

The switch to IPv6 addresses is a practical one; some parts of the world have already exhausted their allocations of IPv4 addresses, and most other regions are expected to exhaust their allocations within a few years.

Mathematically, there are some good questions that can be asked about the potential impact of switching from IPv4 to IPv6:

• How many IPv4 addresses are possible?
• How many IPv6 addresses are possible?
• What is the ratio of the number of possible IPv6 addresses to possible IPv4 addresses?

These questions might be especially good for a unit on exponents.

My original and sophomoric contribution to World IPv6 Day…

If they ever need a commissioner of Internet Protocol, who would be the best candidates?

• I. P. Freely
• I. P. Daly
• I. P. Offtin
• I. P. Ondaseet
• I. P. Threetimezanite
• I. P. Indaportapotty

And since I’ve already started down this path…

You’re so stupid, you have to study for a urine test.

The Math Jokes 4 Mathy Folks blog is an online extension to the book Math Jokes 4 Mathy Folks. The blog contains jokes submitted by readers, new jokes discovered by the author, details about speaking appearances and workshops, and other random bits of information that might be interesting to the strange folks who like math jokes.

MJ4MF (offline version)

Math Jokes 4 Mathy Folks is available from Amazon, Borders, Barnes & Noble, NCTM, Robert D. Reed Publishers, and other purveyors of exceptional literature.