60 likes | 100 Views
CSC312 Automata Theory Lecture # 15 Chapter # 7 by Cohen Nondeterministic Finite Automaton (NFA). Nondeterministic Finite Automaton (NFA). A nondeterministic finite automaton is a TG with a unique start state and property of having single letter as label of transition.
E N D
CSC312 Automata Theory Lecture # 15 Chapter # 7 by Cohen Nondeterministic Finite Automaton (NFA)
Nondeterministic Finite Automaton (NFA) • A nondeterministic finite automaton is a TG with a unique start state and property of having single letter as label of transition. • An NFA is a collection of three things. • Finite many states with one initial and some (may be non) final states. • Finite set of input letters, say = {a, b, c} • Finite set of transition, showing where to move if a letter is input at certain state ( is not a valid transition in this type of NFA. The name of -NFA is used where transition is allowed). There may be more than one transition for certain letters and there may not be any transition for certain letters.
Theorem 7: • For every NFA, there is some DFA that accepts exactly the same language. • Proof 1: • Using Part-2 of Kleene’s theorem, convert the NFA into a RE, then using the four rules of Part-3 of the proof to construct a DFA that accepts the same language as the RE. • Proof 2: • We use constructive algorithm to go from NFA to DFA without passing through RE.
Proof 2 (Cont…): • The start state of DFA will correspond to the start stat of NFA. We introduce an empty state for a letter having no transition at certain state and a state corresponding to the combination of states, for a letter having more than one transitions. • Theorem 6, Part-3, Rule-2 (Union of two FAs) • Proof 2 (alternative proof) • Given FA1 and FA2, we shall construct an algorithm for producing a union machine FA1 + FA2 by two steps: • Step 1: Introduce a new and unique start state with two outgoing a-edges and two outgoing b-edges but no incoming edges. Connect the outgoing edges to the states that the start states of FA1 and FA2 are already connected.
Erase minus signs of the start states of FA1 and FA2. the new machine is an NFA that clearly accepts exactly L(FA1) +L(FA2). • Step 2: Using the algorithm of theorem 7, convert the NFA into equivalent DFA. • Solve Exercise Q. No. 4 • For practice do Exercise Questions: 1, 3, 4, 5, 6, 7, 8, 14, 16