Let ≈ be a substring consistent equivalence relation (SCER) on strings such that for any two strings x,y, x≈y implies that (1) |x|=|y| and (2) x[i.j]≈y[i.j] for all 0≤i≤j<|x|. Examples of SCER are parameterized pattern matching and order-preserving pattern matching. We present a generalized and efficient algorithm for pattern matching with SCER ≈. Also, we show analogues of Fine and Wilf's periodicity lemma hold for SCER.
All Science Journal Classification (ASJC) codes
- Theoretical Computer Science
- Computer Science(all)