All Exams Test series for 1 year @ ₹349 only
Question

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.

This question was previously asked in
UGC NET 2016 Paper 3 Computer Science and Applications Question Paper (10-Jul-2016)
The correct answer is

(B), (C) and (D) only

A language is regular when a finite automaton can accept it; the pumping lemma shows non-regularity when pumping a substring pushes a string out of the language.

(A) Even number of a’s is \((aa)^*\), accepted by a two-state DFA — regular.

(B) \(\{a^p : p \text{ prime}\}\): pumping \(a^p\) with a block of length k gives lengths p + ik; choosing i = p gives p(1 + k), which is composite — not regular.

(C) Palindromes over {a, b}: pumping the leading a’s of \(a^n b a^n\) breaks the symmetry — not regular (it needs a stack).

(D) \(\{a^{m^2}\}\): consecutive squares differ by 2m + 1, which grows without bound, while pumping adds a fixed amount ≤ n, landing strictly between \(n^2\) and \((n+1)^2\) — not regular.

So exactly (B), (C) and (D) are not regular. Any choice that includes (A) wrongly calls a regular language non-regular, and (B) and (D) alone misses the palindromes.

(B), (C) and (D) only option is correct.

Was this answer helpful?

Similar Questions

  1. For the above specified passage, which of the following represents the regular expression?

  2. Given two languages :

    \(L_1 = \{(ab)^n a^k \mid n \gt k,\ k \ge 0\}\)

    \(L_2 = \{a^n b^m \mid n \ne m\}\)

    Using pumping lemma for regular language, it can be shown that

  3. Regular expression for the complement of language \(L = \{a^n b^m \mid n \ge 4,\ m \le 3\}\) is

  4. Let L be any language. Define even (W) as the strings obtained by extracting from W the letters in the even-numbered positions and even(L) = {even (W) | W ∈ L}. We define another language Chop (L) by removing the two leftmost symbols of every string in L given by \(\text{Chop}(L) = \{W \mid \nu W \in L, \text{ with } |\nu| = 2\}\).

    If L is regular language then

  5. Consider the languages L1 = φ and L2 = {1}. Which one of the following represents

    L1* ∪ L2* L1* ?

  6. Which of the following statements is false ?

  7. The regular expression corresponding to the language L where

    \(L = \{ x \in \{0, 1\}^{*} \mid x\) ends with 1 and does not contain substring 00 \(\}\) is :

  8. The symmetric difference of two sets S1 and S2 is defined as

    S1 ⊖ S2 = {x|x ∈ S1 or x ∈ S2, but x is not in both S1 and S2}

    The nor of two languages is defined as

    nor (L1, L2) = {w|w ∉ L1 and w ∉ L2}.

    Which of the following is correct ?

  9. The regular expression for the complement of the language L = {anbm|n ≥ 4, m ≤ 3} is :

  10. Consider the following two languages :

    L1 = {0i1j| gcd (i, j) = 1}

    L2 is any subset of 0*.

    Which of the following is correct ?


Important Questions from Regular Languages

  1. Which of the following are correct on regular expressions?

    A. φ + L = L + φ = L

    B. εL = Lε = L

    C. φL = Lφ = φ

    D. φL = Lφ = L

    Choose the correct answer from the options given below: 

  2. Let $L_1$ and $L_2$ be two languages over a finite alphabet, such that $L_1 \cap L_2$ and $L_2$ are regular languages.
    Which of the following statements is/are always true?
  3. Let $\Sigma = \{a, b, c\}$. For $x \in \Sigma^*$, and $a \in \Sigma$, let $\#_a(x)$ denote the number of occurrences of $a$ in $x$.
    Which one or more of the following option(s) define(s) regular language(s)?
  4. The Kleene Star operation accepts the following string of finite length over set A = {0,1} | where string s contains even number of 0 and 1.

  5. For the above specified passage, which of the following represents the regular expression?

Need Expert Advice?
Upcoming Exams
CTET
December 12, 2026
WB SET
December 13, 2026
CBSE UGC NET
December 14, 2026
CSIR UGC NET
December 19, 2026
Test Series
UGC NET img
Teaching
UGC NET (Paper 2) December 2026 Mock Test Series
799 Tests 2 Tests Free
300 Attempts
4.4(45)
English, Hindi
More Questions from UGC NET

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App