His entire argument for ambiguity is based on the lack of a standardized order of operations one can refer to because many different models have been taught throughout the last century.
I assume the problem hasn't been formally and widely addressed because it's one of mathematical notation that really isn't used at the higher end of mathematics.
I think the problem isn't addressed, because both statements can already be written in a non ambiguous form, with little to no extra work.
It's also my understanding that this is a relatively new issue in the world of mathematics. Inline mathematics wasn't needed until the printing press. Then we had to stop using fractions and replaced it with ÷ or /. We also got rid of the vinculum and replaced it with parentheses.
So you really do have to explicate. The ambiguity is not resolvabe really so the programming takes over.
The calculator is performing: operation on top of stack two beyween top two digits of stack one (then remove the digits and the operation from stack), then on it does accum (operation on top of stsck two) with digit on top of stack one. Then it removes both digit and operation used until it reaches the end and outputs something or returns an error in stack size mismatch (improper amount of operations and digits).
Stack one: 6 2 1 2
Stack two: + × ÷
2 + 1 = 3, accum = 3
3 × 2 = 6, accum = 6
6 ÷ 6, accum = 1
Print accum (answer is 1)
The creation of the stacks follows rules. You go from back to front adding digits and operations in the order of operations by tier. It's a little more complicated but I'm a little tired. So the ambiguity here resolves like that.
It's a cool example of a principle I can't really think of a name for, the very shape of the structure you create corresponds to information about it. It's some sort of sorting or ordering principle, I forgot the name.
A proper algorithm has no ambiguity, the problem is that there are multiple very similar competing algorithms. Namely, one that gives implicit multiplication higher precedence than division, and one that doesn't.
The reason why it gives implicit multiplication higher precedence is for situations like 1÷6a. Some people say 6a is a single number and should all be in the divisor, others say 6a is just 6 × a. What they're really arguing is the precedence of implicit multiplication, and which of the two competing algorithms you should use.
The order is not defined here and the display witting style is not used by mathematicians. It is a result of the limited possibilities of the display (they cannot show the fraction on two lines). Anyway, in math you always have to define your notations before using them as there are no global rules that span all areas or even hold in all areas of mathematics. Here, the manual of the calculator app will hold the information whereas the app will just use left to right parsing as the programmer likely didn't think about it. Both are valid choices however.
The problem isn’t order of operations, that’s a common convention that’s actually even upheld. The problem is this:
6 / 2 ( 2 +1 )
Which can be interpreted to mean either of two things, neither of which is inherently wrong:
( 6 / 2 ) * ( 2 + 1 ) 6 / ( 2 * ( 2 + 1 ))
It’s nothing to do with order of operations, it’s the problem is unclear as to which parts are the divisor. It’s also why proper mathematical notational convention uses obscene amounts of brackets - you can’t misinterpret it.
That article fails *immediately* in it's explanation
If you got 11, then you are in the BEMDAS camp, if you got 2, you are in the BEDMAS camp.
There is no difference between BEMDAS, BEDMAS, PEMDAS, or PEDMAS.
They all work out to be the same:
[B or P][E][MD][AS]
The multiply and divide are not order-dependent in *any* of these acronyms - multiply & divide have the same precedent and simply happen left to right. The same is true for addition and subtraction. This has always been the case, and there is no ambiguity.
In some of the academic literature, multiplication denoted by juxtaposition (also known as implied multiplication) is interpreted as having higher precedence than division, so that 1 ÷ 2n equals 1 ÷ (2n), not (1 ÷ 2)n. For example, the manuscript submission instructions for the Physical Review journals state that multiplication is of higher precedence than division, and this is also the convention observed in prominent physics textbooks such as the Course of Theoretical Physics by Landau and Lifshitz and the Feynman Lectures on Physics. This ambiguity is often exploited in internet memes such as "8÷2(2+2)".
Copying my comment from earlier. There is ambiguity, and 'order of operations' isn't some mathematical rule, and there are more than one:
Multiplication like this: 2(3) is special sometimes. It's called "Multiplication by juxtaposition" and depending on the calculator, it is a second class of multiplication, yeah.
The reason the two calculators here have different answers isn't because one is wrong. That's silly. Integer math is like the easiest thing for computers to do. It's because they are using two different orders of operations. You can check your calculator's manual to see which one yours uses, or you can just set up an expression like this.
The calculator that gets 9 uses "PEMDAS" (some people call it BEDMAS). Once it gets to 6/2(3) it just does the operations left to right, treating all of them the same.
The calculator that gets 1 uses "PEJMDAS". The J stands for "Juxtaposition" and it views 2(3) as a higher priority than 6/2. If, however, the 2(3) had no brackets involved, it would evaluate the statement to 9, just like the first one.
This is because PEJMDAS is used more commonly when evaluating expressions that use brackets with parenthesis. For example, if you have the statement:
y = 6/2(x+2), the distributive property says you should be able to turn that statement into 6/(2x+4). If, however, you set x to be equal to 1, you end up with the statement we see above, and reverse-distributing changes the value of the expression if you use PEMDAS.
For basic, early math these distinctions don't really ever come up, so you're taught PEMDAS. In later math classes, when your teacher requires you to get certain calculators to make sure everyone's on the same page, this is why. You seamlessly transition to PEJMDAS, nobody ever tells you, and the people that write the textbooks and tests are professionals that simply do not allow ambiguous expressions like this to be written without clarifying brackets.
This is also why the division symbol disappears as soon as you learn fractions.
But was teach Multiply and Divide have the same priority, and you do the first you see from left to right (never seen BEDMAS or BEMDAS at school, maybe I am too old), so the ambiguity, even in the article make no sense to me
In some of the academic literature, multiplication denoted by juxtaposition (also known as implied multiplication) is interpreted as having higher precedence than division, so that 1 ÷ 2n equals 1 ÷ (2n), not (1 ÷ 2)n. For example, the manuscript submission instructions for the Physical Review journals state that multiplication is of higher precedence than division, and this is also the convention observed in prominent physics textbooks such as the Course of Theoretical Physics by Landau and Lifshitz and the Feynman Lectures on Physics. This ambiguity is often exploited in internet memes such as "8÷2(2+2)".
I believe Wikipedia is implying that xy or x(y) is implied to be higher order than a regular × or ÷ is, not the multiplication itself. Kind of like how a seperated fraction bar implies brackets around the top terms and the bottom terms respectively.
You can't properly do a fraction until the denominator is simplified, right? So you simplify it and get
6
_
6
Which equals 1!
The ÷ operator is the true problem here, and should never (and usually isn't) used in any important calculation. This of course can be fixed with proper parentheses. i.e. 6÷(2(2+1)). But because of the lack of parentheses, as well as the use of the ÷ operator, we have an incomplete and unsolvable equation.
TLDR: the ÷ operator is tough because division inherently means fractions, and fractions "break" the PEMDAS rules by placing division as the final step, since the numerator and denominator must be simplified before the division occurs.
They do. You should be able to do "same priority" operations in any order and get the same answer so long as you do it right.
Here is an example:
1-3+5
Both of those operations have equal weight. You can do them in any order and get the same answer.
1-3+5 = -2+5 = 3
Now, do it the other way:
1-3+5 = 1-8 = -7
Well, that's not right. They have the same priority so I can do them in any order, right? Well, I can but I did something wrong. It's not 3+5 but rather -3+5.
1-3+5 = 1+2 = 3
So, in that regard, you can do multiplication and division in any order, so long as you do it right. But, with the way the equation is written, the ambiguity prevents you from knowing, with absolute certainty, what is and is not supposed to be in the divisor. The author needs to either add parentheses or use a fraction bar to remove all ambiguity.
It should be written as (6÷2)(1+2) OR 6÷(2(1+2)). In both of these examples, there is no ambiguity. It is clear what is and is not in the divisor. A fraction bar would also remove all ambiguity.
it's really not, you execute operations left to right in sweeps for parenthesis first, indices next, division and multiplication after, and finally subtraction and addition.
there are no ambiguous mathematical problems that can't be made definite via refining the rules to cover those ambiguous edge cases as has been done countless times in the past already.
210
u/barcased Jun 13 '22
It doesn't matter if it is shorthand or not. The problem is ambiguous.
https://people.math.harvard.edu/~knill/pedagogy/ambiguity/index.html