Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.

Similar presentations


Presentation on theme: "Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages."— Presentation transcript:

1 Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages

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

3 Fall 2006Costas Busch - RPI3 Transition Graph initial state accepting state transition

4 Fall 2006Costas Busch - RPI4 For every state, there is a transition for every symbol in the alphabet Alphabet

5 Fall 2006Costas Busch - RPI5 Initial Configuration Input String Initial state Input Tape head

6 Fall 2006Costas Busch - RPI6 Scanning the Input

7 Fall 2006Costas Busch - RPI7

8 Fall 2006Costas Busch - RPI8

9 Fall 2006Costas Busch - RPI9 accept Input finished

10 Fall 2006Costas Busch - RPI10 A Rejection Case Input String

11 Fall 2006Costas Busch - RPI11

12 Fall 2006Costas Busch - RPI12

13 Fall 2006Costas Busch - RPI13 reject Input finished

14 Fall 2006Costas Busch - RPI14 Another Rejection Case Tape is empty reject Input Finished

15 Fall 2006Costas Busch - RPI15 Language Accepted:

16 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

17 Fall 2006Costas Busch - RPI17 Another Example Accept state Accept state Accept state

18 Fall 2006Costas Busch - RPI18 Empty Tape accept Input Finished

19 Fall 2006Costas Busch - RPI19 Another Example Accept state trap state

20 Fall 2006Costas Busch - RPI20 Input String

21 Fall 2006Costas Busch - RPI21

22 Fall 2006Costas Busch - RPI22

23 Fall 2006Costas Busch - RPI23 accept Input finished

24 Fall 2006Costas Busch - RPI24 A rejection case Input String

25 Fall 2006Costas Busch - RPI25

26 Fall 2006Costas Busch - RPI26

27 Fall 2006Costas Busch - RPI27 reject Input finished

28 Fall 2006Costas Busch - RPI28 Language Accepted:

29 Fall 2006Costas Busch - RPI29 Another Example Alphabet: Language Accepted:

30 Fall 2006Costas Busch - RPI30 Formal Definition Deterministic Finite Automaton (DFA) : set of states : input alphabet : transition function : initial state : set of accepting states

31 Fall 2006Costas Busch - RPI31 Set of States Example

32 Fall 2006Costas Busch - RPI32 Input Alphabet :the input alphabet never contains Example

33 Fall 2006Costas Busch - RPI33 Initial State Example

34 Fall 2006Costas Busch - RPI34 Set of Accepting States Example

35 Fall 2006Costas Busch - RPI35 Transition Function Describes the result of a transition from state with symbol

36 Fall 2006Costas Busch - RPI36 Example:

37 Fall 2006Costas Busch - RPI37

38 Fall 2006Costas Busch - RPI38

39 Fall 2006Costas Busch - RPI39 Transition Table for states symbols

40 Fall 2006Costas Busch - RPI40 Extended Transition Function Describes the resulting state after scanning string from state

41 Fall 2006Costas Busch - RPI41 Example:

42 Fall 2006Costas Busch - RPI42

43 Fall 2006Costas Busch - RPI43

44 Fall 2006Costas Busch - RPI44 Special case: for any state

45 Fall 2006Costas Busch - RPI45 states may be repeated In general: implies that there is a walk of transitions

46 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

47 Fall 2006Costas Busch - RPI47 For a DFA Language accepted by :

48 Fall 2006Costas Busch - RPI48 Language rejected by :

49 Fall 2006Costas Busch - RPI49 More DFA Examples Empty languageAll strings

50 Fall 2006Costas Busch - RPI50 Language of the empty string

51 Fall 2006Costas Busch - RPI51 = { all strings with prefix } accept

52 Fall 2006Costas Busch - RPI52 = { all binary strings containing substring }

53 Fall 2006Costas Busch - RPI53 = { all binary strings without substring }

54 Fall 2006Costas Busch - RPI54

55 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

56 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).

57 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)


Download ppt "Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages."

Similar presentations


Ads by Google