In an exercise with variations, degeneration occur when for some values (or combination of values) of random parameters, the behavior of the exercise takes important changes. Such changes may take the following forms. 

- The computation of the good answer becomes wrong.

- The number of good answers radically changes, for instance zero or several instead of one expected.

- The difficulty level radically changes, the exercise becoming much easier or much harder than in the general case.

Degenerations should be considered as bugs in the exercises, and care should be taken to avoid them. When scores are seriously activated, degenerations may severely frustrate students who get trapped.

The basic method to avoid degeneration is to carefully choose the range of variations of random parameters.

When a kind of degeneration is known to be rare, and if the syntax accepts loops (this is not the case of OEF; however, native WIMS exercises can have loops), one can also do the following.

Generate one exercise, then test for condition of degeneration. If the exercise is degenerate, jump back to the beginning and generate a new one. Attention if you don't make sure that the degeneration is ALWAYS rare, this may lead to occasional infinite loops in your exercise. And occasional infinite loops are harder to debug than always infinite loops.

Examples of degenerations:

- Vanishing coefficient.

- Vanishing determinant.

