What would the class/category of question for this be called? What's the general approach to this type of problem? I'm looking to find the fastest way of solving things like this. The question comes from certain logic tests.
A, B, C, D, E are positive integers holding values from 1 through 5 but not in the order. Given the three pieces of information, what are A, B, C, D, E?
- D - 2 = C
- E + C = D
- A + E = C
These set of problems are called constraint satisfaction problems. They have a set of variables, a set of domains from which the variables can take values in, and a set of constraints. Here, the set of variables are ${A, B, C, D, E}$, the domain of the variables are all from the integers $\mathbb{Z}$, and the constraints are the equations and inequalities below:
Backsolving (known more generally as backtracking) is a valid approach to constraint satisfaction problems; other approaches include constraint propagation, local search, and techniques from solving linear programming/integer programming optimisation problems.