Bugs

Evaluation of 6÷2(1+2)

Evaluation of 6÷2(1+2)

Postby KeepItSimpleStupid » Tue May 03, 2011 2:19 pm
Not sure if the evaluation is correct.
6/2(1+2)

Let's use distributive property first:

6/(2+4) = 1

Let's use parenthesis first

6/2(3)

6/6 = 1

Wolframalpha's result is 9
http://www.wolframalpha.com/input/?i=6% ... 281%2B2%29

Am I all wet?
KeepItSimpleStupid
 
Posts: 1
Joined: Tue Nov 10, 2009 7:42 am

Re: Evaluation of 6÷2(1+2)

Postby Nuclearman » Tue May 03, 2011 5:17 pm
KeepItSimpleStupid wrote:Not sure if the evaluation is correct.
6/2(1+2)

Let's use distributive property first:

6/(2+4) = 1

Let's use parenthesis first

6/2(3)

6/6 = 1

Wolframalpha's result is 9
http://www.wolframalpha.com/input/?i=6% ... 281%2B2%29

Am I all wet?


When using the distributive property it applies to the 6/2, not just the 2.

It should actually be:
6/2(1+2)
3(1+2) (simplified)
3+6 (distributive property applied)
9 (answer)

When using the distributive property, the "parenthesis first" rule doesn't apply. One of the points of the distributive property is that there is generally something preventing you from doing the parenthesis's first (in more complex problems), and as such, is a "work around" to the "parenthesis first" rule. Hence why you simplify the outside, then apply the property.
-Nuclearman
Nuclearman
 
Posts: 343
Joined: Sun Sep 13, 2009 6:01 pm

Re: Evaluation of 6÷2(1+2)

Postby oc918 » Wed May 04, 2011 8:18 pm
If you wanted an expression that is equal to 1, you'd need to do

6/(2(1+2))

http://www.wolframalpha.com/input/?i=6%2F%282%281%2B2%29%29
oc918
 
Posts: 3
Joined: Fri Dec 10, 2010 12:57 am

Re: Evaluation of 6÷2(1+2)

Postby oc918 » Wed May 04, 2011 8:19 pm
oc918
 
Posts: 3
Joined: Fri Dec 10, 2010 12:57 am

Re: Evaluation of 6÷2(1+2)

Postby severoon » Wed May 04, 2011 11:37 pm
The problem with your evaluation has nothing to do with the distributive law. You have the order of operations incorrect; you're not accounting properly for multiplication's associativity.

As written, you have: 6/2*(1+2). (You left the multiplication out in your example, but I think you'll agree it's the same thing.) When deciding how to fully parenthesize this expression, you must take into account that division and multiplication are left-associative.

That means: 6/2*(1+2) = (6/2)*(1+2) NOT 6/(2*(1+2))

Left-associative operators work like this: a1*a2*a3*...*aN = (((a1*a2)*a3)*...)*aN

Since multiplication and division are left-associative, that means when you mix them, you get: a1/a2*a3/...*aN = (((a1/a2)*a3)/...)*aN

The confusion caused by your example is that the importance of the left-associativity of the division operator is obscured by the fact that you left the multiplication operator implied. Once you make it explicit and fully parenthesize the expression according to the precedence and associativity of the operators involved, the confusion lifts.

(Incidentally, if you're interested in an example of a right-associative operator and one of the neatest implications of an operator with this property, see currying.)
severoon
 
Posts: 5
Joined: Tue Apr 13, 2010 8:02 pm

Re: Evaluation of 6÷2(1+2)

Postby yos233 » Thu May 05, 2011 12:24 am
Order of operation says Parentheses, then Multiplication and Division.

So 6/2(1+2) is first simplified to 6/2*3.

Then M&D are carried out in the order they appear so 6/2=3, 3*3=9. W|A is correct. The distributive property plays no part.

*PS, Did this come from Facebook, I saw a question on this roll by a few weeks ago.
Eric Vander
yos233
 
Posts: 122
Joined: Tue Nov 16, 2010 2:48 pm

Re: Evaluation of 6÷2(1+2)

Postby Gabbione » Thu May 05, 2011 1:13 am
Your problem is that you need to know the correct order of evaluation, i.e.
1) evaluate expressions within parentheses
2) perform any exponentiation
3) perform any multiplication and division
4) perform any remaining addition and subtraction.

Thus, if we rewrite your expression as the following:

(6/2)*(1+2)^1=X. where ^ indicates exponentiation

Using the rules above in stepwise order we obtain the following:

1) (6/2)*(3)^1=X. [since 1+2=3]. Rule #1
2) (3)*(3)^1=X. [since 6/2=3]. Rule #1
3) (3)*(3)=X. [since 3^1=3]. Rule #2
4) 9=X. [since 3*3=9]. Rule #3

Many times when I have problems I find it useful to resort to first principles such as the four fundamental rules listed above to evaluate expressions.

Best of luck!

3) (6/2
Happy Computing!

Gabbione
Gabbione
 
Posts: 6
Joined: Sat Jul 24, 2010 12:52 am

Re: Evaluation of 6÷2(1+2)

Postby jackpinegandy » Tue Feb 19, 2013 8:38 pm
This tiresome chestnut has reached northern Minnesota (USA), and wears me out. Is it the case that rules of math change periodically?

When I was a tyke, implied multiplication always took precedence over explicit multiplication. Explicit multiplication was signified by a multiplication sign, either an x or a midline dot - or a virgule or an obelus (for division) When no explicit symbol is used, as in 2(1+2) then the multiplication is implied.

If implied multiplication is still an accepted practice, then the problem seems to me to be a straightforward 6÷6=1.

Is there no longer any such thing as implied multiplication?
jackpinegandy
 
Posts: 1
Joined: Tue Feb 19, 2013 7:58 pm

Re: Evaluation of 6÷2(1+2)

Postby WolframAlphaTeam » Thu Feb 21, 2013 4:04 pm
Try avoiding ambiguous notation in queries. Instead of

6÷2(1+2)

use

(6÷2)*(1+2)
or
6÷(2*(1+2))

For either of these, there is no confusion as to what this means. To see how W|A interprets the order of operations, see:
http://www.wolframalpha.com/input/?i=order+of+operations
WolframAlphaTeam
 
Posts: 166
Joined: Mon May 18, 2009 5:39 am

Re: Evaluation of 6÷2(1+2)

Postby EagleEye1975 » Mon Mar 11, 2013 4:35 am
The program is failing to account for the very first order of operations (I note it is not listed in the linked page)... that you do numerators and denominators separate from each other whenever you encounter a fraction.

The system is incorrectly taking the 6/2 as its own fraction, and failing to maintain 2 as a factor of the quantity (1+2). The entirety of the 2(1+2) is in the denominator of a fraction that is read (in english) as "six over two times the quantity one plus two".

Or:

6
------
2(1+2)

The programming logic on wolfram is, thus, wrong.

FYI, this is from my intermediate algebra book

9th edition, by Lyle Hornsby and McGinnis.
Page 27.

"First work separately above and below any fraction bar".

The slash used in in-line formula typing (as text on a single line) to indicate division is only done because fractions IMPLY division, and the slash bar is convenient, and on the standard keyboard, whereas the ÷ is not.

This leads to sloppy formulas that generally work, but as we see here, not always.

Thus, the formula: 6/2(1+2) ought to be interpreted as 6/(2(1+2)), but it is not.
EagleEye1975
 
Posts: 1
Joined: Mon Mar 11, 2013 4:29 am

Re: Evaluation of 6÷2(1+2)

Postby Nuclearman » Wed Mar 13, 2013 2:00 pm
The program is failing to account for the very first order of operations (I note it is not listed in the linked page)... that you do numerators and denominators separate from each other whenever you encounter a fraction.


That isn't an actual order of operation, that is simply an accepted shorthand, and a rather useful one at that. There is implicit parenthesis for the numerator and denominator, so people don't have to spend the time to make the equation look like this (or worst): ((2/3)/(5/7)) / ((13/17)/(23/29)), if they can avoid it. However, without type setting or paper, that is exactly what you need to do to ensure that there is no doubt as to what is calculated first. This is why W|A provides a typeset version of the input, as it's a lot easier to ensure that it's correct.

It should be noted that division using '÷' is no different mathematically from '/'. Although, if it was written as 6 / 2(1+2), that would at least give the impression that perhaps it was intended as 6/(2 + 1). It's still rather ambiguous though.

Still, W|A could use better support for using that same type setting input as well as displaying it.
-Nuclearman
Nuclearman
 
Posts: 343
Joined: Sun Sep 13, 2009 6:01 pm

Who is online

Users browsing this forum: No registered users and 2 guests