5

Let's pretend, for a second, that we used PEASMD instead of PEMDAS. That is, addition/subtraction and multiplication/division are switched. Is it possible to write: $$(a\times b)+c$$ without parentheses?

EDIT: For example, the expression $(a\times b)+a+b+1$ can be written as $a+1\times b+1$, which doesn't use parentheses.

  • It is completely unclear what you are asking. It is manifestly impossible to write a string of symbols like the one in your example that includes a left and a right bracket without including a left and a right bracket. The usual conventions for omitting brackets when interpreting the string of symbols in your example do not require the brackets, but if you changed those conventions the brackets might be required. – Rob Arthan Aug 05 '15 at 22:32
  • @RobArthan What I meant was: Is there an expression that does not include parentheses and is equivalent to $(a\times b)+c$? – Akiva Weinberger Aug 05 '15 at 22:34
  • If you make multiplication have lower precedence then addition then obviously no. – Rob Arthan Aug 05 '15 at 22:35
  • @RobArthan SE318 has given an answer already, which means it is possible. (And even if you don't allow fraction bars, it's definitely far from obvious whether or not it's impossible.) – Akiva Weinberger Aug 05 '15 at 22:36
  • @RobArthan I'll edit to make my question more clear. – Akiva Weinberger Aug 05 '15 at 22:37
  • Yes, but if you look carefully at that answer, you'll find that it's wrong. – Rob Arthan Aug 05 '15 at 22:38
  • It depends on the syntax you're allowing. I assume all you want to allow is the symbols $a, b, c$, any other amount of variable symbols $x, y, z$ etc., constants, and the operators $+, -, /, \times$ and exponentiation? Then I'd say it's impossible and you could prove it by structural induction on the terms of the language. – Colm Bhandal Aug 05 '15 at 22:40
  • Please explain Aunt Sally's Master Degree? – Registered User Aug 06 '15 at 02:14

2 Answers2

2

$(a*b)+c=a*b+\frac{c}{a}$ as long as you allow horizontal fractions to have implied parentheses.

That is one of the weirdest equalities I have ever written...

To see this, observe that according to PEASMD, $a*b+\frac{c}{a}=a*(b+(c/a))$ (note the use of the implied parentheses for horizontal fractions.) then by distribution we get$ (a*b)+(a*(c/a)) $or $(a*b)+c$

Sean English
  • 3,789
  • 1
    Fraction probably gained its implicit parentheses in our common system of multiplication before addition. In the alternate universe, this precedence may not make sense. – peterwhy Aug 05 '15 at 22:20
  • $(a \times b) + c$ is equal to neither of $a \times b + \frac{c}{a}$ or $\frac{a \times b + c}{a}$ in general. – Rob Arthan Aug 05 '15 at 22:40
  • 1
    @RobArthan Yes, it is. We are working with a different operator precedence here. That's the whole point of the question. Look at the first two sentences of the question. – Akiva Weinberger Aug 05 '15 at 22:41
  • @columbus8myhw: no matter how you put the brackets in, the extra division by $a$ causes a problem in SE318''s answer. – Rob Arthan Aug 05 '15 at 22:46
  • @peterwhy talks sense. This equality doesn't hold according to the rules of the question. $\frac{c}{a}$ is $c$ divided by $a$, and division, in this new world, comes after addition. So the term $ab+\frac{c}{a} = \frac{a(b + c)}{a} = a + b \neq (a \times b) + c$. – Colm Bhandal Aug 05 '15 at 22:47
  • @ColmBhandal "...as long as you allow horizontal fractions to have implied parentheses." – Akiva Weinberger Aug 05 '15 at 22:48
  • @Colm Bhandal, yes. You are correct in a strict sense. As I mentioned, you need parentheses implied by a horizontal fraction(that would not be implied by / ) this is something extra, and would require an extra symbol to be in the calculus in order for this to be an arithmetic WFF without parentheses. – Sean English Aug 05 '15 at 22:55
  • Yes this is fair enough, but I think it's sort of "cheating" with respect to the question's true nature, which I'd interpret as really being one of syntax. What's really being done here, is the horizontal bar "version" of division is being given precedence over the other "version" (so the language now has 2 versions of division), which defeats the whole point of the question (I'd say), being that division has been given a lower precedence to addition/subtraction. In that case, couldn't we just allow another "version" of multiplication e.g. $ab + c$, and say that brackets on $ab$ are implied? – Colm Bhandal Aug 05 '15 at 23:36
  • I only distinguish because in our current symbol the horizontal fraction has different properties as far as written mathematics tends to go (how can you write (a+b)/c without parentheses and without using more than one c? $\frac{a+b}{c}$. – Sean English Aug 05 '15 at 23:39
  • @SE318 fair enough, it was a good example to highlight the ambiguity in the question. – Colm Bhandal Aug 06 '15 at 00:24
  • @SE318 Also: there is technically another problem with your answer. $\frac{c}{a}$ is only defined for $a \neq 0$. If $a = 0$, the original term evaluates to $c$, whereas your term is undefined. – Colm Bhandal Aug 06 '15 at 00:34
  • @Colm Bhandal that is another good point. Thus my method still works(sort of) but must be broken up into two cases according to the value of a. – Sean English Aug 06 '15 at 00:39
2

Note: This is not a full answer, but I think it offers some useful ideas towards understanding the nature of the question and also provides a sketch towards a solution.

This is a question of syntax. Is there a string of symbols that, using no brackets, and the given operator precedence, evaluates to the same term as $(a \times b) + c$, for all values of $a, b, c$. We must then ask, what are the symbols allowed and what does evaluation mean? Here is a simple start to answer this question. It is by no means "the" correct approach, but it highlights the subtlety of the underlying assumptions needed, and highlights that this is really a formal-syntax question.

To begin, we have a language of expressions. These are written as alternating sequences of symbols and operators, odd in length always. A symbol is either a "variable", or a known constant. A variable is any string of letters, say. This includes the strings "a", "b" and "c". An operator is one of the $5$ standard operators $+, -, \times$ \ and ^. A constant is $e$, $2$ etc. For the moment, we'll disallow any other symbols e.g. known functions such as sine, cosine.

The meaning of such a list is a function in all its variables. This function is unambiguously defined by bracketing according to the precedence rules. We assume an infix notation for operators. For example, $[x, \times, 2, \times, 3]$ "means" the function $\lambda x \rightarrow 6x$, using lambda calculus notation.


Edit: To prove a special case of this ignoring exponentiation we reduce everything to a normal form. We first notice that everything can be written as a product of sums, with terms in sums being either the variables $a$, $b$ or $c$, or constants.

  • We can ignore occurrences of other variables because, they will have to cancel out to leave us with a term in only $a$, $b$ and $c$, so we can just replace them with any constant we like and the term reduces to one in only those $3$ variables.
  • The reason we can ignore division is as follows. Suppose a sum term $(x + y + z + \dots)$ appeared in the denominator. Then either it is constant, in which case it can be replaced with multiplication by $\frac{1}{x + y + z + \dots}$, which itself is just a constant. Otherwise, the term contains at least one variable $a$, $b$ or $c$. In this case, we can make the term go to zero by the appropriate choice of $a$, $b$ and $c$, and the entire term becomes undefined. This can't happen, so such a case cannot be allowed.

Now, we can further reduce to a product of sums in which each sum has at least one variable, at most one constant, and the whole thing is multiplied by a constant. That is:

$$(x_{1, 1} + x_{1, 2} + \dots + d_1)(x_{2, 1} + x_{2, 2} + \dots +d_2)\dots(x_{n, 1} + x_{n, 2} + \dots + d_n)d$$

For some constants $d_i, d$, variables $x_{i, j} \in \{a, b, c\}$.

We then show that $n \leq 2$. Otherwise, for the case of $a = b = c$, we have a cubic polynomial which is equal to a quadratic, which cannot be true for all $a$. Now we can also show $n \geq 2$ and so $n = 2$. This is true because otherwise, we get a linear term compared to a quadratic one, which cannot be true in all cases. So our term is always:

$$(x_{1, 1} + x_{1, 2} + \dots + d_1)(x_{2, 1} + x_{2, 2} + \dots +d_2)d$$

Now, $d$ can't be zero because then this term would always be zero. Also, setting $a$ and $c$ to $0$, this term must equal to $0$ for all $b$. So $b$ cannot appear in both sums, and the constant in the sum opposite that of $b$ must be zero. WLOG, then our expression is:

$$(b + xa + yc + d_1)(wa + uc)d$$

Where $x, y, w, u \in \{0, 1\}$. But setting $c = 0, b = 1$ the above must equal $a$, for all $a$:

$$(1 + xa + d_1)(wa)d = a$$

But this is impossible, because the LHS term is quadratic with respect to $a$, whereas the RHS term is linear. This is a contradiction, and so, without exponentiation, an equivalent bracketless statement is impossible.

Note: I have a hunch that the exponentiation case may follow from similar arguments of function complexity (growth rate).

Colm Bhandal
  • 4,649
  • Hm… perhaps there's some property that's true of all bracket-free functions but false of $(a\times b)+c$? If so, then we'd have shown that there is no solution. (And we would prove that it is true of all bracket-free functions by using your structural induction.) – Akiva Weinberger Aug 05 '15 at 23:41
  • Good idea. You might even be able to pove that this property holds even under the assumption that $a, b, c$ are all natural numbers. The advantage being that natural numbers themselves can be defined inductively... – Colm Bhandal Aug 05 '15 at 23:52
  • Perhaps we could consider a normal form. Usually this is a sum of products, but in this new precedence, it will be a product of sums. So all terms will parse to $(x_1 + x_2 + \dots) \times (x_k + x_{k + 1} + \dots) \times \dots \times$. We'd then have to allow $-x$ and $\frac{1}{x}$, for some symbol $x$, as terms of the language, but we could then do away with subtraction and division and analyse this normal form. – Colm Bhandal Aug 06 '15 at 00:37
  • Including subtraction and division, we'd have$$\frac{(x_1+\dots+x_n-\dots-x_m)\times\dots} {(x_p+\dots+x_q-\dots-x_r)\times\dots}$$or something similar. – Akiva Weinberger Aug 06 '15 at 00:40
  • And that doesn't talk about exponents, actually. – Akiva Weinberger Aug 06 '15 at 00:41
  • I have added an answer using the normal form. Maybe now it is worth exploring other questions. E.g. the case where $a, b, c \neq 0$ would be harder to deal with. – Colm Bhandal Aug 06 '15 at 01:54
  • I just realised I ignored exponents. But I'd say similar arguments in terms of growth rate of functions could be applied to deal with these. – Colm Bhandal Aug 06 '15 at 02:00