[a] Time Warps, String Edits, and Macromolecules The Theory and Practice of Sequence Comparison
David Sankoff and Joseph Kruskal, with introduction by John Nerbonne
The MP is so efficent that you can test ALL window lengths at once! This is called MADRID [a].
[a] Matrix Profile XXX: MADRID: A Hyper-Anytime Algorithm to Find Time Series Anomalies of all Lengths. Yue Lu, Thirumalai Vinjamoor Akhil Srinivas, Takaaki Nakamura, Makoto Imamura, and Eamonn Keogh. ICDM 2023.
It is possible that two occurrences of the same motif can overlap.
And
It is possible that two different motifs can overlap.
Lets see both cases, in string analogs. We will start with the second case, using an example from John Cleese…
“…itself…and hence the very meaning of life itselfish bastard, I'll kick him… selfish…”
Here there is a motif “itself” and there is a motif “selfish”. Note that one occurrence of each motif appears overlapping in “itselfish”.
---
Now for the first case:
“….soihsehihrhewCOMICOMICireoqiwwherhqwe…”
Here we have a motif “COMIC”, but they share a letter, the central ‘C’. We can allow motifs to share more letters, but they cannot share ALL letters, that would be a trivial match.
The matrix profile has a simple parameter (the exclusion zone) that lets you control how much overlap you want to allow.