290 likes | 322 Vues
Languages and Codes. Chapter 15 第 15 章. P0L Schemes. A 0L scheme is an ordered pair ( A , P ), where A is a finite alphabet and P , called the set of productions , is a finite non-empty subset of A A * s.t. for a A at least one u A * s.t. ( a , u ) P .
E N D
Languages and Codes Chapter 15 第 15章
P0L Schemes • A 0L scheme is an ordered pair (A,P), where A is a finite alphabet and P, called the set of productions, is a finite non-empty subset of AA* s.t. for aA at least one uA* s.t. (a,u)P. • A language which can be generated by a 0L scheme is called a 0L language. 醫學影像處理實驗室
0L Schemes Substitutions • A mapping h:A2B* is said to be a substitution of A into 2B* for finite alphabets A and B if h(a) for every aA. • If (A,P) is a 0L scheme, then the mapping h defined by h(a)={u| (a,u)P}, aA, determines a substitution over A. 醫學影像處理實驗室
Substitutions 0L Schemes • Every substitution h over A defines a 0L scheme (A,P), where P={(a,u)| aA,uh(a)}. • A 0L scheme can be defined either by (A,P) or (A,h). • A 0L scheme (A,P) is termed propagating, called a P0L scheme, if (a,1)P for every aA. 醫學影像處理實驗室
Strongly Injective • A substitution h:A2B* is strongly injective (shortly s-injective) if for wh(A*), !uA* s.t. wh(u). • Note that 1h(a) for each aA whenever h is s-injective. • A substitution h is non-erasing if none of h(a), aA, contains the empty word. 醫學影像處理實驗室
P0L Languages • A 0L system is a triple (A,P,w), where (A,P) is a 0L scheme and wA*, called the axiom of (A,P,w). • For a substitution h over A, let h0(w)={w} and hi(w)=h(hi–1(w)) for wA* and i1. • The language L(A,h,w)=i0hi(w) is called the 0L language generated by (A,h,w). 醫學影像處理實驗室
Properties • Prop. Let h be an s-injective substitution over A. Then for each w1,w2A*, L(A,h,w1)L(A,h,w2) if and only if either L(A,h,w1)L(A,h,w2) or vice versa. • Prop. If h be an s-injective substitution over A, then every P0L language L with the scheme (A,h) is contained in a unique maximal P0L language with the same scheme. 醫學影像處理實驗室
Property Preserving Substitutions • For an alphabet A and a property P of languages, let PA denote the family of languages with the property P over A. • A substitution h:2A*2B* is said to be P-preserving if h(L)PB for every LPA. • If h:A*2A* is a P-preserving substitution, then we said that the 0L scheme (A,h) is P-preserving. 醫學影像處理實驗室
D-Primitivity-Preserving Homomorphisms • Th. Let h:A*B* be a homomorphism. Then the following statements are equivalent: (1) |h(A)|=|A| and h(A) is a d-code; (2) h is D(n)-preserving for everyn1; (3) h is D(n)-preserving for somen1; (4) h(a),h(ab)D(1) for any two distinct letters a,bA. 醫學影像處理實驗室
D-Primitivity-PreservingSubstitutions • Prop. Let h:A*2B* be a substitution s.t. h(a) is an infix code for aA. If h(ab),h(a2b),h(ab2)D(1) for abA, then h(D(1))D(1)h(A). • Prop. Let h:A*2B* be a substitution s.t. h(a)h(b)= for abA and h(A) is a d-code. Then h is D(n)-preserving for some n2 iff h is a homomorphism. 醫學影像處理實驗室
Pure Languages • A language LA+ is called pure if for any uL+, (u)L+. • Prop. Let h:A*2B* be an s-injective substitution. Then h preserves pure language if and only if h(A) is a pure language. 醫學影像處理實驗室
Primitivity-Preserving Substitutions • Prop. Let h:A*2B* be an s-injective substitution. Then h(A) being a pure language implies that h is primitivity-preserving. 醫學影像處理實驗室
Other Language-Preserving Substitutions • Prop. Let h:A*2B* be a substitution. Then h(A) containing a maximal code over Bimplies thath is dense-preserving. • Prop. Let h:A*2B* be a substitution s.t. h(A) is a thin codeover B. Then h is dense-preservingif and only ifh(A) is a maximal code over B . 醫學影像處理實驗室
A Special Case • Prop. Let h:A*A* be a homomorphism. Then the following statements are equivalent: (1) h(A)=A; (2) h is dense-preserving; (3) h is disjunctive-preserving. 醫學影像處理實驗室
D(n)-Generating 0L Schemes • For any monomorphism h over A s.t. h(A) is a d-code, a word wD(n) iff the M0L language L(A,h,w)D(n) for any n1. • Thus the M0L scheme (A,h) is D(n)-generating for each n1. • Prop. No D0L scheme (A,h) is dense-generating, whereh is a homomorphism over A and |A|2. 醫學影像處理實驗室
Dense-Generating 0L Schemes • Prop. Let A={a1,a2,,am} and v=a1a2am. If h is a non-erasing substitution over A s.t. h(A) contains a maximal prefix codeC with lg(C)2, then the P0L language L(A,h,v) is dense, i.e., (A,h) is dense-gtenerating. • Prop. Let A={a,b} and h a substitution over A defined by h(a)= {b} and h(b)= {ab,aa}. Then the P0L language L(A,h,a) is dense. 醫學影像處理實驗室
-Words • A homomorphism h can be extended to -words by setting h()=h(a1)h(a2)h(an)for each -word =a1a2an. • For a homomorphism h over A, hi is defined by h1=h and hi(u)=h(hi–1(u)) for any uA* and i2. Let wA+ be s.t. exists. Then we denote this limit by h(w). 醫學影像處理實驗室
Strongly Cube-Free Words • A word or an -word over A is termed square-free (resp. cube-free) if it contains no subword of the form u2(resp. u3), u1. • A word or an -word w is said to be strongly cube-free if wA*(au)2a(A*A)for any aA and uA*. 醫學影像處理實驗室
Strong-Cube-Free-Preserving Homomorphisms • Prop 15.2.1. Let A and B be two non-empty finite alphabets. Let h:A*AB*B be a homomorphism s.t. h(A) consists of strongly cube-free words and that h(A) is a non-empty subset of aB* for some aB. If an -word A s.t. h() is strongly cube-free, then is square-free. 醫學影像處理實驗室
Example 1The Thue-Morse -Word • Let A={a,b} and let be a homomorphism over A by (a)=ab and (b)=ba. The Thue-Morse -word is the -word (a). • Let A={a,b,c}, B={a,b} and h:A*B* be a homomorphism defined by h(a)=a, h(b)=ab and h(c)=abb. Let h() be the Thue-Morse -word, i.e., h()=(a)=abbabaabbaababbabaaba. 醫學影像處理實驗室
Example 2The Square-Free -Word • The Thue-Morse -word h()=(a) is strongly cube-free. • By Prop. 15.2.1, =h–1((a)) is square-free. • =cbacabcbabcacba. 醫學影像處理實驗室
Square-Freeness-Preserving Homomorphisms 1 • Prop. Let h:A*B* be a homomorphism with h(A){1} s.t. (1) h(u) is square-free for square-free word u with lg(u)3, (2) No h(a) is a proper factor of an h(b) (a,bA). Then h preserves square-free words. 醫學影像處理實驗室
Square-Freeness-Preserving Homomorphisms 2 • Theorem 15.2.1. Let h:A*B* be a non-erasing homomorphism and m=max{k|h(A)B*h(Ak)B*}. Then h preserves square-free words if and only if h(w) is square-free for each square-free word w withlg(w)max{|A|,m+2}. 醫學影像處理實驗室
Square-Freeness-Preserving Homomorphisms 3 • Prop. 15.2.5. Let h:A*B* be a homomorphism. Let M(h)=max{lg(h(a))| aA} and m(h)= min{lg(h(a))| aA}. Then h is square-freeness-preserving if and only if h(w) is square-free for any square-free word w with lg(w)max{3,(M(h)–3)/m(h)}. 醫學影像處理實驗室
Square-Freeness-PreservingExample 1 • Ex. Let A={a1,a2,,an} and h:A*A* a homomorphism. Let k:A*A* be a homomorphism defined by k(ai)=hk(ai). Consider h(a1)=uv, where u,vA+ with vpu and usv. Let :(A{an+1})*(A{an+1})* be a homomorphism defined by (a1)=uan+1v, (ai)=h(ai), i=2,,n, and (an+1)=an+1. 醫學影像處理實驗室
Square-Freeness-PreservingExample 2 • If h is square-freeness-presserving, then k and are square-freeness-presserving for any k2. • One can use this procedure to construct a square-freeness-preserving homomorphism s.t. M(h)–m(h) is large. In this case Th 15.2.1 performs better than Prop. 15.2.5. 醫學影像處理實驗室
Square-Freeness-Preservingv.s. Primitivity-preserving • Prop. Each non-erasing square-freeness-preserving homomorphism is primitivity-preserving. Prim.-preserv. S.-F.-preserv. 醫學影像處理實驗室
A Construction of Primitivity-Preserving Homomorphisms • Cor. Let A={a,b}, B a non-empty finite alphabet and h:A*B* a non-erasing injectivehomomorphism with lg(h(a)) lg(h(b)). Let m=max{k|h(A)B*h(Ak)B*}. If h(w) is primitive for each primitive word w with lg(w)m+2, then for any primitive word wA*a3A*, h(w) is primitive. 醫學影像處理實驗室
Primitivity-Generating 0L Schemes Example • Ex. Let A={a,b} and h:A*A* a homomorphism defined by h(a)=ba3 and h(b)=b. Since m=max{k|h(A)B*h(Ak)B*}=1, and h(a), h(b), h(ab), h(ab2) and h(a2b) are primitive words, hi(a3b) is primitive for any i1. • That is, (A,h) is a primitivity-generating 0L scheme. 醫學影像處理實驗室