An Introduction to Finite Automata - PowerPoint PPT Presentation

About This Presentation
Title:

An Introduction to Finite Automata

Description:

Deterministic Finite Automata. A DFA can be written as a quintuple M = (Q, E, d, q0, F) ... Nondeterministic Finite Automata. An NFA can have several possible ... – PowerPoint PPT presentation

Number of Views:429
Avg rating:3.0/5.0
Slides: 13
Provided by: ECS1
Category:

less

Transcript and Presenter's Notes

Title: An Introduction to Finite Automata


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
Write a Comment
User Comments (0)
About PowerShow.com