Set Operations Topic Including Union , Intersection, Disjoint etc De Morgans Prove

Preview:

Citation preview

1

TheStuffPoint.ComTheStuffPoint.Com

Set Operations

Union Intersection

Disjoint sets

V.Imp De Morgan Laws

BY Abu Bakar SoomroBY Abu Bakar Soomro

2

Set Operations

A B A B A B

r ocA A

3

Set operations: Union

A

B

A B

U

4

Set operations: Union • Formal definition for the union of two sets:

• Further examples

{ }A B x x A x B

{ }or A B x x A x B

3 5 7 3 5 7{2, , , ,11,13} {1, , , ,9} {1,2, , , ,9,113 5 7 ,13}

{2, 3,5,7,11,13} {2,3,5,7,11,13}

5

Set operations: Union

• Properties of the union operation Identity law Domination law Idempotent law Commutative law Associative law

A A

Empty set Universal setU

A U U A A A A B B A

( ) ( )A B C A B C

6

Set operations: Intersection

A

BA B

U

7

Set operations: Intersection

• Formal definition for the intersection of two sets:

• Further examples

{ }A B x x A x B

{2, , , ,11,13} {1, , , ,9}3 5 7 3 5 7 7{ }3,5,

{2, 3,5,7,11,13}

{ }andA B x x A x B

8

Set operations: Intersection 4

• Properties of the intersection operation Identity law Domination law Idempotent law Commutative law Associative

law

A U A A A A A A B B A

( ) ( )A B C A B C

9

Disjoint sets

A B

U

10

Disjoint sets

• Formal definition for disjoint sets: two sets are disjoint if their intersection is the empty set.

• i.e. • Further examples

{1, 2, 3} and {3, 4, 5} are not disjoint {1, 2} and are disjoint

• Their intersection is the empty set and are disjoint!

• Their intersection is the empty set

A B

11

A

BA BA B

U

Set operations: Difference

12

• Formal definition for the difference of two sets:

• Further examples

Set operations: Difference

{ }A B x x A x B

{ , , , , , } {1,3 5 7 3 5 7, , ,9}2 11 13 2 11 3{ , , }1

{ }andA B x x A x B

cA B A B

cA A A U A

13

• Formal definition for the symmetric difference of two sets:

Further examples

Set operations: Symmetric Difference

{ }A B x x A B x A B ( ) ( )A B A B A B

( ) ( )A B A B B A

{2, , , ,11,13} { , , , , } {2,13 5 7 3 5 1,13,7 9}1 9 1,

14

A

BA B

U

B A

15

Complement sets

A

B

cB U

cA U A

16

Complement sets

• Formal definition for the complement of a set cA A U A

1,2,3, ... 0{ },1U

, 3,2 }7{ 5,A,4, ,6,8 }0{2 5 ,1B

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

1,4,6,8,9 1{ }, 0cA

17

{ ,7}3A B

4,6,8{ , 0}1B A

1,2,3, ... 0{ },1U

, 3,2 }7{ 5,A

,4, ,6,8 }0{2 5 ,1B

2 5,3,4, ,6,7,8 1{ }, 0A B

{ 5, }2A B

Exp.:

18

De Morgan Laws• For anywe have

( ) ,c c cA B A B

,A B U

( )c c cA B A B

Q:

19

1,2,3, ... 0{ },1U , 3,2 }7{ 5,A,4, ,6,8 }0{2 5 ,1B

2 5,3,4, ,6,7,8 1{ }, 0A B

{ 5, }2A B

1,4,6,8,9,10{ }cA U A

1,3,7,9{ }cB U B

Verify De Morgan’s Laws

20

( ) ,9( ) 1{ }c U A BA B

1,3,4,6,7,8,9,1{( ( ) 0})cA U A BB

1,3,4,6,7,8,9,10{ }c cA B

{1 },9c cA B ( )c c cA B A B

( )c c cA B A B

Order of

21

A B

22

A B A B A B

Exp.: , 3,2 }7{ 5,A,4, ,6,8 }0{2 5 ,1B

2 5,3,4, ,6,7,8 1{ }, 0A B

UB

A B

A BA

25

37

46810

8 4 6 2

Q:Each student in a class of 45 students can speak either Urdu or English. If 25 of the students can speak Urdu and 15 can speak both, find, analytically, the number of those who can speak (i) English, (ii) English only, (iii) Urdu only?

23

24

U E15

25

25

U E

15 2025

10

U E

U E- E U-

26

U E

3515 20

2510

U E

U E- E U-

27

( ) 25, ( ) 15, ( ) 45.n U n U E n U E

( ) ( ) ( ) ( )n U E n U n E n U E -

( ) ( ) ( ) ( ) 45 25 15 35n E n U E n U n U E - -

( ) ( ) 35 15 20,n E n U E -

( ) ( ) 20 15 5.n U n U E -