0% found this document useful (0 votes)
16 views20 pages

Lecture 1.2

Uploaded by

kumarashish91100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views20 pages

Lecture 1.2

Uploaded by

kumarashish91100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 20

CSE322

Formal Languages and


Automation Theory

Unit 1 : Mathematical
Preliminaries
Topics to be covered

• Sets
• Functions
• Relations

2
SETS
A set is a collection of elements
A {1, 2, 3}
B {train, bus, bicycle, airplane}

We write
1 A
ship  B
3
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

S = { j : j > 0, and j = 2k for some


k>0 }

S = { j : j is nonnegative and even }


4
A = { 1, 2, 3, 4, 5 } U
6 A
2 3 8
1
7 4 5
9
10

Universal Set: all possible elements

U = { 1 , … , 10 }
5
Set Operations
A = { 1, 2, 3 } B = { 2, 3, 4, 5}
A B
• Union 1
2 4
3 5
A U B = { 1, 2, 3, 4, 5 }
• Intersection
U
2
A B = { 2, 3 } 3

• Difference
A-B={1} 1

B - A = { 4, 5 }
Venn diagrams
6
• 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
7
{ even integers } = { odd
integers }

Integers

1 odd
even 5
2 6
0
4
3 7

8
DeMorgan’s Laws
U
AUB=A B

U
A B=AUB

9
Empty, Null
Set:
={}

SU =S
U
S = = Universal Set

S- =S

-S=

10
Subset

A = { 1, 2, 3} B = { 1, 2, 3, 4, 5 }
A B

U
Proper Subset: A B

U
B
A

11
Disjoint Sets
A = { 1, 2, 3 } B = { 5, 6}

U
A B=

A B

12
Set Cardinality
• For finite sets
A = { 2, 5, 7 }

|A| = 3

(set size)

13
Powersets

A powerset is a set of sets

S = { a, b, c }

Powerset of S = the set of all the subsets of S

={ , {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c

Observation: | 2S | = 2|S| ( 8 = 23 )

14
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|

Generalizes to more than two sets

AXBX…XZ
15
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
16
RELATIONS
R = {(x1, y1), (x2, y2), (x3, y3), …}

xi R y i

e. g. if R = ‘>’: 2 > 1, 3 > 2, 3 > 1

17
Equivalence Relations
• Reflexive: xRx
• Symmetric: xRy yRx
• Transitive: x R y and y R z x
Rz

Example: R = ‘=‘
•x=x
•x=y y=x
• x = y and y = z x=z
18
Equivalence Classes
For equivalence relation R
equivalence class of x = {y : x R y}

Example:
R = { (1, 1), (2, 2), (1, 2), (2, 1),
(3, 3), (4, 4), (3, 4), (4, 3) }

Equivalence class of 1 = {1, 2}


Equivalence class of 3 = {3, 4}
19
End of Topic

Any Query

20

You might also like