Question 49Asked in UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)

Which of the following are not regular? (A) Strings of even number of a's

Which of the following are not regular? (A) Strings of even number of a's (B) Strings of a's, whose length is a prime number (C) Set of all palindromes made up of a's and b's (D) Strings of a's whose length is a perfect square
  1. A(A) and (B) only
  2. B(A), (B) and (C) only
  3. C(B), (C) and (D) only
  4. D(B) and (D) only
Show answerHide answer

Correct answer: (C) (B), (C) and (D) only

Explanation

(A) Strings with an even number of a's is regular, since a finite automaton can accept it. (B) Strings of a's whose length is prime, (C) palindromes over {a, b} and (D) strings of a's whose length is a perfect square are not regular: no finite automaton can accept them (provable with the pumping lemma).

From UGC NET Computer Science PYQ, June 2017 (Paper II & III, Selected Questions)

This is question 49 of UGC NET Computer Science PYQ, June 2017 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.