Where counting runs out

You have used this machine. The predictive text on an old phone keypad was doing roughly this: counting what tends to follow what, then offering the winner. It was handy for the and useless for anything you actually wanted to say.

You can make it smarter. Instead of counting single words, count pairs. What follows the dog? That is a better question than what follows dog, and it gives a better answer.

So count triples. Better again. And here the trouble starts, because each step multiplies how much you have to count, while the phrases themselves get rarer. Count long enough stretches and almost every one shows up exactly once in your entire pile of text, which tells you nothing. One appearance is not a pattern.

The clearest way to see the ceiling is to let one of these run. Give it a start, let it feed its own output back in, and it folds in on itself:

the man who was the man who was the man who was

Every pair in that sentence is a reasonable thing to say. the man, man who, who was. Read any two words and nothing is wrong. Read the whole line and there is nobody home.

Two or three words of memory cannot hold a thought. The counter has no idea it is repeating itself, because it cannot see far enough back to notice.