3
3
CHAPTER 1
Finite automaton (FA)
1
2
Course Syllabus
Textbook
Course Site
https://hanyzamel.wixsite.com/lec-hti
4
Grading Scheme
5
Classroom Policy
Regular Expression
6 3/12/2025
Regular Expression
Write regular expressions for the following character sets
7 3/12/2025
Regular Expression
Write regular expressions for the following character sets
8 3/12/2025
Finite Automata and Scanners (1)
Finite automaton (FA)
can be used to recognize the tokens specified by a regular expression
A FA consists of
A finite set of states S
A set of input symbols (the input symbol alphabet)
A set of transitions (or moves) from one state to another,
labeled with characters in V
A special start state s0 (only one)
A set of final, or accepting, states F
9 3/12/2025
Finite Automata and Scanners (2)
is a state
is a transition
is a final state
( a b c +) +
a b c
11 3/12/2025
Finite Automata and Scanners (4)
Other Example
(0|1)*0(0|1)(0|1)
0 0,1 0,1
1 2 3 4
0,1 0
5
0,1
(0|1) * 0 (0|1)(0|1)
12 3/12/2025
Finite Automata and Scanners (5)
Other Example
ID = L(L|D)*(_(L|D)+)* Final for two * symbol
L (L|D)* (_(L|D)+)*
L|D
L -
L|D
13 3/12/2025
Transition Table
Draw Finite Automata (FA) transition diagram and transition
table for the following Regular Expressions (RE)
1- aa
14 3/12/2025
Transition Table
Draw Finite Automata (FA) transition diagram and transition
table for the following Regular Expressions (RE)
2- baba
15 3/12/2025
Transition Table
Draw Finite Automata (FA) transition diagram and transition
table for the following Regular Expressions (RE)
3- (a + b)(a + b)* ≡ (a + b)+
16 3/12/2025
Transition Table
Draw Finite Automata (FA) transition diagram and transition
table for the following Regular Expressions (RE)
4- (a + b)*
17 3/12/2025
Transition Table
Draw Finite Automata (FA) transition diagram and transition
table for the following Regular Expressions (RE)
5- (a + b)*a
18 3/12/2025
Transition Table
Draw Finite Automata (FA) transition diagram and transition
table for the following Regular Expressions (RE)
6- {a is even number}
19 3/12/2025
Transition Table
Draw Finite Automata (FA) transition diagram and transition
table for the following Regular Expressions (RE)
7- {a is odd number}
20 3/12/2025