Continue to Site

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.

  • 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.

6÷2(1+2)=?

Status
Not open for further replies.

Gobbledok

Active Member
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?
 
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,
 
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.
 
a1. [latex]6/2(1+2)[/latex]

a2. [latex]6/2*3[/latex] ; did nothing but removed the parenthesis. This is the same as [latex]\frac{6}{2}(3)[/latex]

a3. [latex]3*3[/latex] ; Nothing but left to right evaluation

a4. [latex]9 [/latex]

Way B:

b1. [latex] \frac{6}{2}(1+2)[/latex]

b2. [latex]9[/latex]

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:
a2. [latex]6/2*3[/latex] ; did nothing but removed the parenthesis

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:
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.
I can see this getting to 20 pages as well.

Mike.
 
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:
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.
 
I have another card up my sleave: Wolfram|Alpha: Computational Knowledge Engine which is the inventer of Mathmatica
Here is his say: 6/2(1+2) - Wolfram|Alpha

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:
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).
 
I take it my previous reply helped to clear things up a bit?

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 :)
 
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?
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).

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,
The second is not quadratic (nor are the others).
For BEDMAS/BEMDAS it should be noted that subtraction should generally occur before addition.
 
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?

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.
 
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
 
I investigated this further.

Wolfram Mathematica gives:

[latex]
\6\div 2(1+2) = 9
[/latex]

[latex]
\6\div 2\times(1+2) = 9
[/latex]

[latex]
\6\div A(1+2) = \frac{18}{A}
[/latex]

[latex]
\6\div A\times(1+2) = \frac{18}{A}
[/latex]

Wolfram Alpha gives:

[latex]
\6\div 2(1+2) = 9
[/latex]

[latex]
\6\div 2\times(1+2) = 9
[/latex]

[latex]
\6\div A(1+2) = \frac{6}{A(3)}
[/latex]

[latex]
\6\div A\times(1+2) = \frac{18}{A}
[/latex]

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:
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.
 
B O D M A S

B Brackets ( )

O Of

D Division /

M Multiplication x

A Addition +

S Subtraction -

so the answer is 1
 
More than anything, I wanted to see which way was more accepted on here. Also, (I think) it makes interesting conversation.
I'm sorry, I got the impression you had an agenda (that you wanted people to agree with your views/beliefs):
But that's where you went wrong...Juxtaposition (in this case, multiplying using brackets instead of the x sign), takes precedence over multiplication and division.

As far as interesting.. to me it's about as interesting as a discussion on proving which faith is correct :confused:

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.
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
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top