# Prepare to Be Nerdsniped

You have a lot of bags, and you want to store them by stuffing all of them into one of the bags. For n bags, how many ways are there to do this?

Nerdsniping. Image: xkcd by Randall Munroe.

I’ve spent a good amount of time thinking about that question recently, and I figured I’d inflict it on you as well. It’s not my fault, though. Sam Shah, a high school math teacher, wrote about the question on his blog, Continuous everywhere but differentiable nowhere, after Matt Enlow shared it. I’ve been reading Shah’s blog since 2012, when he posted a really interesting calculus class project investigating the Gini index, a measure of wealth inequality.

The stuffing sacks problem appears in the good math problems tag on his blog, which certainly lives up to its name. Plenty of nerdsniping there. Some of the problems are fun brain teasers like stuffing sacks, but some of them are more geared towards making sure his math class is about thinking instead of formulas. For example, what’s the derivative of log(log(sin(x)))? It’s easy to use the chain rule to come up with an answer without stopping to consider the small detail that log(log(sin(x))) doesn’t make sense for any real numbers. Oops.

In addition to puzzles that will help you pass the time waiting for the bus, Shah often writes about how he cultivates deep understanding in the classroom. He recently wrote about the way he has students make conjectures at the beginning of the semester and then the eventual payoff when they finally have the tools to prove the conjectures. Outside of the classroom, he helped launch a student math and science journal at his school. Even if you don’t teach high school, a trip to his blog will probably give you some ideas for your classroom or just for talking about math with people.

So how many ways are there to stuff sacks? It’s not hard to figure out the values for the first few numbers n. But holy overcounting, Batman, things get complicated as n increases! There’s an OEIS sequence that will get you the answer, but that would take all the fun away.

This entry was posted in K-12 Mathematics, Math Education and tagged , , , , . Bookmark the permalink.

### 2 Responses to Prepare to Be Nerdsniped

1. Francois Leyvraz says:

log(log(sin x)) “does not make sense for x real”. Hmmm…. It is a perfectly valid real number, except you should add i*pi to it. Since this is a constant, it disappears upon taking the derivative, which is why the derivative is a perfectly valid trigonometric function, real on the reals, namely it is cot\'(x)/cot(x). In other words, up to an irrelevant additive constant log(log(sin(x))) is equivalent to log(log(1/sin(x))), which is real valued for all real values of x. It is indeed a very neat example! Thank you very much!

Absolutely depends on what SORT of bags they are!!
Are they stiff? tearable”? can they fold flat or do they have a ‘pleat in their bottom?
Are they all the same size? or all the same material?