1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

6÷2(1+2)=?

Discussion in 'Mathematics and Physics' started by Gobbledok, May 2, 2011.

Thread Status:
Not open for further replies.
  1. Gobbledok

    Gobbledok Active Member

    Joined:
    Mar 9, 2008
    Messages:
    452
    Likes:
    34
    Location:
    Toowoomba, Australia
    Hi guys,

    On another forum of which I am a member, we are having a discussion about the above equation.

    Some people read the equation as:

    (6÷2)(1+2) in which case the answer is 9.

    Some read the equation as:

    6÷(2(1+2)) in which case the answer is 1.

    Google and Microsoft (and other computer) calculators show the answer as 9 whereas good scientific calculators show the answer as 1.

    Anyway i thought what better place to ask than here.

    So go ahead guys, is the answer 1 or 9 and why?
     
  2. Dr_Doggy

    Dr_Doggy Well-Known Member

    Joined:
    Aug 11, 2007
    Messages:
    1,715
    Likes:
    37
    ONLINE
    1.....those are 2 different equations, watch you notation, equation 1 & 3 are the same(equal) the brackets are not needed in #3 since equation follows order of operations, the second equation is a quadratic, way different.....the brackets hold it "apart", if someone is mixing the 2 it is wayyy wrong.....

    to answer the question, just work it out using BEDMAS,
     
  3. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,018
    Likes:
    317
    Location:
    Brisbane Australia
    ONLINE
    I agree with doggy, the answer is 1.

    Mike.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Gobbledok

    Gobbledok Active Member

    Joined:
    Mar 9, 2008
    Messages:
    452
    Likes:
    34
    Location:
    Toowoomba, Australia

    I agree with you 2.

    Juxtaposition (multiplication without the sign) takes precedence over the division.

    Therefore 1 is the result.

    However this question has returned over 20 pages of replies in the other forum, some saying 1, most saying 9.

    That's why I thought I'd ask a 'smart' forum instead lol.
     
  6. KeepItSimpleStupid

    KeepItSimpleStupid Well-Known Member Most Helpful Member

    Joined:
    Oct 30, 2010
    Messages:
    9,916
    Likes:
    1,097
    ONLINE
    a1.


    a2.
    ; did nothing but removed the parenthesis. This is the same as


    a3.
    ; Nothing but left to right evaluation

    a4.


    Way B:

    b1.


    b2.


    The answer is 9. Rewriting a1 as b1, I think, makes it obvious. If you make division have a higher priority than addition, you get eqn B1. B1 is easy to solve.

    A is harder to understand. If you want, I'll go through it.

    The answer is 9.

    adding and subtracting have the SAME precedence. Multiplication and division have the SAME precedence. Expressions are evaluated left to right.
     
    Last edited: May 2, 2011
  7. Gobbledok

    Gobbledok Active Member

    Joined:
    Mar 9, 2008
    Messages:
    452
    Likes:
    34
    Location:
    Toowoomba, Australia
    But that's where you went wrong.

    6/2(1+2) does not equal 6/2*(1+2)

    Juxtaposition (in this case, multiplying using brackets instead of the x sign), takes precedence over multiplication and division.

    Have a read here.

    Also, on my Casio scientific calculator:

    6/2*3 = 9

    and

    6/2(3) = 1


    .
     
    Last edited: May 2, 2011
  8. KeepItSimpleStupid

    KeepItSimpleStupid Well-Known Member Most Helpful Member

    Joined:
    Oct 30, 2010
    Messages:
    9,916
    Likes:
    1,097
    ONLINE
  9. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,018
    Likes:
    317
    Location:
    Brisbane Australia
    ONLINE
    I can see this getting to 20 pages as well.

    Mike.
     
  10. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,029
    Likes:
    951
    Location:
    NJ
    Hello there,

    Lets see if we can cut the pages down right now :)


    Sometimes the answer to a question depends on the background context. You can not answer it either way until you decide on a priority, and the priority depends on the context.

    For example, if the context is "pure mathematics" then the answer has to be 9 because multiplication and division both have the same priority. This is the same as pure algebra, where the order of operations is multiplication and division before addition and subtraction, but there is no preference for multiplication over division.

    On the other hand, if the context is one of those calculators that defines an implied multiplication to have priority over division, then no sign between numbers will be a multiplication that takes priority over division.

    It just so happened that in the past i wrote an entire program for a programmable calculator that does scientific calculations and integrations and even solves differential equations, and one of the things i made sure to do was prioritize the multiplications the same as the divisions so the calculator would always handle these operations as close as possible to the way a mathematician would do it. I also took part in the writing of language interpreter programs that had to handle algebraic expressions, and i was sure to do the same there as were all the writers before me. I can say first hand that it is better to program the calculator or programming language interpreter mathematics as pure algebraic, although that's not the only possible way to do it.

    The bottom line is you have to know how the device or program will handle your math expressions, and where you are to migrate from one device to another you have to be ready to translate by hand the expressions from one device for use on another. That means if your calculator handles implied multiplications as higher priority (giving you an answer of 1) and you transfer it to another program that does not recognize that, then you have to recode it into 6/(2*(1+2)) or else you will not get the result you are expecting.

    Just to illustrate the coding of a math expression handler, one of the first things to do is to encode the priority of each operation, and since each operation is a character, that can be used as an index into an array such as:
    p['+']=2;
    p['-']=2;
    p['*']=3;
    p['/']=3;

    where you can note that add and subtract have priority 2, while multiplication and division have higher priority but both the same. This method of prioritizing produces a result of 9.

    The priority of those above plus a higher priority for implied multiplication might look like this:
    p['+']=2;
    p['-']=2;
    p['*']=3;
    p['/']=3;
    p[' ']=4;

    where the implied multiplication is done with a space rather than '*', and has higher priority so it would be done before operations involving '*'. This kind of prioritizing would produce a result of 1.

    So you can see that the result depends on how the guy who programmed it decided to do it, and that's about the end of it.

    Of course parens always have higher priority than the other operations.
     
    Last edited: May 2, 2011
  11. Gobbledok

    Gobbledok Active Member

    Joined:
    Mar 9, 2008
    Messages:
    452
    Likes:
    34
    Location:
    Toowoomba, Australia
    MrAl, nice answer.

    Do distributive rules comes into it at all?

    For example:

    A(B+C) = AB + AC

    Therefore

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

    I think the problem comes from what people read A as. Some people read it as A = 6 and some people erroneously (in my opinion) read it as A = 6/2.

    I think that if it should be read as A = 6/2, then 6/2 should have brackets.
     
  12. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
    I sent an email to Wolfram about that one. They have a great tool there, but even the greatest piece of software can have bugs in it.. or a feature if the bug is documented. Lets see if they will answer.

    Wolfram Alpha gives different results to

    6÷A(1+2)
    and
    6÷A*(1+2)

    But the same result to

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

    6÷2(1+2), 6÷2*(1+2), 6÷A*(1+2), 6÷A(1+2), A=2 - Wolfram|Alpha
    If it is not a bug, I would like to know the logic behind those results.
     
    Last edited: May 2, 2011
  13. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,029
    Likes:
    951
    Location:
    NJ
    Hi again,

    I take it my previous reply helped to clear things up a bit?

    There are at least two very different types of calculators, symbolic and numeric. The numeric type handle calculations with actual numbers like 1,2, 3.234, etc., while the symbolic type calculators handle calculations like A*(B+C) => A*B+A*C or the other way around, A*B+A*C => A*(B+C).

    The distributive law only comes in for symbolic calculators. For numeric calculations, the part of the expression inside the parens is done first, followed by what is outside of them. It all takes place as part of the parsing of the expression. As each symbol (like +,-, etc) is read and each number is read, it is either used right away or put on a queue for later inclusion depending on the priority list i was talking about in my previous post. It's quite interesting really, and one of the most basic types of calculators uses a sort of 'train track' type algorithm, where one thing comes in and gets used or stored on another 'track' until it is called for later. I think there should be stuff on the web about this kind of algorithm if you are interested. They probably also go into detail about how to handle other operations too like exponentiation (a^b) and function calls ( f(x)=x^2+x+1 for example).
     
  14. Gobbledok

    Gobbledok Active Member

    Joined:
    Mar 9, 2008
    Messages:
    452
    Likes:
    34
    Location:
    Toowoomba, Australia
    Well, sortof. I still think the answer is 1 ;)

    If not because of distribution then because of juxtaposition. Though some people follow different rules for juxtaposition, too. Some take it as meaning exactly the same as multiplied by, and some take it to have a slightly higher priority. I was always taught that it took a higher priority than multiplication and division.

    I'm not sure anybody knows what's right :)
     
  15. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,672
    Likes:
    215
    Location:
    Brisbane, Australia
    So there is no consensus on any forum re the relative precedences of implicit/explicit multiplication...

    The link you provided [in a subsequent post] even states that neither approach (i.e. implicit/explicit multiplication equivalence OR implicit multiplication precedence) is universally accepted. Is it not possible that the equation is potentially ambiguous?

    Unless you can find a valid reference standard for the actual accepted operator precedences, there's really no point in arguing either side, is there?

    Although I would personally expect multiplication by juxtaposition (implicit mult) to have greater precedence than explicit multiplication, that has no bearing on the fact (whatever that may be).

    The second is not quadratic (nor are the others).
    For BEDMAS/BEMDAS it should be noted that subtraction should generally occur before addition.
     
  16. Gobbledok

    Gobbledok Active Member

    Joined:
    Mar 9, 2008
    Messages:
    452
    Likes:
    34
    Location:
    Toowoomba, Australia
    Well it did say "The general consensus among math people is that "multiplication by juxtaposition" (that is, multiplying by just putting things next to each other, rather than using the "×" sign) indicates that the juxtaposed values must be multiplied together before processing other operations." But no, it didn't say that either way is universally accepted.

    More than anything, I wanted to see which way was more accepted on here. Also, (I think) it makes interesting conversation.
     
  17. stephan.b2hv

    stephan.b2hv Banned

    Joined:
    May 3, 2011
    Messages:
    1
    Likes:
    0
    Location:
    Riedstraße 1 . 6833 Klaus . Vorarlberg/Austria
    I believe it is 9 and others think that it is 1. For it to be it should have another set of parenthesis and it would look like 6/(2(1+2)). The way I see it, it would simplify to 6/2*3 and according to Order of Operations, multiplication and Division have equal presidence so you do the problem from left to right. thats in my own opinion.

    b2hv.com
    high voltage
     
  18. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
    I investigated this further.

    Wolfram Mathematica gives:

    [Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode 84488a3877e42ed70da47ca51f08df11.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o a390a89901f1a1590a1e44e553723ded-2.png 84488a3877e42ed70da47ca51f08df11.dvi]

    [Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode d3a5c23563d21965a4089ba06f4e0b84.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 817ad6b2c0082fc68a2deb7252ac0d96-2.png d3a5c23563d21965a4089ba06f4e0b84.dvi]

    [Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode c0d777b0c71451cd0c98351b0c8737db.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 0fa5b4d4eb6e78c477f261d50207b831-2.png c0d777b0c71451cd0c98351b0c8737db.dvi]

    [Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode aa3105efa0b61990805c5c8ff5b685f6.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 3de7d16581d282d5ac13b77a451c8de0-2.png aa3105efa0b61990805c5c8ff5b685f6.dvi]

    Wolfram Alpha gives:

    [Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode e339e933bd31dfcf37a262441618e659.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o a390a89901f1a1590a1e44e553723ded-2.png e339e933bd31dfcf37a262441618e659.dvi]

    [Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode e119220d071842ca079caf807c9d43ba.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 817ad6b2c0082fc68a2deb7252ac0d96-2.png e119220d071842ca079caf807c9d43ba.dvi]

    [Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode 78737506b7af3afbca48072cf4d976b1.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 387eb0062ad65a0f4559633b286c133a-2.png 78737506b7af3afbca48072cf4d976b1.dvi]

    [Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode 91ed13bebe7b08bff0d689380bdc66a8.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 3de7d16581d282d5ac13b77a451c8de0-2.png 91ed13bebe7b08bff0d689380bdc66a8.dvi]

    Edit: I noticed that the result is different if there is a space between the symbol A and the term (1+2). Wolfram Mathematica inserts (forces) the space automatically and Wolfram Alpha allows both cases.
     
    Last edited: May 3, 2011
  19. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,029
    Likes:
    951
    Location:
    NJ
    Hi again,


    There wont be any 'consensus' that works in every possible circumstance because as i was saying the software itself decides which way to compute it. There is no real right or wrong here, it's a matter of who programmed it. That's why you'll see a different result for different software.
     
  20. aljamri

    aljamri Member

    Joined:
    Jun 12, 2006
    Messages:
    694
    Likes:
    6
    B O D M A S

    B Brackets ( )

    O Of

    D Division /

    M Multiplication x

    A Addition +

    S Subtraction -

    so the answer is 1
     
  21. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,672
    Likes:
    215
    Location:
    Brisbane, Australia
    I'm sorry, I got the impression you had an agenda (that you wanted people to agree with your views/beliefs):
    As far as interesting.. to me it's about as interesting as a discussion on proving which faith is correct :confused:

    I think you've added some extra brackets up there... You have done a substitution based on the assumption that the implicit has the higher precedence.

    e.g., taking the same approach
    if AB + AC = (A(B+C)) -- which it does
    Therefore, after substitution:
    6/AB+AC = 6/(A(B+C)) -- which it doesn't
     
Thread Status:
Not open for further replies.

Share This Page