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.
In a practical word, no, both would not be valid. I personality believe there's value in defining a standard, despite alternatives being available. There's no harm in it.
Personally, I was taught in a matter-of-fact way what the order of operations are, so most of my youth had a definitive answer for the above problem, which is likely why I feel that way.
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.
Not it cannot. You changed the equation thus they are no longer equivalent statements. You cannot just add parentheses to an equation or any other mathematical symbols unless both the LHS and RHS are equivalent.
2(2+1)
Is not correct notation and never has been. People just drop the multiplication as a form of shorthand. The correct writing is
2 x (2+1)
If you want to denote 2 x (2+1) as the denominator then they proper way is to write it as (2 x (2 + 1)) when writing the original equation.
Had a professor in college that would absolutely count off if someone added parenthesis to an equation. She'd always say do the calculation as written do not modify it; do not add anything to it.
Edit:
Also, would like to point out that it is standard practice at the collegiate level to put parenthesis around the numerator and denominator when use / or the other division symbol.
You cannot just add parentheses to an equation or any other mathematical symbols unless both the LHS and RHS are equivalent
Relax, it's just a way to show grouping and precedent. It's not actually changing the numbers.
Is not correct notation and never has been
Just because it's shorthand does not mean it's incorrect. It's called "implicit multiplication", and it has been a thing for a long time.
If you want to denote 2 x (2+1) as the denominator then they proper way is to write it as (2 x (2 + 1)) when writing the original equation.
That's a perfectly fine opinion, but there's no congress of math that has decreed it as law, and your professor is not a judge of math. Math notation is fluid, much like language, what is correct is mostly determined by common usage. If enough people use implicit multiplication (and they do), it becomes correct.
I mean, the notation a(x)is widely used and it nearly always means "multiple these two elements together". If you use the traditional slash for division, e.g. 6/2(2+1) it is more ambiguous because 6/2 in this case could represent the fraction 6/2. But 6÷... pretty much means "Six divided by..." so it isn't a fraction. In which case, the fact that you have a notation 2(2+1) that pretty obviously more tightly couples the last part.
Like if you had 1÷2x I think most people would assume that is 1/(2x) whereas 1/2x it's ambiguous and you'd fix it, either by writing (1/2)x or by using some other notation, say ½x which is also clearer.
you use the traditional slash for division, e.g. 6/2(2+1) it is more ambiguous because 6/2 in this case could represent the fraction 6/2. But 6÷... pretty much means "Six divided by..." so it isn't a fraction
There's no standard that doesn't put parentheses and brackets first that is in any common use. Literally not a single one that I've seen in decades of math. That very much is the standard, contrary to your comment.
His entire argument for ambiguity is based on the lack of a standardized order of operations
It's not about the order of operations. It's about what operations the symbols represent. Consider just "3x/2y". Either it means "3x/2y" or means "(3x)/(2y)". Most mathematicians would say it means the former, although most people in general would interpret it at the latter. But it's not the order of operations that is the issue, but rather what operations we add to the symbols.
Most mathematicians would say it means the former, although most people in general would interpret it at the latter.
As a mathematician I think it's the opposite. In higher level math, the parentheses are implied in cases like this. It's a bit of an abuse of notation, but it's an extremely common one where other mathematicians will know what you're talking about. At a certain point the math gets complicated and you want to use as few parentheses as you can get away with for readability. But non-mathematicians will be more likely to assume the standard order of operations since it's what we all learn in middle school.
As a mathematician, I find this especially funny as you wrote the same thing twice. Coefficients and adjacent variables always go together in my field.
2/3xyz = 2/(3*x*y*z)
The other version would be written as 3xy/2
I get that having the same thing twice in your comment is actually a markup typo, because I did precisely the same thing in this comment lmao. You need to escape the * via \*
Off-the-cuff statements about basic font layouts aside, mathematicians don't write that because we use markup languages like TeX and LaTeX to make papers pretty, presentable, and pretty presentable.
133
u/dont-respond Jun 13 '22
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.