Finite Automata 1 Finite Automaton Input String Output

  • Slides: 56
Download presentation
Finite Automata 1

Finite Automata 1

Finite Automaton Input String Output Finite Automaton “Accept” or “Reject” 2

Finite Automaton Input String Output Finite Automaton “Accept” or “Reject” 2

Transition Graph initial state transition accepting state 3

Transition Graph initial state transition accepting state 3

Initial Configuration Input String 4

Initial Configuration Input String 4

Reading the Input 5

Reading the Input 5

6

6

7

7

8

8

Input finished accept 9

Input finished accept 9

Rejection 10

Rejection 10

11

11

12

12

13

13

Input finished reject 14

Input finished reject 14

Another Rejection 15

Another Rejection 15

reject 16

reject 16

Another Example 17

Another Example 17

18

18

19

19

20

20

Input finished accept 21

Input finished accept 21

Rejection Example 22

Rejection Example 22

23

23

24

24

25

25

Input finished reject 26

Input finished reject 26

Languages Accepted by FAs FA Definition: The language contains all input strings accepted by

Languages Accepted by FAs FA Definition: The language contains all input strings accepted by = { strings that bring to an accepting state} 27

Example accept 28

Example accept 28

Example accept 29

Example accept 29

Example accept trap state 30

Example accept trap state 30

Formal Definition Finite Automaton (FA) : set of states : input alphabet : transition

Formal Definition Finite Automaton (FA) : set of states : input alphabet : transition function : initial state : set of accepting states 31

Input Alphabet 32

Input Alphabet 32

Set of States 33

Set of States 33

Initial State 34

Initial State 34

Set of Accepting States 35

Set of Accepting States 35

Transition Function 36

Transition Function 36

37

37

38

38

39

39

Transition Function 40

Transition Function 40

Extended Transition Function 41

Extended Transition Function 41

42

42

43

43

44

44

Observation: if there is a walk from with label then to 45

Observation: if there is a walk from with label then to 45

Example: There is a walk from with label to 46

Example: There is a walk from with label to 46

Recursive Definition 47

Recursive Definition 47

48

48

Language Accepted by FAs For a FA Language accepted by : 49

Language Accepted by FAs For a FA Language accepted by : 49

Observation Language rejected by : 50

Observation Language rejected by : 50

Example = { all strings with prefix } accept 51

Example = { all strings with prefix } accept 51

Example = { all strings without substring } 52

Example = { all strings without substring } 52

Example 53

Example 53

Regular Languages Definition: A language is regular if there is FA such that Observation:

Regular Languages Definition: A language is regular if there is FA such that Observation: All languages accepted by FAs form the family of regular languages 54

Examples of regular languages: { all strings with prefix } { all strings without

Examples of regular languages: { all strings with prefix } { all strings without substring } There exist automata that accept these Languages (see previous slides). 55

There exist languages which are not Regular: Example: There is no FA that accepts

There exist languages which are not Regular: Example: There is no FA that accepts such a language (we will prove this later in the class) 56