Professional Documents
Culture Documents
Automata Theory
Lecture # 1
Introduction
Administrative Stuff
• Instructor:Syed Burhan ud Din Tahir
burhantahir@cuilahore.edu.pk
Room # C-12
CPU memory
11
temporary memory
input memory
CPU
output memory
Program memory
12
3
Example: f ( x) x
temporary memory
input memory
CPU
output memory
Program memory
compute xx
2
compute x x
13
3
f ( x) x
temporary memory
input memory
x2
CPU
output memory
Program memory
compute xx
2
compute x x
14
3
temporary memory f ( x) x
z 2*2 4
f ( x) z * 2 8
input memory
x2
CPU
output memory
Program memory
compute xx
2
compute x x
15
3
temporary memory f ( x) x
z 2*2 4
f ( x) z * 2 8
input memory
x2
CPU
f ( x) 8
Program memory output memory
compute xx
2
compute x x
16
Automaton
temporary memory
Automaton
input memory
CPU
output memory
Program memory
17
Different Kinds of Automata
Automata are distinguished by the temporary memory
18
Finite Automaton
temporary memory
input memory
Finite
Automaton
output memory
input memory
Pushdown
Automaton
output memory
input memory
Turing
Machine
output memory
• Sets
• Functions
• Relations
• Graphs
• Proof Techniques
23
SETS
A set is a unordered collection of elements
A {1, 2, 3}
B {train, bus, bicycle, airplane}
We write
1 A
ship B
24
Set Representations
C = { a, b, c, d, e, f, g, h, i, j, k }
C = { a, b, …, k } finite set
S = { 2, 4, 6, … } infinite set
25
A = { 1, 2, 3, 4, 5 }
U
6 A
2 3 8
1
7 4 5
9
10
U = { 1 , … , 10 }
26
Set Operations
A = { 1, 2, 3 } B = { 2, 3, 4, 5}
A B
• Union
2 4
1
A U B = { 1, 2, 3, 4, 5 } 3 5
• Intersection
U 2
A B = { 2, 3 } 3
• Difference
1
A-B={1}
B - A = { 4, 5 } Venn diagrams 5
27
• Complement
Universal set = {1, …, 7}
A = { 1, 2, 3 } A = { 4, 5, 6, 7}
4
A
A 3 6
1
2
5 7
A=A
28
{ even integers } = { odd integers }
Integers
1 odd
even
6 5
2
0
4
3 7
29
DeMorgan’s Laws
AUB=A B
U
A B=AUB
U
30
Empty, Null Set:
={}
SU =S
U
S = = Universal Set
S- =S
-S=
31
Subset
A = { 1, 2, 3} B = { 1, 2, 3, 4, 5 }
A B
U
Proper Subset: A B
U
B
A
32
Disjoint Sets
A = { 1, 2, 3 } B = { 5, 6}
A B=
U
A B
33
Set Cardinality
• For finite sets
A = { 2, 5, 7 }
|A| = 3
(set size)
34
Powersets
A powerset is a set of sets
S = { a, b, c }
2S = { , {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c} }
Observation: | 2S | = 2|S| ( 8 = 23 )
35
Cartesian Product
A = { 2, 4 } B = { 2, 3, 5 }
A X B = { (2, 2), (2, 3), (2, 5), ( 4, 2), (4, 3), (4, 5) }
|A X B| = |A| |B|
AXBX…XZ
36
FUNCTIONS
domain range
4 A B
f(1) = a a
1
2 b
3 c
5
f : A -> B
If A = domain
then f is a total function
otherwise f is a partial function
37
RELATIONS
Let A & B be sets. A binary relation “R” from A to B
R = {(x1, y1), (x2, y2), (x3, y3), …}
Where xi A and yi B
R⊆AxB
xi R yi to denote (a, b) R
40
Walk
e
b
a d
41
Path
e
b
a d
base e
b
3
a 1 d
2
c
43
Euler Tour
8 base
7 e
b 1
4 6
a 5 2 d
3
c
44
Hamiltonian Cycle
5 base
e
b 1
4
a 2 d
3
c
45
Trees
root
parent
leaf
child
46
root
Level 0
Level 1
leaf Height 3
Level 2
Level 3
47
Binary Trees
48