Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages
Fall 2006Costas Busch - RPI2 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output
Fall 2006Costas Busch - RPI3 Transition Graph initial state accepting state transition
Fall 2006Costas Busch - RPI4 For every state, there is a transition for every symbol in the alphabet Alphabet
Fall 2006Costas Busch - RPI5 Initial Configuration Input String Initial state Input Tape head
Fall 2006Costas Busch - RPI6 Scanning the Input
Fall 2006Costas Busch - RPI7
Fall 2006Costas Busch - RPI8
Fall 2006Costas Busch - RPI9 accept Input finished
Fall 2006Costas Busch - RPI10 A Rejection Case Input String
Fall 2006Costas Busch - RPI11
Fall 2006Costas Busch - RPI12
Fall 2006Costas Busch - RPI13 reject Input finished
Fall 2006Costas Busch - RPI14 Another Rejection Case Tape is empty reject Input Finished
Fall 2006Costas Busch - RPI15 Language Accepted:
Fall 2006Costas Busch - RPI16 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
Fall 2006Costas Busch - RPI17 Another Example Accept state Accept state Accept state
Fall 2006Costas Busch - RPI18 Empty Tape accept Input Finished
Fall 2006Costas Busch - RPI19 Another Example Accept state trap state
Fall 2006Costas Busch - RPI20 Input String
Fall 2006Costas Busch - RPI21
Fall 2006Costas Busch - RPI22
Fall 2006Costas Busch - RPI23 accept Input finished
Fall 2006Costas Busch - RPI24 A rejection case Input String
Fall 2006Costas Busch - RPI25
Fall 2006Costas Busch - RPI26
Fall 2006Costas Busch - RPI27 reject Input finished
Fall 2006Costas Busch - RPI28 Language Accepted:
Fall 2006Costas Busch - RPI29 Another Example Alphabet: Language Accepted:
Fall 2006Costas Busch - RPI30 Formal Definition Deterministic Finite Automaton (DFA) : set of states : input alphabet : transition function : initial state : set of accepting states
Fall 2006Costas Busch - RPI31 Set of States Example
Fall 2006Costas Busch - RPI32 Input Alphabet :the input alphabet never contains Example
Fall 2006Costas Busch - RPI33 Initial State Example
Fall 2006Costas Busch - RPI34 Set of Accepting States Example
Fall 2006Costas Busch - RPI35 Transition Function Describes the result of a transition from state with symbol
Fall 2006Costas Busch - RPI36 Example:
Fall 2006Costas Busch - RPI37
Fall 2006Costas Busch - RPI38
Fall 2006Costas Busch - RPI39 Transition Table for states symbols
Fall 2006Costas Busch - RPI40 Extended Transition Function Describes the resulting state after scanning string from state
Fall 2006Costas Busch - RPI41 Example:
Fall 2006Costas Busch - RPI42
Fall 2006Costas Busch - RPI43
Fall 2006Costas Busch - RPI44 Special case: for any state
Fall 2006Costas Busch - RPI45 states may be repeated In general: implies that there is a walk of transitions
Fall 2006Costas Busch - RPI46 Language Accepted by DFA it is denoted as and contains all the strings accepted by Language of DFA : We say that a language is accepted (or recognized) by DFA if
Fall 2006Costas Busch - RPI47 For a DFA Language accepted by :
Fall 2006Costas Busch - RPI48 Language rejected by :
Fall 2006Costas Busch - RPI49 More DFA Examples Empty languageAll strings
Fall 2006Costas Busch - RPI50 Language of the empty string
Fall 2006Costas Busch - RPI51 = { all strings with prefix } accept
Fall 2006Costas Busch - RPI52 = { all binary strings containing substring }
Fall 2006Costas Busch - RPI53 = { all binary strings without substring }
Fall 2006Costas Busch - RPI54
Fall 2006Costas Busch - RPI55 Regular Languages Definition: A language is regular if there is a DFA that accepts it ( ) The languages accepted by all DFAs form the family of regular languages
Fall 2006Costas Busch - RPI56 { all strings in {a,b}* with prefix } { all binary strings without substring } Example regular languages: There exist automata that accept these languages (see previous slides).
Fall 2006Costas Busch - RPI57 There exist languages which are not Regular: There is no DFA that accepts these languages (we will prove this in a later class)