0

1 + 2 + 3 = 6 is a pretty straight-forward equation, but let's say you have something like this:

1 ? 2 ? 3 = 6

Where you have all the individual data points and the target, can you find "calculate" what operations to use?

  • have you tried supervised statistical learning? Where you give them tons of equations and the operator is the classification as an output. I do have actually no idea what the purpose is of this question. – Steven01123581321 Sep 10 '19 at 10:23
  • Why is this being downvoted other than being more or less unmotivated? It could be important. The solution in general won't be unique, e.g. $4 ? 2 ? 1 ? 1 = 4$. Question to think about: how many solutions exist for a given set of numbers and what they equal? Brute force, you could enumerate all of the $2^N$ possibilities where $N$ is the number of operations unknown, assuming only $+$ and $-$. But I'm sure there are more refined ways to approach the matter. For example, $8 ? 8 ? 8 ? 4 = -4$ is less than zero, and therefore neither operation on the $8$'s could be positive. – Merkh Sep 10 '19 at 10:26
  • I would expect that this would be an NP-Hard question when properly generalized. It is easy to check if a solution is valid, but much harder to generate a solution for the general case. – JMoravitz Sep 10 '19 at 12:04
  • @Merkh ${8-8\over 8}-4$ or $8\cdot(8-8)-4$. but $-2$ can be done with ${8+8\over 8}-4$ disproving your whole argument. –  Sep 10 '19 at 20:02
  • Read: "...assuming only + and -" – Merkh Sep 11 '19 at 07:34
  • If we wanted to consider multiplication and so on, I'm sure there is still a more refined way than trying all possibilities. The search space may still be combinatorial in size, but I expect that certain operations, like using multiplication for two of the ? marks in my example, will be disallowed. Are parenthesis allowed? Exponentiation? Of course the question itself needs refinement, if we are to disprove each other's general observations. – Merkh Sep 11 '19 at 07:44

0 Answers0