mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2021-09-28, 14:05   #1
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

1,487 Posts
Default 8 ÷ 2 (2 + 2)

One group of people say result is 16 another group answer is 1
Since I presume this task can only have one correct answer , what that answer will be?
pepi37 is offline   Reply With Quote
Old 2021-09-28, 14:20   #2
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

2×3×127 Posts
Default

It can have either of your solutions depending on your choice of operator precedences. (Even more if you allow more peculiar definitions.) I personally would give an implicit multiplication a higher precedence than an explicit one, since the bracket expression is visually grouped with the prefactor. But I never saw that formalised, since it is usually only a shorthand - and in this case they would be of equal precedence. Having said that, if somebody writes an expression like this, it is definitely misleading, maybe deliberately.
kruoli is online now   Reply With Quote
Old 2021-09-28, 14:24   #3
axn
 
axn's Avatar
 
Jun 2003

5,179 Posts
Default

Quote:
Originally Posted by pepi37 View Post
Since I presume this task can only have one correct answer
Wrong. The expression is ambiguous. Hence there can be more than one answer depending on how you interpret.

The ambiguity is due to two incompatible notation styles being used together. Here, the multiplication operator is implicit, but the division operator is explicit. Due to this, we could reasonably interpret as meaning 8 / 2 * (2+2) or
Code:
  8
------
2(2+2)
The way it is written, it is neither, so we need to pick an interpretation. Hence the differing answers
axn is offline   Reply With Quote
Old 2021-09-28, 19:27   #4
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

23×1,201 Posts
Lightbulb

Welcome to the world of semantics!

It is the same as (it sounds better in Russian) a some king's ruling that was passed down to minions:
"behead not pardon"
Imagine the confusion of the "project managers" of that time.
Batalov is offline   Reply With Quote
Old 2021-09-28, 20:32   #5
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

22·3·181 Posts
Default

Mathematics is way too old and too perfect for such ambiguity:
Quote:
Parentheses (simplify inside 'em)
Exponents
Multiplication and Division (from left to right)
Addition and Subtraction (from left to right)
https://www.purplemath.com/modules/orderops.htm

or just use Pari-gp, it will give you only the correct answer.

Of course you an always rely on Wikipedia to corrupt a beautiful science to nonsense. Democratic sciences anyone?


Quote:
Similarly, there can be ambiguity in the use of the slash symbol / in expressions such as 1/2n.[12] If one rewrites this expression as 1 ÷ 2n and then interprets the division symbol as indicating multiplication by the reciprocal, this becomes:

1 ÷ 2 × n = 1 ×
1
/
2
× n =
1
/
2
× n.
With this interpretation 1 ÷ 2n is equal to (1 ÷ 2)n.[1][8] However, in some of the academic literature, multiplication denoted by juxtaposition (also known as implied multiplication) is interpreted as having higher precedence than division, so that 1 ÷ 2n equals 1 ÷ (2n), not (1 ÷ 2)n. For example, the manuscript submission instructions for the Physical Review journals state that multiplication is of higher precedence than division with a slash,[22] and this is also the convention observed in prominent physics textbooks such as the Course of Theoretical Physics by Landau and Lifshitz and the Feynman Lectures on Physics.[d]
https://en.wikipedia.org/wiki/Order_...multiplication

Last fiddled with by a1call on 2021-09-28 at 20:45
a1call is offline   Reply With Quote
Old 2021-09-29, 00:31   #6
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

22×1,277 Posts
Default

Quote:
Originally Posted by a1call View Post
<snip>
or just use Pari-gp, it will give you only the correct answer.
<snip>
The "right answer" then, is "This doesn't parse." The problem is there's no operator between the 2 and the (.

In the error message, the ^ appeared directly under the (. I tried to put it there by inserting - characters, but YMMV.

Code:
? 8/2(2+2)
  ***   unused characters: 8/2(2+2)
--------------------------------------^-----

?
If you input 8/2*(2+2) Pari-GP gives 16.
Dr Sardonicus is online now   Reply With Quote
Old 2021-09-29, 09:00   #7
S485122
 
S485122's Avatar
 
"Jacob"
Sep 2006
Brussels, Belgium

1,753 Posts
Default

IMHO the rule that implicit multiplication should have a higher priority is nonsense : if the sign for a multiplication operation can be omitted, there is still a multiplication to do. Why treat it differently from a multiplication which does use a sign ?

The left to right convention is simple and unambiguous.
S485122 is online now   Reply With Quote
Old 2021-09-29, 10:10   #8
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

2·3·127 Posts
Default

Let's take the example of a1call:
Why should someone interpret 1 ÷ 2n as (1 ÷ 2)n i.e. half n? This is really counterintuitive. Giving the implicit operator precedence is also unambiguous, maybe even simpler and definitely self-evident.

Edit: Why should we treat something that is written differently inevitably the same? Math is not a conversational language which may have ambiguities etc., math should be well defined and having multiple ways to express the exact same thing is not helpful.

Last fiddled with by kruoli on 2021-09-29 at 10:13 Reason: Additions.
kruoli is online now   Reply With Quote
Old 2021-09-29, 13:46   #9
Dobri
 
"刀-比-日"
May 2018

EB16 Posts
Default

The answer could also be {8} for a finite set containing one element in the range 8 ÷ 8 from 8 to 8.
"In Italy, Poland and Russia, this notation is sometimes used in engineering to denote a range of values."
https://en.wikipedia.org/wiki/Obelus
Dobri is offline   Reply With Quote
Old 2021-09-30, 12:06   #10
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

13F416 Posts
Default

Quote:
Originally Posted by Batalov View Post
Welcome to the world of semantics!

It is the same as (it sounds better in Russian) a some king's ruling that was passed down to minions:
"behead not pardon"
Imagine the confusion of the "project managers" of that time.
This is a case where punctuation really would be a matter of life and death! "Behead, not pardon" and "Behead not, pardon" have opposite meanings.
Dr Sardonicus is online now   Reply With Quote
Old 2021-09-30, 14:16   #11
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

1,487 Posts
Default

I am very disappointed. I expected the math to be a little better defined after all :)
pepi37 is offline   Reply With Quote
Reply

Thread Tools


All times are UTC. The time now is 15:52.


Sun Nov 28 15:52:03 UTC 2021 up 128 days, 10:21, 0 users, load averages: 1.18, 1.14, 1.10

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.