Input: machine M = (Q,Σ,δ,s,W)The existence of such an algorithm proves that L can't be accepted by a finite automaton.
Output: string w' such that either w' ∈ L but w' ∉ L(M), or w' ∉ L but w' ∈ L(M).
Note: the important thing about this example is that it really shows you why proof requires justifying that the w' you get by pumping in the last step is guaranteed to give you a string that is not in the language L. While it's easy to follow the algorithm itself, it is not easy to see that it will always produce a string that the input machine misclassifies with respect to L. So without that justification it's hard to believe that the algorithm gives you a proof that no FA accepts L.
Question: What string does the proceeding algorithm/proof produce for input machine
If we had time, we swapped proofs/algorithms for the above, and ran them on the following two machines to see what strings were produced:
This is really hard to prove using the pumping lemma! However, we don't need to work that hard, because we can leverage the languages we already proved are not regular. Here's a simple proof.
Let $L_{ab}$ be the language defined by the regular expression $a^*b^*$. Note that $\overline{L_{ne}}$ is the language of all strings with the same number of $a$s as $b$s. So $\overline{L_{ne}}\cap L_{ab} = \{a^n b^n\ \big|\ n\geq 0\}$. Assume, by way of contradiction, that there is a DFA $M$ that accepts $L_{ne}$. Then there's a DFA that accepts $\overline{L_{ne}}$. Since $L_{ab}$ is defined by a regular expression there is a DFA that accepts it as well. If we then apply the intersection algorithm for DFAs, we get a DFA that accepts $\overline{L_{ne}}\cap L_{ab} = \{a^n b^n\ \big|\ n\geq 0\}$, and that's a contradiction! So ... there is no DFA accepting $L_{eq}$.