Up
Main Algorithm

proc Formula
:=
:=
Delete elements and have in common. 
if or contains a nonpositive integer then
return polynomial or error
else
:=;
:=;
for bucket in plan do
:=;
if then
for from 1 to do
:=;
od;
elif then
for from to do
:=;
od;
fi;
od;
return ;
fi;