Saturday, March 22, 2014

Peanut wrapper

I was on a flight some time ago and noticed the following on the wrapper of my bag of peanuts:


The second line seems kind of redundant, no?



Wednesday, March 19, 2014

Recycling

I was talking to someone about the deposit we can get from soda cans and bottles when we returned them to the store for recycling and she remarked that the containers do a good job telling us that they are worth some money, because on the cans are written the words "ME 5¢".   Sometimes the messages are quite friendly; on one bottle it says "HI ME 5¢".

Sunday, March 16, 2014

Multiplication tricks

When I was a young boy I was shown the following trick to square certain numbers very quickly.  In particular, given a 2-digit number where the unit digit is 5, the square of this number can be easily computed with the following rule:

If the tens digit is $a$ and the unit digit is $5$, the square can be found by computing $a(a+1)$ and appending $25$ to the result.  

For instance $75^2$ is computed by multiplying $7$ and $8$ ($= 56$)and adding $25$ at the end to get $5625$.  This also work with $3$-digit numbers (and longer numbers).  For instance, to compute $115^2$, we compute $11\times 12 = 132$ and get $13225$.

To show why this is true is a simple exercise. A number with tens digit $a$ and unit digit $5$ is equal to $10a+5$.  Squaring this number results in $(10a+5)^2 = 100a^2 + 100a + 25 = 100a(a+1) + 25$ which corresponds to the rule above.

This same argument is true when multiplying two 2-digit numbers where the tens digits are equal and the unit digits add up to 10.  In this case we are multiplying $10a+b$ and $10a+c$ where $b+c =10$.  The product $(10a+b)(10a+c)$ is equal to $100a^2+100a+bc = 100a(a+1)+bc$. So the corresponding rule is:

Multiply $a$ with $a+1$ and append $bc$ at the end.  

The only caveat is that when $b=1$ and $c = 9$, you append $09$ (rather than just $9$) at the end. For instance to compute $83\times 87$, we get $8\times 9 = 72$ and append $3\times 7$ to get $7221$. Similarly for $124\times 126$, we compute $12\times 13 = 156$ and append $24$ to get $15624$.

You can use a similar trick to multiply two 2-digit number where the tens digits add up to 10 and the unit digits are the same, i.e. multiplying $10b+a$ with $10c+a$ where $b+c = 10$. The product is
$$(10b+a)(10c+a) = 100bc + 100a + a^2 = 100(bc+a) + a^2$$
Thus the corresponding rule is:

Multiply $b$ with $c$, add $a$ and then append $a^2$ to the result.

Again, if $a^2$ has only one digit, prefix it with a $0$ before appending it to $bc+a$.  For example, to compute $43\times 63$, we compute $4\times 6 + 3 = 27$ and append $3^2 = 09$ to obtain $2709$.

Sunday, March 9, 2014

Beyond superlatives

My son and I went skiing the other day and he asked me why double black diamond trails which are billed as "Extremely difficult" are more difficult than black diamond trails which are described as "Most difficult". He said, "How could there be something more difficult than 'most difficult'?"   Is "most difficult" more difficult or less difficult than "extremely difficult"? According to the New Oxford American Dictionary, "most" is defined as "greatest in amount or degree", whereas "extreme" is defined as "reaching a high or the highest degree".  So there is a sense where "extremely difficult" is the same as "most difficult", but there is an interpretation of the definitions where "extremely difficult" is less difficult than "most difficult".  Perhaps the wording in the ski resorts should be changed to more clearly indicate which trails are more difficult.

Wednesday, March 5, 2014

Fractals in a fairy tale

We were all watching the Oscars last Sunday and my son and I noticed that the song "Let it go" from the movie Frozen mentions fractals.  Fractal is a mathematical term and we were quite surprised but delighted to see it used in a children's song.  One of the most famous fractals is the Mandelbrot set, named after Benoit Mandelbrot, the father of fractals.  When I got my Commodore VIC-20 in the 1980's, my brother and I (and I am sure countless other kids playing with their personal computers) wrote a program to compute the Mandelbrot set, and zoom in and display various sections of it, (not knowing that 15 years later, I will work at the same place where Mandelbrot worked and have a chance to have lunch with him on several occasions).  At the time, it takes hours to compute a picture of the Mandelbrot set.

The definition of the Mandelbrot set is quite simple.  Points on the plane correspond to complex numbers and each point is used as a parameter $c$ in the equation $x_{n+1}= x_n^2 + c$.  The iterates $x_i$ starting from $x_0 = 0$ remain bounded if and only if $c$ belongs to the Mandelbrot set.  Since it may take many iterations before the iterates start to diverge, practically the computer program assumes the iterates are bounded if it hasn't diverged after a large number of iterations.