5,681 views

1 Answer

Best answer
9 votes
9 votes

Let $x_1, x_2, x_3, \ldots$ be the sequence $0, 1, 4, 6, 8, 9, \ldots$ of non-prime, non-negative integers.

Let $a^{x_i}$ be a string of $x_i$ number of $a$’s (that is, $a^{x_3} = a^4 = aaaa$)

Let the language $L_i = a^* - \left \{a^{x_i} \right \}$.

Now consider $L =$ The infinite intersection of the sequence of languages $L_1, L_2, \ldots$. That is, $$L = \bigcap_{i=1}^{\infty}L_i = L_1 \cap L_2 \cap L_3 \cap \ldots$$

Note that $L = \left \{a^p \mid p \text{ is prime}\right \}$.

Hence L is not regular.


Another easy example would be (this one with unions as opposed to intersections):

Let $L_i = \left \{a^i b^i \right \}$ for some given value $i$.

Then, $L_1 = \{ab\}, L_2 = \{aabb\}, L_3 = \{aaabbb\}$ and so on.

Now consider $L =$ The infinite union of the sequence of languages $L_1, L_2, \ldots$ That is, $$L = \bigcup_{i=1}^{\infty}L_i = L_1 \cup L_2 \cup L_3 \cup \ldots$$

Thus, $L = \left \{ a^i b^i \mid \forall i > 0 \right \}$ which is CFL but not Regular.

Related questions

3 votes
3 votes
1 answer
2
Meenakshi Sharma asked Aug 4, 2016
1,071 views
how to find an infinite language is regular or not is there any other method than drawing DFA as DFA made by us may or may not be correct how to ensure DFA is correct an...