24 Game with $31,41,59,26,53$ and an additional number.

633 Views Asked by At

We have got five numbers $31,41,59,26,53$,please add a positive integer $n$,as small as possible,which we can find a way to manipulate these numbers with addition, subtraction, multiplication, or division, so that the end result is 24.Like this:$\frac{8}{3-\frac{8}{3}}=24$.

PS:I'm so sorry to change the problem so many times,but since $53-41=12,59-26-31=2$,so we can just add $1$.

My purpose for asking this problem is to find the answer to this question:if we have $x_1,x_2,……x_k$,what's the smallest number we need add them to make 24? Such as $12,34,56,78,90,105?$

1

There are 1 best solutions below

2
On BEST ANSWER

$$ 1\times(53-41)(59-26-31)=24 $$

In general I think this will be hard, since if we restrict to addition and subtraction it is almost the subset sum problem.

As a heuristic, with just addition and subtraction we can make $2^k$ expressions between $-\sum x_i$ and $\sum x_i$, so on average we can make numbers spaced by about $2^{1-k}\sum x_i$ so as $k$ grows we should expect to get pretty close.

For the set $\{12,34,56,78,90,105\}$ we can add $24$ to the set, then check all partitions into $S_1,S_2$ for the smallest non-zero* $\sum_{S_1}-\sum_{S_2}$. In this case it is $90+78+34-105-56-12-24=5$, so 5 is a candidate.

For these numbers, however, we can do better, since $$(90-56-34)(105+78)+12\times 2 =24$$ so 2 works (but I can't rule out 1).

(* Instead of including 24 and checking non-zero differences we can add 23 look for a zero solution, then repeat with 25 if necessary.)