fall 2006costas busch - rpi1 deterministic finite automaton (dfa) input tape “accept” or...

Download Fall 2006Costas Busch - RPI1 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output

Post on 16-Jan-2016

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

Sift on

Fall 2006Costas Busch - RPI1Deterministic Finite Automaton (DFA) Input TapeAccept orRejectStringFiniteAutomatonOutputFall 2006Costas Busch - RPI2Formal Definition Deterministic Finite Automaton (DFA)

: set of states: input alphabet: transition function: initial state: set of accepting states

Fall 2006Costas Busch - RPI3Language Accepted:

Fall 2006Costas Busch - RPI4Transition Graph initialstate accepting statestatetransition

Fall 2006Costas Busch - RPI5

For every state, there is a transitionfor every symbol in the alphabetFall 2006Costas Busch - RPI6Set of States

ExampleFall 2006Costas Busch - RPI7Input Alphabet

:the input alphabet never contains

ExampleFall 2006Costas Busch - RPI8Initial State

ExampleFall 2006Costas Busch - RPI9Set of Accepting States

ExampleFall 2006Costas Busch - RPI10Transition Function

Describes the result of a transitionfrom state with symbol

Fall 2006Costas Busch - RPI11

Example:Fall 2006Costas Busch - RPI12

Fall 2006Costas Busch - RPI13

Transition Table for statessymbols

Fall 2006Costas Busch - RPI14To accept a string:all the input string is scanned and the last state is acceptingTo reject a string:all the input string is scanned and the last state is non-acceptingFall 2006Costas Busch - RPI15Initial Configuration

Input String

Initial stateInput TapeheadFall 2006Costas Busch - RPI16Scanning the Input

Fall 2006Costas Busch - RPI17

Fall 2006Costas Busch - RPI18

Fall 2006Costas Busch - RPI19

accept

Input finishedFall 2006Costas Busch - RPI20

A Rejection CaseInput StringFall 2006Costas Busch - RPI21

Fall 2006Costas Busch - RPI22

Fall 2006Costas Busch - RPI23

reject

Input finishedFall 2006Costas Busch - RPI24

Another Rejection CaseTape is emptyrejectInput FinishedFall 2006Costas Busch - RPI25Extended Transition Function

Describes the resulting state after scanning string from state

Fall 2006Costas Busch - RPI26

Example:Fall 2006Costas Busch - RPI27

Fall 2006Costas Busch - RPI28

Fall 2006Costas Busch - RPI29Another Example

AcceptstateAcceptstateAcceptstateFall 2006Costas Busch - RPI30

Empty Tape

acceptInput FinishedFall 2006Costas Busch - RPI31Another Example

Accept statetrap stateFall 2006Costas Busch - RPI32

Input StringFall 2006Costas Busch - RPI33

Fall 2006Costas Busch - RPI34

Fall 2006Costas Busch - RPI35

acceptInput finishedFall 2006Costas Busch - RPI36

A rejection caseInput StringFall 2006Costas Busch - RPI37

Fall 2006Costas Busch - RPI38

Fall 2006Costas Busch - RPI39

rejectInput finishedFall 2006Costas Busch - RPI40Language Accepted:

Fall 2006Costas Busch - RPI41Another Example

Alphabet:Language Accepted:

Fall 2006Costas Busch - RPI42More DFA Examples

Empty languageAll stringsFall 2006Costas Busch - RPI43

Language of the empty stringFall 2006Costas Busch - RPI44

= { all strings with prefix }

Fall 2006Costas Busch - RPI45

= { all binary strings containing substring }

Fall 2006Costas Busch - RPI46

= { all binary strings without substring }

Fall 200647

Recommended

View more >