1

I need to Design an efficient decision procedure to determine if the language accepted by a non-deterministic Finite state machine is empty.

I know machine doesn't accepting string if there is no path from initial state to final state.

But I'm struggling in how to prove that or design procedure.

Thanks

  • What have you tried so far, and where are you stuck? Where does the naïve approach of finding the set of all lambda-reachable states from the initial state fail? – Welbog Apr 09 '19 at 12:48
  • I think I don't need to go as what you said. – user10543640 Apr 09 '19 at 15:33
  • What do you think you need to do? Without more specific information, your question is too open-ended for folks to help. – Welbog Apr 09 '19 at 17:27

1 Answers1

0

OK, so like you said, you do a depth-first or breadth-first search from the initial state and you print "no" if you run across an accepting state. If the search finishes without printing "no", print "yes".

The proof that this works is easy if you use DFS as your search. Then, as you are doing the search, keep track of the sequence of symbols you've encountered on the branch so far. If you get to an accepting state, the string you've seen is a string accepted by the DFA; you can spit that out as your counterexample to the language being empty. You can't get better proof than a counterexample.

Patrick87
  • 27,682
  • 3
  • 38
  • 73