Standard Mathematical Notation:: Models of Computation, HW3 Solutions
Standard Mathematical Notation:: Models of Computation, HW3 Solutions
Standard mathematical notation: implies that, there exists, for each, such that.
Furthermore, since regular languages are closed under complement and intersection, we have:
If L is regular then Lc is regular then Lc {a*b*a*} = L is regular.
Therefore, if L is not regular then L is not regular either. It suffices to show that Lis not regular.
____________
Since Lis regular and infinite we have from the pumping lemma that there exists m such that:
w L with |w| m, x, y, z such that:
|xy| m, |y| = k > 0, w = xyz and xyiz L i 0.
Since L is regular and infinite we have from the pumping lemma that there exists m such that:
u L with |u| m, x, y, z such that
|xy| m, |y| = k > 0, u = xyz and xyiz L i 0.
No.
Consider Lc = {an : n is prime}. (Lc is the coplement of L).
Therefore, if Lc is not regular then L is not regular either. It suffices to show that Lc is not regular.
Since Lc is regular and infinite we have from the pumping lemma that the exists m such that:
w Lc with |w| m, x, y, z such that:
|xy| m, |y| = k > 0, w = xyz and xyiz Lc i 0.
No.
Assume (for contradiction) that L is regular.
Since L is regular and infinite we have from the pumping lemma that there exists m such that:
w L with |w| m, x, y, z such that:
|xy| m, |y| = k > 0, w = xyz and xyiz L i 0.
but k m < c,
2j = c < c+k < 2c = 2*2j = 2(j+1)
q 2q = c+k
which is a contradiction
L is not regular
No.
We can use the pumping lemma.
but k<m
1m = m < m+k < m+m = 2m
n (m+k) = n*m
which is a contradiction
L is not regular
No.
D: L = {anbl : n + l = 100 }
Yes.
L is finite (101 elements), and all finite languages are regular; therefore L is regular.
Claim: L(G) = L
Proof:
Consider the following derivation:
S * anScn anBcn * anbmBcmcn anbmc(n + m)
(where the first * applies S aSc n times, the second B bBc m times)
Since all words in L(G) must follow this pattern in their derivations, it is clear that L(G) L
Claim: L(G) = L = L1 L2
Proof:
Consider the leftmost productions following S EcC
S EcC * anbmc(n+m)cC * anbmc(n+m)cckC anbmc(n+m)cck = anbmc(n+m+k+1)
(where the first * follows from 4(a), the second from k repetitions of { C cC })
Since (n+m) < (n+m+k+1), L(EcC) L2 L
L1 L(G)
L = L1 L2 L(G)
L = L(G)
S I1I2 | TA | b
A TA | b
I1 T1S
I2 T1A
T T1T2
T1 a
T2 b
Method: