Poll
 2 6 (33.3%) 288 10 (55.6%) Go create something! 2 (11.1%)
Total Voters: 18

 Pages: 1 ... 6 7 [8]   Go Down
 Author Topic: 48÷2(9+3) = ?  (Read 4184 times) 0 Members and 1 Guest are viewing this topic.
Georgia, US
Offline
Sr. Member
Karma: 4
Posts: 372
Arduino makes my head hurt :(
 « Reply #105 on: April 28, 2011, 12:13:00 am » Bigger Smaller Reset

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
 Logged

Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
 « Reply #106 on: April 28, 2011, 01:01:47 am » Bigger Smaller Reset

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:
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);

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:

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

SF Bay Area (USA)
Offline
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
 « Reply #107 on: April 28, 2011, 02:06:21 am » Bigger Smaller Reset

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

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

Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
 « Reply #108 on: April 28, 2011, 03:08:52 am » Bigger Smaller Reset

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

North Yorkshire, UK
Offline
Karma: 104
Posts: 5531
 « Reply #109 on: April 28, 2011, 05:27:38 am » Bigger Smaller Reset

Quote
(A very similar "poll" has now appeared on facebook...)
I might have started that indirectly - I asked a few people

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

Newcastle, England
Offline
Sr. Member
Karma: 2
Posts: 489
Always learning!
 « Reply #110 on: April 28, 2011, 01:11:55 pm » Bigger Smaller Reset

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,

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.

 Logged

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

Silly-con Valley, Ca, U.S.
Offline
Sr. Member
Karma: 17
Posts: 420
Lernin' to tinker
 « Reply #111 on: April 28, 2011, 01:15:56 pm » Bigger Smaller Reset

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)

 Logged

10 PRINT CHR\$(7)
20 GOTO 10

SF Bay Area (USA)
Offline
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
 « Reply #112 on: April 28, 2011, 07:19:08 pm » Bigger Smaller Reset

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.)
 Logged

Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
 « Reply #113 on: April 28, 2011, 08:31:37 pm » Bigger Smaller Reset

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 ...".
 Logged

 Pages: 1 ... 6 7 [8]   Go Up