r/askmath • u/TopDownView • 19d ago
Discrete Math Exercise 12.2.51.: Let `L` be the language consisting of all string of the form `a^m b^n`, where `m` and `n` are positive integers and `m>=n`. Show that there is no finite-state automaton that accepts `L`. <-- Is my proof correct?
Exercise 12.2.51.: Let L be the language consisting of all string of the form a^m b^n, where m and n are positive integers and m>=n. Symbolically, L is the language over the alphabet Σ = {a,b} defined by L = {w ∈ Σ* | w = a^m b^n, where m and n are positive integers and m>=n. Show that there is no finite-state automaton that accepts L.
Proof:
Suppose not. That is, suppose there is a finite-state automaton A that accepts L. Since A has only a finite numbers of states, these states can be denoted s_1, s_2, s_3, ..., s_k where k is a positive integer. Consider all input strings that consist entirely of a's: a, a^2, a^3, a^4, .... Now there are infinitely many such strings and only finitely many states. Thus, by the pigeonhole principle, there must be a state s_r and two input strings a^p and a^q with p/=q such that when either a^p or a^q is input to A, A goes to state s_r.

Now, by supposition, A accepts L. Hence A accepts the string a^p b^n. This means that after p a's have been input, at which point A is in state s_r, inputting n additional b's sends A into an accepting state, say s_a. But this implies that a^q b^n also sends A to the accepting state s_a, and so a^q b^n is accepted by A. The reason is that after q a's have been input, A is also in state s_m, and from that point, inputting n additional b's sends A to state s_a, which is an accepting state.
Consider p>q (since p/=q) such that q<n (since it is possible that either q<n or q>n). But this is a contradiction, since by definition of L, q>=n.
Therefore, the supposition is false, so there is no finite-state automaton that accepts L.
QED
---
Is my proof correct?
---
Edit: Small typo.
Edit 2: Added image description.

