StreakPeaked· Practice

ExamsGATETechnical

Which of the following are regular sets? I. {aⁿ b^(2m) | n ≥ 0, m ≥ 0} II. {aⁿ b^m | n = 2m} III. {aⁿ b^m | n ≠ m} IV. {xcy | x,y ∈ {a,b}*}

  1. (A) I and IV only
  2. (B) I and III only
  3. (C) I only
  4. (D) IV only

Correct answer: (A) I and IV only

Solution

Option I represents a regular set because it can be described by a regular expression, allowing any number of 'a's followed by an even number of 'b's. Option IV is also regular as it can be expressed using a finite automaton that accepts any string from {a,b} followed by a 'c' and then any string from {a,b}, demonstrating closure properties of regular languages.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →