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 //
        }
    }
}
Find a Minimal Siphon - Algorithn
20/3/2014
CE-653 - PTnet Theory and some Algorithms
32
}Computes one minimal siphon S ≤ ~S and containing ~P