1.

Which of the following is not regular?(a) String whose length is perfect square and consists of 0s(b) Palindromes consistingof 0’s and 1’s(c) String whose length is perfect square and consists of 0s & Palindromes consistingof 0’s and 1’s(d) None of the mentionedThis question was addressed to me in a national level competition.My doubt stems from Obtaining the regular Expression from the Finite automata in portion Finite Automata and Regular Expression of Compiler

Answer»

Correct choice is (c) String whose length is PERFECT square and consists of 0s & Palindromes consistingof 0’s and 1’s

Best explanation: STRINGS of odd numbers of zeros can be generated by regular expression (00)*0.



Discussion

No Comment Found

Related InterviewSolutions