Go Down

Topic: 48÷2(9+3) = ? (Read 8248 times) previous topic - next topic

Valalvax


Quote
without this [missing] sign the equation is not valid


And that, ladies and gentlemen, is why the question itself is in question.


There's no missing sign, 2(2) means 2*2 just as much as 2X means X*2, there is not a "stronger" bond between it and the other multiplication or anysuch bullshit... it means literally 2*2, not some sort of bond between the two numbers

Nick Gammon

Just for the fun of it, I am going to demonstrate how the answer is 12096. And you are most welcome to try this out at home ...

Code: [Select]
class num {

  // private value of our number 
  long _n;
 
  public:
 
  // constructors
  num () : _n (0) {};
  num (const long n) : _n (n) {};
  num (const num & rhs) : _n (rhs) {};
 
  // get value back
  operator long () const { return _n; }
 
   // operations on the number
   num operator+ (const num & n1) { _n += n1; return *this; };
   num operator- (const num & n1) { _n -= n1; return *this; };
   num operator* (const num & n1) { _n *= n1 * 42; return *this; };
   num operator/ (const num & n1) { _n /= n1; return *this; };
};  // end class num


void setup ()
{
 
  // set up our numbers
  num a (48);
  num b (2);
  num c (9);
  num d (3);
 
  // work out the answer
  num ans = a / b * (c + d);   // that is, 48 / 2 * (9 + 3)
 
  // display it
  Serial.begin (115200);
  Serial.println ();
  Serial.print ("The answer is ... ");
  Serial.println (ans);
}

void loop () {}


Result:

Code: [Select]
The answer is ... 12096


To achieve this I have redefined what the multiplication operator does, namely multiply the two terms by each other and then by 42 (as a nod towards the dolphins).

If you change "42" in the sketch to "1" then you get the number 288, just to show that I haven't made a major programming error.

What this demonstrates is, that unless you define the domain of the problem, the answer is meaningless. For example the original question did not mention the base of the number system in which the question was posed.

So even assuming we specify the base 10, we also need to specify the meanings of the operators, the order in which they apply, what the "missing" multiplication means (if anything), and if it means anything what precedence that takes.

Without that, well as we have shown with various calculators, the answer is not well-defined.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

westfw

Anyone else get
     | 1 + sqrt(3)*j |
??
How about
    -2 * e pi*j

(A very similar "poll" has now appeared on facebook...)

Nick Gammon

I'm going to have to assume for now that a race of hyper-intelligent pan-dimensional beings (that is, mice) are setting us all up here.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

mowcius

Quote
(A very similar "poll" has now appeared on facebook...)

I might have started that indirectly - I asked a few people :D

Quote
I'm going to have to assume for now that a race of hyper-intelligent pan-dimensional beings (that is, mice) are setting us all up here.

Sounds like a good assumption.

Onions

The answer is simple. As westfw said, if it was algebra, the question would not have the divide sign. If it was non-algebra, it would be 48÷2*(9+3) = ? or
48÷2*9+3 = ? That means the fault lies in the question, not in how you work it out.

On the assumption that it is non-algebra, you do the multiplacation and division, then the addition and subtraction. That would make it:
48÷2*9+3 = ?
48÷2=24    * 9 = 216    +3 = 219. Not 2, and not 288.


On the assumption that it is algebra, and working with the rule that implied multiplacation has a higher presedence than defined multiplacation,
the answer is:

2*(9+3) = 2*(12) = 24

48 ÷ 24 = 2


On the assumption that it is algebra, and implied multiplacation has the same presedence as defined multiplacation, the answer could either be:

2*(9+3) 
=2*(12) = 24

48 ÷ 24 = 2

or

(9+3) = 12
48 ÷ 2 = 12
12 * 12 = 144

or

288

It all depends on what rules you apply.
(I must be doing something wrong as I have got 219 and 144, which were not mentioned, but not 288, which was...)


Onions.

My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) :D

biocow

Definitions. Assumptions. Order of operations. Sheesh, do I have to spell EVERYTHING out?

OK. Solve this equation.

48÷2(9+3) = ?

Here are the rules/definitions/assumptions/etc...

  • All numbers are in base 14

  • Everything OUTSIDE the parenthesizes should be done first

  • I am awesome

  • Once the equation has been solved to a single (base 14) number, if the answer IS NOT 42 (base 14), a number between zero and 13 (again, base 14) should be chosen and either added or subtracted from it in which ever way brings it closer to 42 (base 14)

  • If the answer IS NOT 42 (base 14) then another random number zero to 13 (base 14) should be chosen and either added or subtracted from it in which ever way get's it closer to 42 (base 14)


What's the final answer?
10 PRINT CHR$(7)
20 GOTO 10

westfw

Quote
On the assumption that it is non-algebra, you do the multiplacation and division, then the addition and subtraction. That would make it:
48÷2*9+3 = ?

I think you'll have a hard time convincing anyone that you get to ignore the "do the part in parenthesis first" rule, regardless of context.  (hmm.  I guess if it were prose, parenthesis would mean something different.)

Nick Gammon

On the assumption that ... and working with the rule that ...


The assumptions are the whole problem. And just to show what happens when you assume things, here is an old joke:

Quote
A physicist, a chemist and an economist are stranded on an island, with nothing to eat.
A can of soup washes ashore.
The physicist says, "Let's smash the can open with a rock".
The chemist says, "Let's build a fire and heat the can first".
The economist says, "Let's assume that we have a can-opener ...".

Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up