Information Technology Reference
In-Depth Information
Algorithm 3.1: Find a solution of the problem HG.
Step 1: Solution  empty;
Step 2: if G  H then
begin Solution_found  true; goto step 4; end
else Solution_found  false;
Step 3: Repeat
Hold  H;
Select f  F;
while not Solution_found and (f found) do begin
if (applying f from H produces new facts)
then begin
H  H  M(f); Add f to Solution;
end;
if G  H then
Solution_found  true;
Select new f  F;
end ;
 while 
Until Solution_found or (H = Hold);
Step 4: if not Solution_found then
There is no solution found;
else
Solution is a solution of the problem;
Algorithm 3.2: Find a good solution from a solution S = [f 1 , f 2 , ..., f k ] of the problem HG on
computational net (M, F).
Step 1: NewS  []; V  G;
Step 2: for i := k downto 1 do
If v(f k )  V   the Begin
Insert f k at the beginning of NewS;
V  (V - v(f k ))  (u(f k ) - H);
End
Step 3: NewS is a good solution.
On a computational net (M, F), in many cases the problem HG has a solution S in which
there are relations producing some redundancy variables. At those situations, we must
determine necessary variables of each step in the problem solving process. The following
theorem shows the way to analyze the solution to determine necessary variables to compute
at each step.
Theorem 3.2: Given a computational net K = (M, F). Let [f 1 , f 2 , ..., f m ] be a good solution of
the problem HG. denote A 0 = H, A i = [f 1 , f 2 , ..., f i ](H), with i=1, ..., m. Then there exists a
list [B 0 , B 1 , ..., B m-1 , B m ] satisfying the following conditions:
1.
B m = G,
2.
B i  A i , with i=0, 1, ..., m.
3.
For i=1,...,m, [f i ] is a solution of the problem B i-1  B i but not to be a solution of the
problem B  B i , with B is any proper subset B of B i-1 .
Search WWH ::




Custom Search