#MathEd – Math for My Nephew

A while ago I was asked to provide some resources I use to teach math for my nephew (well, nephew-in-law). I decided to gather them together into a blog post and thus get a two-fer.

Associations

Mathematical Association of America (http://www.maa.org/) – Their stated mission is “to advance the mathematical sciences, especially at the collegiate level.” Membership is open to students and teachers (K-12 and college), starting at $35/year (student with proof of status) and going up to $249/year (Member Plus). I’m a member and for me the real value of membership is access to a wide range of publications plus discounts on books, both e-book and printed. (Disclaimer: I currently write book reviews for the MAA web site but I am not compensated.) You can follow them on Twitter at @maanow and on Facebook as maanews.

National Council of Teachers of Mathematics (http://www.nctm.org/) – Like the MAA, the NCTM offers memberships to students, teachers (primary through college) and to organizations. They also offer the option of an ‘e-membership’ at each level for a slight discount. Membership annual dues range from $44 (Student and Emeritus) to $144 (Full Individual Membership). Membership gives you access to a host of instructional materials, NCTM’s ‘e-standards’ and NCTM’s E-Seminars, 60 minute on-demand video presentations on a variety of math education topics. You can follow them on Twitter at @NCTM or on Facebook as NCTM Illuminations.

Blogs

Math with Bad Drawings – This is one of my favorite sites. Ben Orlin provides an entertaining and educational view of math from a teachers perspective. The title comes from each post being illustrated by a series of stick drawings on a whiteboard. I wrote a review of his site here. I’ve used some of his posts as jumping-off points for discussions in my math class. You can follow Ben on Twitter as @benorlin. He’s also on Facebook but doesn’t appear to be too active.

MathBabe – Cathy O’Neil is a former Wall Street quantitative analyst who left for the wilds of higher education. She mainly blogs about Big Data and math education in higher ed. I wrote a review of her site here. A smart, interesting, fun site. You can also follow Cathy on Twitter.

Finding Ways to Nguyen Students Over – Fawn Nguyen is a California math teacher who has one of the best math blogs I’ve seen for primary and secondary educators. She clearly works hard to present math to her students in innovative and entertaining ways and she shares these techniques on her blog. (I wrote a review of her site here.) However, the real hidden gems of her site for educators are the affiliated sites like Visual Patterns, Math Munch and Would You Rather. These sites are a treasure trove of fun math problems and exercises you can share with your students or work on your own.

The NRICH Project – Not a blog per se, but The NRICH Project was started by the University of Cambridge, according to their “About” page:

“to enrich the mathematical experiences of all learners. To support this aim, members of the NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to embed rich mathematical tasks into everyday classroom practice.”

(More here.) The content is divided into material for teachers and students. Each category is further divided into primary and secondary education. The idea is to present tasks that target multiple learning styles. These are known as “rich tasks” and you can get more information about them from this article.  Teaching materials are printable and downloadable for ease of use. You can also follow the NRICH project on Twitter  and on Facebook. You can sign up on their mailing list to get updates. They also provide a guide for parents and caregivers.

Project Euler – Also not a blog but a cool site for more advanced math fans. (Yes, there are some of us out there.) It’s a collection of almost 500 math problems, some of which may require basic programming skills. Each problem builds on insights gained solving previous problems so I advise doing them in order. I’ve posted a few of the problems on my site. Working on the problems presents interesting insights and is definitely mind-expanding.

Videos

NumberPhile – This is a nice resource of short, entertaining videos about specific math concepts. I do a short segment at the beginning of my classes called “Math Minute” and I’ve used several of these as inspiration for material. You can also follow them on Twitter and Facebook.

ComputerPhile – Not strictly related to math, but computer science is based on math. Similar to NumberPhile, ComputerPhile provides short videos about topics like undecidability, cryptography and how computers use math to do animation. You can follow them on Twitter or on Facebook.

I’m always looking for good math resources, both for my classroom and this blog. If you have any interesting leads, post them in comments!

#WeHateMath One Man’s Meat is Another Man’s Poisson

Recently I got to thinking about my grad school course on system performance. The instructor had a day job at Bell Labs where he did the math that he tried to teach to us. It was all about things like queuing theory, think time and all sorts of statistical and stochastic analysis of information systems. (It was pretty overwhelming at the time but I’d like to take the class again.)

Anyway…one of the concepts that I took away from the class was about Poisson distributions. It got me wondering about how I would explain this concept to my College Mathematics students.

Let me explain.

College Mathematics at my school is a 100-level class for non-technical students. Most of my class are in programs like Medical Assisting, Graphic Design and Business Administration. This is the course description:

This course develops problem-solving and decision-making strategies using mathematical tools from arithmetic, algebra, geometry, and statistics. Topics include consumer mathematics, key concepts in statistics and probability, sets of numbers, and geometry. Upon successful completion of this course, students will be able to apply mathematical tools and methods to solve real-world problems.

Basically, it’s a functional numeracy class. Don’t get me wrong — it’s fun to teach and I enjoy the challenge of presenting math concepts in an interesting and accessible way. One of the ways I do this is start each class session with a ‘Math Minute’ where I run through a quick math concept to give my students a little something to ponder.

The Poisson distribution was developed by Siméon Denis Poisson in 1837. According to StatTrek:

A Poisson distribution is the probability distribution that results from a Poisson experiment.

Okay, a Poisson something-or-other comes from a Poisson something-else. Could you vague that up for me?:

A Poisson experiment is a statistical experiment that has the following properties:

  • The experiment results in outcomes that can be classified as successes or failures.
  • The average number of successes (μ) that occurs in a specified region is known.
  • The probability that a success will occur is proportional to the size of the region.
  • The probability that a success will occur in an extremely small region is virtually zero.

Note that the specified region could take many forms. For instance, it could be a length, an area, a volume, a period of time, etc.

That’s a little better. Let’s look at the classic example of a Poisson distribution: bus arrivals.

On your route, a bus comes by, on average, every ten minutes. On this particular day, you arrive at the bus stop and there is no bus to be seen. How long, on average, do you think you’ll have to wait for the next bus?

At this point, your audience is expected to say “Why, five minutes, of course.” The standard answer is actually ten minutes. The problem with this example is that it doesn’t give the right picture so the actual answer doesn’t fit our mathematical intuition. That’s why at this point the explainer hauls out the equation:

Via StatTrek:

Poisson Formula: Suppose we conduct a Poisson experiment, in which the average number of successes within a given region is μ. Then, the Poisson probability is:

P(x; μ) = (e) (μx) / x!

where x is the actual number of successes that result from the experiment, and e is approximately equal to 2.71828.

And everyone’s eyes glaze over.

I’m not complaining but I’m looking for a way to explain this to a non-technical crowd. So the bus stop example can be much more effective if we just tweak a few parameters. A Poisson distribution is generated out of experimental data so let’s adjust our mental picture.

Instead of being the person waiting for the bus, let’s instead picture ourselves sitting on a park bench across the street from the bus stop. In one hand we have a stopwatch and the other a spreadsheet. We can start our experiment any time but let’s say that we begin when a bus arrives. As we observe busses and passengers, we record two things:

  1. The time the bus arrives
  2. The time that each person arrives at the bus stop.

We need to gather enough data for a useful answer, so we’re going to be here for a while. It could be an hour, two hours, twelve, whatever. At some point we get bored and go home to crunch our data. Lo and behold, we discover that the bus interarrival time does in fact average ten minutes but the average wait time is greater than five minutes.

Why is that? Well, from our perspective as an outside observer, this phenomenon makes a lot more sense.  Let’s look at our bus arrivals over a timeline:

bus 1  –  5 mins. – bus 2  – 15 mins.- bus 3 – 10 mins.bus 420 mins.bus 5 and so on…

As an individual waiting at the bus stop we didn’t have this perspective. But when we look at it from outside, we have a better picture of what’s going on. More passengers arrive during the longer intervals than during the short ones. As a result, the wait times for these passengers are going to skew our average wait time, giving us our previously unintuitive result of greater than five minutes.

Uncertainty is part of our lives, so it makes sense that it would show up in math as well. Probability (and statistics) don’t eliminate uncertainty but rathergive us a useful way to acknowledge  and honor uncertainty.

 

#WeHateMath Project Euler 9 – Pythagorean Triplets

A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,

For example, 32 + 42 = 9 + 16 = 25 = 52.

There exists exactly one Pythagorean triplet for which a + b + c = 1000.

Find the product abc.

Let’s get the problem part out of the way first. It turns out to be pretty easy to generate Pythagorean Triplets (sometimes called Pythagorean triples):

Pick two positive integers, m and n, ,where m < n. Generate your three values like so:

Of course, doing this by hand is annoying and this is just the sort of thing for which spreadsheets were made. I set up the formulas and then starting fiddling with values of m and n and it just took a few tries to range in on the answer:

m

5

n

20

a

375

b

200

c

425

Sum(a,b,c)

1,000

Product(a,b,c)

31,875,000

a^2

140,625

b^2

40,000

a^2 plus b^2

180,625

c^2

180,625

Readers know by now that the point of the Project Euler posts is not to simply get the answer to the problem but to figure out the point of the problem. In this case, that’s not obvious. Though Pythagorean Triples are a surprisingly hot topic of discussion among mathematicians if my casual research is anything to go by. I even found a paper documenting a new way to generate triples that suggests an interesting application of the math to cryptology. It’s especially surprising when you consider that these triples have been around for over 2000 years.

The classic Pythagorean triples are (3, 4, 5) and (5, 12, 13). You can generate new triples by using multiples of each element. In our answer above, (375, 200, 425) is a multiple of (3, 4, 5). There are others, however. For example (4, 3, 5) is also a valid triplet but can’t be generated by the traditional methods.

Pythagorean Triples are connected to both Fibonacci numbers and primes, which we’ve discussed previously.. The two classic triples each have Fibonacci values as two of the three values. In addition, up to two of the legs can be prime numbers but because at least one of the legs must be even, there is no triple where all three elements are primes.

This is a great example of pure mathematics that may (or may not) someday find some practical application. I view mathematics as a way to perform experiments on the universe, but unlike traditional laboratory science, my lab bench is conveniently located between my ears. So the next time someone tells you that studying math is impractical, remind them:


#WeHateMath Project Euler 8 – Math Makes Everything Better

Find the greatest product of five consecutive digits in the 1000-digit number.

73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614282806444486645238749
30358907296290491560440772390713810515859307960866
70172427121883998797908792274921901699720888093776
65727333001053367881220235421809751254540594752243
52584907711670556013604839586446706324415722155397
53697817977846174064955149290862569321978468622482
83972241375657056057490261407972968652414535100474
82166370484403199890008895243450658541227588666881
16427171479924442928230863465674813919123162824586
17866458359124566529476545682848912883142607690042
24219022671055626321111109370544217506941658960408
07198403850962455444362981230987879927244284909188
84580156166097919133875499200524063689912560717606
05886116467109405077541002256983155200055935729725
71636269561882670428252483600823257530420752963450

At first glance this appears to be arithmetic which, as we all know, is boring and mechanical and completely beneath us as humans. Well, actually, at first glance the part of our brains that does arithmetic (you know, the boring part) sees this awful number and just wants to shut down. Since I knew it had to be more than just arithmetic, I tucked it in the back of my mind to ferment a bit before tackling it again.

After a bit of thought, I can see the trick here. The problem statement refers to a 1000-digit number but we’re supposed to deal with individual sets of digits. So we can use math to make this more interesting (since math makes everything better) and simply regard this as a string of 1000 digits.

How does this help? First of all, any string of digits with a zero in it we can disregard. In fact, we can discard any ten consecutive digits that have a zero in the middle since any five digit sequence will multiply out to zero. So we look for digits with this pattern:

XXXX0XXXX

Let’s take another look at our number, clearing out digits within four positions of any zero:

731671765XXXX0XXXX19225119674426574742355349194934
969XXXX0XXXXXXX0XXXX23957XXXX0XXXXXX0XXXX478851843
858XXXX0XXXX12949495XXXX0XXXX95833XXXX0XX0XXXX
XXXX0XXXX4715852XXXX0X0XXXXXXXX0XXXX9522XXXX0XXXX7
668966XXXX0XXXX44523161731XXXX0X0XXXX1121722383113
622298934XXXX0X0XXXX336276614XXXX0XXXX486645238XXX
X0XXXX0XXXXXX0XXXXXXXX0XXXXX0XXXXX0XXXXXXX0XXX0XXXX
0XXXX27121883998XXXX0XXXX274XXXX0XXXXXX0XXX0XXXX6
6572XXXX00X0XXXX78XXXX0XXXXXXX0XXXX2XXXX0XXXX52243
52XXXX0XXXXXX0XXX0XXX0XXXX586XXXX0XXXX415722155397
5369781797784XXXX0XXXX51XXXX0XXXX69321978468622482
8397224137XXXX0XX0XXXX0XXXX0XXXX968652414XXXX00XXXX21XXXX0XXXX0XXXX
XX000XXXX2XXXX0XXXX41227588666881
164271714799244429XXXX0XXXX65674813919123162824586
17866458359124566529476545682848912883XXXX0XXX00XXXX
XXX0XXXXX0XXXX6321XXXX0XXX0XXXXXXX0XXXX6XXXX0X0X
0XXXXX0XXX0XXXX554443629XXXX0XXXX79927244XXXX0XXXX
XXXX0XXXXXX0XXXX9133875XXXX00XXX0XXXX99XXXX0XXXX0X
0XXXX116XXXX0XX0X0XXXXX00XXXXX983XXXX000XXXX5729725
716362695618XXXX0XXXX52XXXX00XXXXXXXX0XX0XXXXXXXX0

Okay, I’ve eliminated all strings of digits whose product will be zero so our new string of digits becomes:

73167176519225119674426574742355349194934969239574788518438581294949595833471852952276689664452316173111217223831136222989343362766144866452382712188399827466572785224352586415722155397536978179778451693219784686224828397224137968652142124122758866688116427171479924442965674813919123162824586178664583591245665294765456828489128836321655444362979927244913387599116983572972571636269561852

(I could have written a script to do this for me but pattern-matching is part of my evolution so I can do it myself without much trouble.)

This is a much more manageable number (still 389 digits long, though) but if we’re ultimately going to be doing arithmetic (and it looks like we’ll have to eventually) we have to think about having a machine do the work and that involves explaining the task to a machine in a way that it can understand. But this brings us to a question:

Do we really have to do any arithmetic at all?

A bit of thought tells us that we may be able to avoid arithmetic after all.  Here’s the logic:

Start scanning the string of digits and split off each set of five. For example, if our string was:

73167176

We would pull out the substrings:

73167

31671

16717

67176

Now, remember, I don’t really want to any arithmetic if I can help it so I do a bit of math thinking and rearrange the numbers in sorted order:

Original           Sorted

73167                77631

31671                76311

16717                77611

67176               77661

I can multiply numbers in any order I want so rearranging the digits won’t change the outcome. However, by sorting numerically, the number with the largest magnitude will automatically give me the largest product. 77661 is the largest number in my sequence here but let’s test my hypothesis just to check my thinking:

Original                     Sorted               Product

73167                          77631                882

31671                          76311                 126

16717                          77611                294

67176                         77661                 1764

Sorting has the added benefit of letting us eliminate strings that have the same digits (and thus the same product). So I only need to find the largest five digit number (after sorting) and then get the product of those five digits. I have now knocked my job down to doing a single multiplication and I bet I can get my computer to do even that little job for me if I’m feeling particularly lazy.

So I just whipped up a quick script to dump out 386 separate five digit strings of digits and sort each set of strings numerically. Then I copied and pasted the output into a spreadsheet and did a quick numerical sort to find the largest numerical quantity. Here is my result:

99972

It’s then a simple matter of using my hand-dandy calculator and determining the product, which is 10,206.

So we took a problem that looked like it would require almost 1000 arithmetic operations and knocked it down to a single calculation with just a bit of thought about the conditions of the problem.

If anyone is interested, I’ve posted my script here.

See, math makes everything better!

Project Euler #5 – A Fool Remains

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

 

He who asks is a fool for five minutes, but he who does not ask remains a fool forever.

Chinese Proverb

 

This is an example of why students hate word problems. It’s also an example of why it’s important to practice with word problems.

You see, it’s not just about asking a question. It’s about how the question is framed. Question framing can make a big difference in how easy it is to find the answer. This is related to (but not the same as) the loaded question, which is one of the classic logical fallacies.

So when I come across a problem like this, I try to rephrase the question in such a way that my path to the answer becomes more clear. In this case, the question makes more sense to me when phrased like this:

What numbers can be factored into the first 20 integers? Find the smallest one.

Since I’m lazy, I asked WolframAlpha but it didn’t understand the question. I also considered that multiplying all of the numbers from 1 to 20 together (otherwise known as 20 factorial or 20!) would answer the first part of the question but not the second. (It’s 2432902008176640000, by the way.) (Yeah, probably too big.)

Now, of course, I have a computer that has no problem with mindless arithmetic so I could totally brute-force this by starting at 2520 (since the answer certainly can’t be smaller than that), factoring each number, examining the factors to make sure all required integers are present and so on. But I think there’s a lazier (and hence smarter) way of doing this.

Consider that certain factors automatically get us other factors for free:

20 – gives me 2, 4, 5 and 10

18 – gives me 2, 3, 6, and 9

16 – gives me 2, 4 and 8

14 – gives me 2 and 7

15 – gives me 3 and 5

9 – gives me 3

And so on and so forth. Let’s try that technique with a number we already know, 2520 and the factors from 1 to 10.

10 – gives me 2 and 5

9 – gives me 3

8 – gives me 4

7 – a prime but needs to be in there because we don’t get it anywhere else

6 – got it (2 from 10 and 3 from 9)

5 – got it (from 10)

4 – got it (from 10 via 2 and from 8)

3 – got it (from 9)

2 – got it (from 10 and 8)

1 – duh

So the factors that I care about are 10, 9, 8 and 7. If we multiply these together we get 5040. Not the answer we’re looking for but certainly better than 10! (otherwise known as 3,628,800). My keen eye, however, observes that 5040 is exactly twice 2520, so I have an extra 2 somewhere in my numbers that I don’t need. (I’m going for smallest, after all.) Well, I already get a 2 from the 10 so I don’t need 8. But now I don’t have a 4 (almost sounds like we’re playing Fish) so I’ll substitute to get the factors 10, 9, 7 and 4. Multiplying these together gives us 2520 which is the correct answer.

This is a problem-solving technique I like to use when I want to experiment with solutions. Find a similar, but smaller problem (preferably one where you already know the answer or can easily get to it) and use it as a test case.  (Make sure your logical assumptions are sound, though.)

I think I’m ready to tackle the original problem now. I’m going to use a table so that I can organize my factors more efficiently

 

Factor

Gives me

20

2, 4, 5, 10

19

19

18

3, 6, 9

17

17

16

2, 4, 8

15

3, 5

14

2, 7

13

13

12

2, 3, 4, 6

11

11

10

2, 5

9

3

8

2,4

7

7

6

2,3

5

5

4

2

3

3

2

2

1

duh

Since we don’t get 19,17, 13 and 11 from anywhere else, they have to be part of our final answer. Let’s look at that table again and mark off the numbers we need and don’t need.

Factor

Gives me

20

2, 4, 5, 10

19

19

18

3, 6, 9

17

17

16

2, 4, 8

15

3, 5

14

2, 7

13

13

12

2, 3, 4, 6

11

11

10

2, 5

9

3

8

2,4

7

7

6

2,3

5

5

4

2

3

3

2

2

1

duh

 

So it looks like we just need 19, 18,17,13,11,10,8 and 7. Multiplying these together gives us 465,585,120. A quick calculation at WolframAlpha confirms that the first 20 integers are indeed factors of this number. This seems like a large number but not when compared to 20!, which is  2.43290200817664 × 10^18 or a bit over 2 quintillion.

So that’s definitely an answer, but is it the answer? Based on our experience with the smaller version of this problem, let’s try to substitute 4 for 8 as one of our factors. This gives us 232,792,560 which is not only smaller but is also correct. But can we keep going down? A bit of experimentation shows that with further substitutions cause factors to drop out so that’s no go. So we end up with 19,18,17,14,11,10,4 and 7.

So we looked at a couple of problem-solving techniques that we can add to our intellectual toolkits:

  • If possible, rephrase the question so that it suggests a path to the answer

  • Use a smaller version of the problem to quickly test your potential solutions.

  • As always, use a computer for the boring stuff.

Project Euler #4 – Red Rum, Sir, is Murder

A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 x 99.
Find the largest palindrome made from the product of two 3-digit numbers.

This seems like an odd problem (no pun intended). My goal with this series, if you recall, is not just to solve problems from Project Euler (http://www.projecteuler.net) but to figure out the deeper meaning behind each problem. This time I think the solution to the problem may lie in some deeper thinking about the numbers themselves.
You see, there really is no strictly mathematical significance to palindromic numbers. They are only important to people who do math for fun. (Yeah, I know.) In fact, there’s an entire field of study(?) known as recreational mathematics. For those of you out there who hate and/or fear math, this must sound like a seriously strange hobby only slightly less deranged than those people who collect shrunken heads. You’d think so, but if you’re a fan of Sudoku or other logical puzzles, then you’re a fan of recreational math.
But if we give these poor souls the benefit of the doubt, recreational mathematics is a way to move beyond the strictly technical operations of mathematics and explore the deeper relationships between numbers and our human world.
Anyway, back to considering palindromic numbers. A bit of thought tells us that all single-digit numbers are palindromes, so there are 9 single-digit palindromes. For two digit numbers, there are also 9 palindromes (11, 22, 33, 44, etc). For three digits, it starts to get more complicated but let’s think it out.
Our starting digit must be our ending digit so this gives us 9 possible templates such as 1_1, 2_2, 3_3, etc. The middle number can be anything we want so there are 10 possibilities there (don’t forget 0!) so each of our nine templates can be formed into ten different numbers. So the total number of 9 x 10 or 90 possible palindromic three-digit numbers.
I’m starting to see a pattern here. Maybe we can use this technique to narrow down our possible answers to where we’ll know it when we see it. In other words, what should our answer look like? (This is an excellent technique for real, practical math as well since it lets you recognize the answer when you see it.)
Our number will be a palindrome. (Okay, baby steps first. By the way, recognizing palindromes is one more of those things that humans are much better at doing than computers.)
It will be the product of two 3-digit numbers, as stated. So, the first question I might ask at this point is ‘How many digits will our number have?’ I mean, sure, I could write a program that would multiply every possible pair of 3-digit numbers, check each result for palindromicity (yes, that’s a word….now) and just print that out but where’s the fun in that? So I can say for sure that my answer will have at least five digits [ 100 x 100] and no more than six [999 x 999]. Given that we’re looking for the largest number, we can restrict our search to 6 digits.
Consider, however, that we’re looking for the largest palindromic number. So it seems like a good bet that it will start and end with 9. Combine that with my previous assumption and my number will look something like 9xxxx9 (where each x is some digit between 0 and 9). So this gives us a range between 900,009 and 997,999 so we have almost 98,000 possibilities. This is a large number, sure, but is better than our previous field of over 980,000 so we’ve knocked ninety percent off of our search range. We can also ignore prime numbers (why, boys and girls?) and WolframAlpha tells me that there are 7083 primes in our range so that knocks our search space down by a little bit.
Now WolframAlpha tells me that 900,009 isn’t the product of two 3-digit numbers. So assuming I don’t want to just start multiplying at 100 and go up from there, where do I start? I’m planning on having a computer do the grunt work so I’m not too concerned about how much arithmetic I have to do but I want the solution in my current lifetime. (Netflix isn’t going to watch itself, you know.)
So time for more thinking. Does it really matter where I start? I want a pair of 3-digit numbers that are likely to be a bit less than the right answer because I’m going to let my computer sneak up on the real answer by brute force. So let’s set both numbers to 900. (Sort of the math equivalent of Kentucky Windage. Oh, yes, that’s a thing.) What do I tell my computer? I think the logic should go something like this:

A=900
B=900
C=0
PALINDROME=0

{Keep going until I tell you to stop}
C = A * B
{Is C a palindrome AND bigger than PALINDROME?}
Yes: C becomes the new value for PALINDROME
No: B = B + 1
{Is B = 1000?}
Yes: reset B to 900 and add 1 to A
{Keep doing the above until A = 1000}

Print out our answer

I think we have enough information to jump in and do this now. I created a little script and this was the result:

906609 is the largest palindromic number that is a product of two three-digit numbers (993 and 913).

Just out of curiosity (and being an enormous nerd), I ran the script again with a timer and got:

real 0m26.480s
user 0m11.793s
sys 0m17.230s

For those of you who are interested, here’s a link to the script.

So what did we learn?

  • Recreational math is more common than you think.
  • Humans are still smarter than computers.
  • Putting a little thought on the front end into solving a problem makes for less work on the back end.

The Urn of Destiny Part 2

Destiny is for people who are too lazy to create alternate timelines.
R. Stevens, Diesel Sweeties, 10-05-11

Okay, kids, if you remember from last time when we had that whole bean counting thing? Here’s where we break down the play-by-play and figure out just what was going on there.
So, our goal today is to PROVE that the last bean will always be white and along the way we’ll be able to figure out just what’s going on with that urn.
Remember the rules?

An urn is filled with 75 white beans and 150 black ones. Next to the urn is a large pile of black beans. The beans are removed from the urn according to certain rules.
Remove two beans from the urn at random.
If at least one of the beans is black, place it on the pile and drop the other bean, whether white or black, back into the urn.
But if both of the removed beans are white, discard both of them and take one black bean from the pile and drop it into the urn.

So we can summarize the rules like so, one for each possible pair of beans:

black black -> remove one black bean
white white -> remove two white beans
black white -> remove one black bean
white black -> remove one black bean

Do you see it yet?

The only way we can remove white beans is two at a time. Since there are an odd number of white beans (75), the last bean will ALWAYS be a white bean.
This is what math nerds call a rewrite system. A rewrite system consists of one or more objects (in this case, the beans and the urn) with a set of rewrite rules which take the object(s) from one state to the next. Eventually we will stop with one bean left, so this system is classified as terminating.

How many of you got it right?