L is a language over a finite alphabet. How to show that if L is infinite, then there is no upper bound on the length of the words within L?
Can someone help me prove this.
L is a language over a finite alphabet. How to show that if L is infinite, then there is no upper bound on the length of the words within L?
Can someone help me prove this.
On
HINT: Suppose that there are $m$ symbols in the alphabet $\Sigma$. If $n\in\Bbb N$, how many words of length $n$ are there in $\Sigma^*$? Clearly $L$ has at most that many words of length $n$.
On
Proof by Contradiction:
Let's assume that there exists a longest word w' in Language L. And assume that there is an arbitrary alphabet a of length 1 in language L.
Then the length of the word aw' = |w'| + 1 , but it is not possible to get the value of length aw' because the length of the longest word in an infinite language cannot be mapped to a countably finite set of natural (counting) numbers.
Hence it follows that length of word aw' cannot be bounded above by a finite natural number and therefore, there is no upper bound on the length of words in language L.
If the alphabet is finite -- say $k$ symbols -- and there's an upper bound of $S$ on the length of words, then there are at most $S^k$ words. Now contradiction finishes the proof.