When introducing variations into an exercise, the first natural thought is to generate the statement first (that is, generate parameters appearing in the statement), then compute the solution from the parameters in the statement.

However, in many cases it is easier to do in the opposite direction: first generate the solution, then compute the statement.

There is also a mixed possibility: generate intermediate parameters first, then compute both the statement and the solution from the intermediate parameters (the latter being transparent to the students all the time).

A typical example is exercises on linear systems. Suppose that you are to design an exercise asking the student to solve a linear system. If you generate the linear system first, you will find it hard to compute the solution without using a mathematics software, especially when the size of the system is over 3&times;3. You will have even more difficulties if you want the solution to be integers.

On the other hand, it becomes very easy if you first generate the coefficients of the linear system and an (integer) solution, then compute the constant terms of the equations. The computations will be straightforward, and all that you have to make sure is that your linear system is non-degenerate (unique solution).

Computing statement from solution represents another advantage: even if the student takes a look into the source of the exercise, he cannot find out how to solve the problem.