Question:

Which of the following is a regular language?

Show Hint

Regular languages can be recognized by finite automata, and properties like counting even or odd numbers make a language regular.
Updated On: Jun 16, 2025
  • A string whose length is a sequence of prime numbers
  • A string with substring ww\(^f\)
  • A palindrome
  • A string with even number of zero’s
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

A string with an even number of zeroes is a regular language because it can be recognized by a finite automaton. A finite automaton can keep track of whether the number of zeroes encountered is even or odd, and accept the string accordingly. Other options like palindromes and sequences of prime numbers are not regular languages because they require counting or more complex memory, which cannot be done with finite automata.
Was this answer helpful?
0
0