10
$\begingroup$

The symbols "!" and "?" stands for addition and subtraction, (not necessarily in that order) but for subtraction it can be the left argument subtract for the right or vice versa. e.g. a!b can be a-b, a+b or b-a. Variables and brackets can be used as usual. How to write $20a-18b$ for sure, with 'a' and 'b'?

My attempt: in the contest I found an expression that equals to 2(a-b), but I can't remember what it was. It's like ((a!b)?a)!((b?a)!b) or something like that. But I don't know how to add two different things in general.

Is it possible to form an expression that represent a+b?

Edit: $(a!a?a)?[(a!a)?(a!a)]=a$

$\endgroup$
  • 2
    $\begingroup$ Can you explain the rules here more precisely? Are we looking for an expression that has a fixed meaning, no matter how ! and ? are interpreted (with one being addition and the other being subtraction in some order)? Does each symbol always have to be interpreted with the same meaning? $\endgroup$ – Eric Wofsey May 6 '18 at 23:08
  • 2
    $\begingroup$ The same symbol has to have the same meaning. $\endgroup$ – abc... May 6 '18 at 23:09
  • 3
    $\begingroup$ One example is that $(a!b)?(b!a)=0$. If $!$ is minus, the two parenthesized things are negatives and we add them. If $!$ is plus the two parenthesized strings are both $a+b$ and we subtract them. $\endgroup$ – Ross Millikan May 6 '18 at 23:12
  • 3
    $\begingroup$ @abc...: I thought it showed the general approach that is needed for the problem. We need to find clever ways to combine the operators so we get the same answer despite the swapping of the meanings. $\endgroup$ – Ross Millikan May 6 '18 at 23:14
  • 2
    $\begingroup$ @MishaLavrov Tournament of the Towns 2018 A level Q7 $\endgroup$ – abc... May 6 '18 at 23:38
25
$\begingroup$

Let me write the interpretations of any string using ? and ! as a 4-tuple. The first entry is the interpretation where ? is addition and ! is subtraction, the second is where ? is addition and ! is reversed subtraction, the third is where ? is subtraction and ! is addition, and the fourth is where ? is reversed subtraction and ! is addition. So for instance, I will write $$a?b=(a+b,a+b,a-b,b-a)$$ and $$a!b=(a-b,b-a,a+b,a+b).$$

The key trick is that we can negate one entry of a tuple at a time. Indeed, notice first that $$(a!a)?(a!a)=(0,0,0,0)$$ (and so I will subsequently abbreviate this string as just $0$). Therefore $$0!a=(-a,a,a,a),$$ $$a!0=(a,-a,a,a),$$ $$0?a=(a,a,-a,a),$$ and $$a?0=(a,a,a,-a).$$ Let me write the above four expressions as $F_1(a)$, $F_2(a)$, $F_3(a)$, and $F_4(a)$ (so $F_i$ just negates the $i$th coordinate).

It is now easy to make addition and negation. The addition $a+b$ can be made as $$F_4(a)?F_3(b)=(a+b,a+b,a-(-b),b-(-a))=(a+b,a+b,a+b,a+b).$$ We can also make $-a$ as $F_1(F_2(F_3(F_4(a))))$. By composing addition and negation, we can now easily represent $ma+nb$ for any integers $m$ and $n$.

$\endgroup$
  • 1
    $\begingroup$ Can you please explain the last step a bit more throughly? $\endgroup$ – abc... May 6 '18 at 23:58
  • 1
    $\begingroup$ Which part, exactly? $\endgroup$ – Eric Wofsey May 7 '18 at 0:23
  • 1
    $\begingroup$ F(a)?G(b). Why does that have to equal a+b? $\endgroup$ – abc... May 7 '18 at 0:24
  • $\begingroup$ Just write out each of the four cases... $\endgroup$ – Eric Wofsey May 7 '18 at 0:26
  • $\begingroup$ Ok I get it. Thanks. $\endgroup$ – abc... May 7 '18 at 0:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.