Theorems
Theorem 1: Regular expression (R.E) is closed under union operation.
Proof :
Consider a finite automata
M1 = (Q1 , Σ1 , q1 , F1 , δ1)
which accept L(M1)
such that L(M1) = r1
where r1is regular expression accepted by M1
and
M2 = (Q2 , Σ2 , q2 , F2 , δ2)
which accept L(M2)
such that L(M2) = r2
where r1is regular expression accepted by M2
we have to construct an finite automata
M = (Q , Σ , q0 , {qf} , δ)
which accept L(M)
such that L(M) = L(M1) U L(M2)
as follow
(i) Q = {Q₁ U Q₂ U q₀ U qf}
(ii) Σ =∑₁ U ∑₂
(iii) q₀ = q₀
(iv) δ is represented as
a. δ(q₀,ε) - [q₁ , q₂]
b. δ(f₁,ε) = δ(f₂,ε)-[qf]
c. (q , a) = δ₁(q,a) (shift all transition of δ₁ to δ)
when a∈ (∑₁ U ε) and
for every q ∈ (Q₁ - [f₁])
d. δ(q,a) = δ₂(q,a) when a∈(∑₂ U ε)
and for every q∈ (Q₂ -[f₂])
Every transition of M₁ and M₂ is now are transition of M.
Any path in transition diagram of M from q0 to qf must begin by going to either q₀ or q2 on ε. If path goes to q1 it may follow any path from q0 to f₁ on M₁ and finally to qf on ε
Suppose M₁ accept a string x if path goes to q2 it may follow any path from q2 to f₂ on M₂ and finally to qf on ε
Suppose M₂ accept a string y from this automata M it follow that
L(M) = [x+y]
where x ∈ L(M₁) and y ∈ L(M₂)
Therefore
if L(M) = r ;where r is regular expression of M
than
r = r₁ + r₂
Therefore Regular Expression are closed under union, Hence Proved
Theorem 2: Regular language are closed under concatenation
OR
If L1 and L2 are regular than L1L2 are also regular.
Proof :
Consider a finite automata
M1 = (Q1 , Σ1 , q1 , F1 , δ1)
which accept L(M1)
such that L(M1) = r1
where r1is regular expression accepted by M1
Consider another finite automata
M2 = (Q2 , Σ2 , q2 , F2 , δ2)
which accept L(M2) such that
L(M2)=R2
where R2 is regular expression for M2
we have to construct an automata
M = (Q1 , Σ , q1 , F2 , δ)
which accept L(M)
such that
L(M) = L(m1) . L(M2)
as follow
(i) Q = {Q₁ U Q₂}
(ii) Σ =∑₁ U ∑₂
(iii) δ is represented as
a. δ(f₁,ε) ={q₂}
b. δ(q,a) = δ1(q₀ , a)
where a∈ (∑₁Uε) and for every
q₁∈Q₁ -{f₁}
c. δ(q,a) = δ₂(q₁,a)
where a∈(∑₂Uε) and for every q∈Q₂
If x is a string accepted by M₁ and y is a string accepted by M₂ than from the above finite automata M, it follows.
L(M) = {xy | x ∈ L(M1) , y ∈ L(M2)}
Therefore L(M) = L(M1) . L(M2)
Hence Regular Expression are closed under concatenation.
Hence Proved
Theorem 3: Regular expression is closed under kleen closure.
Proof:
Consider finite automata
M1 = (Q1 , Σ1 , q1 , {f₁} , δ1)
which accept L(M1) such that
L(M1) = r1
where r1 is regular expression for M1
we have to construct an automata
M=(Q , ∑ , δ , q₀ ,{qf})
which accept L(M) such that
L(M) = L*(M1)
as follows
i. Q= { Q₁ U q₀ U qf}
ii. Σ = Σ1
iii. Transition function δ are represented as
a. δ(q₀,ε) ={q₁ , qf }= δ(f₁,ε)
b. shift all transition of δ₁ to δ
δ(q,a) = δ₁(q,a)
where a∈ (∑₁ U ε)
and q ∈ (Q₁ -{f₁})
If M1 accept string x than from the finite automata (M) it follows that
L(M) = {x* | x∈ ∑*}
Therefore L(M) = L*(M) and
if L(M) = r
where r is regular expression for M than
r=r₁*
Hence regular expression are closed under kleen closure.
Hence Proved
Theorem 4: Regular expression is closed under positive closure.
Proof:
Consider finite automata
M1 = (Q1 , Σ1 , q1 , {f₁} , δ1)
which accept L(M1) such that
L(M1) = r1
where r1 is regular expression for M1
we have to construct an automata
M=(Q , ∑ , δ , q₀ ,{qf})
which accept L(M) such that
L(M) = L+(M1)
as follows
i. Q= { Q₁ U q₀ U qf}
ii. Σ = Σ1
iii. Transition function δ are represented as
a. δ(q₀,ε)={q₁}
b. Shift all transition of δ1 to δ
δ(q ,a) = δ1(q ,a)
where a∈ (∑₁ U ε)
and a∈ (Q₁ - {f₁})
If M1 accept string x than from the finite automata (M) it follow that
L(M) = {x+ | x Σ+}
Therefore L(M) = L+(M1) and
If L(M)=r
where r is regular expression for M than
r=r1+
Hence RE are closed under positive closure
Hence Proved
Theorem 5: Construct an finite automata which accept a string does not end with 0 and 1's
OR
If L is regular than L' is also regular
OR
Regular language / Expression are closed under compliment.
Proof:
Consider finite automata
M1 = (Q1 , Σ , q0 , {f₁} , δ)
which accept L
we have to construct are automata M
M = (Q , Σ , q0 , F , δ)
which accept L(M) such that
L(M) = L'
L' = Σ*-L
as follows
i. Q = Q₁
ii. ∑=∑₁
iii. q₀=q₁
iv. f=(Q-f₁)
since we have successfully constructed an automata M such as L(M)=L'
where L'= Σ*-L
Hence proved.
Theorem 6: If L is regular LT is also regular. (T-Transpose)
OR
Regular language are closed under transpose.
Proof:
Consider finite automata
M = (Q , Σ , q0 , F , δ)
which accept L
we have to construct are automata M'
M' = (Q , Σ' , q1 , F' , δ')
which accept LT such that
as follows
i. Q =Q
ii. Σ' = Σ
iii. q₀' {F}
iv. F' = {q0}
v. δ' are represented as
Consider if δ(A,a)→B
where A,B ∈ Q , A ∈ (ΣUε) than
δ'(B,a)→A
Since the new automata L' accept LT therefore LT is regular.
Hence Proved
Theorem 6: If L1 and l2 are regular language than L1∩L2 is also regular.
Proof:
Consider finite automata
M1 = (Q1 , Σ1 , q1 , F₁ , δ1)
which accept L1 and
Consider another automata
M2 = (Q2 , Σ , q2 , F₂ , δ2)
which accept L2
we have to construct an automata
M = (Q , Σ , q0 , F , δ)
which accept L such that
L= L1∩L2
as follow:
i. Q=Q₁ X Q₂
ii. q₀ =[q₁Xq₂]
iii. F = [F₁XF₂]
iv. Transition δ are represented as:
δ([p,q],a) → [x,y]
where δ1(p,a)→x and
δ2(q,a)→y
where p,x ∈ Q₁ , q,y ∈ Q₂ and
a ∈ (ΣUε)
therefore M accept L such that
L = L1∩L2
Hence L1∩L2 or L is regular
It is regular because it is accepted by any finite automata M.
Theorem 7: If L is accepted by NFA then L is also accepted by DFA.
OR
NFA and DFA are equivalent
OR
For every NFA there is an equivalent DFA.
Proof:
Consider a NDFA / NFA
M = (Q , Σ , q0 , F , δ)
which accept L(M) and
We have to construct an equivalent DFA
M' = (Q' , Σ , q₀ , F' , δ')
Which accept L(M') such that
L(M) = L(M')
as follow:
i. Q=2Q
ii. q₀' =[q₀]
iii. F'= element of Q' which contain state of F.
iv. δ([q₁,q₂,q₃ ----- qn] ,a)=[p₁,p₂,p₃ ------ pm]
be any transition of M than
δ' of M' are written as
δ'([q₁,q₂,q₃ ----- q₄] ,a)= [p₁,p₂,p₃ ------ pm]
OR
δ'([q₁,q₂,q₃ ----- q₄] ,a)= δ(([q₁],a) U ([q₂],a) U ----- U ([qn],a))
Hence L(M) = L(M')
Theorem 8: For every CFG there is an equivalent PDA
Proof:
Consider a CFG
G = (V , T , P , S)
which accept L(M) and
We have to construct a PDA
P = (Q , Σ , Γ , q₀ , Z₀ , F , δ)
which accept L(P)
such that
L(M) = L(P)
as follows:
i. A →a∝
A ∈ V , a ∈ T , ∝ ∈ V*
δ( q₁ , a , A )→(q₁ , ∝)
ii. A →BC
where A , B , C ∈ V
iii. A →BC
where A , B , C ∈ V
δ( q₁ , ε , A )→(q₁ , BC)
iv. (q₀ , ε , Z₀ )→( q₁ , S , Z₀)
v. (q₁ , ε , Z₀ )→pop Z₀ accepted
L(M) = L(P)
Hence Proved.
Try Some other Theorems
Theorem 9: For every 2-DFA there is an equivalent NFA
Theorem 10: For every NFA with ∈ there is an equvalent NFA without ∈.
Theorem 11: CFG are not closed under intersection , transpose and compliment.
Theorem 12: R.E are closed under co-finite operation ⊕. In this theorem write union and intersection theorem. L₁ ⊕ L₂ mean either L₁ or L₂ or Both.
Theorem 13: Language accepted by R.E is regular. In this theorem we proof
R₁+R₂ | R₁.R₂ and
R+ and R*
Theorem 14: Context free language are accepted by PDA or conversion of PDA to CFG.
No comments:
Post a Comment