Below is the COMPLETE list of maximal-exact matches (MEMs) between the two sequences we have been using
S₁ = A C G T A C G T A C G T (length 12, index 0‥11)
S₂ = T A C G T A C G T A C (length 11, index 0‥10)
followed by the subset that qualify as super-maximal exact matches (SMEMs).
I use 0-based, inclusive coordinates (start..end) and indicate the offset d = j − i (B-start – A-start) for each match.
All MEMs
| # | substring | len | in S₁ (i..i+len−1) | in S₂ (j..j+len−1) | d |
|---|
| 1 | ACGTACGTAC | 10 | 0..9 | 1..10 | +1 |
| 2 | TACGTACGT | 9 | 3..11 | 0..8 | −3 |
| 3 | ACGTAC | 6 | 0..5 | 5..10 | +5 |
| 4 | TACGT | 5 | 7..11 | 0..4 | −7 |
| 5 | AC | 2 | 0..1 | 9..10 | +9 |
| 6 | T | 1 | 11..11 | 0..0 | −11 |
Why these are MEMs
• Each of these substrings occurs in both sequences.
• For every one of them, trying to extend just one more character to the left or the right fails in at least one of the sequences (we either hit a mismatch or run off the end).
Hence they are all “maximal” with respect to extension.
Which of those MEMs are SMEMs?
A MEM is a SMEM if NO LONGER MEM contains it as a substring (anywhere in either sequence).
• Match #1 (ACGTACGTAC) is clearly not contained in anything longer, so it is a SMEM.
• Match #2 (TACGTACGT) is also not contained in another MEM, so it is a SMEM.
• Matches #3, #4, #5, #6 are each contained in at least one longer MEM above, so they are NOT SMEMs.
Resulting SMEM set
{ ACGTACGTAC , TACGTACGT }
Visual inclusion map
ACGTACGTAC ← SMEM (#1, len 10)
├─ contains ACGTAC (MEM #3, len 6)
│ └─ contains AC (MEM #5, len 2)
└─ (overlaps but does not fully contain TACGTACGT)
TACGTACGT ← SMEM (#2, len 9)
└─ contains TACGT (MEM #4, len 5)
└─ contains T (MEM #6, len 1)
So the full set of MEMs is {#1 … #6}; the SMEM subset is {#1, #2}.