Which of the following are not regular?

Which of the following are not regular?
A. String of )’s which has length that is a perfect square
B. Palindromes Consisting of 0’s 1’s
C. String of 0’s whose length is a prime number
D. All of the mentioned
 
Answer: d
Explanation: Strings of odd number of zeroes can be generated by the regular expression (00) *0.Pumping lemma can be used to prove the non-regularity of the other options.
 

Tìm kiếm

Back
Top