Docstoc

Chapter 4_ Properties of Regular Languages

Document Sample
Chapter 4_ Properties of Regular Languages Powered By Docstoc
					Chapter 4: Properties of Regular Languages

Theorem 4.1 If L1 and L2 are regular languages, then so are L1  L2, L1  L2, L1L2, L1 complement and L1*. Thus, the family of regular languages is closed under union, intersection, concatenation, complementation and star-closure. Proof: If L1 and L2 are regular, then there are DFAs M1 and M2 such that L1 = L(M1) and L2 = L(M2).

Closure under complement,

Finishing the Proof
Closure under intersection
_ ___
_

A constructive proof of closure under intersection

Closure under difference

Closure under reversal

Examples
_ Example 1: Prove or disprove: If L is not regular then L is not regular.

Example 2: If L is regular then L′ = {xy | x  L and y  L} is regular.

Closure under other operations Definition 4.1: Let  and  be alphabets. Then a function h:  * is called a homomorphism.

Let L = {01, 10}*, and let h be the homomorphism h(0) = ab and h(1) = c.

Theorem 4.3: Let h be a homomorphism. If L is a regular language, then its homomorphic image h(L) is also regular. The family of regular languages is therefore closed under arbitrary homomorphisms. Proof method:

Using closure properties Example 3: #8 p. 109 Define the complementary or (cor) of two languages by _ _ cor(L1, L2) = {w | w  L1 or w  L2}. Show that the family of regular languages is closed under the cor operation. Proof:

Example 4: Let L = {0i1n2n | i  1, n  0}.

Inverse Homomorphisms

Substitution

Definition 4.2 Let L1 and L2 be languages over the same alphabet. Then, the right quotient of L1 with L2 is defined as L1/L2 = {x | xy  L1 for some y  L2}.

Theorem 4.4: If L1 and L2 are regular languages, then L1/L2 is also regular.

More Examples
Example 5: (Example 4.5 in Linz:) Let L1 = L(a*baa*) and L2 = L(ab*). Find L1/L2.

Example 6: Prove that if L is regular then so is drop(L) = {x | x is formed by dropping one letter from a word in L}. Proof sketch:

Still More Examples
Example 7: Let L = {aibj | i, j  0, i  j}.

Example 8: Let L = {aibjck | i = 0 or j = k}.

Example 9: (problem 4.1.16) Consider the statement: If L1 is regular and L1  L2 is also regular then L2 is regular.

Example 10: If L1 is finite and L1  L2 is regular then L2 is regular.

Section 4.2 Elementary Questions about Regular Languages

Is w  L(M)?

Is  in L where L = L(M) for a DFA M?

Is L(M) empty?

More questions about regular languages
Is L(M) infinite?

Theorem 4.6 There exists an algorithm to determine whether a regular language is empty, finite or infinite. Given regular languages L1 and L2, does L1 = L2?

Theorem 4.7 Given standard representations of two regular languages L1 and L2 there exists an algorithm to determine whether or not L1 = L2. Proof:


				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:217
posted:1/7/2010
language:English
pages:9