Homomorphisms - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Homomorphisms

Description:

Chapter 6 Homomorphisms (lecture 10) Transparency No. 6-* – PowerPoint PPT presentation

Number of Views:194
Avg rating:3.0/5.0
Slides: 16
Provided by: Cheng73
Category:

less

Transcript and Presenter's Notes

Title: Homomorphisms


1
Chapter 6
  • Homomorphisms
  • (lecture 10)

Transparency No. 6-1
2
Homomorphisms (the definition)
  • Def A homomorphism is a mapping h S ? G s.t.
    for all x,y in S
  • h(xy) h(x) h(y) (10-1)
  • h(e) e (10.2)
  • Note (10.2) is not needed since h(e ) h(e e )
    h(e ) h(e )
  • gt h(e ) h(e )h(e ) gt h(e ) 0
    gt h(e ) e .
  • Property 1 Any homomorphism hS ? G is
    uniquely determined by its values on S.
  • I.e., if g,h S ?G are morphisms s.t. g(a)h(a)
    for all a ? S, then g h (I.e., g(x) h(x) for
    all x ? S).
  • Pf if x x1x2xn gt
  • h(x) h(x1x2xn) h(x1)h(x2)h(xn)
    g(x1)g(xn) g(x1x2xn) g(x).
  • Conclusion To specify a homomorphism h S?G
    completely, it suffices to specify its values on
    S.

3
More about homomorphisms
  • h S ? G a homomorphim A a subset of S B
    a subset of G
  • h(A) def h(x) x ? A ? G is the image of A
    under h.
  • h-1(B) def x h(x) ? B ? S is the preimage
    of B under h.
  • Theorem 10.1
  • h S?G a homomorphism B a regular language
    over G
  • gt h-1(B) is regular too.
  • Pf M(Q, G ,d,s,F) a DFA (or NFA) s.t. L(M)
    B
  • gt let M (Q, S ,d,s,F) where d(q,a)
    D(q,h(a)) for all a in S.
  • Property of M
  • D(q,x) D(q,h(x)) for all q ? Q and x ? S
    ----- (10.3)
  • by simple induction on x, left as an
    exercise.
  • ?x?S,x?L(M) iff D(s,x)?F iff D(s,h(x)) ?F iff
    h(x)? L(M) B
  • h-1(B) L(M) is regular. QED

4
Example
  • ha,b ? 0,1 s.t. h(a) 01 and h(b) 10.
  • B L(M)
  • M
  • gt M ?
  • view a and b as macro instructions on M
    consisting of 01 and 10,respectively

5
Example
  • ha,b ? 0,1 s.t. h(a) 01 and h(b) 10.
  • gt M ? (view a and b as macro instructions
    on M
  • consisting of 01 and
    10,respectively.)

6
Theorem 10.2
  • h S ? G a homoporphism A ? S a regular
    set
  • gt h(A) is regular.
  • Let a be any reg. expr. S.t. L(a ) A.
  • Let a be the reg. expr. obtained from a by
    replacing every letter a of S in a with the
    string h(a).
  • eg if h(a) 000, h(b) 11, a (ab)ab gt a
    (00011)00011
  • a can be defined inductively as follows _____
    (exercise)
  • Lemma 10.4 for any reg. expr. b over S. L(b)
    h(L(b)) --- (10.4)
  • Hence L(a) h(L(a)) h(A) is regular.
  • To prove 10.4, we require the lemma
  • for all C,D ? S and any family of subsets Ci ?
    S, i ? I,
  • h(CD) h(C) h(D) --- (10.5)
  • h(U i ? I Ci) U i ? I h(Ci) --- (10.6)
  • gt can be proved directly from definition.

7
Proof of 10.2
  • pf by induction on b
  • case 1 b a ? S L(a) L(h(a)) h(a)
    h(L(a))
  • b ? gt L(?) L(?) h()
    h(L(?)).
  • b e gt L(e) L(e) e h(e)
    h(L(e)).
  • Ind. cases
  • 1. L((bg)) L(b g) L(b) U L(g)
    h(L(b)) U h(L(g))
  • h(L(b ) U L(r)) h(L(b
    r))
  • 2. L((b g)) L(b g) L(b )L(g) h(L(b
    )) h(L(g))
  • h(L(b )L(g)) h(L(bg))
  • 3. L((b)) L((b)) U k ? 0 (L(b))k U
    k ? 0 (h(L(b)))k
  • U k?0 h(L(b)k) h( U k ?
    0 L(b)k) h( L(b))
  • h(L(b)).

8
Example
  • EX
  • h0,1 -gt a,b s.t. h(0) ab and h(1)
    ba.
  • A L(M)
  • M
  • gt h(A) is accepted by M ?
  • (Like the previous case, view 0,1 as macro
    instructions consisting of ab and ba,
    respectively. )

9
Example
  • EX
  • h0,1 -gt a,b s.t. h(0) ab and h(1)
    ba.
  • A L(M)
  • M
  • gt h(A) is accepted by M ?
  • (View 0,1 as macro instructions consisting of
    ab and ba, respectively, but this time replace
    every macro instruction by its content instead of
    traversing its content. )
  • ab
  • 1 ba

1 ba
0 ab
1 ba
10
Quiz
  • Q1 Is it true that h(A) is regular gt A is
    regular ?
  • Notes
  • 1. h(A) B does not mean h-1(B) A.
  • Hence Q1 is not a consequence of Theorem
    10.1.
  • 2. counter example
  • Let A anbn n ? 0
  • h a,b -gt a,b with h(a)h(b) a
  • gt h(A) a2n n ? 0 B is regular, but A
    can be shown
  • to be not regular.
  • 3. h-1(B) ______ ? A.
  • ans x ? a,b x 2n .
  • Exercise Given a homomorphism hS ? G and a FA
    M, find a FA M s.t. L(M) h (L(M)).
  • It is possible that h(A1)h(A2)B

11
Automata with e-transiiton
  • Let M (Q,S,d,S,F) be any NFA with e-transition.
  • Now define a NFA Me from M as follows
  • Me (Q,SUe, d',S,F)
  • is a usual NFA over the alphabet SUe where
  • d' is almost the same as d except that d'(p, e)
    d (p, e) for all p ?Q.
  • Lemma q0 a1 q1 a2 q2 an qn (n ? 0) is a path
    from q0 to qn in M iff q0 b1 q1 b2 q2 bn
    qn is a path from q0 to qn in Me, where bk (ak
    e ? e ak).
  • pf Simple induction on n.

12
  • Corollary x ? L(M) iff ? y ? L(Me) s.t. h(y)
    x, where h is a morphism with h(e) e and h(a)
    a for all a ? S.
  • ( iff x ? h(L(Me)) )
  • pf x?L(M) iff
  • ? a path from an initial state to a final state
    in M q0 a1 q1 a2 q2 an qn with x a1a2an ,
    iff
  • ? a path from an initial state to a final state
    in Me
  • q0 b1 q1 b2 q2 bn qn with y b1b2bn and
    h(y) x
  • iff ? y ? L(Me) and h(y) x
  • Theorem Languages accepted by NFA with
    e-transition are regular.
  • pf If A is a language accepted by an NFA with
    e-transition machine M, then, by previous
    corollary, A L(M) h( L(Me)) . But since L(Me)
    is regular, L(M) thus is regular too.

13
Application of homomorphisms Haming distance
  • x, y two bit strings, A a set of bit strings k
    ? 0 any number.
  • H(x,y) of positions at which they differ
    if x y, or
  • infinite if x ? y.
  • H(x,A) min y ? A H(x,y)
  • Nk(A) x H(x,A) ? k is the set of
    strings of Haming distance at most k from A.
  • Example
  • 1. N0(000) 000 ,
  • 2. N1(000) 100,010,001
  • 3. N2(000) ?
  • 4. N2(001, 11) 0,13 - 110 U 0,12.
  • Ex3Hw2 if A is regular, then so is Nk(A) for any
    k ? 0.

14
Applications of homomorphisms
  • S 0,1 S x S 00, 01,10,11
  • define top, btm S2 -gt S with
  • top( ) x and btm( ) y.
  • top and btm can be extended to homomorphism (S x
    S ) -gt S
  • eg
  • top( ) 0001 and btm(
    ) 1011
  • Dk def x ? (SxS ) x contains no more than k
    occurrences of
  • (0,1) or (1,0) is certainly
    regular (why?)
  • x ? (S x S ) H(top(x), btm(x)) ?
    k .

15
Applications of homomorphisms (contd)
  • Now let A be any regular set over S
  • gt Nk(A) top (btm-1(A) ? Dk) where
  • btm-1(A) is the set of (x,y) with y ? A,
  • Dk is the set of (x,y) with H(x,y) ? k
  • btm-1(A) ? Dk is the set of (x,y) with y ? A and
    H(x,y) ? k
  • top (btm-1(A) ? Dk) is the set of x s.t. y ? A
    with H(x,y) ? k the set of x with H(x,A) ? k
    Nk(A).
  • Hence Nk(A) is regular if A is regular.
  • Exercises Let M be a FA accepting a language A
    over 0,1.
  • 1. Construct two machines to accept N0(A) and
    N1(A),
  • respectively.
  • 2. How to construct a machine to accept Nk(A)
    for any given k gt 1 ?
Write a Comment
User Comments (0)
About PowerShow.com