For a non-deterministic finite automaton M over an alphabet Σ, we write L(M)⊆Σ∗ for the set of words accepted by M. We write ∣w∣ for the length of the word w, and write N for the set of non-negative integers.
Answer the following questions:
(1) Consider the non-deterministic finite automaton M0 depicted below, where q0 is the start state, and q3 is the only final state. Give x,y,z∈{a,b,c}∗ that satisfy all of the following conditions:
(i) xyz=abcc
(ii) ∣y∣>0
(iii) xynz∈L(M) for every n∈N.
(2) Prove that, for every non-deterministic finite automaton M consisting of k states and for every w∈L(M) such that ∣w∣≥k, there exist x,y, and z that satisfy all of the following conditions:
(i) xyz=w
(ii) ∣y∣>0
(iii) ∣xy∣≤k
(iv) xynz∈L(M) for every n∈N.
(3) Prove that there exists no non-deterministic finite automaton M such that L(M)={ambn∣m,n∈N,0<m<n}. You may use the fact proved in question (2).
Classic proof of Pumping Lemma (PL) for regular languages.
Let M be an automaton with k states.
Let w=a1a2⋯ak∈L(M) such that ∣w∣>k.
Now let's simulate run of M of word w.
Define states pi=δ^(q0,w1w2⋯wi).
That is, pi is a state in which M is after reading first i inputs.
From pigeonhole principle, at lest two of those state must be exactly the same state.
Let pi=pj be the state that is visited the second time for the first time (i.e. i is the smallest among all such states).
I claim that: w=xyz, where
x=a1a2⋯ai−1
y=aiai+1⋯aj−1
z=ajaj+1⋯ak
Obviously, ∣y∣>0 because i=j and ∣xy∣=j−1≤n.
States pi,…,pj create a loop in the automaton - it can be traversed any number of times, thus xynz∈L(M).
For n=0 we simply "skip" the loop, for n≥1 we traverse the loop n times.
L(M)={ambn∣n,m∈N,0<m<n}
Assume that L is regular language.
Then pumping lemma must hold.
Consider w=akbk+1∈L, where k is the pumping lemma constant.
Because ∣w∣=2k+1>k, then there must exist a partitioning
xyz=w such that ∣xy∣<k, ∣y∣>0 and xynz∈L \textbf{for all} n∈N.
Notice that xy consists of a's only.
Let's "pump up" y.
For example, xy42z contains of significantly more a's than b's.
This word does not belong to the language.
Contradiction with statement that xynz∈L for all n∈N.
L(M) is not regular, thus there exist no automaton recognizing it.