Simple math problem posted on the internet

CelticFrost

SasqWatch
Joined
April 2, 2011
Messages
3,381
some facebook blah blah had this math problem posted. My wife who has facebook asked me the answer which I said is 19.0000000001

9-3/1/3+1

now the internet and there was 10,000 answer to this problem including a a math professor from MIT said the answer was 1

if it was 9-(3/(1/3))+1 it would be but not as they posted it do you not agree?
 
Joined
Apr 2, 2011
Messages
3,381
It depends on what the "order of operations" would be, that is a thing in math that tells you what order to do things in. I forget the details, but it would probably be able to help.
 
Joined
Oct 2, 2009
Messages
2,244
Location
Pacific NorthWest, USA!
So if i did 1\3= 0.33333333333
then 3\.33333333=9
9-9
plus 1
the answer is 1
okay no brackets needed then
 
Joined
Apr 2, 2011
Messages
3,381
I made a simple program
Code:
answer = 9-3/1/3+1
answer = 9

edit: No fast replies so I guess I'll go again then :)

3/1= 3
3/3=1
= 9 -1+1 = 9
 
Last edited:
Joined
Jul 10, 2007
Messages
2,974
Location
Australia
The answer is to find whoever wrote the calculation like that, and give them detention.
 
Joined
Nov 8, 2014
Messages
12,085
Yes, that depends on how you interprete 3/1/3, which given the character notation isn't entirely clear. Do we mean 3/(1/3) or (3/1)/3. First one gives 1, so the answer is 9, second gives 9 and the answer is 1.

If we wrote it by hand, we would write either

3
______
1
__
3

or

3
__
1
_____
3

But as it stands, at least in computing, we would follow the left to right rule, and the answer is 9.

BTW, using RPN the expression would be unambiguous: 3 1 3 // or 3 1/ 3/

pibbur who +
 
Thanks Pibs, you saved me the time and effort of explaining the 2 possible answers. I'm glad I read all the posts first!!
 
Joined
Aug 31, 2006
Messages
12,806
Location
Australia
in-fix, pre-fix, or post-fix?
@Corwin; still uses a calculator that does pre-fix.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
I'm with pibbur and co.
At school (many years ago) we were taught to do brackets, then exponents, then multiplication and division from left to right, and then addition and subtraction from left to right. This has held for many moons of fixing other peoples' awful financial code.

Seems odd that an MIT prof would get a different answer?

Absent any brackets, that means this:
9-3/1/3+1

Effectively becomes this:
(9-((3/1)/3))+1
 

Attachments

  • proof.png
    proof.png
    5.8 KB · Views: 68
Joined
Oct 18, 2006
Messages
2,245
Location
New Zealand
What base is it in????

Base 10. Or 16. 31. Any base >=10, actually, including the really huge ones. Like Graham's number, or Corwin's age.

pibbur who prefers base 42.
 
Last edited:
When written like that, the answer would be 1.
I’ve been taught that a division is to be performed before an addition or subtraction. And the order of operations is from left to right.
 
Joined
Aug 30, 2006
Messages
11,223
I do all my arithmetic in BASECorwin. It keeps all my numbers to a single digit.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
You do remember, that Once Upon a Time (though not in a galaxy far, far away), I was a High School Maths teacher!! :)
 
Joined
Aug 31, 2006
Messages
12,806
Location
Australia
Back
Top Bottom