Download presentation
Presentation is loading. Please wait.
Published byНикита Шольцев Modified over 5 years ago
1
CSC 4170 Theory of Computation Finite Automata Section 1.1
2
How a finite automaton works
1 q0 q2 1 1 q1
3
The language of a machine
1.1.b 1 q0 q2 1 1 q1 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) =
4
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.
5
Our automaton formalized
1 q0 q2 Q: : : s: F: 1 1 q1 A = (Q, , , s, F)
6
Formal definition of accepting
M = (Q, , , s, F) 1 q0 q2 1 1 q1 M accepts the string u1 u2 … un iff there is a sequence r1, r2, …, rn, rn+1 of states such that: r1=s ri+1 = (ri,ui), for each i with 1 i n rn+1 F u u2 … un r1, r2, …, rn, rn+1
7
Designing finite automata
Task: Design an automaton that accepts a bit string iff it contains an even number of “1”s.
8
Designing finite automata
Task: Design an automaton that accepts a bit string iff the number of “1”s that it contains is divisible by 3.
9
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 L2L3
10
Designing finite automata
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 L2L3
11
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 wL}. X is the complement of what language?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.