The Student Room Group

a puzzle in computational maths

heya guys, I've got a little problem which i need to solve but i cant program at all.

Here goes.

using the digits 0-9 and only the plus and minus signs I need to know the smallest number which cannot be expressed as a "sum" using all these digits only once. You can use as many plus/minus signs as you want.

For example:

123+45-67+890 = 991
135-98+67+42+0=176

Of course, i can do all the combinatorics of the puzzle but actually solving by hand would take a lifetime, so I need a program to do it, or for someone to give the answer.
I take it you're not allowed to take the negative of the highest possible absolute value?

(I.E. =-9876543210)
Reply 2
Nope, I think here we are restricting to positive integer outputs.
(9-8-7+6)+(5-4-3+2)+(1-0)=1

Just keep it as near to zero as possible by using numbers that are close to each other.
Reply 4
But it is known that the answer has at least 5 digits, so to do it by hand would be difficult.
Oh, can't, sorry, I was thinking of can >_>

Hah, not a clue, sorry.
Reply 6
42
Reply 7
98-67+5-2+3+4-1=42

Latest

Trending

Trending