# Getting to the Root of the Problem

TD:LR - Only the equations and bold question at the bottom are part of the puzzle; the rest is just flufftext.

After a long time of searching for the origin of the device I previously posted about, I have finally managed to track down it's creator. The device comes from a small shop out in a sleepy village in the middle of nowhere. It seems the owner is an odd sort who creates seemingly pointless devices of this ilk and then sells them to make a living. Well, obviously I couldn't resist a visit to this place myself!

Having arrived and entered the shop - a relatively small place considering all the space avalible in the village, and every shelf overflowing with contraptions & curios - I wandered over to the first thing that caught my eye. It was another calculator-ish thing, much like the last.

At this point I first noticed the shopkeeper - a short, old fellow who might be confused with a goblin if such creatures actually existed. The desk was so tall and he so short that I had not previously noticed him peering over the countertop toward me. Feeling a little anxious in his gaze, I decided to distract myself by plugging equations into the machine I had just picked up.

$4 + 5 = 9$

So far, so ordinary.

$37 + 81 = 1$

Or not. Hmmm. Well, let's try something more complex.

$256 + 72 + 25 = 2$

Most odd. Unlike the previous device, this one has all four main operators. Lets try a different tack then.

$103 * 63 = 9$

Oh, and brackets...

$(413/31) + 12 = 5$

$893 - 265 = -2$

Well, this all makes no logical sense. How is 893 smaller then 265? Uh, okay, maybe if...

At this point the 'goblin', who had somehow managed to sneak up upon me from behind, leapt up and grabbed the device from out of my hand. "You use it, you pay for it." he said, grinning and pointing toward a price tag on the shelf I had not previously noticed. "£499! For a calculator that doesn't calculate!" I stammered. "Well," said he, "I guess you don't need it if you already know what it does. How about it then?" He spun the device around in his hand. "If you can tell me what my genius invention does, you may take it for free; else you'll pay what I'm owed."

Well, I certainly wasn't about to spend £499 on a device this useless. I stood for a while in contemplation, before answering and leaving with my souvenir - without handing over any money, of course.

I now pose to you the same question. What does this device do to calculate it's output? What would be the result of the calculation $123 + 456 - 789$?

The calculator

Replaces every number by the sum of its digits until it has only a single digit. So for example, 765 becomes 7+6+5 = 18, which then becomes 1+8=9.

The title of the question aludes to the fact that this digit is called the digital root of an integer.

Operations:

$4 + 5 = 9$ (simple enough)

$37 + 81 \to 10 + 9 \to 1 + 9 = 10 \to 1$

$256 + 72 + 25 \to 13 + 9 + 7 \to 4 + 9 + 7 = 20 \to 2$

$103 * 63 \to 4 * 9 = 36 \to 9$

$(413/31) + 12 \to 8/4 + 3 = 5$

$893 - 265 \to 20 - 13 \to 2 - 4 = -2$

What would be the result of $123+456-789$?

$123 + 456 - 789 \to 6 + 15 - 24 \to 6 + 6 - 6 = 6$

Another possibility would be to reduce intermediate results as well, giving:
$123 + 456 - 789 \to 6 + 15 - 24 \to 6 + 6 - 6 = 12 - 6 \to 3 - 6 = -3$

• I need the 123 + 456 - 789 answered. Other then that, spot on, and I'll accept this after a day or so. – ShadowCat May 30 '17 at 15:53
• @ShadowCat the question doesn't make it clear if intermediate results are reduced as well, is my current answer for 123+456-789 correct? – ffao May 30 '17 at 15:56
• The intended answer ignored intermediate results, so no, but if it's unclear then I suppose that means that either answer could be correct. – ShadowCat May 30 '17 at 16:06
• Might be worth explaining the title, which I take it is an allusion to digital roots. – Gareth McCaughan May 30 '17 at 16:20
• @GarethMcCaughan It is indeed. – ShadowCat May 31 '17 at 13:47

Result of Calculation might be:

123 + 456 − 789 → (1+2+3) + (4+5+6) - (7+8+9) → 6 + 15 − 24 → 21 − 24 = 3 - 6 = -3

(OR)

123 + 456 - 789 = 579 - 789 = -210 -> -2 - 1 = -3

(OR)

123 + 456 − 789 → (1+2+3) + (4+5+6) - (7+8+9) → 6 + 15 − 24 → 6 + 6 -6 = 6

• Why might the result of the calculation be this? And why would we neglect the negative sign? – boboquack May 31 '17 at 6:09
• I see why -3 is a logical alternate solution, but I don't get the positve 3 at all, since the '893 - 265 = -2' example shows a minus output is perfectly valid. – ShadowCat May 31 '17 at 13:43
• @ShadowCat Thanks, I think answer what you are looking might be in positive. – CR241 May 31 '17 at 13:53