Problem solved in full
-
Why no finite machine can match up 0s and 1s, however many states you give it 8 steps
The parity machine on this page has two states, and it reads 101101, six symbols, without ever wanting a third. Hand it six million symbols and it still wants two. So what is it that a machine with a fixed number of states cannot do? And how do you prove a machine does not exist, rather than merely failing to find one?
-
Watch the machine you have. Parity starts in e, and every 1 flips it. Six symbols later it is back in e and the input is accepted. Nothing accumulated along the way: the machine at symbol six is in exactly the same condition it could have been in at symbol one.
-
That is the entire resource. A DFA’s memory is the state it is in and nothing else. No counter, no stack, no tape it can write on. After reading any prefix, everything the machine knows about that prefix is which of its k states it now occupies.
-
So find something that plainly needs more. Take the strings that are some number of zeros followed by exactly as many ones. 01 is one, 0011 is one, 001 is not, and neither is 0110.
-
Suppose a DFA with k states recognises it. Do not ask what the machine looks like — you are never going to be told. Just feed it the k+1 prefixes made of 0 through k zeros, and note where each one leaves it.
-
Pigeonhole. There are more prefixes than states, so two of them land in the same place. Call them 0ⁱ and 0ʲ with i smaller than j. From that moment the machine cannot tell them apart, and not because it is badly designed. The state is all it has, and the two strings gave it the same one.
-
Now feed both continuations the same thing: i ones. Same starting state, same symbols, so same finishing state, so the same verdict. There is no room for the machine to do anything else.
-
And the two verdicts have to differ. 0ⁱ1ⁱ has matching counts and belongs; 0ʲ1ⁱ does not, because j is not i. One must be accepted and the other refused, and the machine gives them the same answer. What breaks is the supposition it existed.
-
Read the argument again and notice what never appeared in it: a value of k. Two, the parity machine’s own size, or two billion: k+1 prefixes outnumber k states either way. Put a ceiling on n, though, and the language becomes finite-state at once: matching up to N needs 2N+2 states, so 22 for N = 10 and 202 for N = 100.
Answer
No finite automaton recognises it, at any size. The proof needs nothing about how the machine is built, only that k+1 things cannot sit in k places without two of them sharing, and that sharing a state is forgetting. The parity machine shows the same thing in miniature: feed it 0, then 00, then 000, and all three leave it in e, because it does not look at zeros at all.
The ceiling is where the whole difficulty lives. Matching up to N is easy, at 2N+2 states, one more pair for every symbol you want to reach, and that count grows without stopping, so every particular N has a machine and no machine has every N. That gap is what “finite memory” means, and it is why the next thing after a DFA is defined by handing it a stack: an unbounded store, added back precisely because this is what its absence costs. -
References (2)
- Insight block 3 — the nerve-net model the finite automaton descends from: W. S. McCulloch and W. Pitts, "A logical calculus of the ideas immanent in nervous activity." Bulletin of Mathematical Biophysics 5(4), 115–133, 1943.
- Insight block 1 — the theorem that fixes the minimum state count: A. Nerode, "Linear automaton transformations." Proceedings of the American Mathematical Society 9(4), 541–544, 1958.