Presentation is loading. Please wait.

Presentation is loading. Please wait.

Finite Automata Section 1.1 CSC 4170 Theory of Computation.

Similar presentations


Presentation on theme: "Finite Automata Section 1.1 CSC 4170 Theory of Computation."— Presentation transcript:

1

2 Finite Automata Section 1.1 CSC 4170 Theory of Computation

3 How a finite automaton works 1.1.a q2q2 q0q0 q1q1 0 0 0 1 11 0 1 1 0 0

4 The language of a machine 1.1.b q2q2 q0q0 q1q1 0 0 0 1 11 L(M), “the language of M”, or “the language recognized by M” --- the set all strings that the machine M accepts What is the language recognized by our automaton A? L(A) =

5 Formal definition of a finite automaton 1.1.c A finite automaton is a 5-tuple (Q, , , s, F), where: Q is a finite set called the states,  is a finite set called the alphabet,  is a function of the type Q   Q called the transition function, s is an element of Q called the start state, F is a subset of Q called the set of accept states.

6 Our automaton formalized 1.1.d q2q2 q0q0 q1q1 0 0 0 1 11 Q:::s:F:Q:::s:F: A = (Q, , , s, F)

7 Formal definition of accepting 1.1.e M = (Q, , , s, F) M accepts the string u 1 u 2 … u n iff there is a sequence r 1, r 2, …, r n, r n+1 of states such that: r 1 =s r i+1 =  (r i,u i ), for each i with 1  i  n r n+1  F q2q2 q0q0 q1q1 0 0 1 11 0 1 1 0 0 u 1 u 2 … u n r 1, r 2, …, r n, r n+1 0

8 Designing finite automata 1.1.f Task: Design an automaton that accepts a bit string iff it contains an even number of “1”s.

9 Designing finite automata 1.1.g Task: Design an automaton that accepts a bit string iff the number of “1”s that it contains is divisible by 3.

10 Designing finite automata 1.1.h Task: Let L2={w | w is a string of 0s whose length is divisible by 2} and L3={w | w is a string of 0s whose length is divisible by 3} Design an automaton that recognizes L2  L3

11 Designing finite automata 1.1.i Task: Let L2={w | w is a string of 0s whose length is divisible by 2} and L3={w | w is a string of 0s whose length is divisible by 3} Design an automaton that recognizes L2  L3

12 Designing finite automata 1.1.j Task: Design an automaton that recognizes the language X={w | w is a string of 0s whose length is divisible neither by 2 nor by 3} Definition: Let L be a language over an alphabet . The complement of L is the language {w | w is a string over  such that w  L}. X is the complement of what language?


Download ppt "Finite Automata Section 1.1 CSC 4170 Theory of Computation."

Similar presentations


Ads by Google