to your HTML Add class="sortable" to any table you'd like to make sortable Click on the headers to sort Thanks to many, many people for contributions and suggestions. Licenced as X11: http://www.kryogenix.org/code/browser/licence.html This basically means: do what you want with it. */ var stIsIE = /*@cc_on!@*/false; sorttable = { init: function() { // quit if this function has already been called if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); if (!document.createElement || !document.getElementsByTagName) return; sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; forEach(document.getElementsByTagName('table'), function(table) { if (table.className.search(/\bsortable\b/) != -1) { sorttable.makeSortable(table); } }); }, makeSortable: function(table) { if (table.getElementsByTagName('thead').length == 0) { // table doesn't have a tHead. Since it should have, create one and // put the first table row in it. the = document.createElement('thead'); the.appendChild(table.rows[0]); table.insertBefore(the,table.firstChild); } // Safari doesn't support table.tHead, sigh if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; if (table.tHead.rows.length != 1) return; // can't cope with two header rows // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as // "total" rows, for example). This is B&R, since what you're supposed // to do is put them in a tfoot. So, if there are sortbottom rows, // for backwards compatibility, move them to tfoot (creating it if needed). sortbottomrows = []; for (var i=0; i
PEMDAS, or rather, the mathematical order of operations is in the news!
PEMDAS is an acronym that stands for "Parentheses, Exponents, Multiplication and Division, Addition and Subtraction", for which many math students use the mnemonic "Please Excuse My Dear Aunt Sally" to remember when solving math problems that involve performing multiple operations.
And it has been in the news quite a lot lately. The New York Times (NYSE: NYT) has featured two stories about a viral Twitter post involving it within the last week, not to mention its role in how government officials in the South American nation of Guyana sought to overturn the outcome of a December 2018 no-confidence vote and stay in power by misapplying it but failed, although that latter story is not something any reader who relies on the editorial decisions of the New York Times to learn about what is happening in the world would know much about because the financially troubled newspaper chose to not cover it.
Since they care more about what people talk about on Twitter, let's look at the tweet:
i do parenthesis, multiplication, then division so i believe it’s 1
— ##semi ia (@m8nie) July 28, 2019
This seemingly simple math problem has become a viral social media phenomenon because it so ambiguously written, it can lead people to one of two results, either 16 or 1, depending on how one interprets how to determine the order in which its arithmetic operations are to be performed. Cornell math professor Steven Strogatz describes this in the second NYT article on the tweet:
The issue was that it generated two different answers, 16 or 1, depending on the order in which the mathematical operations were carried out. As youngsters, math students are drilled in a particular convention for the “order of operations,” which dictates the order thus: parentheses, exponents, multiplication and division (to be treated on equal footing, with ties broken by working from left to right), and addition and subtraction (likewise of equal priority, with ties similarly broken). Strict adherence to this elementary PEMDAS convention, I argued, leads to only one answer: 16.
Nonetheless, many readers (including my editor), equally adherent to what they regarded as the standard order of operations, strenuously insisted the right answer was 1. What was going on? After reading through the many comments on the article, I realized most of these respondents were using a different (and more sophisticated) convention than the elementary PEMDAS convention I had described in the article.
In this more sophisticated convention, which is often used in algebra, implicit multiplication is given higher priority than explicit multiplication or explicit division, in which those operations are written explicitly with symbols like × * / or ÷. Under this more sophisticated convention, the implicit multiplication in 2(2 + 2) is given higher priority than the explicit division in 8÷2(2 + 2). In other words, 2(2+2) should be evaluated first. Doing so yields 8÷2(2 + 2) = 8÷8 = 1. By the same rule, many commenters argued that the expression 8÷2(4) was not synonymous with 8÷2×4, because the parentheses demanded immediate resolution, thus giving 8÷8 = 1 again.
The implicit multiplication in this case may be appropriate because the presence of the parentheses without any intervening arithmetic operator or additional sets of parentheses to clarify otherwise, indicates that the distributive property of multiplication should be applied to this portion of the problem, where the 2 outside the parentheses is part of that grouping within the problem and should be processed along with the math inside the parentheses. To see how that works, let's substitute variables for the numbers in the problem:
a ÷ b(c+d)
For the implicit multiplication, we effectively assume a second set of parentheses contains this portion of the math:
a ÷ (b(c+d))
We would then apply the distributive property of multiplication to obtain the following result, which removes the innermost set of parentheses:
a ÷ (bc+bd)
When we substitute the values for the letters back into this problem and then perform the math inside the parentheses according to the explicit order of operations, we will get 1 as the result.
But should we have to rely on this kind of implicit understanding for processing the math in this problem? Whoever wrote the math presented in this tweet could have saved anyone tasked with doing the math a lot of time and trouble if they had simply included an additional set of parentheses to clarify their intent.
Strogatz makes that exact argument:
Much as we might prefer a clear-cut answer to this question, there isn’t one. You say tomato, I say tomahto. Some spreadsheets and software systems flatly refuse to answer the question — they balk at its garbled structure. That’s my instinct, too, and that of most mathematicians I’ve spoken with. If you want a clearer answer, ask a clearer question.
Would it really be so hard to add additional sets of parentheses or brackets to the problem to better clarify how the order of operations should be applied?
Labels: math
Welcome to the blogosphere's toolchest! Here, unlike other blogs dedicated to analyzing current events, we create easy-to-use, simple tools to do the math related to them so you can get in on the action too! If you would like to learn more about these tools, or if you would like to contribute ideas to develop for this blog, please e-mail us at:
ironman at politicalcalculations
Thanks in advance!
Closing values for previous trading day.
This site is primarily powered by:
The tools on this site are built using JavaScript. If you would like to learn more, one of the best free resources on the web is available at W3Schools.com.