Combinatorics and Jason’s Deli (Part 3)

Jason’s Deli is one of my family’s favorite places for an inexpensive meal. Recently, I saw the following placard at our table advertising their salad bar:

fb_img_1470352586255.jpg

The small print says “Math performed by actual rocket scientist”; let’s see how the rocket scientist actually did this calculation.

In yesterday’s post, I showed that the rocket scientist correctly calculated

\displaystyle {49 \choose 5} = 1,906,884.

To impress upon customers just how large this number is, the advertisers imagine eating a different salad every day until all 1,906,884 possibilities had been exhausted. Since there are 365 days in a year, apparently the rocket scientist divided:

\displaystyle \frac{1,906,884}{365} = 5,224.3397...

Unfortunately, there’s a small problem: the rocket scientist forgot about leap years! Ignoring for now the adjustments of the Gregorian calendar (years divisible by 1000 but not 4000 aren’t leap years — so that 2000 was a leap year but 2100 won’t be), we should divide not by 365 but by 365.25:

\displaystyle \frac{1,906,884}{365} = 5,220.7638...

Over a span of 5,220 years, there might be 3 or 4 extra leap days in the above calculation (depending on when someone starts eating the salads), not enough to throw off the above calculation by too much. So the correct answer, rounded to the nearest integer, really should have been 5,221 years.

All this to say, ignoring leap years caused the rocket scientist to give an answer that was off by 3.

Combinatorics and Jason’s Deli (Part 2)

Jason’s Deli is one of my family’s favorite places for an inexpensive meal. Recently, I saw the following placard at our table advertising their salad bar:

fb_img_1470352586255.jpg

The small print says “Math performed by actual rocket scientist”; let’s see how the rocket scientist actually did this calculation.

The advertisement says that there are 50+ possible ingredients; however, to actually get a single number of combinations, let’s say there are exactly 50 ingredients. Lettuce will serve as the base, and so the 5 ingredients that go on top of the lettuce will need to be chosen from the other 49 ingredients.

Also, order is not important for this problem… for example, it doesn’t matter if the tomatoes go on first or last if tomatoes are selected for the salad.

Therefore, the number of possible ingredients is

\displaystyle {49 \choose 5},

or the number in the 5th column of the 49th row of Pascal’s triangle. Rather than actually finding the 49th row of Pascal’s triangle by direct addition, it’s simpler to use factorials:

\displaystyle {49 \choose 5} = \displaystyle \frac{49!}{5! \times 44!} = \displaystyle \frac{49 \times 48 \times 47 \times 46 \times 45 \times 44!}{5 \times 4 \times 3 \times 2 \times 1 \times 44!}

= \displaystyle \frac{49 \times 48 \times 47 \times 46 \times 45}{5 \times 4 \times 3 \times 2 \times 1}

= 49 \times 12 \times 47 \times 23 \times 3

= 1,906,884.

Under the assumption that there are exactly 50 ingredients, the rocket scientist actually got this right.

Correlation and Causation: Index

I’m using the Twelve Days of Christmas (and perhaps a few extra days besides) to do something that I should have done a long time ago: collect past series of posts into a single, easy-to-reference post. The following posts formed my series on data sets that (hopefully) persuade students that correlation is not the same as causation.

Part 1: Piracy and global warming. Also, usage of Internet Explorer and murder.

Part 2: An xkcd comic.

Part 3: STEM spending and suicide. Consumption of margarine and divorce. Consumption of mozzarella and earning a doctorate. Marriage rates and deaths by drowning.

Part 4: Donna the Deer Lady.

 

 

 

 

Lessons from teaching gifted elementary students (Part 8g)

Every so often, I’ll informally teach a class of gifted elementary-school students. I greatly enjoy interacting with them, and I especially enjoy the questions they pose. Often these children pose questions that no one else will think about, and answering these questions requires a surprisingly depth of mathematical knowledge.

Here’s a question I once received, in the students’ original handwriting. They wanted me to add adjacent numbers on the bottom row to produce the number on the next row, building upward until I reached the apex of the triangle. Then, after I reached the top number, they wanted me to take the square root of that number. (Originally, they wanted me to first multiply by 80 before taking the square root, but evidently they decided to take it easy on me.)

And, just to see if I could do it, they wanted me to do all of this without using a calculator. But they were nice and allowed me to use pencil and paper.

PascalProblem

So far, I’ve used Pascal’s triangle to obtain

y = \displaystyle \sum_{k=0}^{11} (k+1)^2 {11 \choose k}

= \displaystyle \sum_{k=2}^{11} k(k-1) {11 \choose k} +  \sum_{k=1}^{11} 3k {11 \choose k} + \sum_{k=0}^{11} {11 \choose k}.

= \displaystyle \sum_{k=2}^{11} k(k-1) \left( \frac{11!}{k!(11-k)!} \right) +  \sum_{k=1}^{11} 3k \left( \frac{11!}{k!(11-k)!} \right) + \sum_{k=0}^{11} \left( \frac{11!}{k!(11-k)!} \right).

= \displaystyle \sum_{k=2}^{11}  \frac{11!}{(k-2)!(11-k)!}  +  3 \sum_{k=1}^{11}  \frac{11!}{(k-1)!(11-k)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!} .

= \displaystyle \sum_{i=0}^{9} \frac{11!}{i!(9-i)!}  +  3 \sum_{j=0}^{10}  \frac{11!}{j!(10-j)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!} .

= \displaystyle \sum_{i=0}^{9} 11 \times 10 \frac{9!}{i!(9-i)!}  +  3 \sum_{j=0}^{10}  11 \frac{10!}{j!(10-j)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!}

= \displaystyle 110 \sum_{i=0}^{9} {9 \choose i}  +  33 \sum_{j=0}^{10} {10 \choose j} + \sum_{k=0}^{11}  {11 \choose k}

= 110 \times 2^9 + 33 \times 2^{10} + 2^{11}

= 92,160.

I’m almost done… except my students wanted me to find the square root of this number without using a calculator.

There are a couple ways to do this; the method I chose was directly extracting the square root by hand… a skill that was taught to children in previous generations but has fallen out of pedagogical disfavor with the advent of handheld calculators. I lost my original work, but it would have looked something like this (see the above website for details on why this works):

squareroot

And so I gave my students their answer: x \approx 303.578\dots

Lessons from teaching gifted elementary students (Part 8f)

Every so often, I’ll informally teach a class of gifted elementary-school students. I greatly enjoy interacting with them, and I especially enjoy the questions they pose. Often these children pose questions that no one else will think about, and answering these questions requires a surprisingly depth of mathematical knowledge.

Here’s a question I once received, in the students’ original handwriting. They wanted me to add adjacent numbers on the bottom row to produce the number on the next row, building upward until I reached the apex of the triangle. Then, after I reached the top number, they wanted me to take the square root of that number. (Originally, they wanted me to first multiply by 80 before taking the square root, but evidently they decided to take it easy on me.)

And, just to see if I could do it, they wanted me to do all of this without using a calculator. But they were nice and allowed me to use pencil and paper.

PascalProblem

So far, I’ve used Pascal’s triangle to obtain

y = \displaystyle \sum_{k=0}^{11} (k+1)^2 {11 \choose k}

= \displaystyle \sum_{k=2}^{11} k(k-1) {11 \choose k} +  \sum_{k=1}^{11} 3k {11 \choose k} + \sum_{k=0}^{11} {11 \choose k}.

= \displaystyle \sum_{k=2}^{11} k(k-1) \left( \frac{11!}{k!(11-k)!} \right) +  \sum_{k=1}^{11} 3k \left( \frac{11!}{k!(11-k)!} \right) + \sum_{k=0}^{11} \left( \frac{11!}{k!(11-k)!} \right).

= \displaystyle \sum_{k=2}^{11}  \frac{11!}{(k-2)!(11-k)!}  +  3 \sum_{k=1}^{11}  \frac{11!}{(k-1)!(11-k)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!} .

= \displaystyle \sum_{i=0}^{9} \frac{11!}{i!(9-i)!}  +  3 \sum_{j=0}^{10}  \frac{11!}{j!(10-j)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!} .

= \displaystyle \sum_{i=0}^{9} 11 \times 10 \frac{9!}{i!(9-i)!}  +  3 \sum_{j=0}^{10}  11 \frac{10!}{j!(10-j)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!}

= \displaystyle 110 \sum_{i=0}^{9} {9 \choose i}  +  33 \sum_{j=0}^{10} {10 \choose j} + \sum_{k=0}^{11}  {11 \choose k}

To numerically evaluate y, I use the identity

\sum_{r=0}^n {n \choose r} = 2^n;

this identity can be proven by using the binomial theorem

\sum_{r=0}^n {n \choose r} x^r y^{n-r} = (x+y)^n

and then plugging in x = 1 and y = 1. Using this identity, I conclude that

y = 110 \times 2^9 + 33 \times 2^{10} + 2^{11}

= 55 \times 2 \times 2^9 + 33 \times 2^{10} + 2 \times 2^{10}

= 55 \times 2^{10} + 33 \times 2^{10} + 2 \times 2^{10}

= (55+33+2) \times 2^{10}

= 90 \times 2^{10}.

Since I know that 2^{10} = 1024, it’s now a simple matter of multiplication:

y = 90 \times 1024 = 92,160.

 (Trust me; after I showed my students this answer about five minutes after it was posed, I was ecstatic when I confirmed this answer with Mathematica.)

Lessons from teaching gifted elementary students (Part 8e)

Every so often, I’ll informally teach a class of gifted elementary-school students. I greatly enjoy interacting with them, and I especially enjoy the questions they pose. Often these children pose questions that no one else will think about, and answering these questions requires a surprisingly depth of mathematical knowledge.

Here’s a question I once received, in the students’ original handwriting. They wanted me to add adjacent numbers on the bottom row to produce the number on the next row, building upward until I reached the apex of the triangle. Then, after I reached the top number, they wanted me to take the square root of that number. (Originally, they wanted me to first multiply by 80 before taking the square root, but evidently they decided to take it easy on me.)

And, just to see if I could do it, they wanted me to do all of this without using a calculator. But they were nice and allowed me to use pencil and paper.

PascalProblem

So far, I’ve used Pascal’s triangle to obtain

y = \displaystyle \sum_{k=0}^{11} (k+1)^2 {11 \choose k}

= \displaystyle \sum_{k=2}^{11} k(k-1) {11 \choose k} +  \sum_{k=1}^{11} 3k {11 \choose k} + \sum_{k=0}^{11} {11 \choose k}.

= \displaystyle \sum_{k=2}^{11} k(k-1) \left( \frac{11!}{k!(11-k)!} \right) +  \sum_{k=1}^{11} 3k \left( \frac{11!}{k!(11-k)!} \right) + \sum_{k=0}^{11} \left( \frac{11!}{k!(11-k)!} \right).

= \displaystyle \sum_{k=2}^{11}  \frac{11!}{(k-2)!(11-k)!}  +  3 \sum_{k=1}^{11}  \frac{11!}{(k-1)!(11-k)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!} .

= \displaystyle \sum_{i=0}^{9} \frac{11!}{i!(9-i)!}  +  3 \sum_{j=0}^{10}  \frac{11!}{j!(10-j)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!} .

In the first series, I’ll rewrite 11! as 11 \times 10 \times 9!. Also, in the second series, I’ll rewrite 11! as 11 \times 10!. Therefore,

y = \displaystyle \sum_{i=0}^{9} 11 \times 10 \frac{9!}{i!(9-i)!}  +  3 \sum_{j=0}^{10}  11 \frac{10!}{j!(10-j)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!}

y = \displaystyle 110 \sum_{i=0}^{9} \frac{9!}{i!(9-i)!}  +  33 \sum_{j=0}^{10}  \frac{10!}{j!(10-j)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!}

We now see that binomial coefficients appear in each of these series:

y = \displaystyle 110 \sum_{i=0}^{9} {9 \choose i}  +  33 \sum_{j=0}^{10} {10 \choose j} + \sum_{k=0}^{11}  {11 \choose k}

I’ll conclude the evaluation of y in tomorrow’s post.

Lessons from teaching gifted elementary students (Part 8d)

Every so often, I’ll informally teach a class of gifted elementary-school students. I greatly enjoy interacting with them, and I especially enjoy the questions they pose. Often these children pose questions that no one else will think about, and answering these questions requires a surprisingly depth of mathematical knowledge.

Here’s a question I once received, in the students’ original handwriting. They wanted me to add adjacent numbers on the bottom row to produce the number on the next row, building upward until I reached the apex of the triangle. Then, after I reached the top number, they wanted me to take the square root of that number. (Originally, they wanted me to first multiply by 80 before taking the square root, but evidently they decided to take it easy on me.)

And, just to see if I could do it, they wanted me to do all of this without using a calculator. But they were nice and allowed me to use pencil and paper.

PascalProblem

So far, I’ve used Pascal’s triangle to obtain

y = \displaystyle \sum_{k=0}^{11} (k+1)^2 {11 \choose k}

= \displaystyle \sum_{k=2}^{11} k(k-1) {11 \choose k} +  \sum_{k=1}^{11} 3k {11 \choose k} + \sum_{k=0}^{11} {11 \choose k}.

I now use the definition of the binomial coefficient:

= \displaystyle \sum_{k=2}^{11} k(k-1) \left( \frac{11!}{k!(11-k)!} \right) +  \sum_{k=1}^{11} 3k \left( \frac{11!}{k!(11-k)!} \right) + \sum_{k=0}^{11} \left( \frac{11!}{k!(11-k)!} \right).

Since k! = k(k-1) \times (k-2)! and k! = k \times (k-1)!, this simplifies as

y = \displaystyle \sum_{k=2}^{11} \frac{11!}{(k-2)!(11-k)!}+  3 \sum_{k=1}^{11} \frac{11!}{(k-1)!(11-k)!} + \sum_{k=0}^{11} \frac{11!}{k!(11-k)!} .

In the first series, I’ll use the change of index i = k-2, so that k = i+2 and 11-k = 11-(i+2) = 9-i. Also, in the first series, the index will change from k = 2 to k = 11 to i = 0 to i = 9.

In the second series, I’ll use the change of index j = k-1, so that k = j+1 and 11-k = 11-(j+1) = 10-j. Also, in the first series, the index will change from k = 1 to k = 11 to j = 0 to j = 10.

With these changes, I obtain

y = \displaystyle \sum_{i=0}^{9}\frac{11!}{(i!(9-i)!}  +  3 \sum_{j=0}^{10} \frac{11!}{j!(10-j)!}  + \sum_{k=0}^{11}  \frac{11!}{k!(11-k)!} .

I’ll continue the simplification of these series in tomorrow’s post.