{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

LectureNotes5 - ECS 120 Lesson 5 Nondeterministic Finite...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ECS 120 Lesson 5 – Nondeterministic Finite State Machines Oliver Kreylos Monday, April 9th, 2001 Before we prove the closure of regular languages under concatenation and Kleene Star, we introduce another type of finite automaton that will make the proofs a lot easier. 1 Nondeterministic Finite State Machines Until now, the transition function δ for an automaton M = ( Q, Σ , δ, q 0 , F ) was restricted by requiring that for each state q Q and every charac- ter a Σ, there was exactly one other state q Q such that δ ( q, a ) = q . This made δ a total function. We will henceforth call machines of this re- stricted type deterministic finite automata (DFA) . A new type of machine, called nondeterministic finite automaton (NFA) , is created by dropping the restriction on δ . There are three differences between the transition function of an NFA and that of a DFA, see Figure 1: There can be states with more than one arrow leaving for the same input symbol (see state q 0 and symbol 1 in Fig. 1). There can be states with no arrows leaving for an input symbol (see state q 2 and symbol 0 in Fig. 1). There can be arrows labelled with the special symbol (see state q 1 in Fig. 1). How does the computation of an NFA differ from that of a DFA? To recall, a DFA computes by starting in its start state, and following a chain of 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
q 0 q 1 q 2 0 1 0 1 1 1 ε Figure 1: An NFA M over the alphabet Σ = { 0 , 1 } . states labeled by the sequence of characters read, see Figure 2. An NFA, on the other hand, computes by following a tree of state chains starting at its start state, see Figure 3. Here are the three ways in which NFA computation differs from DFA computation: If the machine reads a character with multiple arrows leaving from the current state, it will branch the chain of states and follow all those arrows simultaneously. If the machine reads a character with no arrows leaving from the current state, the chain of states will “die,” i. e., it will terminate prematurely. If the machine is in a state with one or more leaving -arrows, it will branch the chain of states by following all those arrows simultaneously before reading any characters.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern