These fields are all optional and need only
be supplied if you would like a direct reply.
Subject
Your email address
Your real name
You must answer this!
If you don't, my spam filtering will
ensure that I never see your email.
What's 8 plus five (in digits only)?
Please make your changes here and then
Editing tips and layout rules.
File: AMatterOfConvention ''' <link rel="alternate" type="application/rss+xml" ''' href="/rss.xml" title="RSS Feed"> ********> width="25%" |>> ''' <a title="Subscribe to my feed" ''' rel="alternate" ''' href="https://www.solipsys.co.uk/rss.xml"> ''' <img style="border-width: 0px;" ''' src="https://www.feedburner.com/fb/images/pub/feed-icon32x32.png" ''' align="middle" ''' alt="" />Subscribe!</a> _ ''' <a href="https://twitter.com/ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/new/images/TwitterButton.png" ''' title="By: TwitterButtons.net" ''' width="212" height="69" ''' alt="@ColinTheMathmo" ''' /></a> <<| ---- My lastest posts can be found here: * ColinsBlog ---- Previous blog posts: * DoYouNourishOrTarnish * BinarySearchReconsidered * TwoEqualsFour * TheLostPropertyOffice * TheForgivingUserInterface * SettingUpRSS * WithdrawingFromHackerNews ---- Additionally, some earlier writings: * RandomWritings. * ColinsBlog2010 * ColinsBlog2009 * ColinsBlog2008 * ColinsBlog2007 * ColinsBlogBefore2007 ******** !! A Matter of Convention - 2011/05/09 [[[> ''' <a href="#toc_name001">There's an<br>addendum</a> ]]] A friend of mine, JamesGrime, is becoming quite well known both for his mathematics presentations, as well as for his videos on ''' YouTube. He's really quite good, but recently he complained that he was getting a lot of requests to settle a matter. He didn't really want to talk about it, but it's this: |>> What is the value of *6/2(2+1)* ?? <<| Some people were claiming it's 9, and others were claiming it's 1. And it all depends on whether you think of it as: |>> ********> {{{ 6 ------- 2*(2+1) }}} ******** _ or ******** {{{ 6 --- * (2+1) 2 }}} ********< <<| To put it into computing terms, it's the difference between: |>> ********> 6/(2*(2+1)) ******** and ******** (6/2)*(2+1) ********< <<| So which is it? Without prior knowledge, and trying to work it out from scratch, for yourself, with no experience and no advice, there is nothing to choose between these. To reduce ambiguity, and to ensure there is no possibility of misunderstanding, we can bracket the expression fully, and then there is no doubt. But over time, and performing many calculations, that becomes incredibly tedious. So tedious that a shortcut must be made, and the shortcut that has evolved is to say that * *B* : brackets are evaluated first, then * *O* : other stuff, like exponentiation and radicals, then * *M*&*D* : multiplication and division, reading left to right, then * *A*&*S* : addition and subtraction, reading left to right. Using that convention we reduce the expression as follows: * 6/2(2+1) : First, insert the implied multiplication, giving * 6/2*(2+1) : Now evaluate the bracket, giving * 6/2*3 : which contains division and multiplication, which we evaluate left to right, giving * 3*3 : and then * 9. But */why/* is this the convention? The short answer is that there is no short answer. To some extent you simply need a convention, and this is as good as any other, except that when you deal with many expressions over many calculations, you find that this one is easier. In some sense it feels more natural. Multiplication "binds more closely," and addition comes after. More, there is really no such thing as division or subtraction, there is only multiplying by the inverse, and adding the negative. In a sense it's like silver service. Food should be served from the left, and plates removed from the right. It is simpler that way, but it could be a different combination. It's a convention. If we all do it the same way, we all know what to expect, and life is made a little easier. There's no reason to drive on the left or the right, so long as we all do the same thing. So when you have to evaluate 1+2*3 we simply have to remember that we do the multiplication first. We get 1+6, and not 3*3. When you do it often enough it becomes natural and you stop worrying about it until you have to explain it to someone who doesn't know the convention. Then suddenly it's hard again. ---- !! Addendum: I've had several emails about this now, and interestingly enough they are split fairly evenly. There are two arguments: ********> [[[ 6/2(2+1) clearly means 6/(2(2+1)) because writing it without the explicit multiplication clearly means that the 2 and the (2+1) belong as a single entity. Hence the answer is 1. ]]] ******** [[[ 6/2(2+1) clearly means (6/2)(2+1) because the multiplication, even though implicit, is still there, and so we should put it in and follow the *BOMDAS* convention. Hence the answer is 9. ]]] ********< There's still one interpretation missing, though. |>> [[[ |>> *DON'T*DO*THIS!* It's ambiguous, and should _ not be written like this _ because it leads to problems. <<| ]]] <<| That sums it up, really. ---- |>> | |>> <<<< Prev <<<< ---- DoYouNourishOrTarnish <<| | : | |>> >>>> Next >>>> ---- DecisionTreesInGames ... <<| | ---- ********> ''' <a href="https://twitter.com/ColinTheMathmo">You should follow me on twitter</a> ''' <img src="/cgi-bin/CountHits.py?AMatterOfConvention" alt="" /> ******** ''' <a href="https://twitter.com/ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/new/images/TwitterButton.png" ''' title="By: TwitterButtons.net" ''' width="212" height="69" ''' alt="@ColinTheMathmo" ''' /></a> ********< <<| ---- !! Send us a comment ... ''' <form action="https://www.solipsys.co.uk/cgi-bin/FormMail.pl" method=post> ''' <input type=hidden name="recipient" value="colinsblogcomment@solipsys.co.uk"> ''' <input type=hidden name="subject" value="Blog comment : AMatterOfConvention" > ''' <input type=hidden name="redirect" value="https://www.solipsys.co.uk/new/ThankYouForYourComment.html" > ''' <input type=hidden name="missing_fields_redirect" value="https://www.solipsys.co.uk/RequestError.html"> ''' <input type=hidden name="env_report" value="REMOTE_HOST, REMOTE_ADDR, HTTP_USER_AGENT" > ''' <input type=hidden name="print_blank_fields" value="1" > ********> width="47%" You can send us a message here. It doesn't get published, it just sends us an email, and is an easy way to ask any questions, or make any comments, without having to send a separate email. So just fill in the boxes and then ''' <font size="+4"><INPUT TYPE="submit" VALUE="CLICK HERE TO SEND"></font> ******** width="53%" ********< ''' <table cellpadding="5"> ''' <tr> ''' <td valign="top">Your name </td> <td valign="top">:</td> ''' <td> <input type=text name="realname" size="48"> </td> ''' <tr> ''' <td valign="top">Email </td> <td valign="top">:</td> ''' <td> <input type=text name="email" size="48"> </td> ''' </tr> ''' <tr> ''' <td valign="top">Message </td> <td valign="top">:</td> ''' <td> <TEXTAREA NAME="Message" ROWS=10 COLS=64></TEXTAREA> </td> ''' </tr> ''' </table> ''' <center> ''' <font size="+4"> ''' <INPUT TYPE="submit" VALUE="CLICK HERE TO SEND"> ''' </font> ''' </center> ''' </form> ********<