4_12525_CS311_2014_1__1_1_02-NFA.pdf - Theory of...

This preview shows page 1 - 8 out of 20 pages.

Theory of Computation Lecture 2: Non-Determinism Dr. Nahla Belal
Nondeterministic Finite Automata (NFA) Motivation of nondeterminism Play chess, factor a number In a nondeterministic machine, several choices may exist for the next state at any point. Any nondeterministic machine is a deterministic one, nondeterminsim is a generalization of determinism. Every NFA can be converted into a DFA. Constructing NFAs is sometimes easier than directly constructing DFAs. NFAs may be much smaller than DFAs.
NFA definition A nondeterministic finite automaton is a 5-tuple ( Q, , , q 0 , F ) Q is a set of states is an alphabet over which input strings are defined  Q x Q is a transition function between states q 0 is the start state F is a set of accept states
NFA Example N1
How NFAs Work Input 010110 to NFA N 1 (accepts string containing 101 or 11)
DFA vs NFA Every state in a DFA has exactly one transition arrow for a given input of the alphabet.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture