






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Transparency No. ?- 0 Formal Language and Automata Theory
Transparency No. 6- 1
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 ) => |h( e )| = |h( e )|+|h( e )| ==> |h( e )| = 0 ==> h( e ) = e. Property 1: Any homomorphism h: S * - > G * is uniquely determined by its value on S. I.e., if g,h: S * - > G * are morphism s.t. g(a)=h(a) for all a in S , then g = h (I.e., g(x) = h(x) for all x in S *). Pf: if x = x 1 x 2 …x n
h(x) = h(x 1 x 2 …x n ) = h(x 1 )h(x 2 )…h(x n ) = g(x 1 )…g(x n ) = g(x 1 x 2 …x n
= g(x). Conclusion: to specify a homomorphism h: S *-> G * completely, it suffices to specify its values on S.
Example: EX: h:{a,b}* - > {0,1}* s.t. h(a) = 01 and h(b) = 10. B= L(M) M : ==> M’ =?
Theorem 10. h : S * - > G *: a homoporphism; A S : a regular set => 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 in S appearing in a with the string h(a) in G . eg: if h(a) =000, h(b) = 11, a = [(a+b)ab] => a ’ = (000+11) a ’ can be defined inductively as follows: _____ (exercise) Property: 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: for all C,D S * and any family of subsets C i S *, i I, h(CD) = h(C) h(D) --- (10.5) h(U i I
i
i I h(C i
==> can be proved direct from definition.
Example: EX: h:{0,1}* - > {a,b}* s.t. h(0) = ab and h(1) = ba. A= L(M) M : ==> h(A) is accepted by M’ =?
Quiz Q1: Is it true that “ h(A) is regular => A is regular “? Notes: 1. h(A) = B does not mean h
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
2
3
Applications of homomorphisms S = {0,1}; S x S = { 00, 01,10,11} = { } define top, btm : S 2
- > S with top( ) = x and btm( ) = y. top and btm can be extended to homomorphism ( S x S )* - > S * eg: top( ) = 0001 and btm( ) = 1011 D k
def {x ( S x S )* | 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 }. 0 1 0 0 1 1 1 0 x y x y 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1