B Question about PEMDAS/BODMAS ambiguity

  • B
  • Thread starter Thread starter DaveC426913
  • Start date Start date
  • #51
Mark44 said:
I don't buy your argument at all. Since both expressions have ##2^3## in parentheses, which are at the highest level of precedence, I'm going to rewrite the two expressions as ##8^{{}^2}## and ##8^2##. To claim that these are "very different mathematically" seems pedantic to me.
You have to know that ##8^{{}^2}## has the '2' in the wrong position to be an exponent of the 8 whereas ##8^2## is proper. It is hard to see unless there are other properly placed exponents to compare it with. The difference is significant. The first example is simply invalid -- it has an exponent with a missing base. And the original post example, ##2^{3^2}##, has an "exponent tower" with both a properly positioned exponent and an exponent for the exponent. The mathematical interpretation is unambiguous. Mathematics has many "exponent tower" examples.

IMO, the fundamental misconception of the OP is that PEMDAS completely defines mathematical syntax. It does not. If it was only up to PEMDAS, we would have ##\sin(x)=s\cdot i\cdot n\cdot x##.
 
Mathematics news on Phys.org
  • #52
pbuk said:
No it is not in PEMDAS because at the level PEMDAS is taught repeated exponentiation is not encountered, however exponentiation is a right-associative operation.
With regard to "however exponentiation is a right-associative operation," you know this and I know this, but very many people don't know it. My concern is that it should be taught when PEMDAS is presented so that mathematics at this level is at least on par with how programming languages operate and are taught. There seem to be a number of implicit assumptions about how PEMDAS should be used to parse an algebraic or arithmetic expression, such as that multiplication and division have the same precedence, with neither being at a higher level than the other. And the same for addition and subtraction.

pbuk said:
This is not taught explicitly for the same reason that we do not teach explicitly that in e.g. ## e^{i\theta} ## the multiplication comes before the exponentiation, breaking PEMDAS.
OTOH, this exponential alternatively can be written as ##exp(i\theta)##, which makes it explicit that the multiplication takes precedence over the exponentiation. In textbooks, the placement of the exponent in ##e^{i\theta}## implies that the exponent is parenthesized. In a similar way, the vinculum in ##\dfrac C {2\pi}## implies that the denominator is parenthesized whereas writing ##C/2\pi## as a linear expression is ambiguous## unless we invoke the more complete parsing rules of programming languages.
pbuk said:
As said somewhere above, PEMDAS is not mathematics, it is simply a mnemonic that helps us do arithmetic and algebra
And poorly, in its current state, IMO. As I said before, in my first algebra class, around the middle of the last century, only MDAS (with mnemonic My Dear Aunt Sally) was presented. Since then it has been expanded to include Parentheses and Exponents, to make the mnemonic more comprehensive and helpful. I don't see why it can't be improved on again to cover situations that seem to give people so much difficulty; That is, to be explicit on how all of the operators, and particularly exponents, group.
 
  • #53
FactChecker said:
You have to know that ##8^{{}^2}## has the '2' in the wrong position to be an exponent of the 8 whereas ##8^2## is proper.
Baloney...
 
  • #54
Mark44 said:
Baloney...
Ok. Show me a reference with an exponent tower that is interpreted as ##a^{b^c}=a^{bc}##.
 
Last edited:
  • #55
pbuk said:
This is not taught explicitly for the same reason that we do not teach explicitly that in e.g. ## e^{i\theta} ## the multiplication comes before the exponentiation, breaking PEMDAS.
This is the perfect example and goes to the heart of what I was trying to say. 99% of students would automatically and intuitively interpret that as ##e^{i\theta} ## and not as ##e^i\theta##. However, to render the Latex, you had to put the ##i\theta## in curly braces! It would be the same in any programming language: computer input is limited and cannot make use of the visual conventions that we use.

The hard-line PEMDAS/BODMAS advocates insist that we should give up our human visual skills and rely solely on computer-like parsing of strings of characters. This is bad enough. But, if you take PEMBAS literally, then we do need brackets in this case.

And then there really ought to be a debate on whether PEMDAS/BODMAS are fit for purpose.
 
  • #56
Mark44 said:
Baloney...
My point is this.
Suppose you were reading a document and knew that the normal exponent was positioned like ##8^2##. Then suppose you ran into ##8^{{}^2}## and know that there is a missing number, ##b##, in the usual position of an exponent: ##8^{b^2}##.
Wouldn't you say that the missing number was a serious omission?
 
  • #57
FactChecker said:
My point is this.
Suppose you were reading a document and knew that the normal exponent was positioned like ##8^2##. Then suppose you ran into ##8^{{}^2}## and know that there is a missing number, ##b##, in the usual position of an exponent: ##8^{b^2}##.
Wouldn't you say that the missing number was a serious omission?
If you knew that there is a missing ##b##, even if it had been written as ##8^2## you would still say that there is a serious omission. On the other hand if you just see ##8^{{}^2}##, you may check if there is a footnote, but then you will read it as ##8^2##. The way most people will read it anyway.
 
  • Like
Likes Trysse and PeroK
  • #58
martinbn said:
If you knew that there is a missing ##b##, even if it had been written as ##8^2## you would still say that there is a serious omission.
But there is an empty position for the first exponent. That is not mathematically valid. It would be hard to notice, but this is not a thread about a vision test, it is a thread about proper mathematics.
I will leave it at that.
 
  • #59
FactChecker said:
But there is an empty position for the first exponent. That is not mathematically valid. It would be hard to notice, but this is not a thread about a vision test, it is a thread about proper mathematics.
I will leave it at that.
Well, then I envy you. It seems that you have been very lucky and have read books with perfect typesetting. I have books that have the formulas written by hand then printed.
 
  • #60
martinbn said:
Well, then I envy you. It seems that you have been very lucky and have read books with perfect typesetting. I have books that have the formulas written by hand then printed.
You have missed my point. There is an empty position in the exponent tower. That is mathematically invalid, whether it can be seen or not, whether the typesetting is good or bad. This is a mathematical issue.
 
  • #61
FactChecker said:
You have missed my point. There is an empty position in the exponent tower. That is mathematically invalid, whether it can be seen or not, whether the typesetting is good or bad. This is a mathematical issue.
What do you mean by there is an empty position? How do you know if you cannot see it? Even if you can see something how do you know it isn't just how the person wrote it? You give meaning to the notation that others might not. And you say it as if it is absolute, but to others seems like a convention. I think that is the point they are making.
 
  • #62
FactChecker said:
You have to know that ##8^{{}^2}## has the '2' in the wrong position to be an exponent of the 8 whereas ##8^2## is proper. It is hard to see unless there are other properly placed exponents to compare it with. The difference is significant. The first example is simply invalid -- it has an exponent with a missing base.
You are simply drawing attention to a LaTeX quirk.

I ask again: how do you propose to render this "invalidity" if you only had a pencil and paper?

FactChecker said:
And the original post example, ##2^{3^2}##, has an "exponent tower" with both a properly positioned exponent and an exponent for the exponent. The mathematical interpretation is unambiguous. Mathematics has many "exponent tower" examples.
What is the rule then? Top down or bottom up?
 
  • #63
FactChecker said:
Ok. Show me a reference with an exponent tower that is interpreted as
##a^{b^c}=a^{bc}##.
That was not at all my objection. See below.
FactChecker said:
My point is this.
Suppose you were reading a document and knew that the normal exponent was positioned like ##8^2##. Then suppose you ran into ##8^{{}^2}## and know that there is a missing number, ##b##, in the usual position of an exponent: ##8^{b^2}##.
The only indication that a number is missing is when I look at your LaTeX script. If I were reading a document I would not be able to see the underlying script and would not assume that a number might be missing.
martinbn said:
What do you mean by there is an empty position? How do you know if you cannot see it?
Indeed.
 
  • Like
Likes DaveC426913
  • #64
DaveC426913 said:
I think this is a difference without a difference.
Usually described as a difference without a distinction, but I agree with your sentiment.
 
  • #65
PeroK said:
The hard-line PEMDAS/BODMAS advocates insist that we should give up our human visual skills and rely solely on computer-like parsing of strings of characters.
I'm not proposing that we give up our visual skills; only that we include some caveats with the mnemonic to include the examples listed in this thread. Also, if machines as stupid as computers can figure out the meaning of a string of symbols, why shouldn't we humans be able to do the same, at least with reasonably short strings of symbols?

PeroK said:
This is bad enough. But, if you take PEMBAS literally, then we do need brackets in this case.
I don't know what PEMBAS literally stands for ...
 
Last edited by a moderator:
  • #66
Mark44 said:
I don't know what PEMBAS literally stands for ...

1737470150369.png
 
  • #67
Mark44 said:
Also, if machines as stupid as computers can figure out the meaning of a string of symbols, why shouldn't we humans be able to do the same, at least with reasonably short strings of symbols?
That's at the heart of the matter. I can generally read a piece of rich mathematical text. But, I can't read raw Latex very well. Even with practice, it's very difficult for most humans. I am dependent on the show functionality to test my Latex. Even then, debugging Latex is difficult and tiresome.
 
  • #68
Mark44 said:
I don't know what PEMBAS literally stands for ...
You missed my hint of sarcasm...
 
  • Love
Likes DaveC426913
  • #69
Buhvision.
 
  • Haha
Likes berkeman and Mark44
  • #70
Mark44 said:
The only indication that a number is missing is when I look at your LaTeX script. If I were reading a document I would not be able to see the underlying script and would not assume that a number might be missing.
No. We know where it started and what the original exponent tower was. We know that the original mathematical statement had a tower of two exponents and that the '2' was at the top, where it still is. That leaves the position of the lowest exponent empty. That is mathematically invalid.
 
  • #71
FactChecker said:
No. We know where it started and what the original exponent tower was. We know that the original mathematical statement had a tower of two exponents and that the '2' was at the top, where it still is. That leaves the position of the lowest exponent empty. That is mathematically invalid.
Third time: I would really like an answer to this question - because I think it strikes at the are of the disagreement.

How is this issue any more than a LaTeX artifact? How would you even write this if you only had a pencil and paper? Would we use a micrometer to measure the size of your hand-written letters?
 
  • #72
DaveC426913 said:
Third time: I would really like an answer to this question - because I think it strikes at the are of the disagreement.

How is this issue any more than a LaTeX artifact? How would you even write this if you only had a pencil and paper? Would we use a micrometer to measure the size of your hand-written letters?
That is a very good question. I see your point. The only reason I object to ##8^{{}^2}## is because I know that it (erroneously) came from ##2^{3^2}##, which has an exponent tower of length 2 exponents. Without that, I would only get suspicious if it was right beside a valid exponential expression, like ##8^2##. Even with something to compare it to, a hand-written formula would not make me suspicious.
In general when just presented with ##8^{{}^2}## and no other context, I would never think that there was a missing exponent in an exponent tower.
 
  • #73
FactChecker said:
In general when just presented with ##8^{{}^2}## and no other context, I would never think that there was a missing exponent in an exponent tower.
Which was pretty much my point, in addition to disagreeing that there is a substantive difference between ##8^{{}^2}## (your cooked-up LaTeX) and ##8^2##. I can see that, side by side, they look different, but I disagree that the first is erroneous.
 
  • #74
Mark44 said:
Which was pretty much my point, in addition to disagreeing that there is a substantive difference between ##8^{{}^2}## (your cooked-up LaTeX) and ##8^2##. I can see that, side by side, they look different, but I disagree that the first is erroneous.
It's only wrong in the context of coming from ##2^{3^2}##. The scope of the '2' exponent is wrong. It's correct scope is only ##3^2 = 9##. The "cooked-up LaTex" only illustrates that the base of the '2' exponent (which was '3'), is now missing, so the syntax is invalid (just one way of stating that a mistake was made).
But I do not want to spend too much time worrying about how to describe the mathematical mistake ##2^{3^2}=8^2##.
ADDED: If you don't like my way of describing why ##2^{3^2} \ne 8^2##, feel free to describe it your way.
 
Last edited:
  • #75
FactChecker said:
IMO, the fundamental misconception of the OP is that PEMDAS completely defines mathematical syntax.
There is no such misconception, and no basis for such an opinion.

The OP points out that:
  1. Parentheses - in their most basic application - are covered by PEMDAS
  2. Multiplication and Division - in their most basic application - are covered by PEMDAS
  3. The example given: 6/2(1+2) contains only the most basic applications of both, therefore PEMDAS should cover them, merely to be self-consistent.
  4. Instead, the application of PEMDAS rules leads directy to an intermediate solution that cannot be unambiguously reduced without a missing rule, namely one that determines which of these is correct: 6/2(3) = a] 6/6 b] 3(3).
  5. Bonus points: If we take it a step further, and make the example say, 623 then we have another undefined operation: whether the tower resolves top-down or bottom-up.

I have no idea how a badly-constructed scrap of LaTeX informs any of this.
 
Last edited:
  • #76
DaveC426913 said:
There is no such misconception, and no basis for such an opinion.

The OP points out that:
  1. Parentheses - in their most basic application - are covered by PEMDAS
  2. Multiplication and Division - in their most basic application - are covered by PEMDAS
  3. The example given: 6/2(1+2) contains only the most basic applications of both, therefore PEMDAS should cover them, merely to be self-consistent.
  4. Instead, the application of PEMDAS rules leads directy to an intermediate solution that cannot be unambiguously reduced without a missing rule, namely one that determines which of these is correct: 6/2(3) = a] 6/6 b] 3(3).
  5. Bonus points: If we take it a step further, and make the example say, 623 then we have another undefined operation: whether the tower resolves top-down or bottom-up.

I have no idea how a badly-constructed scrap of LaTeX informs any of this.
As far as I can see, PEMDAS does not cover exponent towers. It does not cover the specifics about matrix computations although the PEMDAS rules do apply. It does not cover any function evaluation although the PEMDAS rules do apply. There is a lot that PEMDAS does not cover even though the rules do apply.
 
  • #77
I wanted to make a post here using LaTex. So I typed this in:

latex1.jpg


The I hit the Preview button. Here's what I got:
latex2.jpg

Seems like LaTex has the right approach: when given an ambiguous sentence, point it out as ambiguous, don't guess on the author's intent.
 
  • Like
Likes FactChecker
  • #78
FactChecker said:
As far as I can see, PEMDAS does not cover exponent towers.
Correct, and the reason for this is that these rules cover only precedence, but not operator associativity. That is, whether operators at the same level of precedence group together right-to-left or left-to-right.

DaveC426913 said:
The example given: 6/2(1+2) contains only the most basic applications of both, therefore PEMDAS should cover them, merely to be self-consistent.
It can't cover this example, because PEMDAS doesn't provide any guidance on how operators at the same precedence level (division and multiplication in this example) group or associate the operators: left-to-right or right-to-left. This has been my complaint about PEMDAS for a number of threads. OTOH, programming languages do specify the associativity so that the above expression is completely unambiguous.
Here's how C or other programming languages would evaluate this expression:
##6/2\cdot3## -- parens are higher in precedence, so the expression between them is evaluated first.
##= 3 \cdot 3## -- division and multiplication are at the same precedence level, but associate (group) left to right, exactly the same as if the expression had been written as ##(6/2) \cdot 3##.
## = 9##.

Another example is 6/2/3. If we decide that the grouping should be left-to-right, we get (6/2)/3 = 3/3 = 1. If we decide that the grouping should be right to left, we get 6/(2/3) = 9.

DaveC426913 said:
Instead, the application of PEMDAS rules leads directy to an intermediate solution that cannot be unambiguously reduced without a missing rule, namely one that determines which of these is correct: 6/2(3) = a] 6/6 b] 3(3).
Right, because PEMDAS doesn't offer any guidance on how operators at the same precedence should be grouped.
DaveC426913 said:
Bonus points: If we take it a step further, and make the example say, ##6^{2^3}## then we have another undefined operation: whether the tower resolves top-down or bottom-up.
C and C++ don't have an exponentiation operator, but Python does (it uses ** for this). Its rule for associativity of the exponent operator is right-to-left, or as you put it, top-down. ##6^{2^3}## would be evaluated as ##6^8## or 1,679,616.

Although C and C++ (and several others) don't have an exponentiation operator, these languages have a bunch more operators. The precedence tables for these languages also include how these operators are grouped, several of which associate from right-to-left.
 
Last edited:
  • Like
Likes jbriggs444 and FactChecker
Back
Top