|
I asked my professor about this today and he said that teachers put way too much time into teaching PEMDAS (which isn't mathematically necessary) and not enough into teaching clarity. He said that mathematicians usually write a + (b*c) instead of a+b*c even though in standard notation they mean the same thing, just to make it clearer which operation is intended to be done first.
I looked this up and apparently there are some old texts on factorials that are written as n * n - 1 * n - 2 etc. from before PEMDAS was standard, and the reader was supposed to add or subtract before multiplying. So it's perfectly acceptable to do math without PEMDAS, you just have to make it clear to the reader, that's the important thing.
In fact, elementary schools could completely eliminate teaching PEMDAS, and just tell students to put parentheses to indicate which operations should be done first. However, the reason we multiply before adding is not because it's mathematically necessary, but because it makes writing polynomials easier. ax^2 + bx + c requires parentheses around the first two terms unless you have a convention that says you multiply before adding.
Another thing is that a + b * c is ambiguous, not unambiguous as some in the thread posted, since the definitions of addition and multiplication don't tell you what order to do those operations in. To create clarity, someone actually has to create a standard of whether a + b * c means (a+b)*c or a+(b*c). That way, problems without complete use of parentheses, like the one in the 80+ page thread, still have one correct solution (even if not everyone can get it right).
|
Ask your professor about reverse polish notation (postfix).
|
Germany2896 Posts
That a + b * c means a+(b*c) is pretty widely established today. And of course convenient in practice. So while one could use a different convention (provided you state your convention at the beginning of the text) it wouldn't be useful in most contexts. Conventions are just for convenience and are not essential to mathematics. And if they become inconvenient you are free to drop them and use different notations provided you define them.
One recent example of such a notation that was introduced because it's convenient in certain parts of physics is implicit Einstein summation.
|
Yeah, I read that article earlier today- it's really interesting. Got me thinking about this thread again.
|
I put this alongside arguing over grammar, accents, spelling or really any kind of argument that relates to language.
Its so much less important HOW they say it, than whether or not you understand the meaning behind it. If a couple of brackets makes something less confusing to the less experienced, why the hell not do it? Got a superiority complex to satisfy by watching weaker minds squirm?
|
I completely support the use of more parenthesis to increase clarity. Learning basic order of operations to reduce excessive parentheses is reasonable but I don't feel that it should be depended on strictly.
|
a+b*c always means a+(b*c) due to operator precedence a*b*c always means (a*b)*c due to left-to-right evaluation (* might not be commutative) a^b^c usually means a^(b^c) due to right-to-left evaluation Less clear cases are sin x + y and sum_{i=1}^{n} i + 1, etc
If you want to diverge from the standard notation (which can be implemented in a simple algorithm and is assumed in a lot of programming languages as well), be sure to inform your readers. But keep in mind that eliminating order of operators and using parentheses instead of em is a very, very bad practice and leads to less clear formulas.
|
If you are a programmer it's not ambiguous at all. I think context might be the ultimate arbiter.
|
Hmm...when I was learning math I was one of those uptight people that always put more parenthesis than needed. Why make it so there is possible confusion when you know for sure if it is in parenthesis you do that first?
If there's any confusion...parenthesis make it completely clear. None of the "oh that's how that guy teaches," or, "it's commonly known." Parenthesis bitches! ^_^
Left to right is pretty clear anyways though, but if there's any confusion then yeah...
|
Germany2896 Posts
On April 09 2011 08:43 avilo wrote: Hmm...when I was learning math I was one of those uptight people that always put more parenthesis than needed. Why make it so there is possible confusion when you know for sure if it is in parenthesis you do that first? While in a publication you aim for clarity, in a calculation brevity and reduction of error rate are most important. Nesting fractions or brackets several levels deep is really annoying. If expressions are longer than lines you grasp for any notational simplification you can get.
Physicists abuse notation horribly. Einstein summation, the way differential operators are treated, reuse of an index to mean different things(Record is three meanings inside a single expression), having different functions with the same name only distinguished by their argument name(i.e. "f(x)" is something different from "f(p)")... One of the more difficult parts of most theoretical physics lectures is getting used to working with whatever notation is used in that field. Like Bra-Kat notation in quantum mechanics, four vectors in electrodynamics,...
On April 09 2011 08:25 mangomango wrote: If you are a programmer it's not ambiguous at all. This most programming languages don't allow juxtaposition(usually because it's inherent ambiguity with either function invokation or multi character identifiers) they don't tell you anything about the priority of that operation. Most programming languages only defined the *,/,+,- operators with well defined precedence.
|
Germany2896 Posts
On April 09 2011 07:55 Frigo wrote: a^b^c usually means a^(b^c) due to right-to-left evaluation
One interesting this is that right associativity of an operator does not mean that the side effects of an operator are evaluated right to left. In particular C# evaluates the subexpressions from left to right even for right associative operators, and in C++ the order of evaluation is undefined. But if there are no side effects the order of evaluation doesn't matter at all, so this is not relevant in mathematics.
|
|
|
|