Page 2 of 3

Posted: June 18th, 2010, 11:51
by Baliame
I think it has something to do with the fact how one "higher" operation can be substituted by another "lower" one, like multiplication is a lot of additions and exponential is a lot of multiplication, therefore a lot of a lot of additions.

Posted: June 18th, 2010, 11:58
by Dog Pants
Baliame wrote:But I find it a troubling question now that I think about it, I think I wasted 12 years of my life so far learning things I most likely won't even want to remember.
Well I did electronics for years and ended up doing IT, so my education hasn't helped me much either. Such is life, it still looks good on your CV.

In the end arithmetic is just the sum of various positive and negative numbers. Erm, maybe not division. But then I never did learn how to divide properly. Luckily by the time I was studying Laplace and Fourier it was largely irrelevant.

Posted: June 18th, 2010, 12:12
by friznit
The rules may seem arbitrary because...well, they're conventions rather than rules. It's an accepted way of doing things in order to avoid confusion. Maths geeks get terribly upset if you tell them to abide by rules (philosophically, pure maths is meant to write the rules not the other way round).

Whilst the precedents have been clearly explained in this thread, what remains it that whoever set the original equation is being deliberately ambiguous and would be much nicer to have used brackets or put the variables in a more customary sequence.

Posted: June 18th, 2010, 12:49
by shot2bits
friznit wrote:The rules may seem arbitrary because...well, they're conventions rather than rules. It's an accepted way of doing things in order to avoid confusion. Maths geeks get terribly upset if you tell them to abide by rules (philosophically, pure maths is meant to write the rules not the other way round).

Whilst the precedents have been clearly explained in this thread, what remains it that whoever set the original equation is being deliberately ambiguous and would be much nicer to have used brackets or put the variables in a more customary sequence.
this :above: see new math, which coincidentally is about 50 years old now

Posted: June 18th, 2010, 13:11
by deject
friznit wrote:The rules may seem arbitrary because...well, they're conventions rather than rules. It's an accepted way of doing things in order to avoid confusion. Maths geeks get terribly upset if you tell them to abide by rules (philosophically, pure maths is meant to write the rules not the other way round).

Whilst the precedents have been clearly explained in this thread, what remains it that whoever set the original equation is being deliberately ambiguous and would be much nicer to have used brackets or put the variables in a more customary sequence.
The point of this exercise is to test people's recollection of the convention, to be sure. While putting the parenthesis would make it obvious, it would make the test pointless.

I think where people are getting led astray is when they're trying to do addition before subtraction. In truth addition and subtraction are the exact same operation, it's just that one case has a negative operand. Wee don't learn it this way because the idea of a negative value of objects doesn't make much sense. However, when you look at it like that, you can see that:

1 - 3 x 4 + 7 is equal to 1 + (-(3x4)) + 7.

So yes the answer is indeed -4. You can verify that using Google Calculator and Wolfram Alpha if you like.

Interestingly though, Bali was wrong about C++ because it will do a strict left-to-right interpretation simply because of the nature of the language and the way it's set up. It's too hard/complicated to get a low level compiler to be able to read an expression completely in order to determine the correct order to do a calculation, so the code author needs to make it explicitly execute code in the right order. The correct syntax for this expression in C++ would be:

1 - (3 * 4) + 7.

The way the computer would execute it would be it first takes the 1 and then sees the subtraction operator and the parenthesis, and puts the subtraction on hold while it figures out whatever you put in the the parenthesis. So in this case it would go "1 minus oh we gotta figure out this other expression" and solve the (3 * 4) bit before finishing the 1 minus... part. Without the parenthesis, C++ would spit out -1 to you because it would do this:

((1 - 3) * 4) + 7

Posted: June 18th, 2010, 14:15
by spoodie
deject wrote:I think where people are getting led astray is when they're trying to do addition before subtraction.
My thinking was:

1 - 3 = -2
-2 x 4 = -8
-8 + 7 = -1

I can only guess that the reason for the convention is to make sure that everyone gets the same result.

Posted: June 18th, 2010, 14:19
by deject
spoodie wrote: My thinking was:

1 - 3 = -2
-2 x 4 = -8
-8 + 7 = -1

I can only guess that the reason for the convention is to make sure that everyone gets the same result.
That is exactly the reason. An expression is no good if it could mean -22, -18, -4, and -1. And yes it is better to be explicit about it using parenthesis, it's not necessary because of the convention.

Posted: June 18th, 2010, 14:20
by amblin
.

Posted: June 18th, 2010, 14:28
by Dog Pants
I think the convention probably happened the other way round. I suspect multiplication was discovered before algebra. However, I refuse to be drawn into an argument about maths. I don't consider myself geeky enough.

Posted: June 18th, 2010, 14:39
by deject
amblin wrote:multiplication isn't normally signed
With variable this works since the different variables represent different objects, whereas you can't do that with numerals since they'd just look like one number.

Posted: June 18th, 2010, 15:27
by HereComesPete
BIDMAS bitches!

Posted: June 18th, 2010, 15:51
by amblin
.

Posted: June 18th, 2010, 16:15
by deject
THE VERY IMPORTANT EXCEPTION

There is an exception to BIDMAS, and it is found right at the end when only additions and subtractions remain. When there are ONLY, I repeat, ONLY additions and subtractions remaining then you can work left to right. I'll show you why.

Suppose I get an expression 4+6-4+8. If I do the additions first I will replace 4+6 with 10 and 4+8 with 12, to get the expression 10-12. The answer to which is -2. Now working from left to right, I start off with 4 units and add to that 6 units. This gives me ten units. I now take away 4 units to leave me with 4 units. Finally I add another 8 units. This gives me 14 units in all.
I don't even understand how this is a problem. Even if you did these out of order, you'd not be adding 4 + 8, you'd be adding -4 + 8. I just don't understand how people can make that kind of error. It's like there is a fundamental misunderstanding of arithmetic or something. The subtraction part can never extend to the 8 in this situation. The very idea of that is ludicrous.

Posted: June 18th, 2010, 17:08
by Dog Pants
deject wrote:It's like there is a fundamental misunderstanding of arithmetic or something.
Well, that's exactly what it is. Not here, necessarily, that's probably people either not paying attention because they don't really care or ignoring the correct answer on the assumption it's a trick question. People in general though don't like maths, and so aren't very good at anything other than basic stuff.

Posted: June 18th, 2010, 19:06
by Roman Totale
I see no reason at all to present this without parentheses. It's like missing out commas from text and expecting people to get the original meaning, e.g.

"...his global tour included encounters with Nelson Mandela, an 800-year-old demigod and a dildo collector"

This can be implied to mean that Mandela is a dildo collecting demi-god (see serial/Oxford comma for further details).

Posted: June 18th, 2010, 19:17
by Dog Pants
Roman Totale wrote:This can be implied to mean that Mandela is a dildo collecting demi-god (see serial/Oxford comma for further details).
Whaaa? He isn't?

Posted: June 18th, 2010, 19:19
by deject
Roman Totale wrote:I see no reason at all to present this without parentheses. It's like missing out commas from text and expecting people to get the original meaning, e.g.

"...his global tour included encounters with Nelson Mandela, an 800-year-old demigod and a dildo collector"

This can be implied to mean that Mandela is a dildo collecting demi-god (see serial/Oxford comma for further details).
Actually it isn't because there is a well a established convention to interpret such expressions, unlike the English language. The problem is a test of people's knowledge of the convention, yes, but it is part of arithmetics.

Re: do a simple maths problem

Posted: June 18th, 2010, 19:31
by Dr. kitteny berk
deject wrote:Do this maths problem.
No.

Re: do a simple maths problem

Posted: June 18th, 2010, 19:37
by spoodie
Dr. kitteny berk wrote:No.
We have a winner.

Posted: June 18th, 2010, 20:47
by Baliame
deject wrote: Interestingly though, Bali was wrong about C++ because it will do a strict left-to-right interpretation simply because of the nature of the language and the way it's set up. It's too hard/complicated to get a low level compiler to be able to read an expression completely in order to determine the correct order to do a calculation, so the code author needs to make it explicitly execute code in the right order. The correct syntax for this expression in C++ would be:

1 - (3 * 4) + 7.

The way the computer would execute it would be it first takes the 1 and then sees the subtraction operator and the parenthesis, and puts the subtraction on hold while it figures out whatever you put in the the parenthesis. So in this case it would go "1 minus oh we gotta figure out this other expression" and solve the (3 * 4) bit before finishing the 1 minus... part. Without the parenthesis, C++ would spit out -1 to you because it would do this:

((1 - 3) * 4) + 7
Interestingly though, Deject was wrong about C++ because it will do the interpretation of maths correctly simply because of the way it's set up.

Please do ignore all the other code, I injected the equation into a random thing I'm working on right now.
Image
Environment: MSVC++ 2010

I'd like to re-refer you to the following page: http://en.wikipedia.org/wiki/Order_of_o ... _languages

If languages didn't use order of operations it'd be just plain wrong, considering without it "5 > 3 + 4" would evaluate to 5.