We start with problems related to the Pumping Lemma:
Theorem 4.1: (The pumping lemma for regular languages)
Let $L$ be a regular language. Then there exists a constant $n$ (which depends on $L$) such that for every string $w$ in $L$ such that $|w| \geq n$, we can break $w$ into three strings, $w = xyz$, such that
$y \ne \epsilon$
$|xy| \leq n$, and
$\forall k \geq 0$, the string $xy^kz$ is also in $L$.
Use the Pumping Lemma to prove the following:
Prove that the language over {0,1} consisting of all strings with equal numbers of zeros and ones is not a regular language.
Reveal
Prove that the language $L = {0^m1^m | m \geq 1 }$ is not a regular language.
Reveal
Assume BWOC that $L$ is regular.
We don’t know what $n$ (the critical value for this regular language) is. But if $L$ is regular, $n$ must exist.
Consider the string $w = 0^n1^n$. Clearly $|w| \geq n$.
By the pumping lemma, we must be able to split this into $w = xyz$ such that $xy^kz$ is also in L.
So we are looking at something along the lines of 000000…01…11111
$y$ cannot be empty.
If $y$ includes zeros and ones (i.e., it sits over the middle of the string $0^n1^n$, then $xy^2z$ would look like 000000…01…01…11111 and so would not be in L.
If $y$ contains only zeros, then $xy^2z$ would have more zeros than ones, and so would not be in L.
If $y$ contains only ones, then $xy^2z$ would have more ones than zeros, and so would not be in L.
So, $xy^2z$ will not be in $L$, contradicting the pumpng lemma and therefore contradicting the assumption that $L$ is regular.
Did not actually need to use the requirement that $|xy| \leq n$ in this proof. Might need it in others.
2 Decision procedures
Decision procedures are, in essence, algorithms that return a boolean true/false result.
2.1 Give a decision procedure for determining if the language accepted by a DFA is empty.
Reveal
We can do this visually. A graph traversal algorithm could do this in $O(|E|)$ time, which is $O(n|\Sigma|)$.
2.2 The decision procedure for distinguishing states
Two states are distinguished/distinguishable if there is some input that gives a different accepting/non-accepting result when starting from those states.
Which of the states in this DFA are distinguishble?
Reveal
Applying the text’s algorithm yields the following sequence:
0
1
2
3
4
5
6
0
1
1
1
1
1
2
1
1
3
1
1
4
1
1
1
1
1
5
1
1
1
1
1
6
1
1
0
1
2
3
4
5
6
0
2
2
1
1
1
2
2
1
1
2
2
2
2
1
1
2
3
2
2
2
1
1
2
4
1
1
1
1
1
5
1
1
1
1
1
6
2
2
1
1
0
1
2
3
4
5
6
0
3
2
2
1
1
1
3
2
2
1
1
3
2
2
2
2
1
1
2
3
2
2
2
1
1
2
4
1
1
1
1
1
5
1
1
1
1
1
6
3
2
2
1
1
0
1
2
3
4
5
6
0
3
2
2
1
1
4
1
3
2
2
1
1
3
2
2
2
2
1
1
2
3
2
2
2
1
1
2
4
1
1
1
1
1
5
1
1
1
1
1
6
4
3
2
2
1
1
The states with empty entries in off-diagonal positions are indistinguishable.
3 Minimizing States in a Finite Automaton
What is the smallest DFA accepting the same language as this FA?
Reveal
Look at our table of distinguished states:
0
1
2
3
4
5
6
0
3
2
2
1
1
4
1
3
2
2
1
1
3
2
2
2
2
1
1
2
3
2
2
2
1
1
2
4
1
1
1
1
1
5
1
1
1
1
1
6
4
3
2
2
1
1
Stated that are indistinguishable can be merged:
4 & 5 can be merged.
Form a DFA with states {0}, {1}, {2}, {3}, {4,5}, {6}
In essence, the result is this automaton that we developed some weeks ago.