1 / 12

An Introduction to Finite Automata

An Introduction to Finite Automata. By Andrew Milne Mentor: Professor Cindy Fry February 1, 2008. A Finite Automaton…. Has some number of states Has a start state and at least one end state Accepts input that advances it through its states

Lucy
Télécharger la présentation

An Introduction to Finite Automata

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Introduction to Finite Automata By Andrew Milne Mentor: Professor Cindy Fry February 1, 2008

  2. A Finite Automaton… • Has some number of states • Has a start state and at least one end state • Accepts input that advances it through its states • Can be Deterministic (DFA) or Non-Deterministic (NFA)

  3. Deterministic Finite Automata • A DFA can be written as a quintuple M = (Q, E, d, q0, F) • Q: A finite set of states • E: A finite set known as the alphabet • q0: The start state (an element of Q) • F: The final / accepting states (a subset of Q)

  4. d • d is a total function from Q x E to Q called the transition function. • Total function: There exists a function f such that for each element of E, e, as input to f, there is an element of Q, q, such that [q, e] is an element of f. • From any state there is a path for each possible input.

  5. Representing Finite Automata • Finite Automata can be represented visually by state diagrams • M: • Q = q0, q1 • E = {0, 1} • F = q2 d(q0, 0) = q1 d(q0, 1) = q0 d(q1, 0) = q0 d(q1, 1) = q1

  6. DFA State Diagram • Consider as input ‘1001’ • [q0, ‘1001’] |- [q0, ‘001’] • [q0, ‘001’] |- [q1, ‘01’] • [q1, ‘01’] |- [q1, ‘1’] • [q1, ‘1’] |- [q0, ‘’] • The input is not accepted

  7. Nondeterministic Finite Automata • An NFA can have several possible paths from a single node. • An NFA processes all possible paths to attempt to find an accepting state. • A string is accepted by an NFA if there is at least one possible path that • Processes the entire string, and • Ends in an accepting state

  8. The d of the NFA • d(q0, ew) = { q0, q1, … qn }

  9. An NFA State Diagram

  10. Nondeterministic Finite Automata • Two NFA can be joined by using the lambda-arc. • Processing follows a lambda-arc no matter what its input is (even null input)

  11. An NFA With a Lambda-Arc

  12. Reference: • Sudkamp, Thomas A • Languages and Machines, 3rd Edition

More Related