View Full Version : Solve
Warka
04-17-2011, 02:59 PM
48/2(9+3) ............
NeoCornelio
04-17-2011, 03:06 PM
48/2(9+3) ............
288 ............
Philosophy
04-17-2011, 03:29 PM
Written like that: 288
It's ambiguous written as is. On a chalkboard it would probably be clear where the (9+3) attaches. In type, it should be written
(48/2)(9+3)
or
48/[2(9+3)]
Following most computer programming languages, it would be 288 if the multiplication symbol were inserted:
48/2*(9+3)
Lionheart
04-17-2011, 04:28 PM
I learned this thing called PEMDAS in the 6th grade. It states that you should simplify in this order: parentheses, exponents, multiplication, division, addition, and subtraction.
Accordingly:
48/2(9+3)
48/2(12)
48/24
2
Jimbo Gomez
04-17-2011, 04:55 PM
I learned this thing called PEMDAS in the 6th grade. It states that you should simplify in this order: parentheses, exponents, multiplication, division, addition, and subtraction.
Accordingly:
48/2(9+3)
48/2(12)
48/24
2
That was my solution too, using the same method.
I learned this thing called PEMDAS in the 6th grade. It states that you should simplify in this order: parentheses, exponents, multiplication, division, addition, and subtraction.I think I vaguely remember the same rules from grade school. These rules are called in general called the order of operations or precedence rules, and they are needed to produce an unambiguous result. The question here is which precedence rules apply.
In nearly all computer programming languages, the precedence rules differ from PEMDAS. Multiplication and division share the same level of precedence; operations are carried out left to right. Likewise addition and subtraction share the same level of precedence and are carried out left to right. However, like PEMDAS, multiplication and division takes precedence over addition and subtraction.
At this point, I have done so much computer coding that I can't help but reflexively apply the computer programming rules.
Warka
04-17-2011, 05:07 PM
This is how I did it:
48/2(9+3)
Parentheses first rule becomes
48/2(12)
Left to right rule becomes
24(12)
Solved = 288
For detailed explanations: http://knowyourmeme.com/memes/48293
Allegheny
04-17-2011, 05:07 PM
I think I vaguely remember the same rules from grade school. These rules are called in general called the order of operations or precedence rules, and they are needed to produce an unambiguous result. The question here is which precedence rules apply.
In nearly all computer programming languages, the precedence rules differ from PEMDAS. Multiplication and division share the same level of precedence; operations are carried out left to right. Likewise addition and subtraction share the same level of precedence and are carried out left to right. However, like PEMDAS, multiplication and division takes precedence over addition and subtraction.
At this point, I have done so much computer coding that I can't help but reflexively apply the computer programming rules.
Multiplication AND Division are of the same order of precedence, as are Addition AND Subtraction -- so the answer would be 288, no matter how you evaluate it.
Multiplication AND Division are of the same order of precedence, as are Addition AND Subtraction -- so the answer would be 288, no matter how you evaluate it.Even if you're right, humans aren't computers, and at least some people are not going to use those precise rules. It's best to be as clear as possible. Your best bet would be to use brackets as I showed, or to reform if possible, e.g. 48(9+3)/2 if you mean 288, or to use a more sophisticated markup text like LATEX to emulate a chalkboard. It shouldn't be just typed out as "48/2(9+3)".
Allegheny
04-17-2011, 05:41 PM
Even if you're right, humans aren't computers, and at least some people are not going to use those precise rules. It's best to be as clear as possible. Your best bet would be to use brackets as I showed, or to reform if possible, e.g. 48(9+3)/2 if you mean 288, or to use a more sophisticated markup text like LATEX to emulate a chalkboard. It shouldn't be just typed out as "48/2(9+3)".
Yes, it is deliberately ambiguous...that is why it is a popular 'troll' post, I guess (see Azimuth's link).
Yes, it is deliberately ambiguous...that is why it is a popular 'troll' post, I guess (see Azimuth's link).Yes, I saw Azimuth's post after I wrote my last post. From the link:
http://cdn0.knowyourmeme.com/system/icons/5548/original/yourewrong.png
SlagMaster
04-17-2011, 07:54 PM
There is noting about 48/2(9+3) that is undetermined about
the arithmetic operations; any compiler will reduce this to the
same result, The Compiler Knows All.
Ahknaton
04-18-2011, 01:23 AM
288.
I was taught PEMDAS in middle school, except that we were taught it as BEDMAS (brackets, exponents, division, multiplication, addition, subtraction). We were also taught that division and multiplication are on the same level and should be evaluated left to right, as are addition and multiplication. As far as I can this is identical to how computer languages work, with the exception that most compilers would require an explicit multiplication sign between the bracketed term and the term and the rest of the equation, otherwise it will be parsed as a function call.
Edit: I just saw that BEDMAS is in Azimuth's link. However PEMDAS vs BEDMAS didn't make a difference to how I solved it.
harjit
04-18-2011, 02:54 AM
This is how I did it:
48/2(9+3)
Parentheses first rule becomes
48/2(12)
Left to right rule becomes
24(12)
Solved = 288
What I did.
Kodos
04-18-2011, 06:43 AM
48/2(9+3) ............
Its ambigious, it could be 48/(2*12)=2 or (48/2)*12=288.
harjit
04-18-2011, 07:06 AM
Its ambigious, it could be 48/(2*12)=2 or (48/2)*12=288.
The bolded method would violate the rule of order of operations (where multiplication and division are of equal precedence).
48/2 has to be done before multiplying that result by (9+3).
Allegheny
04-18-2011, 07:11 AM
The bolded method would violate the rule of order of operations (where multiplication and division are of equal precedence).
48/2 has to be done before multiplying that result by (9+3).
Kodos is an electrical engineer, too....
:square:
Kodos
04-18-2011, 07:13 AM
The fact that they are of equal precedence means that as written its ambigious as its not clear whether the parenthetical expression is in the denominator or not. If you do apply the left to right rule its 288 but its not clear as written that 48/2(9+3) is not 48 with an underline with 2(9+3) written below the underline.
Ahknaton
04-18-2011, 07:30 AM
The fact that they are of equal precedence means that as written its ambigious as its not clear whether the parenthetical expression is in the denominator or not. If you do apply the left to right rule its 288 but its not clear as written that 48/2(9+3) is not 48 with an underline with 2(9+3) written below the underline.
/ isn't interchangeable with an underline, for just that reason. It is synonymous with ÷.
Kodos
04-18-2011, 07:37 AM
When people write it in forums sometimes they intend for it to be a sub for an underline, hence the ambiguity. If you go by strict left to right rule then its 288.
harjit
04-18-2011, 07:47 AM
/ isn't interchangeable with an underline, for just that reason. It is synonymous with ÷.
It would be cool if VB had [LaTeX] tags.
Heynonnymouse
04-23-2011, 09:35 AM
I learned this thing called PEMDAS in the 6th grade. It states that you should simplify in this order: parentheses, exponents, multiplication, division, addition, and subtraction.
Accordingly:
48/2(9+3)
48/2(12)
48/24
2
I would have said the same. The problem lies in the way the numbers are spaced and written. It may be that lacking a way of writing proper fractions the sum was meant to be 48/2 times (9+3) or 48 halves of 12, i.e. 48x6.
Felix the Cat
04-23-2011, 10:54 AM
Subtraction is simply addition involving negative numbers, while division is multiplication involving fractions, so the two pairs (add/sub & mul/div) must be of equal precedence
eg.
3 / 2 == 3 * 0.5
3 - 2 == 3 + -2
Felix the Cat
04-23-2011, 11:08 AM
48/2(9+3)
48/2(12)Ok
48/24no, they are of equal precedence; a well-written parser would throw up an ambiguity warning at this point
Most computer algorithms will just evaluate the expression from left-to-right, which is culturally-specific.
This is what happened when I plugged the calculation into the command-line tool I usually use for minor calculations:
http://img812.imageshack.us/img812/9104/image2xv.png
Felix the Cat
04-23-2011, 11:31 AM
I should add that I'm surprised at this "PEMDAS" thing and its variants. I was never taught this in school. I was taught that the precedences were equal.
Where did this idea come from?
Edit: this is probably a simplification intended for kids who aren't expected to be doing much math in later life; it reminds me of the rule taught to chess beginners that knights and bishops are of the same value, when in fact they're not.
Lionheart
04-23-2011, 03:14 PM
I should add that I'm surprised at this "PEMDAS" thing and its variants. I was never taught this in school. I was taught that the precedences were equal.
Where did this idea come from?
Edit: this is probably a simplification intended for kids who aren't expected to be doing much math in later life; it reminds me of the rule taught to chess beginners that knights and bishops are of the same value, when in fact they're not.
Yeah, I'm not surprised something I learned at a public school in America turned out to be wrong. Anyway, I came across this, and it seems that there's even a discrepancy among calculators.
http://img694.imageshack.us/img694/4108/asdfhif.png
Helios Panoptes
04-23-2011, 03:24 PM
I should add that I'm surprised at this "PEMDAS" thing and its variants. I was never taught this in school. I was taught that the precedences were equal.
Where did this idea come from?
Edit: this is probably a simplification intended for kids who aren't expected to be doing much math in later life; it reminds me of the rule taught to chess beginners that knights and bishops are of the same value, when in fact they're not.
We are taught that the precedence order is: 1) parentheses; 2) exponents and nth roots; 3) multiplication and division; 4) addition and subtraction. Some students just get confused.
Felix the Cat
04-23-2011, 05:10 PM
Yes that's right. Those acronyms are confusing and should be avoided.
http://img694.imageshack.us/img694/4108/asdfhif.png
Good find. My Casio FX-7700GH also returns 2. That's not "wrong" it's just a consequence of the ambiguity in the expression. Whether the calculator parses from left-to-right or right-to-left is up to the personal preference of the engineers/programmers
(It would be interesting if Asian calculators evaluated from right-to-left and Western ones from left-to-right, but that's apparently not the case.)
Macrobius
04-24-2011, 12:31 AM
48/2(9+3)
Well, I've yet to see a compiler that assumed juxtaposition is multiplication.
So, I can only assume it is one of those functional languages (www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf) (
link is PDF), where everything is a value, and functions have first order status.
The question, of course, is what is the function named "2" and what is its value
at 9+3? I assume the latter is a red herring, and the function intended is the
constant function that always returns the value 2, no matter what its inputs.
When you divide the value 2 into the value 48, you get the value 24.
Just to check, I posted into a prolog compiler:
Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 5.6.63)
Copyright (c) 1990-2008 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
1 ?- 48/2(9+3).
ERROR: Syntax error: Operator expected
ERROR: 48/2(9+3
ERROR: ** here **
ERROR: ) .
1 ?-
I believe the correct answer is, ahem, 'Syntax error: Operator expected'.
Arcturus
04-24-2011, 12:47 AM
It is customary to group the dividends to the left of the slash, and the divisors to the right, enclosed in parentheses, so as to avoid such confusion.
Felix the Cat
04-24-2011, 12:55 AM
Related: what should a parser make of this expression: 1.23e-3
Is it 1.23*10^-3 = 0.00123 or 1.23*2.71828 - 3 = 0.34348?
GordoTom
04-24-2011, 01:35 AM
The standard order of operations
http://en.wikipedia.org/wiki/Order_of_operations
The standard order of operations, or precedence, is expressed here:
terms inside brackets
exponents and roots
division and multiplication
addition and subtraction
These rules are simply a made up convention for the purpose of standization. They could just as easily be changed, as long as everyone did it the same.
Obedience to convention, when done out of a common recognition, that it is an intelligent way to do something, is needed, but when people obey rules of convention set by idiots, retards, criminals, beaurocrats, it becomes the juggernaut of insanity.
Niggers are less likely to obey convention, that is their strength, they do not see the logic of obeying standards and rules. They represent the strategy of guerilla warfare, of chaotic, uncentralized warfare.
Nerds obey. They obey the rules of math, not because they understand them, just because they memorize them by rote, because they are told and ordered to do so. They are easily commanded and weak minded.
GordoTom
04-24-2011, 01:39 AM
For instance, the practive of drawing the cirection of positive current in electronic schematics is stupid. The electrons are the particles of charge that are actually moving and they move in the opposite direction of the 'positive' charge. People only use the positive and negative convention as it is set up, because that's how Ben Franklin understood it and describe it.
vBulletin, Copyright ©2000-2012, Jelsoft Enterprises Ltd.