pattern 1: [(0,1)(2,4)] => [(2,3)(3,4)(4,5)]
pattern 2: [(0,1)] => [(2,3)(4,5)]
In my definition pattern 2 is a subpattern of pattern 1, since (0,1) of pattern 2 is contained by (0,1)(2,4) of pattern 1 and (2,3)(4,5) of pattern 2 is contained by (2,3)(3,4)(4,5) of pattern 1.
What is appropriate and efficient algorithm to implement this comparison? Thanks:)