4 ms·
6÷2(1+2)=?
- brodney 14y agoIs it 1+3 or 1+2? Title does not match content.
- StevenXC 14y agoThanks for the catch!
- ColinWright 14y agoI blogged about this nearly two years ago: http://www.solipsys.co.uk/new/AMatterOfConvention.html?HN http://www.solipsys.co.uk/new/AMatterOfConvention.html?HN
- ari_elle 14y agoNice, i would have said 9 just because that's how C interprets it. float x = 6 / 2 * (2 + 1); // x == 9
- beatgammit 14y agoRight, but you also had to explicitly add the asterisk for multiplication. I thought the same thing, but the remarks on juxtaposition do have a point. For example, if an integer were callable, you'd do the function call--2(2+1)--independantly of the division.
- StevenXC 14y agoYeah, tale as old as time, right? It's making the rounds on social media currently, so I thought it was relevant. I agree with your interpretation FTA: > DON'T DO THIS! > It's ambiguous, and should not be written like this because it leads to problems.
- s800 14y agoThat "divide-by" symbol can suck my left nut.
- latimer 14y agoAccording to Google, it's 9 https://www.google.com/search?q=6%C3%B72(1%2B2) https://www.google.com/search?q=6%C3%B72(1%2B2)
- Aloisius 14y agoWouldn't it have been easier to just express this question as 6/2*3? The addition part doesn't seem to add anything to the point of the article (no pun intended).
- StevenXC 14y agoThe question is taken from a Facebook post making the rounds. The parentheses are important however, as they introduce a new ambiguity: does the implied multiplication from the open parenthesis trump the division symbol on the left? Put another way, does it fall into the Parentheses section or the Multiplication section of the PEMDAS order of operations? (Or whatever mnemonic your country uses.)
- Aloisius 14y agoWhy would the multiplication fall in the parenthesis section when it clearly isn't in a set of parenthesis? 6÷2(1+2) expands to 6÷2*(1+2). The items inside the parenthesis first and there should be no ambiguity about that.
- baddox 14y agoObviously, the author is right that there is no universal objective definition of the order of operations. Still, I find it surprising that anyone with a high school level mathematics education would perform the division via the obelus (÷) before the multiplication via juxtaposition.
- ulyssesgrant 14y agoIn high school (and college) I've always been taught that multiplication and division have equal precedence and should be evaluated in the order in which they are encountered.
- baddox 14y agoWas multiplication by juxtaposition ever mentioned explicitly? I was taught to give them equal precedence, but that was explicitly for the division symbol and the multiplication symbol (* or x). Juxtaposition, like 2x or 2(2+1), was always considered to have greater precedence than the division and multiplication symbols.
- Semaphor 14y agoNope, never heard that in my 13 years of school in Germany.
- DrJ 14y agoalso note that the author skips the multiplication operator. Especially odd (to me) since he is using parenthesis to imply multiplication and the values are not variables but values.
- baddox 14y agoIf the expression were 6÷2x(1+2)=?, then my intuition would be to evaluate from left to right (division before multiplication). But removing the x symbol makes me want to perform the multiplication via juxtaposition first, just like if it were 6÷2x. Would anyone really interpret 6÷2x as 3x? note: I had to use an x instead of the asterisk to represent multiplication, since I don't know how to escape the asterisk in Markdown.
- braum 14y agoI was taught to handle parenthesis first before multiplication or division so the answer is clear to me to be 1.
- robryan 14y agoYou handle the contents of the parenthesis first. 2(3) is just shorthand for 2*3 so you would handle the division and multiplication in the order given.
- andrewmunsell 14y agoWell, is the implied multiplication technically part of the parenthesis, though? I've always been taught the stuff inside the parenthesis takes precedence, but outside is irrelevant because it's not technically "part" of the parenthesis statement. It's like how programming works: 6 / 2 * add(1, 2) This would obviously evaluate to 9, because the "add" function would simply return a value and the rest of the statement would be evaluated from left to right. In this case, the first 2 is not related to the "add" function in any way.
- poindontcare 14y agohttp://www.wolframalpha.com/input/?i=6%C3%B72(1%2B3)&t=crmtb01 http://www.wolframalpha.com/input/?i=6%C3%B72(1%2B3)&t=c...
- andrewmunsell 14y agoRather: http://www.wolframalpha.com/input/?i=6%C3%B72%281%2B2%29 http://www.wolframalpha.com/input/?i=6%C3%B72%281%2B2%29 Of course, this is because it's evaluated left to right and the implied multiplication doesn't get put "under" the division.
- Samuel_Michon 14y agoI think you meant: http://www.wolframalpha.com/input/?i=6%C3%B72%281%2B2%29 http://www.wolframalpha.com/input/?i=6%C3%B72%281%2B2%29 But that's just how WolframAlpha does it. The article is about the ambiguity in the mnemonic we're taught in school. I thought the correct answer was going to be '1'.
- sil3ntmac 14y agoI have never understood why you would process multiplication and division as separate reduction steps, besides for simplification in elementary-school learning materials. It seems completely arbitrary. Division is just multiplying by an inverse, and subtraction is just adding negative numbers. PEMDAS seems like something that is taught to you, and then never correctly explained.
- taproot 14y agoBEDMAS (what I was taught in school) really throws some confusion in there concerning PEMDAS. Heh. We've started using PEMA in NZ to lessen confusion. I assume they go on to explain where division / subtraction went.
- armadillowarran 14y ago6/2(1+2)=6/2*(1+2)=6/2*3=(6/2)*3=(3)*3=9 This is pretty well defined, I feel: - Expand implicit multiplication to explicit multiplication (e.g. 2(1+2) becomes 2*(1+2)) - Left-to-right precedence for operators of equal-precedence (divide and multiply) The 2 is no more bound to the parenthesis than it is to the division operator. Am I missing something?
- gizmo686 14y agoWhen you have 6/2(3), it is not well define if the correct expansion is 6/(23) or (6/2)3. In my experience with math, the intuitive answer is that implicit multiplication takes precedence. For example, say instead of 6/2(3), you had 6/2x. Following your convention, that would expand to (6/2)x, not 6/(2x). You might say that the () around the last number make a difference. However that would imply that 6/2x!=6/2(x). Which I find deeply unsettling if true. Ultimitly, this is why we tend to use notation which uses placement to resolve these issues unambiguasly, without alot of parentheses.
- armadillowarran 14y agoI find it interesting you feel this way. In my experience, it is pretty well defined: 0. Evaluate (the inside of!) parenthesis, then 1. Evaluate exponentials, then 2. Evaluate division and multiplication operators, left to right e.g. 1 / 2 * 3 / 4 = (1/2) * 3/4 = ((1/2)*3)/4 3. Evaluate addition and subtraction operators, left to right Your issue seems to stem from the left-to-right concept (in order in which operators are encountered as you read, left-to-right). Your example of 6/2x to me is clearly (6/2)x. What is 1/2x ? In my experience, textbook authors/professors/math teachers tend to be disambiguous and either use the horizontal line for clarity or use parenthesis. I attended public schools in Ontario, Canada if it makes any difference. Edit: Oh yeah, also I have never felt that implicit operators would take precedence. Interesting!
- rubbingalcohol 14y agoIt's funny because in other interpretations the "%" symbol evaluates to the modulus operator and this brings up another possible result. 6 mod 2(1+2) = 6 mod 6 ~= 0 mod 6
- drivebyacct2 14y agoThe way you know this question is dumb? It was written by someone who either doesn't understand how to write math to be readable, or was written by a troll. The use of that division sign, ironically, doesn't make it any easier to determine, although there's surely a subset of FB idiots (the same that would waste time on this in the first place) that wouldn't understand it written as 6/2(1+2).
- d0m 14y agoYou wasted time on this by writing this comment.. not sure why you're discriminating others as idiots.
- drivebyacct2 14y agoI'm 96% sure you missed the point of my post.
- yaakov34 14y agoI don't understand his idea of comparing the independence of the Continuum Hypothesis from the other axioms of set theory, which is a very deep and important result about (in essence) one of the limits of mathematical reasoning, with this little notational difficulty, which frankly is of very little interest, especially to mathematicians (you do run into this when writing parsers, sometimes...) He actually manages to say that this is "as stupid as" asking for a proof of the Continuum Hypothesis. Reminds me of people who get hung up on whether 1 is a prime number. Yes, no, maybe - people have defined it this way and that, it's a convention you can make without changing anything fundamental about mathematical reasoning. Different systems of axioms lead to very different mathematical objects (compare Euclidean and non-Euclidean geometries). Different conventions lead to the exact same thing written slightly differently - if we say that clockwise rotation corresponds to positive change in angle (the opposite of current convention), we'll exchange plus and minus signs in a bunch of formulas, and nothing else.
- StevenXC 14y agoMy (intended) implication was that answering the question > What is 6÷2(1+2)? without establishing the axioms of arithmetic is as impossible as answering > Does CH hold in ZF? without establishing some axioms of set theory. Put another way, asking 6÷2(1+2) on the SAT is as ill-advised as asking an Introduction to Proofs course to tackle the Continuum Hypothesis with just some naive set theory.
- yaakov34 14y agoAgain, I think that's a very bad comparison - resolving this difficulty is not "impossible". You can choose whatever convention you like, and all that changes is the notation. Of course it's a bad test question, but it is not "impossible" or even remotely difficult for mathematics - it's just a matter of choosing a notation. You seem to think that this question has something to do with the "axioms of arithmetic" - no, it doesn't, it's a matter of how you write things by convention. Operator precedence is not and has never been an "axiom". We can define plus to have the highest precedence, and get the exact same arithmetic we have now, written differently. On the other hand, deciding the Continuum Hypothesis is "impossible" in a very fundamental way - Kurt Godel and Paul Cohen, two of the greatest mathematical logicians in history, proved that the Continuum Hypothesis is undecidable by mathematical reasoning as we can best formulate it, i.e. it is independent of the ZFC axioms. That's not a matter of choosing a notation for it.
- Kaivo 14y agoWhen converting it from infix to postfix, it returns 6 2 / 1 2 + * which returns 9. I prefer this point of view.
- Datsundere 14y agoIt's one. He himself said parenthesis takes precedence. So: 6 / 2(3) <== Parenthesis still there 6 / 6 1
- taproot 14y agowooosh -- It's 9, you've added some invisible brackets in there. 6 / 2 * (1 + 2) 6 / 2 * 3 3 * 3 9
- grannyg00se 14y ago(/ 6 (* 2 (+ 1 2))) The answer is 1. (* (/ 6 2) (+ 1 2)) would give nine but c'mon...that multiplication way over on the left came outta nowhere.
- mseepgood 14y agoI prefer 6 2 1 2 + * / and 6 2 / 1 2 + * notation.
- naftaliharris 14y ago> In the real world of mathematics, this is as stupid a question as me asking “Is there a mathematical size bigger than the amount of integers but less than the amount of real numbers?” [1] because you can’t answer it without going through a lot of trouble to specify the “axioms” (basic assumed rules for doing mathematics) you want used on the problem. I don't think this analogy holds very well--a curious student could reasonably and earnestly ask about the continuum hypothesis, since it's not at all obvious from first principles that the answer depends so heavily on obscure set axioms. On the other hand, the order of operations question seems to have been designed to confuse people and stir up meaningless, unresolvable arguments over PEMDAS.
- d0m 14y ago>> The issue stems from the incorrect (but often subconscious) belief that there exists a Bible of Mathematics somewhere Well, yes, I thought so. Most mathematical expressions are pretty standard and I'm surprising that there is no a definitive answer to this question. The way I see it is: 6/2(1+2) 6/2(3) 6/2*3 3*3 9 If I wanted to apply 23 first, I'd write: 6/(23). Maybe I thought like that because that's how all calculators I've used work.
- baddox 14y agoI am very surprised that people would evaluate the multiplication via juxtaposition after the division symbol. According to that method, 6 ÷ 2x would be evaluated as 3x, which I find extremely unlikely to be the intention of that expression.
- d0m 14y agoWell, 6 ÷ 2x is similar to: 6 __ 2x You've explicitly put spaces around it. However, if you look at it like: 6/2*x Does 3x seems that unlikely?
- baddox 14y agoAgain, my point is that my interpretation depends on whether it's multiplication via the multiplication symbol, like 6/2*x, or multiplication via juxtaposition, like 6/2x.
- deleted 14y ago[deleted]
- lucb1e 14y agoThe title (on his website) contains the wrong formula. I've skimmed the post a few times, wondering why the correct answer wasn't twelve... Then I saw it :/
- Zenst 14y agoComputers will conclude the answer is 1 as they will prioritise the multiply. Now us humans will get 9 as they will do the 6/2 and then multiply the result with the (1+2) for 3x3. Now given the multiply is implied and computers like to have that symbol in many languages and the divide sign as again a form not overly used in programming languages, then it is clearly expressed in a form for human consumption. With that we imply the 6 divided by 2 is in its own bracket and will think it is 9, then we will think again if we know computers and then think 1. Moral being whilst lots of brackets and braces can look untidy, they do clarify beyond doubt.
- andrewmunsell 14y agoNo, they won't. Computers will compute it as nine because they evaluate the parenthesis, then go left to right. 6 / 2 (1 + 2) 6 / 2 * 3 3 * 3 9
- EllaMentry 14y agoThis is not mathematics, this is symbol manipulation. The author is correct, the answer here is that it is a badly expressed problem - with multiple possible solutions depending on the assumptions the audience makes. In mathematics allowing your audience to make assumptions is very very bad...people are terrible at making and applying assumptions - just look at any studies into eye witness testimony. Machines are just as bad, as they are loaded with assumptions of their programmers. As a Computer Scientist, I absolutely hate coming across badly expressed formulas. Abstraction is key - why are there parentheses around the 1+2, what makes those separate...why not just write 3?? - In fact there are no variables in this problem, it is constant, just give me the constant...or tell me why you have defined it this way. Implicit operations and ordering may save you a couple of characters but generate essays worth of confusion.
- montogeek 14y ago1
- ibotty 14y agojust as a data point: as google, wolfram alpha (a mathematica "frontend") interprets it as (6/2)*(1+2). https://www.wolframalpha.com/input/?i=6÷2(1+2)&dataset= https://www.wolframalpha.com/input/?i=6÷2(1+2)&dataset= (and even with a variable juxtapositioned it's interpreted like that.) but right, that's no real metric for mathematical use. (i still think the result is 1.)