1.

Which of the following cannot be used to decide whether and how a given regexp matches a string:(a) NFA to DFA(b) Lazy DFA algorithm(c) Backtracking(d) None of the mentionedI had been asked this question during an interview.Question is taken from Converting Regular Expressions to Automata topic in division Regular Expressions and Languages of Automata Theory

Answer»

The CORRECT option is (d) None of the mentioned

Easiest explanation: There are at least three algorithms which decides for us, whether and how a regexp matches a string which included the TRANSFORMATION of Non deterministic automaton to deterministic finite automaton, The lazy DFA algorithm where ONE simulates the NFA DIRECTLY, building each DFA on DEMAND and then discarding it at the next step and the process of backtracking whose running time is exponential.



Discussion

No Comment Found

Related InterviewSolutions