# "Their little heads are exploding"

June 22, 2015 6:45 AM Subscribe

Mrs. Nguyen’s Prestidigitation

*From a set of 1 through 9 playing cards, I draw five cards and get cards showing 8, 4, 2, 7, and 5. I ask my 6th graders to make a 3-digit number and a 2-digit number that would yield the greatest product...*and somehow we end up with lacing diagrams and Python. (The original post on Fawn Nguyen's blog)Her blog makes me want to teach math to middle schoolers! Fantastic!!!

posted by ChuraChura at 8:09 AM on June 22, 2015

posted by ChuraChura at 8:09 AM on June 22, 2015

What a great problem! Thanks for posting!

posted by glass origami robot at 8:12 AM on June 22, 2015

posted by glass origami robot at 8:12 AM on June 22, 2015

82 * 754 = 61,828

posted by Chocolate Pickle at 8:27 AM on June 22, 2015

posted by Chocolate Pickle at 8:27 AM on June 22, 2015

Right, 752 * 84 is the max. The trick is to assign digits from high to low going top-bottom-top-bottom etc. and then switch the first two digits at the end. So for 98765 you'd go

900 x 80

970 x 86

975 x 86

then swap the 9 and 8 for

875 x 96. At least I think so!

posted by freecellwizard at 8:39 AM on June 22, 2015

900 x 80

970 x 86

975 x 86

then swap the 9 and 8 for

875 x 96. At least I think so!

posted by freecellwizard at 8:39 AM on June 22, 2015

I'm a bit surprised (and to be honest, worried) by this—the problem is pretty interesting but it really shouldn't be that hard to come up with the correct answer after a few minutes of thinking if you're a math teacher.I’m noting here that I wasn’t entirely sure what what the largest product would be. After this lesson, I asked some math teachers this question, and I appreciate the three teachers who shared. None of them gave the correct answer.

posted by mr. manager at 9:14 AM on June 22, 2015

I've always been terrible at math and had bad elementary math education so please be gentle - Where does the rectangle thing come from? Is this a new thing being taught or were some folks always taught this? I was learning math in the 80s and 90s.

Also why do the larger numbers go on the bottom in the Y axis and on the right in the X axis respectively? How is this order determined? I'm sure these seem like obvious questions but I am not joking.

posted by jnnla at 9:27 AM on June 22, 2015

Also why do the larger numbers go on the bottom in the Y axis and on the right in the X axis respectively? How is this order determined? I'm sure these seem like obvious questions but I am not joking.

posted by jnnla at 9:27 AM on June 22, 2015

I want to give this math lesson a hug. This is beautiful, because it's teaching real math literacy. Not just tools to solve a problem, but actual understanding. She's teaching the skill of looking at a set of large multiplication and division problems and being able to say, okay, I don't know the precise answer without working through it, but I know the resulting number is going to be about

(And no, I wouldn't have thought that the biggest digit should be in the smaller number either.)

posted by mandanza at 10:19 AM on June 22, 2015 [1 favorite]

*so*big, and*this*product is going to be much bigger than*that*product, etc. It's a skill a lot of folks don't have, and this is a really cool way to teach it. It's fun, it's creative, and it requires approaching a math problem in an unusual way that's less about getting "the right answer" and more about thinking it through and exploring the possibilities.(And no, I wouldn't have thought that the biggest digit should be in the smaller number either.)

posted by mandanza at 10:19 AM on June 22, 2015 [1 favorite]

I really don't understand how one could get this with "a few minutes of thought" without writing the polynomial down.

I got completely lost by the explanation in the article (the lacing diagrams make no sense to me except as a description, not a justification), and I'm still not sure how to determine the ordering beyond adding up polynomial factors (which is what the author did first).

I hope Ms Nyugen does a better job of explaining this -- because while it's a cute problem, my 6th grade self would've been lost too.

posted by smidgen at 11:01 AM on June 22, 2015

I got completely lost by the explanation in the article (the lacing diagrams make no sense to me except as a description, not a justification), and I'm still not sure how to determine the ordering beyond adding up polynomial factors (which is what the author did first).

I hope Ms Nyugen does a better job of explaining this -- because while it's a cute problem, my 6th grade self would've been lost too.

posted by smidgen at 11:01 AM on June 22, 2015

Oh I didn't see the second link (which really should have been first, not an aside). She uses rectangles, which is slightly better.

posted by smidgen at 11:13 AM on June 22, 2015

posted by smidgen at 11:13 AM on June 22, 2015

*I'm a bit surprised (and to be honest, worried) by this—the problem is pretty interesting but it really shouldn't be that hard to come up with the correct answer after a few minutes of thinking if you're a math teacher.*

Then perhaps you'd like to state the general rule at play here and explain it in such a way that it's obviously correct, because I'm damned if I can think

*why*freecellwizard's rule works.

posted by It's Never Lurgi at 11:54 AM on June 22, 2015

*Where does the rectangle thing come from?*

As a fellow victim of the symbolic approach in my early education, I can empathize. In school in the 80s, I was taught that you get the area of a rectangle using multiplication of the sides, but nothing else, really. That's something you probably know as a formula, but not as geometric reasoning. Similarly, you might know about "arbitrary" rules such as the "FOIL" method: (a + b) * (c + d) = a*c + a*d + b*c + b*d.

However, in geometric terms ,multiplying two numbers is a representation of area in the same way you might refer to the size of a room as 30ft "by"(e.g. multiplied by) 40ft (= 1200sq ft) . Area is not just some formula that uses multiplication -- it can be thought of as what the multiplication is *actually representing* -- in the same sense that adding something can be considering moving some distance on a number line.

Why they never taught this properly when I was in secondary school, I will never know...

As the for the order. It doesn't matter, really. They just show it largest to smallest powers of 10 to make it easy to see the relationship to the way you multiply digits by hand. You can slice the numbers however you want, in any order, as long as the totals add up.

*That's* what the FOIL method (which should never have been taught IMO) comes from. The main idea being that each side can be "sliced" any which way and the product (e.g. area) is the sum of the areas of all the boxes made in the rectangle. If you look at the formula above in that vein, the reason the rule works like it does becomes obvious and how at extends to more than two slices on each side. (sigh...)

posted by smidgen at 11:55 AM on June 22, 2015 [1 favorite]

I also had difficulty understanding the explanations given in the first link, so I came up with my own proof that the configuration described in the link and by freecellwizard is correct for any two positive integers with any number of digits each. Your mileage may vary on whether this helps you

I will assume, as in the original statement, that all digits are distinct and none is equal to 0. Throughout this post,

We only need three main observations to solve this problem. The first is one we already know: in an optimal solution, the digits of

The second observation is that if we add any number of 0's to the right end of

The third observation is that in an optimal solution, the digit of

The rest of our argument is based on these three observations. We need one last lemma before the main conclusion: I claim that

(

Now by adding 0's to the right end of

The proof is now complete, and we conclude that

This configuration is still optimal when

posted by J.K. Seazer at 11:02 PM on June 22, 2015

*understand*it (index-wrangling is often the bane of comprehension in mathematics), but I hope this is at least convincing.I will assume, as in the original statement, that all digits are distinct and none is equal to 0. Throughout this post,

*x*is an integer that is*n*digits long such that for all integers*i*from 1 to*n*, the*i*th digit, reading left-to-right, is*x*. In other words, the integer_{i}*x*is written*x*_{1}*x*_{2}*x*..._{3}*x*. Similarly,_{n}*y*is an integer that is*m*digits long, and is written*y*_{1}*y*_{2}*y*..._{3}*y*. For simplicity, I will also mandate_{m}*m*<*n*; i.e.*y*is shorter than*x*(the case in which*x*and*y*have the*same*length will follow as an immediate consequence of our argument). Of course, it follows from this assumption that*y*<*x*.We only need three main observations to solve this problem. The first is one we already know: in an optimal solution, the digits of

*x*and*y*must be sorted in decreasing order. We can see this because if, for example, we had two digits in*x*where the digit on the left is less than the digit on the right, we could simply swap the two of them, increase*x*, and thereby increase the product*x·y*, showing that our original solution was not optimal after all.The second observation is that if we add any number of 0's to the right end of

*y*, the optimal configuration of digits is unchanged. To illustrate what I mean, we know that 752 × 84 is the optimal assignment of 2, 4, 5, 7, and 8 to □□□ × □□. Therefore, we also know that 752 × 840 is the optimal assignment of 2, 4, 5, 7, and 8 to □□□ × □□0, 752 × 8400 is the optimal assignment of 2, 4, 5, 7, and 8 to □□□ × □□00, etc. (Obviously we could also add 0's to the end of*x*, but I will only need to add 0's to*y*for this solution.)The third observation is that in an optimal solution, the digit of

*y*in the ones place is larger than the digit of*x*in the ones place, the digit of*y*in the tens place is larger than the digit of*x*in the tens place, and so on. Written formally, for all*i*from 1 to*m*,*y*>_{i}*x*. We can again use a swapping argument to see why this observation is true. Suppose_{i+n-m}*x*>_{i+n-m}*y*for some_{i}*i*. If we swap*x*and_{i+n-m}*y*, then we increase_{i}*y*and decrease*x*by the same amount. Therefore, the sum*x+y*is left unchanged. However, since*x*is still greater than*y*,*x*and*y*are now closer together. Therefore, the product*x·y*has increased, showing that our original solution was not optimal. (The reasoning for why the product increases is the same as that for why rectangles that are more "square-like" have a larger area than rectangles with the same perimeter that are less "square-like".) As an illustration, notice how 754 × 82 is less than 752 × 84.The rest of our argument is based on these three observations. We need one last lemma before the main conclusion: I claim that

*x*<_{1}*y*(so in an optimal solution, the largest digit is assigned to_{1}*y*). To see this, suppose we have an optimal solution for_{1}*x·y*, and add*n-m*0's to the right end of*y*as in the second observation, so that both*x*and*y*are*n*digits long. Then we now have an optimal solution for*x·(y00...0)*, and the product is equal to(

*y*_{1}*y*_{2}*y*..._{3}*y*·10_{m}^{n-m})(*x*_{1}*x*_{2}*x*..._{3}*x*·10_{m}^{n-m}+*x*_{m+1}*x*_{m+2}*x*..._{m+3}*x*). Since we assumed that none of the digits are equal to 0 and, since_{n}*m*<*n*,*x*_{m+1}*x*_{m+2}*x*..._{m+3}*x*must be greater than 0. By almost the same argument as in the third observation (except swapping_{n}*m*digits at a time instead of just one), we can see that*y*_{1}*y*_{2}*y*..._{3}*y*must be greater than_{m}*x*_{1}*x*_{2}*x*..._{3}*x*, from which it follows that_{m}*y*is greater than_{1}*x*._{1}Now by adding 0's to the right end of

*y*as in the second observation, and observing the corresponding digits as in the third observation, we can solve the problem. In this case, if*x*is still longer than*y*, then corresponding digits of*y*will still be larger than corresponding digits of*x*. For example, if*n*= 6 and*m*= 2, we know from the start that*y*>_{1}*x*and_{5}*y*>_{2}*x*. If we add one 0 to_{6}*y*, we see that*y*>_{1}*x*and_{4}*y*>_{2}*x*, and if we add three 0's, we see that_{5}*y*>_{1}*x*and_{2}*y*>_{2}*x*. However, notice that since the digits of_{3}*x*are sorted in decreasing order, "*y*>_{1}*x*and_{2}*y*>_{2}*x*" is the strongest of these three statements. In general, we get the most information by adding enough 0's so that_{3}*x*is longer than*y*by one digit, and we conclude that for all*i*from 1 to*m*,*y*>_{i}*x*. On the other hand, if we add enough 0's so that_{i+1}*x*and*y*are the same length, then by our previous lemma*y*is now larger than*x*, and by the same argument as in the third observation, we see that for all*i*from 2 to*m*,*x*>_{i}*y*._{i}The proof is now complete, and we conclude that

*y*>_{1}*x*>_{1}*x*>_{2}*y*>_{2}*x*>_{3}*y*> ... >_{3}*x*>_{m}*y*>_{m}*x*>_{m+1}*x*> ... >_{m+2}*x*._{n}This configuration is still optimal when

*n = m*, provided that we assume without loss of generality that the largest digit goes to*y*. The only change we need to make to the proof is to add one 0 to*x*to prove that for all*i*from 1 to*n-1*,*y*>_{i}*x*. When we allow for repeated digits, this solution is almost, but not quite correct (of course, once we replace > with ≥); in the lemma, we have to account for the possibility that the leftmost digits of_{i+1}*x*and*y*may be duplicated, pushing the "crossover point"*y*≥_{k}*x*≥_{k}*x*≥_{k+1}*y*further to the right._{k+1}posted by J.K. Seazer at 11:02 PM on June 22, 2015

If numbers of the lengths given in the original article are used, and arbitary digits used I don't think it's obvious as to which of the second digits of each number should be larger (with the notation x

For example:

If the numbers are 5x

However:

If the numbers are 5x

If a constraint is imposed that the leading digits can't be repeated, then x

posted by Ned G at 6:46 AM on June 23, 2015

_{1}x_{2}x_{3}* y_{1}y_{2}I can't see a simple way of arguing which of x_{2}and y_{2}should be greater): x_{2}is multiplied by y_{1}, which is the largest single digit, but y_{2}gets multiplied three times. Looking into it a bit more, I'm pretty confident that the rule is if the first digits (x_{1}and y_{1}) are equal to each other, y_{2}should be larger, otherwise it should be x_{2}.For example:

If the numbers are 5x

_{2}4 and 5y_{2}then multiplying out the expression we have 1000(5*5)+100(5*y_{2}+ 5*x_{2})+10(y_{2}x_{2}+ 4*5) + 4y_{2}. As the only asymmetric term is the y_{2}at the end, then this should be greater.However:

If the numbers are 5x

_{2}4 and 9y_{2}then 5x_{2}4 * 9y_{2}= 1000(5*9)+100(5*y_{2}+ 9*x_{2})+10(y_{2}x_{2}+ 4*9) + 4y_{2}. Here the 100(9*x_{2}) term will dominate, so x_{2}should be the larger of the two.If a constraint is imposed that the leading digits can't be repeated, then x

_{2}should be larger for a larger overall solution, as then in the second term of the expanded multiplication, which is 100(x_{1}y_{2}+ y_{1}x_{2}), the x_{2}term is multiplied by y_{1}, which is the largest single digit, and there's no way of using the smaller terms to account for the difference in this term within the parameters of the problem. This can be seen by inspection: If the 100 term of the expansion is compared to the 10 and the unit terms of it, and it's noted that each of the products in the 100 term (x_{1}y_{2}and y_{1}x_{2}) has a corresponding product that must be smaller in the 10 term (x_{2}y_{2}and y_{1}x_{3}respectively), then there isn't a way for the smaller terms to counteract the larger one.posted by Ned G at 6:46 AM on June 23, 2015

You're right that if the first digits are equal, then

posted by J.K. Seazer at 3:28 PM on June 23, 2015

*y*should be larger. In the lemma in my post above, we know that_{2}*y*_{1}*y*_{2}*y*..._{3}*y*is greater than_{m}*x*_{1}*x*_{2}*x*..._{3}*x*, so if the largest two digits are equal, we assign them to_{m}*x*and_{1}*y*. We continue that process of matching up largest digits until we find a digit that does not have a matching pair, in which case that digit of_{1}*y*will be larger than its mate in*x*, but every subsequent digit of*y*will be smaller than its mate. Or, if all of the first 2*m*digits come in pairs, we just finish off*x*by assigning the remaining digits in decreasing order.posted by J.K. Seazer at 3:28 PM on June 23, 2015

Hey thanks

posted by jnnla at 5:20 PM on June 23, 2015

**smidgen**...that was very clear and I learned something new :)posted by jnnla at 5:20 PM on June 23, 2015

Nice post! As a math teacher, I love both the problem and the lesson. Here's how I solved it:

- Introduce a decimal point in front of each number so that the most significant digits have a place value of 1/10, the next-most-significant digits have a place value of 1/100, etc. This doesn't change the optimal arrangement of the digits, since we're just multiplying the whole product by 0.00001, but it does give mental clarity, for me at least.

- The two largest digits in the pool should get place values of 1/10, the next two should get place values of 1/100, and so on. This can be proved by contradiction: if we violate this rule, giving a larger digit a smaller place value than a smaller digit (whether in the same number or the other number), then we can always enlarge the product by swapping the positions of those two digits. The details are left to the reader. :-)

- If we follow the rule above, then the sum of the two numbers is fixed. To maximize the product, we should make the two numbers as close to equal as we can. To do that, we should make the smaller number as large as possible. That is, whichever number has the smaller 1/10's digit should get the larger of the two digits chosen to be valued at 1/100, as well as the larger of two digits chosen to be valued at 1/1000, etc. (If there are an odd number of digits in the pool, then the smallest digit can be compared with 0, and thus also assigned to the smaller of the two numbers.)

The result is the same as others have described.

***

Regarding this comment:

I've had many colleagues who are very effective math teachers but would struggle with this problem. My own solution above draws more on my training as both a puzzle enthusiast and a math Ph.D. than on the skills used daily in teaching math. Mrs. Nguyen's curiosity about the problem, and her ability to channel the kids' curiosity, is a much more valuable qualification.

posted by aws17576 at 12:35 PM on June 24, 2015 [1 favorite]

- Introduce a decimal point in front of each number so that the most significant digits have a place value of 1/10, the next-most-significant digits have a place value of 1/100, etc. This doesn't change the optimal arrangement of the digits, since we're just multiplying the whole product by 0.00001, but it does give mental clarity, for me at least.

- The two largest digits in the pool should get place values of 1/10, the next two should get place values of 1/100, and so on. This can be proved by contradiction: if we violate this rule, giving a larger digit a smaller place value than a smaller digit (whether in the same number or the other number), then we can always enlarge the product by swapping the positions of those two digits. The details are left to the reader. :-)

- If we follow the rule above, then the sum of the two numbers is fixed. To maximize the product, we should make the two numbers as close to equal as we can. To do that, we should make the smaller number as large as possible. That is, whichever number has the smaller 1/10's digit should get the larger of the two digits chosen to be valued at 1/100, as well as the larger of two digits chosen to be valued at 1/1000, etc. (If there are an odd number of digits in the pool, then the smallest digit can be compared with 0, and thus also assigned to the smaller of the two numbers.)

The result is the same as others have described.

***

Regarding this comment:

*I'm a bit surprised (and to be honest, worried) by this—the problem is pretty interesting but it really shouldn't be that hard to come up with the correct answer after a few minutes of thinking if you're a math teacher.*I've had many colleagues who are very effective math teachers but would struggle with this problem. My own solution above draws more on my training as both a puzzle enthusiast and a math Ph.D. than on the skills used daily in teaching math. Mrs. Nguyen's curiosity about the problem, and her ability to channel the kids' curiosity, is a much more valuable qualification.

posted by aws17576 at 12:35 PM on June 24, 2015 [1 favorite]

« Older Just another day at work | Off Diamond Head Newer »

This thread has been archived and is closed to new comments

posted by leotrotsky at 7:03 AM on June 22, 2015 [1 favorite]