1.

Maximum number of states of a DFA converted from an NFA with nstates is?(a) n(b) n^2(c) 2n(d) None of the mentionedThis question was addressed to me in an interview for internship.My doubt is from Finite Automata in portion Finite Automata and Regular Expression of Compiler

Answer»

Right choice is (C) 2n

To EXPLAIN: Take the NFA with states {QO,q1}, alphabet Σ={a}, initial state q0, TRANSITIONS δ(q0,a)=q0, δ(q0,a)=q1 and FINAL state q1. It generates the same language as the DFA with the same set of states and alphabet, but transitions δ(q0,a)=q1 and δ(q1,a)=q1.



Discussion

No Comment Found

Related InterviewSolutions