twinPatternMining(
) // Check if there is
with support
for a given
1)
= twinOccurrence(
) 2) if (
) return
; // Since there are no
genomes where each genome has all occurrences of
, // we need to shrink
as long as
. 3) while (
) 4)
= shrinkPDSETbyOne(
); 5) if (
) return
6)
= twinOccurrence(
); 7) if (
) 8) print
and
; endif endwhile
shrinkPDSETbyOne(
) 1) Let
2) for
to
do 3) Let
; 4) Locate
from
with incrementing by one such that
; 5)
= ComputeMdsetMatch(
); 6) if (
) return
; 7) Locate
from
with decrementing by one such that
; 8)
= ComputeMdsetMatch(
); 9) if (
) return
; endfor 10) return
;
twinOccurrence(
) 1) for
to
do 2) if (
) continue ; 3) if (
occurs in its entirety in
) 4) Let
be the occurrence of
in
; 5)
; endif endfor