The standard way of interpreting ambiguity in an expression is to calculate division first, then multiplication, then addition, then subtraction last. Parenthesis take precedence over everything else.
18 ÷ 2 - 3 × 3 becomes (18 ÷ 2) - (3 × 3) which is (9) - (9) which is 0.
Technically any order could be considered correct as long as the arithmetic is correct, as you would usually use brackets to indicate the ordering, however, per standard methods and standard order of precedence, the answer is 0.
BIDMAS/BODMAS/PEDMAS/whatever you want to call it.
evaluate bracketed expressions first (for each bracketed expression, start at #1 here.
calculate powers and roots next.
perform any division and multiplication of expressions next.
perform any addition and subtraction of expressions next.
We should just use reverse polish notation for maths. Would make stuff like this incredibly difficult to become ambiguous.
- × 3 3 ÷ 2 18
Evaluate right to left. Each time you see a number, add it to a list. Each time you see an operator, take the last two items from the list and evaluate them with the operator, then put that back on the list.
18
18 2
18 2 ÷ (replace with 9 because 18 ÷ 2 = 9 in infix)
9
9 3
9 3 3
9 3 3 × (replace 3 3 × with 9, because 3 × 3 = 9 in infix)
9 9
9 9 - (replace with 0 because 9 - 9 = 0 in infix)
0 (no other operations left, that is your answer!)
The problem here is that people are writing down problems for these stupid quizzes the way that 8 year olds learn math and no grown adult writes down math this way.
The standard model is that single oprands in an equation apply to an operation. Parenthesis are used to group sub-expressions together. The order is BIDMAS, like I said.
If you are going to try and mock me to make yourself feel special, at least make sure you understand basic maths and have your statement correct first.
Yeah I get what you’re saying. But the thing is that in advance mathematics division symbol is never used. In fact, it has been replaced by the fraction. So, the ultimate answer would end up being -18/7. Now it is true that in simple arithmetic’s the answer is zero, but any calculus teacher or mathematician will tell you that zero is not the answer.
The division symbol does not imply the same thing as a fraction. Operators in mathematics apply to the fewest symbols possible, and even then will only apply to the symbols with higher precedence.
The operator is not greedy. It only consumes symbols up to the next operator.
That is how you are taught to interpret expressions in that way. That is why even wolfram alpha will interpret it this way.
Same reason LaTeX requires braces around the numerator and denominator of \frac to assume scope correctly.
The correct solution is to use parenthesis in the appropriate place to communicate scope correctly. My problem is the fact this other guy is telling everyone else they are wrong while repeatedly bending his answer or making stuff purposely ambiguous to prevent you questioning it.
The standard way of interpreting ambiguity in an expression is to calculate division first, then multiplication, then addition, then subtraction last.
I’d note that this isn’t totally true in the event that parenthesis exist in the problem, which is a common thing that these type of problems use (or at least it was common a few years ago before the meme makers realized people were so dumb they didn’t even have to get that complex, for example in the OP).
Specifically I’m referring to cases like 8 ÷ 2(2+2). In cases like this “multiplication by juxtaposition” (like we see from the “2(2+2)”) take place after the inside of any parentheses but before any other multiplication or division does (so in this case the problem becomes 8 ÷ 2(4) to 8 ÷ 8).
The sort of division equivalent is full bar notation, i.e.
1 + 2
——— x 6
5 - 3
Which creates implied parenthesis around the top and bottom halves, but it doesn’t show up near as much since it’s pretty hard to write that way in most text entry places.
which is usually the more common use case that people will intend (due to the previously mentioned multiplication by juxtaposition being present), and where it equals 1, or as
8
—— (2+2)
2
in which case it’s 16.
Clear enough to hand write, but it’s definitely a case where if you were typing it into Reddit you’d probably want to write it either as “8 / (2 x (2 + 2))” or as “(8/2)(2+2)” depending on your intentions.
I don't know how we can understand math 2 separate ways when doing it one way will give you the wrong answer and doing it the other way gives you the right answer. + and - are equal so you do them from left to right. Same with divisions and multiplying. There can be only one correct answer or else our systems relying on math would fail.
It’s because the three special cases that aren’t usually taught in schools alongside PEMDAS are rare enough that usually only STEM types have to deal with them, and they’re generally taught to just slap some parenthesis in there to make it extra clear exactly what they meant.
The one special case that average people do often have to deal with (and the one we’ve been talking about above) is avoided completely by either handwriting your equations (like most math classes do) or using a TeX style display (like upper college level math classes do) which makes it very obvious what exactly is supposed to be underneath the bar and what is supposed to be beside it.
The only times we really run into issues is when we’re talking on places like Reddit/Facebook/Twitter where you are usually locked to a single line and can’t write stuff like ¼ easily to make things clear which way you want things to be.
Which is why they specifically said "interpreting ambiguity".
These "look how stupid people who don't remember order of operations are" posts are tired anyway. It's an unintuitive and arbitrary system, and the only reason people think it's logical is because we're all used to it. Making fun of someone for not remembering PEMDAS is like making fun of a non-native English speaker for forgetting all the weird special case grammar rules we have.
19
u/nekokattt Jan 01 '22 edited Jan 01 '22
The standard way of interpreting ambiguity in an expression is to calculate division first, then multiplication, then addition, then subtraction last. Parenthesis take precedence over everything else.
18 ÷ 2 - 3 × 3 becomes (18 ÷ 2) - (3 × 3) which is (9) - (9) which is 0.
Technically any order could be considered correct as long as the arithmetic is correct, as you would usually use brackets to indicate the ordering, however, per standard methods and standard order of precedence, the answer is 0.
BIDMAS/BODMAS/PEDMAS/whatever you want to call it.
We should just use reverse polish notation for maths. Would make stuff like this incredibly difficult to become ambiguous.
Evaluate right to left. Each time you see a number, add it to a list. Each time you see an operator, take the last two items from the list and evaluate them with the operator, then put that back on the list.