How to find the the relationship between different numbers

186 Views Asked by At

Assuming i have 4 numbers a,b,c and d, my question is how can i find the right set(s) of operands a,b,c,d and operators which gives a specific result d, for example to find the right expression containing the operands 1,2,3 and 4 which evaluate to 24, a possible solution would be: 1*2*3*4 = 24 or 2*3*4/1 = 24, is there a tool/method to do this?.

2

There are 2 best solutions below

2
On

I doubt it. There are these riddles where e.g. you only use the digit 4 and certain operator and try to create all possible numbers. Some are rather tricky, while others are easy but it does not seem like an algorithm can be found to do that.

Of course, that's not a proof but I'm not sure a proof would be easy.

You could e.g. see though, that it's difficult to construct $\pi$ with natural numbers, as $\pi$ is transcendental. So you will need more than just the standard operators.

0
On

I personal didn't get your question well you need four numbers $A$ $B$ $C$ $D$, which on a particular operations gives a result $d$, Find all possible expression by which the variables $A$, $B$, $C$, and $D$ can be manipulated by an operation to give the same result $d$. If there was no repetition of any of the variable, we would not be able to get anything new $1×2×3×4 = 24$ and $(2×3×4) \div 1 = 24$.
$1$, $2$, $3$and $4$ Worked without repetition because one of the the variable there was equal to $1$, multiplying and dividing by $1$ is same. so there must be repetition of this variables if-not, we wouldn't get anything. Now let's first assume the product of all the variables was $d$ $$ A × B × C × D = d $$ finding another operation by which we can manipulate $A$ $B$ $C$ $D$ depends on the actual value of these variables.. If we were forced to to repeat a variable, then $$ \cdot A \cdot B \cdot C \cdot D \lt d $$ because introducing other maths operation like $+$ $-$ and $÷$, would lesser its value Now without repetition there are infinite ways to make up these, just by mixing and repeating the numbers