New
#61
There is no left to right "thing". You typed in the wrong equation. Remove the outside parentheses. (48 =xx)
There is no left to right "thing". You typed in the wrong equation. Remove the outside parentheses. (48 =xx)
Heh the equation is ambiguous. It specifically exploits ambiguous math rules. Both answers are correct. What is /wrong/ is that the equation was improperly written for anything more than personal consumption. Any attempt to publish such a thing would have to have had the ambiguity removed.
Comp Sci is full of such things, and even though the rules are strictly defined, if you want a chance in heck that anyone is going to understand you, you explicitly disambiguate the equations.
(This is how space station parts mishaps happen, no good engineer would allow such an equation to escape his notebook)
I did well at algebra and math, but cannot recall the exact order of operations as I learned them, but am not sure they are the problem here.
48÷2(9+3) = is ambiguous as written and the first consideration of communication is to not confuse the reader.
I don’t know the intent of the author, but I was taught 50 years ago to say “the quantity” in such situations. When using “the quantity”, the equation could mean:
1: The quantity (48 divided by 2) times the quantity (9 plus 3), which is clearly 288, but I would have written it this way to avoid ambiguity:
(48÷2)(9+3) = 288
Or it could mean:
2: The quantity 48 divided by the quantity two times (9 plus 3), which is clearly 2, but I would have written it this way to avoid ambiguity:
(48)÷(2(9+3)) = 2
So---as written, I’m not sure there is a correct answer and I would fault the equation writer for not being explicit and leaving unnecessary doubt. Who knows what the intent was?
Of course, maybe the correct notation has changed over the years and there is no ambiguity by current standards?
Or maybe I’m all wet, not for the first time.
There is no ambiguity.
If the answer were 288 the equation would be (48÷2)(9+3) = 288
That is the only way the equation can be written that the 48 is divided by 2.
No wonder we have dropped to 25th in Math in the U.S.
U.S. Teens Lag as China Soars on International Test - Bloomberg
Clearly it is ambiguous, the mere existance of this "problem" is that this equation was formulated specifically to exploit an ambiguity in mathmatical conventions. If there was none, the problem would not exist.
But finally, even if it weren't ambiguous, as both Ignatz and I just pointed out, it's bad form to publish even /potentially/ ambiguous code or equations.
Things like "PEMDAS" are merely conventions for writing equations. Both parties have to agree on the convention. PEMDAS actually restricts true mathmatics since it places an operator precidence where none mathmatically exists. It merely lays out a ruleset for writing equations which, if both parties agree, leads to unambiguous communication. But unless both parties DO agree and know that they are adhering to the PEMDAS convention, then there is in fact ambiguity which could and should have been taken care of by more generally understood mechansims (more explicit use of parens)
Yes there is a "left to right" thing. I stated before, and it's the order of operations.
That's what it boils down to. The whole thing uses bad notation and without proper use of parenthesis will remain ambiguous.
PEMDAS (as well as BODMAS) has M and D at the same precedence, same as A and S are the same precedence. To force the multiplication before division, you'd have to write it has 48/(2((9+3)).
Creating a program to work it out, C, Python and MATLAB result in 288.
You can easily see how different calculators give different answers too. Open Windows calculator in standard view and do 2+2*2, then do the same sum in scientific view and you'll get a different answer.
The ambiguity if one exists is an algebraic equation has been written in basic math format.
The algebraic equation should be:
__48__ = x ......Which results in x= 2
2(9+3)
Sorry I do not have software to write algebra formulas. So I did the best I could.
_48_ (9+3) = x Which results in 288. Which would be (48÷2)(9+3)= x or 288
2
Complex algebra formulas are written as fractions not using ÷
__48__ = 48÷2(9+3)
2(9+3)
I changed to forward slash / for fraction or to denote division below.
a/b = c
a÷b= c when converted to algebraic expression is a/b= c
a=48
b= 2(9+3)
c= unknown
Division or the fraction in these equations is the primary action of the equation.
All secondary actions must be completed first.