Question: Prove that there is a language A {0, 1} with the following properties: (a) ForallxA,|x|4. (b) No regex of length at most 10 recognizes A.
Prove that there is a language A {0, 1} with the following properties: (a) ForallxA,|x|4.
(b) No regex of length at most 10 recognizes A.
Assume that the only allowed symbols in a regex are ( ) * + | 0 1
For example, the regex (0|1)*0110 has length 10.
Hint: You dont have to define A explicitly; just show that it has to exist. Count the number of languages satisfying (4a) and the number of Regex satisfying (4b), and then use the pigeonhole principle. To count the number of languages satisfying (4a), think about writing down all the strings of length at most 4, and then to define such a language, you have to make a binary decision for each string about whether to include it in the language or not. How many ways are there to make these choices?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
