Algorithm
Find_Min_Siphon(G, ~S, ~P, P)
while (exists p in (P - ~P)
∩ ~S such that (•t ∩ ~S) < {p} or
(t•
∩ ~S) = Ø) // Rule 5 //
~S = ~S – {p};
while (1) {
if (~S < P) G = red(G, ~S); Pnew = P - ~P;
if (Pnew == Ø)
{
S = S~;
return; // found minimal siphon //
}
forall (p in Pnew)
// find smaller siphons of Pnew //
{
Gp = red(G, P – {p}); Pnew = Pnew –
p;
Sp =
Find_Siphon(Gp, ~P, P);
if (Sp != Ø)
{
~S = Sp;
break; // found smaller siphon – to outer loop //
}
}
}