Question:

For the computation, choose the sequence of following tasks:
A. Regular Expression,
B. NFA,
C. Tokens,
D. Problem,
E. DFA.

Show Hint

In lexical analysis, the common sequence is problem, regular expression, NFA, DFA and tokens.
Updated On: Jun 6, 2026
  • A, D, B, C, E
  • D, A, B, E, C
  • E, B, D, A, C
  • B, E, D, C, A
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Concept:
In computation and lexical analysis, a problem is first defined, then patterns are written using regular expressions, then automata are constructed and finally tokens are generated.

Step 1: Problem.

First, the computational problem is identified. \[ \text{First step}=D \]

Step 2: Regular Expression.

The required pattern is expressed using regular expression. \[ \text{Second step}=A \]

Step 3: NFA.

The regular expression is converted into NFA. \[ \text{Third step}=B \]

Step 4: DFA.

NFA is converted into DFA for deterministic processing. \[ \text{Fourth step}=E \]

Step 5: Tokens.

Finally, tokens are generated or recognized. \[ \text{Fifth step}=C \] \[ \therefore \text{Correct Answer is (B)} \]
Was this answer helpful?
0
0