Find a Siphon - Algorithm
20/3/2014
CE-653 - PTnet Theory and some Algorithms
31
}~P is a set of places (one or more) which should be contained in the siphon
}Elimination based on Rule 4 (trap places)
Algorithm Find_Siphon(G, ~P, P)
while (1)
{
    if ((exists p in P ∩ ~P) && (exists t in •p such that t not in P•))
    {
        S = Ø;                              // Rule 4 //
        return;
    }
    if ((exists p in P - ~P) && (exists t in •p such that t not in P•))
        G = red(G, P – {p});                // modifies local P and G//
    else
    {
        S = P;
        return;       
    }
}