You are on page 1of 4

0.1.

1 Sets
A set is a collection of objects. For example, the collection of four letters a,
b, c and d is a set, which is written as
L = { a, b, c, d }
The objects comprising a set are called its elements or members .
A set having only one element is called a singleton . A set with no
element at all is called the empty set , which is denoted by .
It is essential to have a criterion for determining, for any given thing,
whether it is or is not a member of the given set. This criterion is called the
Membership criterion of the set.
There are two common ways to indicate the members of a set:
(i) List all the elements, e.g, {a, e, i, o, u}.
(ii) Provide some kind of an algorithm or a rule, such as a grammar.
Let us now take a look at the nota tion that is being used to denote sets.
(a) To indicate that x is a member of the set S, we write x ? S.
(b) If every element of set A is also an element of set B, we say that A
is a subset of B, and write A ? B.
(c) If every element of set A is also an element of set B, but B also has
some elements not contained in A, we say that A is a proper
subset of B and write A ? B.
(d) We denote the empty set as { } or .
The set oper a tions are as described below.
(a) Union
The union of two sets is the set that has objects that are elements of at least
one of the two given sets, and possibly both.
Introduction
That is, the union of sets A and B, written A ? B, is a set that contains
everything in A, or in B, or in both.
A B ? = {x x: ? ? A or x B}
Example: A = {1, 3, 9} B = {3, 5}
Therefore, A B ? = {1 3 5 9 , , , }
(b) Inter sec tion
The intersection of sets A and B, written A n B, is a set that contains exactly
those elements that are in both A and B.
A B n = {x x : ? A and x ?B}
Exam ple: Given A = {1, 3, 9}, B = {3, 5}, C = {a, b, c}
A n B = {3}
A n C = { }
(c) Set Dif fer ence
The set difference of set A and set B, written as A B, is the set that contains
everything that is in A but not in B.
A B - = {x x : ? ? A and x B}
Given A B = {1 3 9 3 5 , , }, = { , }
A B - = {1 9, }
(d) Com ple ment
The complement of set A, written as A is the set containing everything that is
not in A.
Prop erties of set oper a tions
Some of the properties of the set operations follow from their definitions. The
following laws hold for the three given sets A, B and C.
Idempotency : A A A
A A A
? =
n =
Commutativity : A B B A
A B B A
? = ?
n = n
Asso cia tiv ity : ( ) ( )
( ) ( )

A B C A B C
A B C A B C
? ? = ? ?
n n = n n
2 Theory of Automata, Formal Languages and Computation
Distributivity : ( ) ( ) ( )
( ) ( ) ( )
A B C A C B C
A B C A C B C
? n = n ? n
n ? = ? n ?
Absorp tion : ( )
( )
A B A A
A B A A
? n =
n ? =
DeMorgan s Laws : A B C A B A C
A B C A B A C
- ? = - n - n = - ? ( ) ( ) ( )
( ) ( ) ( )
Exam ple 0.1.1: Show that A B - ( ) ( ) ( ) ? C = - A B A n -C .
Solu tion
x A B C x A x B C
x A x B x C
x A x B
? - ? ? ? ? ?
? ? ? ?
? ? ?
( )
( )
and
and and
and and and
and
( )
( ) ( )
x A x C
x A B x A C
x A B A C
? ?
? ? - ? ? ? - n There fore A B - ( ) ( ) ( ) ?C ? A B A - n -C (1)
Conversely,
x A B A C x A B x A C
x A x B x A x
? - n - ? ? - ? ? ? ? ?
( ) ( )
( ) (
and
and and and ?
? ? ? ?
? ? ? ?
? ? - ?
C
x A x B x C

x A x B C
x A B C
)
( )
( )
and and
and
Therefore, ( ) ( ) ( ) A B A - n -C ? A B - ?C .
Hence A B - ( ) ( ) ( ) ? C = - A B A n -C .
Exam ple 0.1.2: Given sets A and B are the subsets of a universal set U,
prove that
(a) A B A B - = n '
(b) A B A - = , if and only if A B n =
(c) A B - = , if and only if A B ? .
Solu tion
(a) Let x ? A B - . Then
x A B x A x B
x A x B
x A B
? - ? ? ?
? ? ?
? ? n '
and
and
A B A B - ? n ' (1)
Introduction 3
Conversely, Let x ? A B n '. Then
x A B x A x B
x A x B
x A B
? n ' ? ? ?
? ? ?
? ? and
and (2)
Hence from (1) and (2)
A B A B - = n '
(b) We have A B n = . Then
A A B A B
A A B A B
A A B
= - ? n
? = - ? n =
? = ( ) ( )
.
since
Again we have A B A - = . Then
A A B A B
A B A A A B A
A B
= - ? n
? n = - - =
? n =
( ) ( )
.
Since
(c) We have A B ? . Then
A B A
A B A A B

A B A A A B A
A B
n =
- = - n
? - = - n =
? - =
( )
.
Since
If A B - = , then
A B A A B
A B A
A B A
A B
n = - ? n = -

You might also like