Deterministic finite automaton dfa
Download
1 / 47

Deterministic Finite Automaton (DFA) - PowerPoint PPT Presentation


  • 105 Views
  • Uploaded on

Deterministic Finite Automaton (DFA). Input Tape. String. Output. “Accept” or “Reject”. Finite Automaton. Formal Definition. Deterministic Finite Automaton (DFA). : set of states. : input alphabet. : transition function. : initial state. : set of accepting states.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Deterministic Finite Automaton (DFA)' - leone


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Deterministic finite automaton dfa
Deterministic Finite Automaton (DFA)

Input Tape

String

Output

“Accept”

or

“Reject”

Finite

Automaton

Costas Busch - RPI


Formal definition
Formal Definition

  • Deterministic Finite Automaton (DFA)

: set of states

: input alphabet

: transition function

: initial state

: set of accepting states

Costas Busch - RPI


Language Accepted:

Costas Busch - RPI


Transition graph
Transition Graph

initial

state

accepting

state

transition

state

Costas Busch - RPI


For every state, there is a transition

for every symbol in the alphabet

Costas Busch - RPI


Set of states
Set of States

Example

Costas Busch - RPI


Input alphabet
Input Alphabet

:the input alphabet never contains

Example

Costas Busch - RPI


Initial state
Initial State

Example

Costas Busch - RPI


Set of accepting states
Set of Accepting States

Example

Costas Busch - RPI


Transition function
Transition Function

Describes the result of a transition

from state with symbol

Costas Busch - RPI


Example:

Costas Busch - RPI



Transition Table for

symbols

states

Costas Busch - RPI


To accept a string:

all the input string is scanned

and the last state is accepting

To reject a string:

all the input string is scanned

and the last state is non-accepting

Costas Busch - RPI


Initial configuration
Initial Configuration

head

Input Tape

Input String

Initial state

Costas Busch - RPI


Scanning the input
Scanning the Input

Costas Busch - RPI




Input finished

accept

Costas Busch - RPI


A Rejection Case

Input String

Costas Busch - RPI




Input finished

reject

Costas Busch - RPI


Another Rejection Case

Tape is empty

Input Finished

reject

Costas Busch - RPI


Extended transition function
Extended Transition Function

Describes the resulting state

after scanning string from state

Costas Busch - RPI


Example:

Costas Busch - RPI




Another example
Another Example

Accept

state

Accept

state

Accept

state

Costas Busch - RPI


Empty Tape

Input Finished

accept

Costas Busch - RPI


Another example1
Another Example

trap state

Accept

state

Costas Busch - RPI


Input String

Costas Busch - RPI




Input finished

accept

Costas Busch - RPI


A rejection case

Input String

Costas Busch - RPI




Input finished

reject

Costas Busch - RPI


Language Accepted:

Costas Busch - RPI


Another example2
Another Example

Alphabet:

Language Accepted:

Costas Busch - RPI


More DFA Examples

Empty language

All strings

Costas Busch - RPI


Language of the empty string

Costas Busch - RPI


= { all strings with prefix }

Costas Busch - RPI


={ all binary strings containing substring }

Costas Busch - RPI


={ all binary strings without substring }

Costas Busch - RPI


ad