Hacker News new | past | comments | ask | show | jobs | submit login
Why Twitter can't agree on a simple math equation (fosterelli.co)
7 points by chrisfosterelli on Nov 14, 2020 | hide | past | favorite | 11 comments



There is plenty of ambiguity in the common math notation, and it's not limited just to arithmetic. Some of the worst ambiguities are in calculus.

If we wanted to, we could teach a notation that is completely unambiguous. Consider (* (/ 6 2) (+ 1 2)) instead.


The notion that something as simple as:

AB/CD

Could have multiple "valid" interpretations boggles my mind. It is clear to me at least that AB/CD is the "lazy way" of writing A x B / C x D where the "dots" between A and B have been omitted by the typesetter/author.

I find it somehow disturbing that some would rather interpret this as the "lazy way" of writing (A x B) / (C x D).

I find it even more disturbing that two different modules of Cassio calculators interpret this differently.

https://twitter.com/DavePunFun/status/1327327770750271488


As a human, if you write AB/CD, you either mean (AB)/(CD), or you're writing a trick question. You do not mean (AB/C)D, because if you did, you could write the equally short ABD/C. If you're appending a multiplication by D after AB/C, you could write AB/C×D. Meaning is borne by contrast.

In any case, the practice of writing "/2π" is pervasive enough that asserting that "PEMDAS" implies ordering explicit division left-to-right with implicit multiplication is at wrong at best.


I guess we can agree to disagree on the validity of implicit multiplication.

My larger point though is if we as an "advanced society" cannot agree on what this very basic notation means then how many times have we implemented something wrong.

Check the link above for images of two Cassio calculators producing different answers for a dead simple grade 5 math problem.

Just to also be clear, are you saying that

    E = MC^2
is actually

    E = (M x C)^2
since implied multiplication suggests that:

    MC === (M x C)
rather than

    MC === M x C
and by your argument above, if you thought otherwise you would simply rearrange the formula to be:

    E = C^2 x M


Prioritizing implicit multiplication prioritizes it over other multiplications / divisions (during the "MD" part of PEMDAS). Since exponents still come before any multiplication / division, E = MC^2 is interpreted the same.


The problem isn't mathematics. The problem is the operation "÷" is not well defined. Note how this looks when variables are substituted:

6÷2(1+2) x=6, y=2

x÷y(1+y)

...

is x÷y(1+y)

A) x/y(1+y) ... 6/2(1+2) = 6/6 = 1.

or

B) x(1+y)/y ... 6(1+2)/2 = 6(3)/2 = 9.

or

C) x/y+(y+1) ... 6/2+(2+1) = 6.

I'm going with 6. Without a formal definition for "÷" 6 is just as reasonable as 1 and 9.


>Of course the vagueness is deliberate in this case

Which is why I Hate a vast majority of these types of “viral math” problems. There’s enough math-anxiety that these problems, with their intentionally poor notation really don’t do anything but add noise.


I don’t see how it can be both 1 and 9 though. In my mind it can only be 1 because anything to right of the division sign should be fully evaluated first before using the result in the division operation.


It cannot be 9. Answering 9 requires you to see notation you recognize as unintuitive (if you are not a calculator, in any case), shut up and multiply, and discard that provenance.

Possible answers are 1 and "the question is ill-formed".


PEMDAS. 1. Done.


Not really; the question switches between two different notations (explicit division and implicit multiplication) so it's not clear why those rules would apply.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: