Find the possible values of used by the given nested loop, as encoded by a list of inequalities:
>
|
p1 := proc(a, b, n)
local i, j;
for i from 1 to min(n + 2, 10) do
for j from i to n + 2 do
a[i, j] := b[i + 1] + a[i - 1, j - 1]
end do
end do
end proc:
loop1 := CreateLoop(p1):
iteration_space1 := IterationSpace(loop1);
|
Specifying a value for the parameter , the integer solutions to the given list of inequalities can be computed:
These solutions correspond to the values of the loop variables for which the loop's statements will be executed. Note that the order of solutions returned by isolve will not necessarily match the order of the loop's execution.