Monday, August 14, 2017

Views from the Abyss #60: Order of Operations

In a recent bulletin, there was an hilarious joke about a programmer, and his wife's inability to communicate simple instructions. It served as an introduction to how our ability to think evolved in service of our ability to communicate, or how both were byproducts of a more useful ability to conceptualise, whatever it was we finally concluded. Ian Dury is still out on that one.

It occurs to me in hindsight that it also serves to illustrate the importance of mathematical orders of operations.

Consider the following simple maths puzzle:

2 + 3 x 5 = ?

If you answered '25', then congratulations, you are the programmer in the joke. You can follow simple instructions pedantically, even if they make no sense (you see, in this scenario, the programmer is the one who is foolish).

If you answered '17' (as my six year old niece correctly did), then congratulations, you can pedantically follow slightly more complex instructions, even without understanding their reason for existing.

But there is a reason for this order of operations to exist—real world application. How so? Because in any real world situation, there would be no left to right calculations of abstract numbers—each of those numbers would represent something real, and the order they appear would not be important.

As such, the order of operations makes the actual order irrelevant.

Think of it this way:

2 + 3 + 5 = 10
3 + 2 + 5 = 10
5 + 2 + 3 = 10
etc.

With addition, the order is irrelevant. Now let's try another:

2 x 3 x 5 = 30
5 x 3 x 2 = 30
3 x 5 x 2 = 30
etc.

With multiplication, the order is irrelevant. Let's try mixing them the wrong way:

2 + 3 x 5 = 25
2 + 5 x 3 = 30
5 x 2 + 3 = 23
etc.

Bollocks. The order totally changes things. That's no good, but how did it happen? Well, it wouldn't happen in the real world.

Let's pretend the numbers are bananas. Actually, no. Let's pretend they're strawberries.

You have a small tub with 2 strawberries in it, another with 3, and another with 5. If you pour all of them out on the table, it doesn't matter which order you do so because it will all amount to the same number of strawberries—10.

2 + 3 + 5 = 10
[**] [***] [*****] = **********

Now, imagine a small tub containing 2 strawberries. You have 3 such tubs—each with the same content—sitting inside a large tub. And you have five of the larger tubs which also all have the same content. So each of the five large tubs contains 3 small tubs, and each of the small tubs contains 2 strawberries. If you pour them all out, you will find there are 30 strawberries, but you would have the same result if it was 2 large tubs containing 5 small tubs containing 3 strawberries each, or 3 large tubs containing 2 small tubs containing 5 strawberries each.

2 x 3 x 5 = 30
( [**] [**] [**] ) ( [**] [**] [**] ) ( [**] [**] [**] ) ( [**] [**] [**] ) ( [**] [**] [**] )  =
******************************

So when you see the original maths question, what you actually have is a small tub with two strawberries, and a large tub containing either 3 tubs with 5 strawberries each, or 5 tubs with 3 strawberries each.

2 + 3 x 5 = 17
[**] ( [*****] [*****] [*****] ) = *****************
[**] ( [***] [***] [***] [***] [***] ) = *****************

I don't remember ever studying them this way in maths class, because I was 4 years old at the time.

No comments:

Post a Comment