Q. If ๐ฟ is a regular language over ฮฃ = {๐, ๐}, which one of the following languages is NOT regular ?
(A) ๐ฟ โ ๐ฟ๐ = {๐ฅ๐ฆ | ๐ฅ โ ๐ฟ, ๐ฆ๐ โ ๐ฟ}
(B) {๐ค๐ค๐ | ๐ค โ ๐ฟ}
(C) Prefix (๐ฟ) = {๐ฅ โ ๐ดโ|โ๐ฆ โ ๐ดโ such that ๐ฅ๐ฆ โ ๐ฟ}
(D) Suffix (๐ฟ) = {๐ฆ โ ๐ดโ|โ๐ฅ โ ๐ดโ such that ๐ฅ๐ฆ โ ๐ฟ}
Ans:{๐ค๐ค๐ | ๐ค โ ๐ฟ}
Solution:
language L = {wwR โ w โ L} is infinite and not regular because it involves string matching and we can increase in length indefinitely and then finite automata will run out of memory, so it require stack. Hence, it is context-free but not regular.