1 / 14

On special families of morphisms related to δ - matching and don ’ t care symbols

On special families of morphisms related to δ - matching and don ’ t care symbols. Information Processing Letters (2003) Richard Cole et al. δ -matching problem. Σ is an interval of integers Pattern P, |P| = m Text T, |T| = n For a, b  Σ , a = δ b if |a-b|≤ δ

Download Presentation

On special families of morphisms related to δ - matching and don ’ t care symbols

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. On special families of morphisms related to δ-matching and don’t care symbols Information Processing Letters (2003) Richard Cole et al

  2. δ-matching problem • Σ is an interval of integers • Pattern P, |P| = m • Text T, |T| = n • For a, b Σ, a =δb if |a-b|≤δ • A δ-matching occurs in position j when • |P[i] - T[i+j-1]| ≤δ for 1≤i≤n • P =δT[j…j+m-1] T 2 3 3 4 2 3 4 3 1 P 1 4 3 2

  3. Pattern-matching with don’t care symbols T * 2 2 2 * 2 2 1 1 • Σ* = Σ  {*} • a≈b if a=b or a=* or b=* • Two strings u, w with |u|=|w|, u≈w iff u[i]≈w[i] for all I • Find all positions j such that P≈T[i…j+m-1] P 1 2 2 *

  4. Lemma 1. The problem of pattern-matching with don’t cares for a pattern P and a text T of length n over an alphabet Σ can be solved in time O(log|Σ| * IntMult(n))

  5. Relation between δ-matching and pattern matching with don’t cares • For small alphabet δ-matching is at least as difficult as matching with don’t cares • Theorem 2. String matching with don’t cares for binary alphabets {a, b} is reducible to δ-matching for the alphabet Σ={1, 2, 3} a b * a b c * ??

  6. Reduction from δ-matching to pattern matching with don’t cares • Given P, T, δ, find k symbol-to-symbol encodings h1,…,hk to reduce it T 2 3 3 4 2 3 4 3 1 P 1 4 3 2 T * 2 2 2 * 2 2 1 1 P 1 2 2 * T 1 * * 2 1 * 2 * 1 P 1 2 * 1 P 1 2 * 1 P 1 2 * 1 P 1 2 * 1

  7. δ- distinguishing families of morphisms • H = {h1, h2, …, hk}, hi:ΣΣi{*} • H is δ-distingushingiff a, b Σ [a =δb] ≡[(hH) h(a)≈h(b)] • Mδ(P,T)={j | P=δT[j…j+m-1]} • D(P,T)={j | P≈T[j…j+m-1]} • Mδ(P,T)=D(h1(P),h1(T))∩…∩D(hk(P), hk(T))

  8. δ-regular family • H is a δ- regular family iff it satisfies • P1: each morphism is a form h=**…*11…1**…*22…2**…*33…**.. The internal blocks of *’s are exactly of length δ, the boundary blocks of *’s are of length at most δ • P2 : For p, q Σsuch that q – p > δ there exists hH such that h(p)=i, h(q)=j > i, and h(r)=* for some p < r <q δ=1

  9. Lemma 3. If a family is δ- regular then it is a δ-distinguishing family <proof idea>δ-distingushing iff a, b Σ[a =δb] ≡[(hH) h(a)≈h(b)] • <proof>: consider p, q Σ and p < q • case 1 : if p =δq • case 2 : if p≠δq

  10. δ=3 • Theorem 4. The size of minimal δ-distinguising family of morphisms is at most 2δ+1:α(δ)≤2δ+1 • # * in each column is at most δ • if p-q>δ then for every i there is a symbol between p, q in hi

  11. Lemma 5. The size of a minimal 3-distinguishing family of morphisms is at most 6:α(3)≤6 • F={{1,2,3},{1,2,4},{1,3,5},{1,4,6},{2,3,4},{2,3,6},{2,4,5},{2,5,6},{3,4,5},{3,4,6}}

  12. Special case • Theorem 6. If k is divisible by 3, then α(δ)≤ 2δ • α(r *δ)≤ r *α(δ) • Expand hi to r times • Cyclically shift by j, 1≤j<r • By Lemma, α(3*r)≤6r

  13. Lower bound • Theorem 7. The size of a minimal δ-distinguishing family of morphisms is at least δ+2:α(δ) ≥δ+ 2

  14. Claim. If there is a δ-distinguishing family of size k, then there exists a δ-regular family of k morphisms

More Related