Table 3

Math = MinHit(E, k, R)

1: // Arguments:
2: // E = {r1, ..., r|E|}, a collection of rays in ℝn.
3: // (e.g. j-containing pathway fragments)
4: // k, a cardinality cutoff (infinite by default).
5: // R, a subset of N to which the search
6: // for minimal hitting sets can be limited
7: // (= N by default)
8: // Output:
9: // Math, a collection of minimal hitting sets for E
10: // (with cardinality k or less, limited to subsets of R)
11: Math = {∅}
12: for all r E do
13:   Math = {}
14:   //Augment non-intersecting sets in Math to
15:   //"hit" nonzero components of ray r of E
16:   for all H Mathdo
17:      //If the H does not intersect the nonzero
18:      //components of r, then augment H
19:      //and add to Math
20:      if H NZ(r) = ∅ then
21:         for all i R for which ri ≠ 0 do
22:            add H ∪ {i} to Math
23:         end for
24:      else
25:         add H to Math
26:      end if
27:   end for
28:   //Populate Math with minimal, non-duplicate, sets
29:   //from Math that meet the cardinality threshold
30:   Math = {}
31:   for all H Mathdo
32:      if H Mathand Math | MathH and |H| ≤ k then
33:         add H to Math
34:      end if
35:   end for
36:   Math = Math
37: end for
38: return Math

Imielinski and Belta BMC Systems Biology 2008 2:40   doi:10.1186/1752-0509-2-40