All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · December 2022 Shift 2

In the ε-NFA M = ({q0, q1, q2, q3}, {a}, δ, q0, {q3}), where δ is given in the transition table below, what is the minimum length of string to reach the final state?
Stateεa
q0{q1}{ }
q1{q2}{ }
q2{ }{q2, q3}
q3{ }{ }

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. 1

Explanation

q0 →ε q1 →ε q2 →a q3. Exactly one 'a' is needed, so the shortest accepted string has length 1.

More Theory of Computation and Compilers questions