Factored and canonical forms: Example 1 |
INDEX
![]() |
Suppose x, y, and z are three variables, and you want to express the following relation:
z = (x - 1)*(y + 2)
There are various ways to express the constraint. You can, for example, write the expression in a factored form like this:
The output is:
z = [-36, 12] |
You can write the same expression in a canonical algebraic form, like this:
After propagation, the result is:
z = [-36, 22] |
With the factored form, you can see that propagation has more severely reduced the domain of z, and in terms of performance, that is a good thing.
Because of that observation, you might think that it is always better to write constraints in a factored form. However, you will see a counter-example to that hasty generalization.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |