GATE CS 2023 (Forenoon) — Question 19

Theory of Computation (TOC)Regular Expressions & Finite Automata (DFA/NFA Min)MCQ1 mark · −1/3 if wrongMedium

Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expressions: \( \text{letter} \rightarrow \text{[A – Za – a]} \) \( \text{digit} \rightarrow \text{[0 – 9]} \) \( \text{id} \rightarrow \text{letter (letter} \mid \text{digit)}^* \) Which one of the following Non-deterministic Finite-state Automata with \( \epsilon \)-transitions accepts the set of valid identifiers? (A double-circle denotes a final state)
  1. A
    Question image
  2. B
    Question image
  3. C
    Question image
  4. D
    Question image
Practise the full 2023-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Automata Theory (Hopcroft & Ullman)Regular languages, CFGs, pushdown automata and Turing machines.
Practise more on Regular Expressions & Finite Automata (DFA/NFA Min)Timed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group