Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Logic Gates and Boolean

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

CHAPTER 3: LOGIC GATES AND BOOLEAN

ALGEBRA
Introduction to Logic Mathematics
Mathematical logic is a subfield of mathematics exploring the applications of formal logic to
mathematics. It bears close connections to meta-mathematics, the foundations of mathematics,
and theoretical computer science.

Set theory
A set can be defined as a collection of things that are brought together because they obey a
certain rule.
These 'things' may be anything you like: numbers, people, shapes, cities, bits of text ..., literally
anything.

The key fact about the 'rule' they all obey is that it must be well-defined. In other words, it
enables us to say for sure whether or not a given 'thing' belongs to the collection. If the 'things'
we're talking about are English words, for example, a well-defined rule might be:

'... has 5 or more letters'


A rule which is not well-defined (and therefore couldn't be used to define a set) might be:
'... is hard to spell'

Requirement of a set
1. A set must be well defined i.e. it must not leave any room for ambiguities e.g sets of all
students- which? Where? When?
A set must be defined in terms of space and time
2. The objective (elements or members) from a given set must be distinct i.e each object
must appear once and only once, Must appear but not more than once

3. The order of the presentation of elements of a given set is immaterial


e.g 1,2,3 = 1,3,2 = 3,2,1

Types of Sets
In set theory, there are different types of sets. All the operations in set theory could be based on
sets. Set should be a group of individual terms in domain. The universal set has each and every
element of domain. We are having different types of sets. We will see about the different types
of sets.

Page 64 of 199
Different Types of Sets
There are different types of sets in set theory. They are listed below:
 Universal Set
 Empty set
 Singleton set
 Finite and Infinite set
 Union of sets
 Intersection of sets
 Difference of sets
 Subset of a set
 Disjoint sets
 Equality of two sets

Universal Set
The set of all the 'things' currently under discussion is called the universal set (or sometimes,
simply the universe). It is denoted by U.
The universal set doesn‘t contain everything in the whole universe. On the contrary, it restricts us
to just those things that are relevant at a particular time. For example, if in a given situation
we‘re talking about numeric values – quantities, sizes, times, weights, or whatever – the
universal set will be a suitable set of numbers (see below). In another context, the universal set
may be {alphabetic characters} or {all living people}, etc.

Singleton Set:
A set which contains only one element is called a singleton set.
For example:
• A = {x : x is neither prime nor composite}
It is a singleton set containing one element, i.e., 1.
• B = {x : x is a whole number, x < 1}
This set contains only one element 0 and is a singleton set.
• Let A = {x : x ∈ N and x² = 4}

Here A is a singleton set because there is only one element 2 whose square is 4.
• Let B = {x : x is a even prime number}
Here B is a singleton set because there is only one prime number which is even, i.e., 2.

Finite Set:
A set which contains a definite number of elements is called a finite set. Empty set is also called
a finite set.
For example:
• The set of all colors in the rainbow.
• N = {x : x ∈ N, x < 7}
• P = {2, 3, 5, 7, 11, 13, 17, ...... 97}

Page 65 of 199
Infinite Set:
The set whose elements cannot be listed, i.e., set containing never-ending elements is called
an infinite set.
For example:
• Set of all points in a plane
• A = {x : x ∈ N, x > 1}
• Set of all prime numbers
• B = {x : x ∈ W, x = 2n}
Note:
All infinite sets cannot be expressed in roster form.
For example:
The set of real numbers since the elements of this set do not follow any particular pattern.

Cardinal Number of a Set:


The number of distinct elements in a given set A is called the cardinal number of A. It is
denoted by n(A).
For example:
• A {x : x ∈ N, x < 5} A = {1, 2, 3, 4}
Therefore, n(A) = 4
• B = set of letters in the word ALGEBRA

B = {A, L, G, E, B, R}
Therefore, n(B) = 6

Equivalent Sets:
Two sets A and B are said to be equivalent if their cardinal number is same, i.e., n(A) = n(B).
The symbol for denoting an equivalent set is ‗↔‘.
For example:
A = {1, 2, 3} Here n(A) = 3 B = {p, q, r} Here n(B) = 3 Therefore, A ↔ B

Equal sets:
Two sets A and B are said to be equal if they contain the same elements. Every element of A
is an element of B and every element of B is an element of A.
For example:
A = {p, q, r, s} B = {p, s, r, q}

Therefore, A = B

The various types of sets and their definitions are explained above with the help of
examples.

Page 66 of 199
Empty Set
In mathematics, empty set is a set theory related topic. A set without any elements is said to be
an empty set. This article helps you understand empty set by giving a clear idea about empty set
with some example problems.

Empty Set Definition


The other name of empty set is null set ϕ. Consider two sets X = {a, b, c, d} and Y = {1, 2, 3,
4, 5, 6}. Consider another set Z which represents the intersection of X and Y. There is no
common element for the set X and Y. So, intersection of X and Y is null.

Z={} The representation of empty set is { }.

Empty Set or Null Set:


 A set which does not contain any element is called an empty set, or the null set or the
void set and it is denoted by ∅ and is read as phi. In roster form, ∅ is denoted by {}. An
empty set is a finite set, since the number of elements in an empty set is finite, i.e., 0.

 For example: (a) The set of whole numbers less than 0.
(b) Clearly there is no whole number less than 0.
Therefore, it is an empty set.
(c) N = {x : x ∈ N, 3 < x < 4}
• Let A = {x : 2 < x < 3, x is a natural number}
Here A is an empty set because there is no natural number between 2 and 3.

• Let B = {x : x is a composite number less than 4}.


Here B is an empty set because there is no composite number less than 4.
Note:
∅ ≠ {0} ∴ has no element.
{0} is a set which has one element 0.
The cardinal number of an empty set, i.e., n(∅) = 0

Cardinality of Empty Set:


Since we know that the cardinal number represents the number of elements that are present in
the set and by the definition of an empty set, we know that there are no element in the empty set.
Hence, the cardinal number or cardinality of an empty is zero.

Page 67 of 199
Properties of Preparation for Empty Set:
1. Empty set is considered as subset of all sets. ϕ⊂X
2. Union of empty set ϕ with a set X is X. A∪ϕ=A
Intersection of an empty set with a set X is an empty set.

Solved Examples
Question 1: A is a set of alphabets and B is a set of numbers. What is the intersection of A and B?

Solution: A ∩ B = { }

Question 2: Write the set A which is a set of goats with 10 legs.


Solution: A = { }
Power Set of the Empty Set
A set is called the power set of any set, if it contains all subsets of that set. We can use the
notation P(S) for representing any power set of the set. Now, from the definition of an empty
set, it is clear that there is no element in it and hence, the power set of an empty set i.e.P(ϕ) is
the set which contain only one empty set, hence P(ϕ) = {ϕ}

Cartesian Product Empty Set


The Cartesian product of any two sets say A and B are denoted by A X B. There are some
conditions for Cartesian product of empty sets as follows:

If we have two sets A and B in such a way that both the sets are empty sets, then A X B = ϕ x ϕ =
ϕ. It is clear that, the cartesian product of two empty sets is again an empty set.

If A is an empty set and B = {1, 2, 3}, then the cartesian product of A and B is as
follows: A X B = {ϕ}. {1, 2, 3} = {ϕ X 1, ϕ X 2, ϕ x 3} = {ϕ, ϕ, ϕ} = {ϕ}

So, we say that if one of the set is an empty set from the given two sets, then again the
Cartesian product of these two sets is an empty set.

Examples of Empty Sets


Given below are some of the examples of empty sets.
Solved Examples
Question 1: Which of the following represents the empty set?

Page 68 of 199
1. A set of cats with 4 legs

2. A set of apples with red color

3. A set of positive numbers in which all are less than 1

4. A set of rectangles with 4 sides

Solution:
Option 1: A set of cats with 4 legs. This set is possible where cats are having 4 legs.
Option 2: A set of apples with red color. This set is possible where apple is in red color.
Option 3: A set of positive numbers in which all are less than 1.
This set is not possible because the positive numbers must be greater than 1. So, this set
is considered as empty set.

Answer: 3
Question 2: A is a set of numbers from 1 to 10 B is a set of negative numbers. What is the
intersection of A and B?

Solution:
Given:
A = set of number from 1 to 10. = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} B = set of negative numbers
= {-1, -2, -3, -4,….} Intersection of A and B = A ∩ B = { }

Answer: The intersection of given sets is an empty set.

Subset
Consider the sets, X = set of all students in your school and Y = set of all students in your class.
It is obvious that set of all students in your class will be in your school. So, every element of Y is
also an element of X. We say that Y is a subset of X. The fact that Y is a subset of X is
expressed in symbol as Y⊂X. The symbol ⊂ stands for "is a subset of" or "is contained in".If Y is
a subset of X, then X is known to be a superset of Y. The subset of a set will have elements
equal to or less than the elements in the given set.

Subset Definition
A set A is said to be a subset of a set B, if every element of A is also an element of B. In other
words, A⊂B if whenever a∈A, then a∈B. It is often convenient to use the symbol ⇒ which
means "implies". Suppose, for two sets A and B, A = {1, 2, 3} and B = {1} then B is the subset
of A.

Subset Symbol:
Using the symbol ⇒, we can write the definition of subset as follows:

Page 69 of 199
A⊂B if a∈A⇒ a∈B

We read it as "A is a subset of B if a is an element of A, which implies that a is also an element


of B". If A is not a subset of B, we write A is not a subset of B. If A = {1, 2, 3, 4, 5, 6} and B =
{4, 5, 6}, then we can draw a Venn diagram for this as follows:

Operation of a Set
Union of Sets
Set is an important part of the mathematics. It is applied in almost many branch of mathematics.
Set is the relation of some givenn data. There are many functions of set like union, intersection.
Here, we will discuss about union of sets.
We denote the union of A and B by A∪B. Thus, AUB=x|x∈Aorx∈Borx∈AandB. We write
AUB=x|x∈Aorx∈B where, it is unnderstood that the word 'or' is used in the inclusive sense. That
is, x∈A or x∈B stands for x∈A or x∈B or x∈AandB.

Union of Two Sets


Let we have two sets A and B, thhen the union of these two sets is the set of all elements of
each sets i.e. the set of those elements which are in either sets.

Page 70 of 199
If A = {1,2,3,4} and B = {3,4,5,66,7} then A∪B = {1, 2, 3, 4, 5, 6, 7}.
With the help of Venn diagram, we can prove it.

Union of Countable Sets


A set of natural numbers which is a subset of a set with the same number of elements is called the countable set. The union of
two countable sets is again a countable set. Let X and Y be two countable sets then X ∪ Y is countable. Clearly, if X ∪ Y is
countable, then X and Y are each countable, as they are subsets of a countable set.

Conversely, let us suppose that we have two countable sets X and Y. And, we can define two
surjection functions f: N → X and g : N → Y. Let Z = X ∪ Y. Then, we can define h : N → Z in
a way that h(2n + 1) = f(n) for n = 0, 1, .... and h(2n) = g(n), n = 1, 2,... Then, h is well defined
function for every value of i ∈ N is either odd or even, so h(i) is defined. Since h is onto
function for any z ∈ Z, then z ∈ X or z ∈ Y. If z ∈ X, then h(2q + 1) = z for some value of q and
if z ∈ Y then h(2p) = z for some value of p. Hence, Z is countable. So, we can say that the union
of two countable sets is again a countable set.

Union of Three Sets


If we have three sets say A, B and C, then the union of these three sets is the set that contains all
the elements or all contains that belongs to either A or B or C or to all three sets.
A = {1, 2, 3, 4}, B = { 2, 3, 5, 6} and C = { 2, 4, 5, 7}. Then, A∪B∪C = { 1, 2, 3, 4, 5, 6, 7}
We can show it in the Venn diagram as follows:

Page 71 of 199
Union of Sets Examples
Given below are some of the examples on union of sets.
Solved Examples
Question 1: Find the union of each of the following two sets:
1. X = {1, 3, 6} Y = {1, 2, 6}

2. X = {a, e, i, o, u} Y = {a, e, c}
3. X = {3 , 4 ,5} B = φ

Solution:
X∪Y = {1, 2, 3, 6}
X∪Y = {a, c, e, i, p, u}
X∪Y = {3, 4, 5}
Question 2:
If X = {1, 2, 5, 6}, Y = {3, 4, 6, 9}, Z = {3, 5, 6, 9} and W = {3, 6, 9, 11}. Find
1. X∪Y
2. X∪Z
3. Y∪Z
4. Y∪W
5. X∪Y∪Z
6. X∪Y∪W
7. Y∪Z∪W

Page 72 of 199
Solution:
1. X∪Y = {1, 2, 3, 4, 5, 6,9}
2. X∪Z = {1, 2, 3, 5, 6, 9}
3. Y∪Z = {3, 4, 5, 6, 9}
4. Y∪W = {3, 4, 5, 6, 9,11}
5. X∪Y∪Z = {1, 2, 3, 4, 5, 6, 9}
6. X∪Y∪W = {1, 2, 3, 4, 5, 6, 9, 11}
7. Y∪Z∪W = {3, 4, 5, 6, 9,11}

Find the Union of the Sets


Here, we will learn how to find the union of the sets with the help of the following examples.

Solved Examples
Question 1:
Two sets are given.
A = {5, 12, 13, 16, 19}
B = {5, 10, 13, 16, 19}
Find A∪B

Solution:
Given sets are:
A = {5, 12, 13, 16, 19}
B = {5, 10, 13, 16, 19}
A∪B = {5, 10, 12, 13, 16, 19}

Here, common elements in A, B are 5,13,16,19


So, it is taken only one times.

Question 2:
Find X∪Y for the following set.
X = {4, 6, 8, 9, 11}
Y = {3, 5, 6, 8, 11}

Page 73 of 199
Solution:
Given sets are
X = {4, 6, 8, 9, 11}
Y = {3, 5, 6, 8, 11}
So, X∪Y = {3, 4, 5, 6, 8, 9, 11}
Here, common element is taken only one time.

Intersection of Sets
Intersection is an operation on sets. It is just opposite to union. It is a very useful and
important concept in set theory. Before we learn about intersection, we need to understand
some basic concept like what is set.
A set is a well-defined collection of data. It's data is known as it's members or elements. We
represent the set by capital letters A, B, C, X, Y, Z, etc. We use the concept of set in daily life.
For example, a team has five members. So, this is a set.

Find the Intersection of the Sets


For finding the intersection of two sets, we usually select those elements which are common in
both the sets. If there are three sets, then we select those elements which are common in all three
sets. Hence, if there are n number of sets, then we select only those elements which are common
in all the n sets. In this way, we find the intersection of sets
Intersecting Set: Two sets A and B are said to be intersecting if A $\cap$ B $\neq$ $\phi$
Disjoint set: Two sets A and B are said to be disjoint if A $\cap$ B = $\phi$

Solved Examples
Question 1:
If A = {1, 3, 4, 6, 9} and B = {2, 4, 6, 8}, find A ∩ B. What do you conclude?

Solution:
We have given that A = {1, 3, 4, 6, 9} and B = {2, 4, 6, 8}
We have to find the intersection of A and B.
So, A ∩ B = {1, 3, 4, 6, 9} ∩ {2,4,6,8}
A ∩ B = {4, 6}

Question 2:
If A = {1, 3, 5, 7, 9} and B = {2,4,6,8}, find A ∩ B. What do you conclude?

Page 74 of 199
Solution:
We have A ∩ B = {1, 3, 5, 7, 9} ∩

{2,4,6,8} = $\phi$

If no data match in both the sets, both the sets are known as disjoint sets. Thus, A and B are
disjoint sets.
Question 3:
If A = {1, 2, 3, 4, 5, 6, 7}, B = {2, 4, 6, 8, 10} and C = {4, 6, 7, 8, 9, 10, 11}, then find A ∩
B and A ∩ B ∩ C.

Solution:
Given sets are
A = {1, 2, 3, 4, 5, 6, 7}
B = {2, 4, 6, 8, 10}
C = {4, 6, 7, 8, 9, 10, 11}
First, we have to find A ∩ B. Then, we have to treat A ∩ B as a single

set. For A ∩ B, we select those elements which are common in sets A and

B. So, A ∩ B = {2, 4, 6}

For (A ∩ B) ∩ C, we select those elements which are common in sets A ∩ B and C.

So, (A ∩ B) ∩ C = {4, 6}

So, A ∩ B ∩ C = {4, 6}

Question 4:
If A = {1,3,5,7,9}, B = {2,4,6,8} and C = {2,3,5,7,11}, find (A ∩ B) and (A ∩ C) What do
you conclude?

Solution:
We have given that
A = {1, 3, 5, 7, 9}
B = {2, 4, 6, 8}
C = {2, 3, 5, 7, 11}

Page 75 of 199
A ∩ B = {1, 3, 5, 7, 9} ∩ {2, 4, 6, 8} = $\phi$

Thus, A and B are disjoint sets


A ∩ C = {1,3,5,7,9} ∩ {2,3,5,7,11} = {3,5,7}

Thus, A and B are disjoint sets while A and C are intersecting sets.
Intersection of Two Sets
The intersection of two sets is the set of all the elements of two sets that are common in both of
them. If we have two sets A and B, then the intersection of them is denoted by A $\cap$ B and it
is read as A intersection B.
Let X = {2, 3, 8, 9} and Y = {5, 12, 9, 16} are two sets.
Now, we are going to understand the concept of Intersection of set. It is represented by the
symbol " $\cap$ ".

If we want to find the intersection of A and B, the common part of the sets A and B is the
intersection of A and B. It is represented as A $\cap$ B. That is, if an element is present in both
A and B, then that will be there in the intersection of A and B. It will be more clear with the
below figure.

Let A and B are two sets. Then, the intersection of A and B can be shown as below.

The intersection of A and B is denoted by A $\cap$ B.


Thus, A $\cap$ B = {x : x $\in$ A and x $\in$ B}.
Clearly, x $\in$ A $\cap$ B i.e., x $\in$ A and x $\in$ B
In the above figure, the shaded area represents A $\cap$ B.

Page 76 of 199
In the same way, if A1, A2, ........., An is a finite family of sets, then their intersection
is represented by A1$\cap$ A2 $\cap$......$\cap$ An.

Intersection of Convex Sets


In a Vector space, a set is called convex set if all the elements of the line joining two points of
that set also lies on that set. In other words, we can say that the set S is convex set if for any
points x, y $\in$ S, there are no points on the straight line joining points x and y are not in the
set S.
The intersection of two convex set is again a convex set. We can prove it with the help of
contradiction method. So, lets suppose that A and B are the two convex sets. And, let we have
two points x and y in such a way that x ∈ A $\cap$ B and y $\in$ A $\cap$ B, then x $\in$ A, x
$\in$ B, y $\in$ A and y $\in$ B and there exists a point z in such a way that z is not in A or B
or both. This is the contradiction of our assumption that A and B are the convex sets. So there is
no such point x, y and z can exists and A $\cap$ B is a convex set.
Intersection of Three Sets
If we have A, B and C, then the intersection of these three sets are the set of all elements A, B
and C that are common in these three sets.

Solved Example
Question:
If we have A = {1, 3, 5, 7, 6, 8}, B = {2, 4, 6, 8, 9} and C = {1, 3, 6, 8 }, then find the A ∩ B ∩ C.

Solution:
Given that A = {1, 3, 5, 7, 6, 8}, B = {2, 4, 6, 8, 9} and C = {1, 3, 6, 8 }.

Then, it is clear that the elements 6 and 8 are common in all the three given sets.
Hence, we get A ∩ B ∩ C = {6, 8}.

Page 77 of 199
Intersection of Open Sets
Every intersection of open sets is again an open set. Let us have two open sets A1 and A2. If
the intersection of both of them is empty and empty set is again an open set. Hence, the
intersection is an open set.
If A1 and A2 are open sets, then there exists some x $\in$ A1 $\cap$ A2. Since the given sets
are open, we have some r1 and r2 in such a way that $B_{r_{1}}(x)\subset A_{1}$ and
$B_{r_{2}}(x)\subset A_{2}$. So, we can choose a number $B_{r}(x)\subset A_{1}\cap
A_{2}$.
So, we can say that if the intersection is not empty, then by the use of definition of intersection
and non emptiness, there exists any x $\in$ Ai for all Ai's, where all Ai's are open sets. Then,
we have $B_{r_{i}}(x)\subset A_{i}$ for some ri > 0.

Complement of a Set
In set theory, complement set is one of the branch. Set of all elements in the universal set that are
not in the initial set are said to be complement set. The complement of a set is represented by the
symbol A‘. The set is a collection of the object. Set is denoted by the symbols {}. In this article,
we see in detail about the complement set.
Complement of a Set Definition
If we have a set A, then the set which is denoted by U - A, where U is the universal set is called
the complement of A. Thus, it is the set of everything that does not belong to A. So, the
complement of a set is the set of those elements which does not belong
c
to the given set but
belongs to the universal set U. Mathematically, we can show it as A = {x \ x ∉ A but x ∈ U}

Since we know that every set is the subset of the universal set U, then the complementary set is
also the subset of U. The total number of elements in the complementary set is equal to the
difference between the number of elements of the set U and the number of elements of the given
c
set (say A). If A is the given set, then the complement of A is denoted as A or A'.

For example, U = { 1, 2, 3, 4, 5, 6, 7, 8, 9} and a set A = { 2,3,4,5,6}. Then, the complement of


c
A is denoted by A or A'.
c
A = {1, 7, 8, 9}. We can show this with the help of Venn diagram

Page 78 of 199
Complement of a Set Example
Given below are some of the examples on complement of a set.

Solved Examples

Question 1: Value of set U = {2, 4, 6, 7, 8, 9, 10} and A = {7, 8, 9, 10} and B = {8, 9, 10}. Find
the complement of A, complement of B, complement of A union B.

Solution:
Step 1: Given
U = {2, 4, 6, 7, 8, 9, 10}
A = {7, 8, 9, 10}
B = {8, 9, 10}

Step 2: The element of set U is {2, 4, 6, 7, 8, 9, 10}. The element that does not belong to A is
{2, 4, 6}. Complement of A is {2, 4, 6}.

Step 3: Complement of B is {2, 4, 6, 7}


Step 4: Complement of AB is {2, 4, 6, 8, 9, 10}.

Page 79 of 199
Question 2: Values of set U = {3, 5, 7, 8, 9, 10, 12} and A = {8, 9, 10, 12}. Find the compliment
of A.

Solution:
Step 1: Given
U = {3, 5, 7, 8, 9, 10, 12}
A = {8, 9, 10, 12}

Step 2: The element of set U is {3, 5, 7, 8, 9, 10, 12}. Elements {3, 5, 7} does not belong to the
set A. So, A‘ = {3, 5, 7}

Step 3: Complement of A is {3, 5, 7}.


Question 3: Values of set U = {1, 4, 6, 7, 8, 10} and A = {6, 7, 8}. Find the complement of A

Solution:
Step 1: Given
U = {1, 4, 6, 7, 8, 10}
A = {6, 7, 8}
Step 2: The element of set U is {1, 4, 6, 7, 8, 10}. Elements {1, 4, 10} does not belong to the
set A. A‘ is {1, 4, 10}.

Step 3: Complement of A is {1, 4, 10}.

Set Difference
Here, we are going to learn about an operation on set called difference of sets. In mathematics, a
set can have a limited number of elements. Set is a collection of data. We can perform many
operations on set. The difference operation is one of them. The subtract(difference) symbol in the
function represents the removal of the values from the second set from the first set. The
operation of subtraction is a removing or taking away objects from group of object.

Difference of Two Sets


Difference of sets is defined as a method of rearranging sets by removing the elements which
belong to another set. Difference of sets is denoted by either by the symbols - or \. P minus Q can
be written either P - Q or P \ Q.

The differences of two sets P and Q, is written as P - Q, It contains elements of P which are
not present in elements of Q. Here, result P - Q is obtained. Take set P as usual and compare

Page 80 of 199
with set Q. Now, remove those element in set P which matches with set Q. If P = {a,b,c,d} and Q
= {d,e}, then P - Q = {a,b,c}.

Definition for difference of sets


The difference between two sets A and B are represented in the order as the set of all those
elements of A which are not in B. It is denoted by A - B.

In symbol, we write it as
A - B = {x: x $\in$ A and x $\notin$ B}
Similarly B - A = {x: x $\in$ B and $\notin$ A}.
By representing it in the Venn diagram,

Symmetric Difference of Sets


If we have two sets A and B, then the symmetric difference of these two sets A and B is the set
of all elements those are either in A or in B not in both sets. So, we can say that the symmetric
difference of two sets is the union without the intersection. We can use the symbol $\triangle$
for this and denoted as follows:

$A \triangle B = \left \{x \setminus x \in A \wedge x \notin B \right \} \vee \left \{ x \notin A
\wedge x\in B \right \}$

Page 81 of 199
The symmetric difference of sets is associative. So, if we have three sets A, B and C, then
$(A \triangle B) \triangle C = A \triangle(B \triangle C)$

The symmetric difference of two sets is commutative i.e. for all sets A and B, we have
$A \triangle B = B \triangle A$

Set Difference Examples


Given below are some of the problems based on difference of sets.

Solved Examples
Question 1: Consider the two sets A = {11,12, 13, 14, 15, 16}, B = {12, 14, 16, 18}. Find the
difference between the two sets?

Solution:
Given A = {11,12, 13, 14, 15, 16}
B = {12, 14, 16, 18}
A - B = {11, 13, 15}
B - A = {18}

The set of all elements are present in A or in B. But, not in both is called the symmetric
difference set.

Question 2: A = {2,3,4,1,8,9} and B = {2,3,4,1,8,,12}. What is A - B and B - A?


Solution:
Given A = {2,3,4,1,8,9}
B = {2,3,4,1,8,12}

Page 82 of 199
Here, all elements of A is available in B except 9.
So, the difference A - B = {9}.
Here, all elements of B are available in A except 12.
So, the difference B - A = {12 }.

Question 3: Consider two sets A = {a, b, f, g, h}, B = {f, g, a, k}. Find A - B and B - A?
Solution:
Given A = {a, b , f , g , h}
B = {f, g, a, k} So, A - B = {b, h} and B - A = {k}
Question 4: Consider given sets P = {19, 38, 57, 76, 95} and Q = {7, 19, 57, 75, 94}. Find P -
Q and Q - P.

Solution:
Given P = {19, 38, 57, 76, 95}
Q = {7, 19, 57, 75, 94} So, P - Q = {38,76,95} and Q - P = {7,75,94}

Venn Diagrams
In mathematics, we can use the graphs and diagrams to solve some problems in geometry as well
as in algebra. To follow this procedure, we can show some relations in set theory with the help
of diagram, which is called as the Venn diagram. It is also known as set diagram. Venn
diagrams are named so in the name of its founder John Venn in around 1880.
In set theory, Venn diagrams are studied. A set is defined as a collection of the same types of
things. Venn diagram is an important and unique way of representing sets and various
operations on them. It is a pictorial representation of sets. It is an easy way to understand about
set theory. Venn diagrams are everywhere in set theory. With the help of Venn diagrams, we are
able to show the operations of union, intersection, difference, complement etc. on the given sets.

In this page, we can discuss about these things with the help of a Venn diagram. In this process,
the sets are represented by circles. Venn diagrams are generally used to represent operations on
two or three sets. In order to learn about set theory in detail, one needs to command on Venn
diagrams. In this article, students will learn about different types of Venn diagrams. So, go
ahead with us and understand about Venn diagrams in detail.

Page 83 of 199
What is a Venn Diagram?
A Venn diagram is a pictorial representation of sets by set of points in the plane. The universal
set U is represented pictorially by interior of a rectangle and the other sets are represented by
closed figures viz circles or ellipses or small rectangles or some curved figures lying within the
rectangle.

Venn diagram is a graphical tool in which we use overlapping circles to visually presentation
among some given sets information. In Venn diagram, we can use two or more than two circles
to show sets.

Make a Venn Diagram


To make a Venn diagram, first we draw a rectangle to show the universal set U and mark U
inside the rectangle. After that, we will make circles for given sets and name them as A, B, C
etc. Then, according to the given relation of the sets, we can make a diagram for these sets in the
rectangle to show the relationship of the sets. Sometimes, we have some elements for the
individual sets, then fill all the elements in their respective sets and as per the given relation of
the sets.

For example, if A and B are any two arbitrary sets, elements such that, some elements are in A
but not in B, some are in B but not in A, some are in both A and B, and some are in neither A
nor B, we represent A and B in the pictorial form as in shown in the Venn diagram.

A is a subset of B and is represented as shown in the Venn diagram.

Page 84 of 199
Disjoint Sets
A and B are disjoint sets as shown in the Venn diagram.

Triple Venn Diagram


For the triple Venn diagram, we need three sets as A, B and C. In the triple Venn diagram, we
have to show some relationship between these three sets.

For example, let A = {a, b, c, d, e}, B = {a, b, f, g, h} and C = {a, c, e, f, g, j, k}. Here, we can
find A ∩ B, B ∩ C, A ∩ C and A ∩ B ∩ C with the help of triple Venn diagram.

Given A = {a, b, c, d, e}, B = {a, b, f, g, h} and C = {a, c, f, g, j, k}. Now, A ∩ B = {b}, B ∩ C


= {f, g}, A ∩ C = {c} and A ∩ B ∩ C = {a}

Page 85 of 199
4 Circle Venn Diagram
Some times, we have four sets in a given problem and we want to show their relationship with
the help of Venn diagram. For this, we can draw four circles in a rectangle box, each circle
represents a unique set. Then, according to sets relation fill all the elements at their place.

Venn Diagram With Lines


In mathematics, sometimes we use the lines in the Venn diagram to show the union, intersection,
difference etc. for the given sets. If we have sets A and B, then with the line Venn diagram we
can show as:

Page 86 of 199
Picture of a Venn Diagram
If we have two sets A and B, then A ∪ B i.e. A union B:

A ∩ B i.e. A intersection B:

Page 87 of 199
A and B are disjoint sets:

A subset B:

Venn Diagram Union


If we have two sets A and B, then A ∪ B is the set of all elements that are in set A and in the set B. If
any element common in these two set, then we will take that one only one time. So, we can say that the
union of the set A and B is everything which are either in set A or in the set B.

Let A = {1,2,3,4,5} and B = {2,6,7,8} then A ∪ B = {1,2,3,4,5,6,7,8}. To show this union, we


can use the Venn diagram also as

Venn diagram Word Problems


Given below are some of the word problems on Venn diagram.

Solved Example
Question: There are 40 players participated in tournament match. In that, 20 players play in
volley ball match and 20 players play in football match and 5 players play in both volley ball and

Page 88 of 199
football match. Solve this problem by using Venn diagram. How many of the players are either
in match and how many are in neither match?

Solution:
There are two categories, one is volleyball and other one is football.
Step 1:
Draw Venn diagram depending up on the classification given in the problem.

Step 2:
Note that 5 players play both volleyball and football match

Step 3:
Here, we accounted for 5 of the 20 players in volleyball match, leaving 15 players taking
volleyball match but not football match. So, I will put "15" in the "volleyball only" part of the
"volley ball" circle.

Page 89 of 199
Step 4:
Here, we accounted for 5 of the 20 players in football match, leaving 15 players taking
football match but not volleyball match. So, I will put "15" in the "football only" part of the
"football" circle.

Step 5:
The total of 5 + 15 + 15 = 35 players are in either volley ball match or football match (or
both). The total numbers of players are 40 and participating players are 35 only.

40 - 35 = 5 players

Page 90 of 199
Boolean Algebra
In 1850, George Boole, an English mathematician developed rules and theorems that became
Boolean algebra.

Boole’s work was an outcrop of work in physiology called LOGIC.

Logic can be used to break down complex problems to simple and understandable problems.

The binary nature of logic problems was studied by Cloude Shannon of MTI in 1938. Shannon
applied Boolean algebra to relay logic switching circuits as means of realizing electric circuits.

Electric circuits used for digital computers are designed to generate only two voltage levels

Eg – high level (≈ 5V ) and low level (≈ 0V)

The binary number system requires two symbols hence its logical to identify a binary symbol
with each voltage level. If we interpolate the high level as a binary 1and low level as a binary 0,
then we are using a positive logic system.

Terminologies in Boolean Algebra


logic function and logic gates
Logic circuit - A computer switching/electronic circuit that consists of a number of logic gates
and performs logical operations on data
A logic gate is an idealized or physical device implementing a Boolean function; that is, it
performs a logical operation on one or more binary inputs, and produces a single binary output.
A logic gate is a small transistor circuit, basically a type of amplifier, which is implemented in
different forms within an integrated circuit. Each type of gate has one or more (most often two)
inputs and one output.

Boolean operation is any logical operation in which each of the operands and the result take
one of two values, as “true” and “false” or “circuit on” and “circuit off.”

A Boolean Function is a description of operation (logic operation) on algebraic expression called


Boolean expression which consists of binary variables, the constants 0 and 1, carried out in
digital/electronic circuits and the logic outputting there off. The logic operation is well expressed in
truth tables.

Truth tables
A truth table is a breakdown of a logic function by listing all possible values the function can
attain. Such a table typically contains several rows and columns, with the top row representing
the logical variables and combinations, in increasing complexity leading up to the final function.

Page 91 of 199
Logic Functions gates and circuitry
From Boolean algebra, we get three basic logic factions that form the basis of all digital
computer functions. These basic functions are: AND, OR and NOT

These functions can be expressed mathematically using Boolean algebra as given.

NOTE – The input and output variables are usually represented by letters as ABC or XYZ

- The logic state of this variables is represented by binary numbers 0 and 1

AND function
The AND function can be thought of as a series circuit containing two or more switches

A B

Circuit diagram

The logic indicator L will be ON only when logic switches A and B are both crossed. Switches A
and B have two possible logic states, open and crossed. This can be represented in binary form
as 0 – open and 1 – crossed.

Logic indicator L also have two possible states 0 and 1

Truth table
A B L(x.y)
0 0 0
0 1 0
1 0 0
1 1 1

The truth table is used to illustrate all the possible combinations of input and output conditions
that can exist in a logic circuit. The Boolean expression used to represent an AND function is as
follows

A.B=L

Page 92 of 199
And is symbolized as

A
L
B

OR function
The function can be thought of as a parallel circuit containing two or more logic switches

L
B

Circuit Diagram

Here, the logic indicator L will be ON whenever logic switch A and B are crossed. The truth
table, Expression and Symbol of OR function is as follows

Truth table
A B L(x+y) A
0 0 0 A+B=L L
0 1 1 B
1 0 1
Symbol diagram
1 1 1

NOT function
It can be thought of as an inverter or negative circuit.

Page 93 of 199
L
A

Circuit diagram

The logic indicator L will be ON whenever logic switch A is open.

The truth table, Expression and Symbol of NOT function is as follows

Truth table
A L(x)‘
0 1 A =A’ A A’
1 0

Symbol diagram

NAND
If an AND gate is followed by an NOT gate then the combination is called an NAND gate and has
following truth table and Boolean expression.

Truth table
A B L (x.y)‘ A
(A.B)’=L
0 0 1 L
0 1 0 B
1 0 0
1 1 0 B Symbol diagram

NOR
If an OR gate is followed by an NOT gate then the combination is called an NOR gate and has
following truth table and Boolean expression.

Page 94 of 199
Truth table
A B L (x+y)‘
0 0 1 A
(A+B)’=L L
0 1 1
1 0 1 B
1 1 0
B Symbol diagram

B
XOR
This output strictly on condition that input is either high but not 2 highs

Truth table
A B L (x±y) A
0 0 0 A + B =L L
0 1 1 B
1 0 1
1 1 0 B Symbol diagram

B
XNOR
This output strictly on condition that input is either high but not 2 highs

Truth table
A B L (x±y)‘ A
A B=L L
0
0
0
1
1
0
* B
1 0 0 B
1 1 1

. B

Theorems of Boolean Algebra


Boolean algebra deals with algebraic .expressions between Boolean variables. Boolean algebra
is a mathematical style dealing in logic. A fundamental rule relating to Boolean variables is
called Boolean theorems.

Boolean theorems

1. Cumulative laws
i. A+B=B+A ii. AB=BA

2. Associative laws
i. (A+B)+C=A(B+C)=A+B+C ii. A(BC)=A(BC)=ABC

Page 95 of 199
3. Distributive laws
i. A(B+C)=AB+AC ii. A+BC=(A+B)(A+C)

- This state that an expression can be expanded by multiplying term by term just like
ordinary algebra. It indicates thus we can factor an expression

i.e – AB’C+A’B’C’=B’(AC+A’C’) – Common factor is B’

- Simplifying by distributive law

Y=AB’C+AB’D’=AB’(D+D’)=AB’ – since D+D’=1+0=1 by distributive law

4. Identity law
i. A+A=A ii. AA=A

5. Negative law
i. A’=A’ ii. A’’=A

6. Redundancy laws
i. A+AB=A(1+B)=A(1)=1 N/b 1+n=1 where n=any num/char
ii. A(A+B)=AA+AB=A+AB=A
iii. 0+A=A
iv. 0A=0
v. 1+A=1
vi. 1A=A
vii. A’+A=1
viii. A’A=0
ix. A+AB’=A+B
x. A(A’+B)=AB
EXAMPLE

Z=(A’+B)(A+B)=AA’+A’B+AB+BB=0+A’B+AB+B=B(A’+A+1)=B(1+1)=B

Proves

i. AC+ABC=AC
Let y=AC+ABC

=AC(1+B)=AC since 1+n=1

ii. (A+B)(A+C)=A+BC
Let y= (A+B)(A+C)

=A(A+C)+B(A+C)=AA+AC+AB+CB=A+AC+AB+CB

Page 96 of 199
= A(1+B)+AC+BC=A+AC+BC=A(1+C)+CB=A+BC

iii. A+A’B=A+B
Let y= A+A’B

= A.1+A’B=A(1+B)+A’B=A.1+AB+A’B=A+AB+A’B

= A+B(A+A’)=A+B

iv. (A+B)(A+B’)(A’+C)=AC
Let y=(A+B)(A+B’)(A’+C)

= (AA+AB’+BA+BB’)A’+C=(A+AB+AB’)(A’+C)

= *A(1+B)+AB’+(A’+C)

= (A+AB’)(A’+C)=A(1+B’)(A’+C)=A.1(A’+C)=A(A’+C)=AA’+AC=AC

v. Simplify the expression and show minimum gate implementation


y=ABC’D’+A’BC’D’+BC’D

Since A+A’=1 and A.1=A

=BC’D’ (A+A’) +BC’D=BC’D’.1+BC’D

= BC’D’+BC’D=BC’ (D+D’) =BC’.1=BC’

B
Y
C

7. Dedmorgans theorems
The theorems are useful in simplifying expressions in which a product or sum of
variables is complimented or inverted.

The two theorems are

a) (A+B)’=A’B’
When the OR sum of two variables (A+B) is complimented, this is same as if the 2
variable’s compliments were ANDed.

i.e. – compliment of an OR sum is AND product of the compliment.

b) (AB)’=A’+B’

Page 97 of 199
Compliment of an AND product is equal to OR sum of its compliment

Karnaugh maps (K-maps)


K-maps/ vetch diagram is a method to simplify Boolean expressions. The maps reduce the need
for extensive calculations by taking advantage of human pattern-recognition capability.

In K—map, the Boolean variables are transferred (generally from a truth table) and ordered
according to the principles of gray code in which only one variable changes in between squares.

Once the table is generated and the output possibilities transcribed, the data is arranged into
the largest possible groups containing 2n cells (n=0, 1, 2, 3...) and the minterms generated
through the axiom laws of Boolean algebra

Note
A minterm is a product (AND) of all variables in the function, in directs or complemented form.
A minterm has the property that it is equal to 1 on exactly one row of the truth table.

A maxterm is a sum (OR) of all the variables in the function, in direct or complemented form. A
maxterm has the property that it is equal to 0 on exactly one row of the truth table.

Don't care conditions are represented by X in the K-Map table. A don't-care term for a function is an
input-sequence (a series of bits) for which the function output does not matter (0,1).

AB 00 01 11 10
(A’B’) (A’B) (AB) (AB’)
CD

00 M0 M4 M12 M8
(C’D’)

01 M1 M5 M13 M9
(C’D)

11 M3 M7 M15 M11
(CD)

10 M2 M6 M14 M10
(CD’)

Procedure
K-map method may theoretically be applied to simplify any Boolean expression through works
well with <=6 variable.

Page 98 of 199

You might also like