0% found this document useful (0 votes)
166 views

Discrete Structures

This document defines key concepts in predicate and propositional logic, including: - Predicates are expressions with variables that can be assigned values or quantified. Quantifiers like universal and existential are used to quantify variables. - Well-formed formulas and connectives are defined for propositional logic. Truth tables demonstrate logical equivalences, tautologies, contradictions, and contingencies. - Implication, inverse, converse, and contrapositive are defined for conditional statements in propositional logic.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views

Discrete Structures

This document defines key concepts in predicate and propositional logic, including: - Predicates are expressions with variables that can be assigned values or quantified. Quantifiers like universal and existential are used to quantify variables. - Well-formed formulas and connectives are defined for propositional logic. Truth tables demonstrate logical equivalences, tautologies, contradictions, and contingencies. - Implication, inverse, converse, and contrapositive are defined for conditional statements in propositional logic.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 60

Predicate Logic – Definition

A predicate is an expression of one or more variables defined on some specific


domain. A predicate with variables can be made a proposition by either assigning a
value to the variable or by quantifying the variable.
The following are some examples of predicates −

 Let E(x, y) denote "x = y"


 Let X(a, b, c) denote "a + b + c = 0"
 Let M(x, y) denote "x is married to y"

Well Formed Formula


Well Formed Formula (wff) is a predicate holding any of the following −
 All propositional constants and propositional variables are wffs

 If x is a variable and Y is a wff, ∀xY∀xY and ∃xY∃xY are also wff


 Truth value and false values are wffs
 Each atomic formula is a wff
 All connectives connecting wffs are wffs

Quantifiers
The variable of predicates is quantified by quantifiers. There are two types of
quantifier in predicate logic − Universal Quantifier and Existential Quantifier.

Universal Quantifier

Universal quantifier states that the statements within its scope are true for every
value of the specific variable. It is denoted by the symbol ∀∀.
∀xP(x)∀xP(x) is read as for every value of x, P(x) is true.
Example − "Man is mortal" can be transformed into the propositional
form ∀xP(x)∀xP(x) where P(x) is the predicate which denotes x is mortal and the
universe of discourse is all men.

Existential Quantifier

Existential quantifier states that the statements within its scope are true for some
values of the specific variable. It is denoted by the symbol ∃∃.
∃xP(x)∃xP(x) is read as for some values of x, P(x) is true.
Example − "Some people are dishonest" can be transformed into the propositional
form ∃xP(x)∃xP(x) where P(x) is the predicate which denotes x is dishonest and the
universe of discourse is some people.

Nested Quantifiers
If we use a quantifier that appears within the scope of another quantifier, it is called
nested quantifier.
Example
 ∀ a∃bP(x,y)∀ a∃bP(x,y) where P(a,b)P(a,b) denotes a+b=0a+b=0
 ∀ a∀b∀cP(a,b,c)∀ a∀b∀cP(a,b,c) where P(a,b)P(a,b) denotes a+
(b+c)=(a+b)+ca+(b+c)=(a+b)+c
Note − ∀a∃bP(x,y)≠∃a∀bP(x,y)

Prepositional Logic – Definition


A proposition is a collection of declarative statements that has either a truth value
"true” or a truth value "false". A propositional consists of propositional variables and
connectives. We denote the propositional variables by capital letters (A, B, etc). The
connectives connect the propositional variables.
Some examples of Propositions are given below −

 "Man is Mortal", it returns truth value “TRUE”


 "12 + 9 = 3 – 2", it returns truth value “FALSE”
The following is not a Proposition −
 "A is less than 2". It is because unless we give a specific value of A, we cannot say
whether the statement is true or false.

Connectives
In propositional logic generally we use five connectives which are −
 OR (∨∨)
 AND (∧∧)
 Negation/ NOT (¬¬)
 Implication / if-then (→→)
 If and only if (⇔⇔).
OR (∨∨) − The OR operation of two propositions A and B (written as A∨BA∨B) is
true if at least any of the propositional variable A or B is true.
The truth table is as follows −

A B A∨B

True True True

True False True

False True True


False False False

AND (∧∧) − The AND operation of two propositions A and B (written as A∧BA∧B) is
true if both the propositional variable A and B is true.
The truth table is as follows −

A B A∧B

True True True

True False False

False True False

False False False

Negation (¬¬) − The negation of a proposition A (written as ¬A¬A) is false when A


is true and is true when A is false.
The truth table is as follows −

A ¬A

True False

False True

Implication / if-then (→→) − An implication A→BA→B is the proposition “if A, then


B”. It is false if A is true and B is false. The rest cases are true.
The truth table is as follows −

A B A→B

True True True

True False False

False True True

False False True

If and only if (⇔⇔) − A⇔BA⇔B is bi-conditional logical connective which is true


when p and q are same, i.e. both are false or both are true.
The truth table is as follows −

A B A⇔B

True True True

True False False

False True False


False False True

Tautologies
A Tautology is a formula which is always true for every value of its propositional
variables.
Example − Prove [(A→B)∧A]→B[(A→B)∧A]→B is a tautology
The truth table is as follows −

A B A→B (A → B) ∧ A [( A → B ) ∧ A] → B

True True True True True

True False False False True

False True True False True

False False True False True

As we can see every value of [(A→B)∧A]→B[(A→B)∧A]→B is "True", it is a


tautology.

Contradictions
A Contradiction is a formula which is always false for every value of its propositional
variables.
Example − Prove (A∨B)∧[(¬A)∧(¬B)](A∨B)∧[(¬A)∧(¬B)] is a contradiction
The truth table is as follows −

A B A∨B ¬A ¬B (¬ A) ∧ ( ¬ B) (A ∨ B) ∧ [( ¬ A) ∧ (¬ B)]

True True True False False False False

True False True False True False False

False True True True False False False

False False False True True True False


As we can see every value of (A∨B)∧[(¬A)∧(¬B)](A∨B)∧[(¬A)∧(¬B)] is “False”, it
is a contradiction.

Contingency
A Contingency is a formula which has both some true and some false values for
every value of its propositional variables.
Example − Prove (A∨B)∧(¬A)(A∨B)∧(¬A) a contingency
The truth table is as follows −

A B A∨B ¬A (A ∨ B) ∧ (¬ A)

True True True False False

True False True False False

False True True True True

False False False True False

As we can see every value of (A∨B)∧(¬A)(A∨B)∧(¬A) has both “True” and “False”,


it is a contingency.

Propositional Equivalences
Two statements X and Y are logically equivalent if any of the following two
conditions hold −
 The truth tables of each statement have the same truth values.

 The bi-conditional statement X⇔YX⇔Y is a tautology.


Example − Prove ¬(A∨B)and[(¬A)∧(¬B)]¬(A∨B)and[(¬A)∧(¬B)] are equivalent

Testing by 1st method (Matching truth table)

A B A∨B ¬ (A ∨ B) ¬A ¬B [(¬ A) ∧ (¬ B)]

True True True False False False False


True False True False False True False

False True True False True False False

False False False True True True True

Here, we can see the truth values


of ¬(A∨B)and[(¬A)∧(¬B)]¬(A∨B)and[(¬A)∧(¬B)] are same, hence the statements
are equivalent.

Testing by 2nd method (Bi-conditionality)

A B ¬ (A ∨ B ) [(¬ A) ∧ (¬ B)] [¬ (A ∨ B)] ⇔ [(¬ A ) ∧ (¬ B)]

True True False False True

True False False False True

False True False False True

False False True True True

As [¬(A∨B)]⇔[(¬A)∧(¬B)][¬(A∨B)]⇔[(¬A)∧(¬B)] is a tautology, the statements


are equivalent.

Inverse, Converse, and Contra-positive


Implication / if-then (→)(→) is also called a conditional statement. It has two parts −

 Hypothesis, p
 Conclusion, q
As mentioned earlier, it is denoted as p→qp→q.
Example of Conditional Statement − “If you do your homework, you will not be
punished.” Here, "you do your homework" is the hypothesis, p, and "you will not be
punished" is the conclusion, q.
Inverse − An inverse of the conditional statement is the negation of both the
hypothesis and the conclusion. If the statement is “If p, then q”, the inverse will be “If
not p, then not q”. Thus the inverse of p→qp→q is ¬p→¬q¬p→¬q.
Example − The inverse of “If you do your homework, you will not be punished” is “If
you do not do your homework, you will be punished.”
Converse − The converse of the conditional statement is computed by
interchanging the hypothesis and the conclusion. If the statement is “If p, then q”,
the converse will be “If q, then p”. The converse of p→qp→q is q→pq→p.
Example − The converse of "If you do your homework, you will not be punished" is
"If you will not be punished, you do your homework”.
Contra-positive − The contra-positive of the conditional is computed by
interchanging the hypothesis and the conclusion of the inverse statement. If the
statement is “If p, then q”, the contra-positive will be “If not q, then not p”. The
contra-positive of p→qp→q is ¬q→¬p¬q→¬p.
Example − The Contra-positive of " If you do your homework, you will not be
punished” is "If you are punished, you did not do your homework”.

Duality Principle
Duality principle states that for any true statement, the dual statement obtained by
interchanging unions into intersections (and vice versa) and interchanging Universal
set into Null set (and vice versa) is also true. If dual of any statement is the
statement itself, it is said self-dual statement.
Example − The dual of (A∩B)∪C(A∩B)∪C is (A∪B)∩C(A∪B)∩C

Normal Forms
We can convert any proposition in two normal forms −

 Conjunctive normal form


 Disjunctive normal form

Conjunctive Normal Form

A compound statement is in conjunctive normal form if it is obtained by operating


AND among variables (negation of variables included) connected with ORs. In
terms of set operations, it is a compound statement obtained by Intersection among
variables connected with Unions.
Examples
 (A∨B)∧(A∨C)∧(B∨C∨D)(A∨B)∧(A∨C)∧(B∨C∨D)
 (P∪Q)∩(Q∪R)(P∪Q)∩(Q∪R)

Disjunctive Normal Form

A compound statement is in disjunctive normal form if it is obtained by operating OR


among variables (negation of variables included) connected with ANDs. In terms of
set operations, it is a compound statement obtained by Union among variables
connected with Intersections.
Examples
 (A∧B)∨(A∧C)∨(B∧C∧D)(A∧B)∨(A∧C)∨(B∧C∧D)
 (P∩Q)∪(Q∩R)

What are Rules of Inference for?


Mathematical logic is often used for logical proofs. Proofs are valid arguments that
determine the truth values of mathematical statements.
An argument is a sequence of statements. The last statement is the conclusion and
all its preceding statements are called premises (or hypothesis). The symbol “ ∴∴”,
(read therefore) is placed before the conclusion. A valid argument is one where the
conclusion follows from the truth values of the premises.
Rules of Inference provide the templates or guidelines for constructing valid
arguments from the statements that we already have.

Table of Rules of Inference


Rule of Inference Name Rule of Inference Name

P∴P∨QP∴P∨Q P∨Q¬P∴QP∨Q¬P∴Q Disjuncti


ve
Addition
Syllogis
m

PQ∴P∧QPQ∴P∧Q P→QQ→R∴P→RP→QQ→R∴P→R Hypothe


Conjuncti tical
on Syllogis
m

P∧Q∴PP∧Q∴P (P→Q)∧(R→S)P∨R∴Q∨S(P→Q)∧(R→S)P∨R∴ Constru


Simplific
Q∨S ctive
ation
Dilemma

P→QP∴QP→QP∴ (P→Q)∧(R→S)¬Q∨¬S∴¬P∨¬R(P→Q)∧(R→ Destructi


Modus
Q S)¬Q∨¬S∴¬P∨¬R ve
Ponens
Dilemma

P→Q¬Q∴¬PP→Q Modus
¬Q∴¬P Tollens
Addition
If P is a premise, we can use Addition rule to derive P∨QP∨Q.
P∴P∨QP∴P∨Q

Example

Let P be the proposition, “He studies very hard” is true


Therefore − "Either he studies very hard Or he is a very bad student." Here Q is the
proposition “he is a very bad student”.

Conjunction
If P and Q are two premises, we can use Conjunction rule to derive P∧QP∧Q.
PQ∴P∧QPQ∴P∧Q

Example

Let P − “He studies very hard”


Let Q − “He is the best boy in the class”
Therefore − "He studies very hard and he is the best boy in the class"

Simplification
If P∧QP∧Q is a premise, we can use Simplification rule to derive P.
P∧Q∴PP∧Q∴P

Example

"He studies very hard and he is the best boy in the class", P∧QP∧Q
Therefore − "He studies very hard"

Modus Ponens
If P and P→QP→Q are two premises, we can use Modus Ponens to derive Q.
P→QP∴QP→QP∴Q

Example

"If you have a password, then you can log on to facebook", P→QP→Q


"You have a password", P
Therefore − "You can log on to facebook"
Modus Tollens
If P→QP→Q and ¬Q¬Q are two premises, we can use Modus Tollens to
derive ¬P¬P.
P→Q¬Q∴¬PP→Q¬Q∴¬P

Example

"If you have a password, then you can log on to facebook", P→QP→Q


"You cannot log on to facebook", ¬Q¬Q
Therefore − "You do not have a password "

Disjunctive Syllogism
If ¬P¬P and P∨QP∨Q are two premises, we can use Disjunctive Syllogism to derive
Q.
¬PP∨Q∴Q¬PP∨Q∴Q

Example

"The ice cream is not vanilla flavored", ¬P¬P


"The ice cream is either vanilla flavored or chocolate flavored", P∨QP∨Q
Therefore − "The ice cream is chocolate flavored”

Hypothetical Syllogism
If P→QP→Q and Q→RQ→R are two premises, we can use Hypothetical Syllogism
to derive P→RP→R
P→QQ→R∴P→RP→QQ→R∴P→R

Example

"If it rains, I shall not go to school”, P→QP→Q


"If I don't go to school, I won't need to do homework", Q→RQ→R
Therefore − "If it rains, I won't need to do homework"

Constructive Dilemma
If (P→Q)∧(R→S)(P→Q)∧(R→S) and P∨RP∨R are two premises, we can use
constructive dilemma to derive Q∨SQ∨S.
(P→Q)∧(R→S)P∨R∴Q∨S(P→Q)∧(R→S)P∨R∴Q∨S
Example

“If it rains, I will take a leave”, (P→Q)(P→Q)


“If it is hot outside, I will go for a shower”, (R→S)(R→S)
“Either it will rain or it is hot outside”, P∨RP∨R
Therefore − "I will take a leave or I will go for a shower"

Destructive Dilemma
If (P→Q)∧(R→S)(P→Q)∧(R→S) and ¬Q∨¬S¬Q∨¬S are two premises, we can use
destructive dilemma to derive ¬P∨¬R¬P∨¬R.
(P→Q)∧(R→S)¬Q∨¬S∴¬P∨¬R(P→Q)∧(R→S)¬Q∨¬S∴¬P∨¬R

Example

“If it rains, I will take a leave”, (P→Q)(P→Q)


“If it is hot outside, I will go for a shower”, (R→S)(R→S)
“Either I will not take a leave or I will not go for a shower”, ¬Q∨¬S¬Q∨¬S
Therefore − "Either it does not rain or it is not hot outside"
German mathematician G. Cantor introduced the concept of sets. He had defined a
set as a collection of definite and distinguishable objects selected by the means of
certain rules or description.
Set theory forms the basis of several other fields of study like counting theory,
relations, graph theory and finite state machines. In this chapter, we will cover the
different aspects of Set Theory.

Set - Definition
A set is an unordered collection of different elements. A set can be written explicitly
by listing its elements using set bracket. If the order of the elements is changed or
any element of a set is repeated, it does not make any changes in the set.

Some Example of Sets

 A set of all positive integers


 A set of all the planets in the solar system
 A set of all the states in India
 A set of all the lowercase letters of the alphabet

Representation of a Set
Sets can be represented in two ways −

 Roster or Tabular Form


 Set Builder Notation

Roster or Tabular Form

The set is represented by listing all the elements comprising it. The elements are
enclosed within braces and separated by commas.
Example 1 − Set of vowels in English alphabet, A={a,e,i,o,u}A={a,e,i,o,u}
Example 2 − Set of odd numbers less than 10, B={1,3,5,7,9}B={1,3,5,7,9}

Set Builder Notation

The set is defined by specifying a property that elements of the set have in
common. The set is described as A={x:p(x)}A={x:p(x)}
Example 1 − The set {a,e,i,o,u}{a,e,i,o,u} is written as −
A={x:x is a vowel in English alphabet}A={x:x is a vowel in English alphabet}
Example 2 − The set {1,3,5,7,9}{1,3,5,7,9} is written as −
B={x:1≤x<10 and (x%2)≠0}B={x:1≤x<10 and (x%2)≠0}
If an element x is a member of any set S, it is denoted by x∈Sx∈S and if an element
y is not a member of set S, it is denoted by y∉Sy∉S.
Example − If S={1,1.2,1.7,2},1∈SS={1,1.2,1.7,2},1∈S but 1.5∉S1.5∉S

Some Important Sets

N − the set of all natural numbers = {1,2,3,4,.....}{1,2,3,4,.....}


Z − the set of all integers = {.....,−3,−2,−1,0,1,2,3,.....}{.....,−3,−2,−1,0,1,2,3,.....}
Z  − the set of all positive integers
+

Q − the set of all rational numbers


R − the set of all real numbers
W − the set of all whole numbers

Cardinality of a Set
Cardinality of a set S, denoted by |S||S|, is the number of elements of the set. The
number is also referred as the cardinal number. If a set has an infinite number of
elements, its cardinality is ∞∞.
Example − |{1,4,3,5}|=4,|{1,2,3,4,5,…}|=∞|{1,4,3,5}|=4,|{1,2,3,4,5,…}|=∞
If there are two sets X and Y,
 |X|=|Y||X|=|Y| denotes two sets X and Y having same cardinality. It occurs when the
number of elements in X is exactly equal to the number of elements in Y. In this case,
there exists a bijective function ‘f’ from X to Y.
 |X|≤|Y||X|≤|Y| denotes that set X’s cardinality is less than or equal to set Y’s
cardinality. It occurs when number of elements in X is less than or equal to that of Y.
Here, there exists an injective function ‘f’ from X to Y.
 |X|<|Y||X|<|Y| denotes that set X’s cardinality is less than set Y’s cardinality. It occurs
when number of elements in X is less than that of Y. Here, the function ‘f’ from X to Y is
injective function but not bijective.
 If |X|≤|Y|If |X|≤|Y| and |X|≥|Y||X|≥|Y| then |X|=|Y||X|=|Y|. The sets X and Y are
commonly referred as equivalent sets.

Types of Sets
Sets can be classified into many types. Some of which are finite, infinite, subset,
universal, proper, singleton set, etc.

Finite Set

A set which contains a definite number of elements is called a finite set.


Example − S={x|x∈NS={x|x∈N and 70>x>50}70>x>50}

Infinite Set

A set which contains infinite number of elements is called an infinite set.


Example − S={x|x∈NS={x|x∈N and x>10}x>10}

Subset

A set X is a subset of set Y (Written as X⊆YX⊆Y) if every element of X is an


element of set Y.
Example 1 − Let, X={1,2,3,4,5,6}X={1,2,3,4,5,6} and Y={1,2}Y={1,2}. Here
set Y is a subset of set X as all the elements of set Y is in set X. Hence, we can
write Y⊆XY⊆X.
Example 2 − Let, X={1,2,3}X={1,2,3} and Y={1,2,3}Y={1,2,3}. Here set Y is
a subset (Not a proper subset) of set X as all the elements of set Y is in set X.
Hence, we can write Y⊆XY⊆X.

Proper Subset

The term “proper subset” can be defined as “subset of but not equal to”. A Set X is a
proper subset of set Y (Written as X⊂YX⊂Y) if every element of X is an element of
set Y and |X|<|Y||X|<|Y|.
Example − Let, X={1,2,3,4,5,6}X={1,2,3,4,5,6} and Y={1,2}Y={1,2}. Here
set Y⊂XY⊂X since all elements in YY are contained in XX too and XX has at
least one element is more than set YY.

Universal Set

It is a collection of all elements in a particular context or application. All the sets in


that context or application are essentially subsets of this universal set. Universal
sets are represented as UU.
Example − We may define UU as the set of all animals on earth. In this case,
set of all mammals is a subset of UU, set of all fishes is a subset of UU, set of
all insects is a subset of UU, and so on.

Empty Set or Null Set

An empty set contains no elements. It is denoted by ∅∅. As the number of elements


in an empty set is finite, empty set is a finite set. The cardinality of empty set or null
set is zero.
Example − S={x|x∈NS={x|x∈N and 7<x<8}=∅7<x<8}=∅

Singleton Set or Unit Set

Singleton set or unit set contains only one element. A singleton set is denoted
by {s}{s}.
Example − S={x|x∈N, 7<x<9}S={x|x∈N, 7<x<9} = {8}{8}

Equal Set

If two sets contain the same elements they are said to be equal.
Example − If A={1,2,6}A={1,2,6} and B={6,1,2}B={6,1,2}, they are equal as
every element of set A is an element of set B and every element of set B is an
element of set A.

Equivalent Set

If the cardinalities of two sets are same, they are called equivalent sets.
Example − If A={1,2,6}A={1,2,6} and B={16,17,22}B={16,17,22}, they are
equivalent as cardinality of A is equal to the cardinality of B. i.e. |A|=|B|=3|A|=|
B|=3

Overlapping Set

Two sets that have at least one common element are called overlapping sets.
In case of overlapping sets −
 n(A∪B)=n(A)+n(B)−n(A∩B)n(A∪B)=n(A)+n(B)−n(A∩B)
 n(A∪B)=n(A−B)+n(B−A)+n(A∩B)n(A∪B)=n(A−B)+n(B−A)+n(A∩B)
 n(A)=n(A−B)+n(A∩B)n(A)=n(A−B)+n(A∩B)
 n(B)=n(B−A)+n(A∩B)n(B)=n(B−A)+n(A∩B)
Example − Let, A={1,2,6}A={1,2,6} and B={6,12,42}B={6,12,42}. There is a
common element ‘6’, hence these sets are overlapping sets.

Disjoint Set
Two sets A and B are called disjoint sets if they do not have even one element in
common. Therefore, disjoint sets have the following properties −
 n(A∩B)=∅n(A∩B)=∅
 n(A∪B)=n(A)+n(B)n(A∪B)=n(A)+n(B)
Example − Let, A={1,2,6}A={1,2,6} and B={7,9,14}B={7,9,14}, there is not a
single common element, hence these sets are overlapping sets.

Venn Diagrams
Venn diagram, invented in 1880 by John Venn, is a schematic diagram that shows
all possible logical relations between different mathematical sets.
Examples

Set Operations
Set Operations include Set Union, Set Intersection, Set Difference, Complement of
Set, and Cartesian Product.

Set Union

The union of sets A and B (denoted by A∪BA∪B) is the set of elements which are
in A, in B, or in both A and B. Hence, A∪B={x|x∈A OR x∈B}A∪B={x|
x∈A OR x∈B}.
Example − If A={10,11,12,13}A={10,11,12,13} and B = {13,14,15}{13,14,15},
then A∪B={10,11,12,13,14,15}A∪B={10,11,12,13,14,15}. (The common element
occurs only once)

Set Intersection
The intersection of sets A and B (denoted by A∩BA∩B) is the set of elements which
are in both A and B. Hence, A∩B={x|x∈A AND x∈B}A∩B={x|x∈A AND x∈B}.
Example − If A={11,12,13}A={11,12,13} and B={13,14,15}B={13,14,15},
then A∩B={13}A∩B={13}.

Set Difference/ Relative Complement

The set difference of sets A and B (denoted by A–BA–B) is the set of elements
which are only in A but not in B. Hence, A−B={x|x∈A AND x∉B}A−B={x|
x∈A AND x∉B}.
Example − If A={10,11,12,13}A={10,11,12,13} and B={13,14,15}B={13,14,15},
then (A−B)={10,11,12}(A−B)={10,11,12} and (B−A)={14,15}(B−A)={14,15}.
Here, we can see (A−B)≠(B−A)(A−B)≠(B−A)

Complement of a Set

The complement of a set A (denoted by A′A′) is the set of elements which are not in
set A. Hence, A′={x|x∉A}A′={x|x∉A}.
More specifically, A′=(U−A)A′=(U−A) where UU is a universal set which contains
all objects.
Example − If A={x|x belongstosetofoddintegers}A={x|
x belongstosetofoddintegers} then A′={y|y doesnotbelongtosetofoddintegers}A′={y|
y doesnotbelongtosetofoddintegers}
Cartesian Product / Cross Product

The Cartesian product of n number of sets A1,A2,…AnA1,A2,…An denoted


as A1×A2⋯×AnA1×A2⋯×An can be defined as all possible ordered pairs (x1,x2,…
xn)(x1,x2,…xn) where x1∈A1,x2∈A2,…xn∈Anx1∈A1,x2∈A2,…xn∈An
Example − If we take two sets A={a,b}A={a,b} and B={1,2}B={1,2},
The Cartesian product of A and B is written as − A×B={(a,1),(a,2),(b,1),
(b,2)}A×B={(a,1),(a,2),(b,1),(b,2)}
The Cartesian product of B and A is written as − B×A={(1,a),(1,b),(2,a),
(2,b)}B×A={(1,a),(1,b),(2,a),(2,b)}

Power Set
Power set of a set S is the set of all subsets of S including the empty set. The
cardinality of a power set of a set S of cardinality n is 2n2n. Power set is denoted
as P(S)P(S).
Example −
For a set S={a,b,c,d}S={a,b,c,d} let us calculate the subsets −
 Subsets with 0 elements − {∅}{∅} (the empty set)
 Subsets with 1 element − {a},{b},{c},{d}{a},{b},{c},{d}
 Subsets with 2 elements − {a,b},{a,c},{a,d},{b,c},{b,d},{c,d}{a,b},{a,c},{a,d},
{b,c},{b,d},{c,d}
 Subsets with 3 elements − {a,b,c},{a,b,d},{a,c,d},{b,c,d}{a,b,c},{a,b,d},{a,c,d},
{b,c,d}
 Subsets with 4 elements − {a,b,c,d}{a,b,c,d}
Hence, P(S)=P(S)=
{{∅},{a},{b},{c},{d},{a,b},{a,c},{a,d},{b,c},{b,d},{c,d},{a,b,c},{a,b,d},
{a,c,d},{b,c,d},{a,b,c,d}}{{∅},{a},{b},{c},{d},{a,b},{a,c},{a,d},{b,c},{b,d},{c,d},{a,b,c},
{a,b,d},{a,c,d},{b,c,d},{a,b,c,d}}
|P(S)|=24=16|P(S)|=24=16
Note − The power set of an empty set is also an empty set.
|P({∅})|=20=1|P({∅})|=20=1

Partitioning of a Set
Partition of a set, say S, is a collection of n disjoint subsets, say P1,P2,…PnP1,P2,…
Pn that satisfies the following three conditions −
 PiPi does not contain the empty set.
[Pi≠{∅} for all 0<i≤n][Pi≠{∅} for all 0<i≤n]
 The union of the subsets must equal the entire original set.

[P1∪P2∪⋯∪Pn=S][P1∪P2∪⋯∪Pn=S]
 The intersection of any two distinct sets is empty.

[Pa∩Pb={∅}, for a≠b where n≥a,b≥0][Pa∩Pb={∅}, for a≠b where n≥a,b≥0]
Example
Let S={a,b,c,d,e,f,g,h}S={a,b,c,d,e,f,g,h}
One probable partitioning is {a},{b,c,d},{e,f,g,h}{a},{b,c,d},{e,f,g,h}
Another probable partitioning is {a,b},{c,d},{e,f,g,h}{a,b},{c,d},{e,f,g,h}

Bell Numbers

Bell numbers give the count of the number of ways to partition a set. They are
denoted by BnBn where n is the cardinality of the set.
Example −
Let S={1,2,3}S={1,2,3}, n=|S|=3n=|S|=3
The alternate partitions are −
1. ∅,{1,2,3}∅,{1,2,3}
2. {1},{2,3}{1},{2,3}
3. {1,2},{3}{1,2},{3}
4. {1,3},{2}{1,3},{2}
5. {1},{2},{3}{1},{2},{3}
Hence B3=5B3=5

Relations may exist between objects of the same set or between objects of two or
more sets.

Definition and Properties


A binary relation R from set x to y (written as xRyxRy or R(x,y)R(x,y)) is a subset of
the Cartesian product x×yx×y. If the ordered pair of G is reversed, the relation also
changes.
Generally an n-ary relation R between sets A1,…, and AnA1,…, and An is a subset
of the n-ary product A1×⋯×AnA1×⋯×An. The minimum cardinality of a relation R is
Zero and maximum is n2n2 in this case.
A binary relation R on a single set A is a subset of A×AA×A.
For two distinct sets, A and B, having cardinalities m and n respectively, the
maximum cardinality of a relation R from A to B is mn.

Domain and Range


If there are two sets A and B, and relation R have order pair (x, y), then −
 The domain of R, Dom(R), is the set {x|(x,y)∈RforsomeyinB}{x|
(x,y)∈RforsomeyinB}
 The range of R, Ran(R), is the set {y|(x,y)∈RforsomexinA}{y|
(x,y)∈RforsomexinA}

Examples

Let, A={1,2,9}A={1,2,9} and B={1,3,7}B={1,3,7}
 Case 1 − If relation R is 'equal to' then R={(1,1),(3,3)}R={(1,1),(3,3)}
Dom(R) = {1,3},Ran(R)={1,3}{1,3},Ran(R)={1,3}
 Case 2 − If relation R is 'less than' then R={(1,3),(1,7),(2,3),(2,7)}R={(1,3),(1,7),
(2,3),(2,7)}
Dom(R) = {1,2},Ran(R)={3,7}{1,2},Ran(R)={3,7}
 Case 3 − If relation R is 'greater than' then R={(2,1),(9,1),(9,3),(9,7)}R={(2,1),
(9,1),(9,3),(9,7)}
Dom(R) = {2,9},Ran(R)={1,3,7}{2,9},Ran(R)={1,3,7}

Representation of Relations using Graph


A relation can be represented using a directed graph.
The number of vertices in the graph is equal to the number of elements in the set
from which the relation has been defined. For each ordered pair (x, y) in the relation
R, there will be a directed edge from the vertex ‘x’ to vertex ‘y’. If there is an ordered
pair (x, x), there will be self- loop on vertex ‘x’.
Suppose, there is a relation R={(1,1),(1,2),(3,2)}R={(1,1),(1,2),(3,2)} on
set S={1,2,3}S={1,2,3}, it can be represented by the following graph −
Types of Relations
 The Empty Relation between sets X and Y, or on E, is the empty set ∅∅
 The Full Relation between sets X and Y is the set X×YX×Y
 The Identity Relation on set X is the set {(x,x)|x∈X}{(x,x)|x∈X}
 The Inverse Relation R' of a relation R is defined as − R′={(b,a)|(a,b)∈R}R′={(b,a)|
(a,b)∈R}
Example − If R={(1,2),(2,3)}R={(1,2),(2,3)} then R′R′ will be {(2,1),(3,2)}
{(2,1),(3,2)}
 A relation R on set A is called Reflexive if ∀a∈A∀a∈A is related to a (aRa holds)
Example − The relation R={(a,a),(b,b)}R={(a,a),(b,b)} on
set X={a,b}X={a,b} is reflexive.
 A relation R on set A is called Irreflexive if no a∈Aa∈A is related to a (aRa does not
hold).
Example − The relation R={(a,b),(b,a)}R={(a,b),(b,a)} on
set X={a,b}X={a,b} is irreflexive.
 A relation R on set A is
called Symmetric if xRyxRy implies yRxyRx, ∀x∈A∀x∈A and ∀y∈A∀y∈A.
Example − The relation R={(1,2),(2,1),(3,2),(2,3)}R={(1,2),(2,1),(3,2),(2,3)}  on
set A={1,2,3}A={1,2,3} is symmetric.
 A relation R on set A is called Anti-
Symmetric if xRyxRy and yRxyRx implies x=y∀x∈Ax=y∀x∈A and ∀y∈A∀y∈A.
Example − The relation R={(x,y)→N|x≤y}R={(x,y)→N|x≤y} is anti-symmetric
since x≤yx≤y and y≤xy≤x implies x=yx=y.
 A relation R on set A is
called Transitive if xRyxRy and yRzyRz implies xRz,∀x,y,z∈AxRz,∀x,y,z∈A.
Example − The relation R={(1,2),(2,3),(1,3)}R={(1,2),(2,3),(1,3)} on
set A={1,2,3}A={1,2,3} is transitive.
 A relation is an Equivalence Relation if it is reflexive, symmetric, and transitive.

Example − The relation R={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2),(1,3),


(3,1)}R={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2),(1,3),(3,1)}  on
set A={1,2,3}A={1,2,3} is an equivalence relation since it is reflexive, symmetric,
and transitive

Counting mainly encompasses fundamental counting rule, the permutation rule,


and the combination rule.

The Rules of Sum and Product


The Rule of Sum and Rule of Product are used to decompose difficult counting
problems into simple problems.
 The Rule of Sum − If a sequence of tasks T1,T2,…,TmT1,T2,…,Tm can be done
in w1,w2,…wmw1,w2,…wm ways respectively (the condition is that no tasks can be
performed simultaneously), then the number of ways to do one of these tasks
is w1+w2+⋯+wmw1+w2+⋯+wm. If we consider two tasks A and B which are
disjoint (i.e. A∩B=∅A∩B=∅), then mathematically |A∪B|=|A|+|B||A∪B|=|A|+|B|
 The Rule of Product − If a sequence of tasks T1,T2,…,TmT1,T2,…,Tm can be done
in w1,w2,…wmw1,w2,…wm ways respectively and every task arrives after the
occurrence of the previous task, then there
are w1×w2×⋯×wmw1×w2×⋯×wm ways to perform the tasks. Mathematically, if a
task B arrives after a task A, then |A×B|=|A|×|B||A×B|=|A|×|B|

Example

Question − A boy lives at X and wants to go to School at Z. From his home X he


has to first reach Y and then Y to Z. He may go X to Y by either 3 bus routes or 2
train routes. From there, he can either choose 4 bus routes or 5 train routes to
reach Z. How many ways are there to go from X to Z?
Solution − From X to Y, he can go in 3+2=53+2=5 ways (Rule of Sum).
Thereafter, he can go Y to Z in 4+5=94+5=9 ways (Rule of Sum). Hence from X to
Z he can go in 5×9=455×9=45 ways (Rule of Product).

Permutations
A permutation is an arrangement of some elements in which order matters. In
other words a Permutation is an ordered Combination of elements.

Examples

 From a set S ={x, y, z} by taking two at a time, all permutations are −

xy,yx,xz,zx,yz,zyxy,yx,xz,zx,yz,zy.
 We have to form a permutation of three digit numbers from a set of
numbers S={1,2,3}S={1,2,3}. Different three digit numbers will be formed when we
arrange the digits. The permutation will be = 123, 132, 213, 231, 312, 321

Number of Permutations

The number of permutations of ‘n’ different things taken ‘r’ at a time is denoted
by nPrnPr
nPr=n!(n−r)!nPr=n!(n−r)!
where n!=1.2.3.…(n−1).nn!=1.2.3.…(n−1).n
Proof − Let there be ‘n’ different elements.
There are n number of ways to fill up the first place. After filling the first place (n-1)
number of elements is left. Hence, there are (n-1) ways to fill up the second place.
After filling the first and second place, (n-2) number of elements is left. Hence, there
are (n-2) ways to fill up the third place. We can now generalize the number of ways
to fill up r-th place as [n – (r–1)] = n–r+1
So, the total no. of ways to fill up from first place up to r-th-place −
nPr=n(n−1)(n−2).....(n−r+1)nPr=n(n−1)(n−2).....(n−r+1)
=[n(n−1)(n−2)...(n−r+1)][(n−r)(n−r−1)…3.2.1]/[(n−r)(n−r−1)…
3.2.1]=[n(n−1)(n−2)...(n−r+1)][(n−r)(n−r−1)…3.2.1]/[(n−r)(n−r−1)…3.2.1]
Hence,
nPr=n!/(n−r)!nPr=n!/(n−r)!

Some important formulas of permutation

 If there are n elements of which a1a1 are alike of some kind, a2a2 are alike of another


kind; a3a3 are alike of third kind and so on and arar are of rthrth kind,
where (a1+a2+...ar)=n(a1+a2+...ar)=n.
Then, number of permutations of these n objects is = n!/[(a1!(a2!)…(ar!)]n!/[(a1!
(a2!)…(ar!)].
 Number of permutations of n distinct elements taking n elements at a time = nPn=n!
nPn=n!
 The number of permutations of n dissimilar elements taking r elements at a time, when x
particular things always occupy definite places = n−xpr−xn−xpr−x
 The number of permutations of n dissimilar elements when r specified things always
come together is − r!(n−r+1)!r!(n−r+1)!
 The number of permutations of n dissimilar elements when r specified things never come
together is − n!–[r!(n−r+1)!]n!–[r!(n−r+1)!]
 The number of circular permutations of n different elements taken x elements at time
= npx/xnpx/x
 The number of circular permutations of n different things = npn/nnpn/n

Some Problems

Problem 1 − From a bunch of 6 different cards, how many ways we can permute it?
Solution − As we are taking 6 cards at a time from a deck of 6 cards, the
permutation will be 6P6=6!=7206P6=6!=720
Problem 2 − In how many ways can the letters of the word 'READER' be arranged?
Solution − There are 6 letters word (2 E, 1 A, 1D and 2R.) in the word 'READER'.
The permutation will be =6!/[(2!)(1!)(1!)(2!)]=180.=6!/[(2!)(1!)(1!)(2!)]=180.
Problem 3 − In how ways can the letters of the word 'ORANGE' be arranged so that
the consonants occupy only the even positions?
Solution − There are 3 vowels and 3 consonants in the word 'ORANGE'. Number of
ways of arranging the consonants among themselves =3P3=3!=6=3P3=3!=6. The
remaining 3 vacant places will be filled up by 3 vowels in 3P3=3!=63P3=3!=6 ways.
Hence, the total number of permutation is 6×6=366×6=36

Combinations
A combination is selection of some given elements in which order does not matter.
The number of all combinations of n things, taken r at a time is −
nCr=n!r!(n−r)!nCr=n!r!(n−r)!

Problem 1
Find the number of subsets of the set {1,2,3,4,5,6}{1,2,3,4,5,6} having 3 elements.
Solution
The cardinality of the set is 6 and we have to choose 3 elements from the set. Here,
the ordering does not matter. Hence, the number of subsets will be 6C3=206C3=20.
Problem 2
There are 6 men and 5 women in a room. In how many ways we can choose 3 men
and 2 women from the room?
Solution
The number of ways to choose 3 men from 6 men is 6C36C3 and the number of
ways to choose 2 women from 5 women is 5C25C2
Hence, the total number of ways is − 6C3×5C2=20×10=2006C3×5C2=20×10=200
Problem 3
How many ways can you choose 3 distinct groups of 3 students from total 9
students?
Solution
Let us number the groups as 1, 2 and 3
For choosing 3 students for 1st group, the number of ways − 9C39C3
The number of ways for choosing 3 students for 2 nd group after choosing 1st group
− 6C36C3
The number of ways for choosing 3 students for 3 rd group after choosing 1st and
2nd group − 3C33C3
Hence, the total number of
ways =9C3×6C3×3C3=84×20×1=1680=9C3×6C3×3C3=84×20×1=1680

Pascal's Identity
Pascal's identity, first derived by Blaise Pascal in 17 th century, states that the
number of ways to choose k elements from n elements is equal to the summation of
number of ways to choose (k-1) elements from (n-1) elements and the number of
ways to choose elements from n-1 elements.
Mathematically, for any positive integers k and
n: nCk=n−1Ck−1+n−1CknCk=n−1Ck−1+n−1Ck
Proof −
n−1Ck−1+n−1Ckn−1Ck−1+n−1Ck
=(n−1)!(k−1)!(n−k)!+(n−1)!k!(n−k−1)!=(n−1)!(k−1)!(n−k)!+(n−1)!k!(n−k−1)!
=(n−1)!(kk!(n−k)!+n−kk!(n−k)!)=(n−1)!(kk!(n−k)!+n−kk!(n−k)!)
=(n−1)!nk!(n−k)!=(n−1)!nk!(n−k)!
=n!k!(n−k)!=n!k!(n−k)!
=nCk=nCk

Pigeonhole Principle
In 1834, German mathematician, Peter Gustav Lejeune Dirichlet, stated a principle
which he called the drawer principle. Now, it is known as the pigeonhole principle.
Pigeonhole Principle states that if there are fewer pigeon holes than total number
of pigeons and each pigeon is put in a pigeon hole, then there must be at least one
pigeon hole with more than one pigeon. If n pigeons are put into m pigeonholes
where n > m, there's a hole with more than one pigeon.

Examples

 Ten men are in a room and they are taking part in handshakes. If each person shakes
hands at least once and no man shakes the same man’s hand more than once then two
men took part in the same number of handshakes.
 There must be at least two people in a class of 30 whose names start with the same
alphabet.

The Inclusion-Exclusion principle


The Inclusion-exclusion principle computes the cardinal number of the union of
multiple non-disjoint sets. For two sets A and B, the principle states −
|A∪B|=|A|+|B|−|A∩B||A∪B|=|A|+|B|−|A∩B|
For three sets A, B and C, the principle states −
|A∪B∪C|=|A|+|B|+|C|−|A∩B|−|A∩C|−|B∩C|+|A∩B∩C||A∪B∪C|=|A|+|B|+|C|
−|A∩B|−|A∩C|−|B∩C|+|A∩B∩C|
The generalized formula -
|⋃ni=1Ai|=∑1≤i<j<k≤n|Ai∩Aj|+∑1≤i<j<k≤n|Ai∩Aj∩Ak|−⋯+(−1)π−1|
A1∩⋯∩A2||⋃i=1nAi|=∑1≤i<j<k≤n|Ai∩Aj|+∑1≤i<j<k≤n|Ai∩Aj∩Ak|−⋯+(−1)π−1|
A1∩⋯∩A2|
Problem 1
How many integers from 1 to 50 are multiples of 2 or 3 but not both?
Solution
From 1 to 100, there are 50/2=2550/2=25 numbers which are multiples of 2.
There are 50/3=1650/3=16 numbers which are multiples of 3.
There are 50/6=850/6=8 numbers which are multiples of both 2 and 3.
So, |A|=25|A|=25, |B|=16|B|=16 and |A∩B|=8|A∩B|=8.
|A∪B|=|A|+|B|−|A∩B|=25+16−8=33|A∪B|=|A|+|B|−|A∩B|=25+16−8=33
Problem 2
In a group of 50 students 24 like cold drinks and 36 like hot drinks and each student
likes at least one of the two drinks. How many like both coffee and tea?
Solution
Let X be the set of students who like cold drinks and Y be the set of people who like
hot drinks.
So, |X∪Y|=50|X∪Y|=50, |X|=24|X|=24, |Y|=36|Y|=36
|X∩Y|=|X|+|Y|−|X∪Y|=24+36−50=60−50=10|X∩Y|=|X|+|Y|−|X∪Y|
=24+36−50=60−50=10
Hence, there are 10 students who like both tea and coffee

Probability can be conceptualized as finding the chance of occurrence of an event.


Mathematically, it is the study of random processes and their outcomes. The laws of
probability have a wide applicability in a variety of fields like genetics, weather
forecasting, opinion polls, stock markets etc.

Basic Concepts
Probability theory was invented in the 17th century by two French mathematicians,
Blaise Pascal and Pierre de Fermat, who were dealing with mathematical problems
regarding of chance.
Before proceeding to details of probability, let us get the concept of some
definitions.
Random Experiment − An experiment in which all possible outcomes are known
and the exact output cannot be predicted in advance is called a random experiment.
Tossing a fair coin is an example of random experiment.
Sample Space − When we perform an experiment, then the set S of all possible
outcomes is called the sample space. If we toss a coin, the sample
space S={H,T}S={H,T}
Event − Any subset of a sample space is called an event. After tossing a coin,
getting Head on the top is an event.
The word "probability" means the chance of occurrence of a particular event. The
best we can say is how likely they are to happen, using the idea of probability.
Probabilityofoccurenceofanevent=TotalnumberoffavourableoutcomeTotalnumberofOutcomesProba
bilityofoccurenceofanevent=TotalnumberoffavourableoutcomeTotalnumberofOutcomes
As the occurrence of any event varies between 0% and 100%, the probability varies
between 0 and 1.

Steps to find the probability


Step 1 − Calculate all possible outcomes of the experiment.
Step 2 − Calculate the number of favorable outcomes of the experiment.
Step 3 − Apply the corresponding probability formula.

Tossing a Coin

If a coin is tossed, there are two possible outcomes − Heads (H)(H) or Tails (T)(T)


So, Total number of outcomes = 2
Hence, the probability of getting a Head (H)(H) on top is 1/2 and the probability of
getting a Tails (T)(T) on top is 1/2

Throwing a Dice

When a dice is thrown, six possible outcomes can be on the top


− 1,2,3,4,5,61,2,3,4,5,6.
The probability of any one of the numbers is 1/6
The probability of getting even numbers is 3/6 = 1/2
The probability of getting odd numbers is 3/6 = 1/2

Taking Cards From a Deck

From a deck of 52 cards, if one card is picked find the probability of an ace being
drawn and also find the probability of a diamond being drawn.
Total number of possible outcomes − 52
Outcomes of being an ace − 4
Probability of being an ace = 4/52 = 1/13
Probability of being a diamond = 13/52 = 1/4

Probability Axioms
 The probability of an event always varies from 0 to 1. [0≤P(x)≤1][0≤P(x)≤1]
 For an impossible event the probability is 0 and for a certain event the probability is 1.
 If the occurrence of one event is not influenced by another event, they are called
mutually exclusive or disjoint.

If A1,A2....AnA1,A2....An are mutually exclusive/disjoint events,


then P(Ai∩Aj)=∅P(Ai∩Aj)=∅ for i≠ji≠j and P(A1∪A2∪....An)=P(A1)+P(A2)
+.....P(An)P(A1∪A2∪....An)=P(A1)+P(A2)+.....P(An)

Properties of Probability
 If there are two events xx and x¯¯¯x¯which are complementary, then the probability of
the complementary event is −

p(x¯¯¯)=1−p(x)p(x¯)=1−p(x)
 For two non-disjoint events A and B, the probability of the union of two events −

P(A∪B)=P(A)+P(B)P(A∪B)=P(A)+P(B)
 If an event A is a subset of another event B (i.e. A⊂BA⊂B), then the probability of A is
less than or equal to the probability of B.
Hence, A⊂BA⊂B implies P(A)≤p(B)P(A)≤p(B)

Conditional Probability
The conditional probability of an event B is the probability that the event will occur
given an event A has already occurred. This is written as P(B|A)P(B|A).
Mathematically − P(B|A)=P(A∩B)/P(A)P(B|A)=P(A∩B)/P(A)
If event A and B are mutually exclusive, then the conditional probability of event B
after the event A will be the probability of event B that is P(B)P(B).
Problem 1
In a country 50% of all teenagers own a cycle and 30% of all teenagers own a bike
and cycle. What is the probability that a teenager owns bike given that the teenager
owns a cycle?
Solution
Let us assume A is the event of teenagers owning only a cycle and B is the event of
teenagers owning only a bike.
So, P(A)=50/100=0.5P(A)=50/100=0.5 and P(A∩B)=30/100=0.3P(A∩B)=30/10
0=0.3 from the given problem.
P(B|A)=P(A∩B)/P(A)=0.3/0.5=0.6P(B|A)=P(A∩B)/P(A)=0.3/0.5=0.6
Hence, the probability that a teenager owns bike given that the teenager owns a
cycle is 60%.
Problem 2
In a class, 50% of all students play cricket and 25% of all students play cricket and
volleyball. What is the probability that a student plays volleyball given that the
student plays cricket?
Solution
Let us assume A is the event of students playing only cricket and B is the event of
students playing only volleyball.
So, P(A)=50/100=0.5P(A)=50/100=0.5 and P(A∩B)=25/100=0.25P(A∩B)=25/1
00=0.25 from the given problem.
P⟮B|A⟯=P⟮A∩B⟯/P⟮A⟯=0.25/0.5=0.5P⟮B|
A⟯=P⟮A∩B⟯/P⟮A⟯=0.25/0.5=0.5
Hence, the probability that a student plays volleyball given that the student plays
cricket is 50%.
Problem 3
Six good laptops and three defective laptops are mixed up. To find the defective
laptops all of them are tested one-by-one at random. What is the probability to find
both of the defective laptops in the first two pick?
Solution
Let A be the event that we find a defective laptop in the first test and B be the event
that we find a defective laptop in the second test.
Hence, P(A∩B)=P(A)P(B|A)=3/9×2/8=1/12P(A∩B)=P(A)P(B|A)=3/9×2/8=1/12

Bayes' Theorem
Theorem − If A and B are two mutually exclusive events, where P(A)P(A) is the
probability of A and P(B)P(B) is the probability of B, P(A|B)P(A|B) is the probability
of A given that B is true. P(B|A)P(B|A) is the probability of B given that A is true,
then Bayes’ Theorem states −
P(A|B)=P(B|A)P(A)∑ni=1P(B|Ai)P(Ai)P(A|B)=P(B|A)P(A)∑i=1nP(B|Ai)P(Ai)

Application of Bayes' Theorem

 In situations where all the events of sample space are mutually exclusive events.

 In situations where either P(Ai∩B)P(Ai∩B) for each AiAi or P(Ai)P(Ai) and P(B|


Ai)P(B|Ai) for each AiAi is known.
Problem
Consider three pen-stands. The first pen-stand contains 2 red pens and 3 blue
pens; the second one has 3 red pens and 2 blue pens; and the third one has 4 red
pens and 1 blue pen. There is equal probability of each pen-stand to be selected. If
one pen is drawn at random, what is the probability that it is a red pen?
Solution
Let AiAi be the event that ith pen-stand is selected.
Here, i = 1,2,3.
Since probability for choosing a pen-stand is equal, P(Ai)=1/3P(Ai)=1/3
Let B be the event that a red pen is drawn.
The probability that a red pen is chosen among the five pens of the first pen-stand,
P(B|A1)=2/5P(B|A1)=2/5
The probability that a red pen is chosen among the five pens of the second pen-
stand,
P(B|A2)=3/5P(B|A2)=3/5
The probability that a red pen is chosen among the five pens of the third pen-stand,
P(B|A3)=4/5P(B|A3)=4/5
According to Bayes' Theorem,
P(B)=P(A1).P(B|A1)+P(A2).P(B|A2)+P(A3).P(B|A3)P(B)=P(A1).P(B|
A1)+P(A2).P(B|A2)+P(A3).P(B|A3)
=1/3.2/5+1/3.3/5+1/3.4/5=1/3.2/5+1/3.3/5+1/3.4/5
=3/5

Simple Graph
A graph with no loops and no parallel edges is called a simple graph.
 The maximum number of edges possible in a single graph with ‘n’ vertices
is nC2 where nC2 = n(n – 1)/2.
 The number of simple graphs possible with ‘n’ vertices = 2 c  = 2n(n-1)/2.
n
2

Example

In the following graph, there are 3 vertices with 3 edges which is maximum
excluding the parallel edges and loops. This can be proved by using the above
formulae.

The maximum number of edges with n=3 vertices −


C =
n
2 n(n–1)/2
= 3(3–1)/2
= 6/2
= 3 edges
The maximum number of simple graphs with n=3 vertices −
2C =n
2 2n(n-1)/2

= 23(3-1)/2

= 23

= 8
These 8 graphs are as shown below −
Multi-Graph

If in a graph multiple edges between the same set of vertices are allowed, it is
called Multigraph. In other words, it is a graph having at least one loop or multiple
edges.

Weighted graph :

Sometimes want to associate some value with the edges in graph. 20 1 -------> 2 / \ / 50/ \50
/20 / \ / v 10 v v 20 5 ------> 3 -----> 4 So.. label all the edges with a number. That number (called the
weight) could represent: • Distances between two locations (cities; computers on network) • Time
taken to get from one node to another (stations; states in schedule or plan). • Cost of traversing the
edge (train fares; cost of wires.
A graph is traversable if you can draw a path between all the vertices without
retracing the same path. Based on this path, there are some categories like Euler’s
path and Euler’s circuit which are described in this chapter.

Euler’s Path
An Euler’s path contains each edge of ‘G’ exactly once and each vertex of ‘G’ at
least once. A connected graph G is said to be traversable if it contains an Euler’s
path.

Example

Euler’s Path = d-c-a-b-d-e.

Euler’s Circuit
In an Euler’s path, if the starting vertex is same as its ending vertex, then it is called
an Euler’s circuit.

Example
Euler’s Path = a-b-c-d-a-g-f-e-c-a.

Euler’s Circuit Theorem


A connected graph ‘G’ is traversable if and only if the number of vertices with odd
degree in G is exactly 2 or 0. A connected graph G can contain an Euler’s path, but
not an Euler’s circuit, if it has exactly two vertices with an odd degree.
Note − This Euler path begins with a vertex of odd degree and ends with the other
vertex of odd degree.

Example
Euler’s Path − b-e-a-b-d-c-a is not an Euler’s circuit, but it is an Euler’s path.
Clearly it has exactly 2 odd degree vertices.
Note − In a connected graph G, if the number of vertices with odd degree = 0, then
Euler’s circuit exists.

Hamiltonian Graph
A connected graph G is said to be a Hamiltonian graph, if there exists a cycle which
contains all the vertices of G.
Every cycle is a circuit but a circuit may contain multiple cycles. Such a cycle is
called a Hamiltonian cycle of G.

Hamiltonian Path
A connected graph is said to be Hamiltonian if it contains each vertex of G exactly
once. Such a path is called a Hamiltonian path.

Example
Hamiltonian Path − e-d-b-a-c.
Note −

 Euler’s circuit contains each edge of the graph exactly once.


 In a Hamiltonian cycle, some edges of the graph can be skipped.

Example

Take a look at the following graph −

For the graph shown above −

 Euler path exists – false


 Euler circuit exists – false
 Hamiltonian cycle exists – true
 Hamiltonian path exists – true
G has four vertices with odd degree, hence it is not traversable. By skipping the
internal edges, the graph has a Hamiltonian cycle passing through all the vertices.
A graph 'G' is said to be planar if it can be drawn on a plane or a sphere so that no
two edges cross each other at a non-vertex point.

Example
Regions
Every planar graph divides the plane into connected areas called regions.

Example

Degree of a bounded region r = deg(r) = Number of edges enclosing the regions r.

deg(1) = 3
deg(2) = 4
deg(3) = 4
deg(4) = 3
deg(5) = 8
Degree of an unbounded region r = deg(r) = Number of edges enclosing the
regions r.

deg(R ) = 4
1

deg(R ) = 6
2

In planar graphs, the following properties hold good −


 1. In a planar graph with 'n' vertices, sum of degrees of all the vertices is

n ∑ i=1 deg(Vi) = 2|E|


 2. According to Sum of Degrees of Regions Theorem, in a planar graph with 'n' regions,
Sum of degrees of regions is −

n ∑ i=1 deg(ri) = 2|E|


Based on the above theorem, you can draw the following conclusions −
In a planar graph,
 If degree of each region is K, then the sum of degrees of regions is
K|R| = 2|E|

 If the degree of each region is at least K(≥ K), then


K|R| ≤ 2|E|

 If the degree of each region is at most K(≤ K), then


K|R| ≥ 2|E|

Note − Assume that all the regions have same degree.


3. According to Euler's Formulae on planar graphs,
 If a graph 'G' is a connected planar, then
|V| + |R| = |E| + 2

 If a planar graph with 'K' components then


|V| + |R|=|E| + (K+1)
Where, |V| is the number of vertices, |E| is the number of edges, and |R| is the
number of regions.
4. Edge Vertex Inequality
If 'G' is a connected planar graph with degree of each region at least 'K' then,
|E| ≤ k/k - 2{|v|-2}
You know, |V| + |R| = |E| + 2
       K.|R| ≤ 2|E|
      K(|E| - |V| + 2) ≤ 2|E|
      (K - 2)|E| ≤ K(|V| - 2)
      |E| ≤ k/k - 2{|v| - 2}
5. If 'G' is a simple connected planar graph, then

|E| ≤ 3|V| − 6
|R| ≤ 2|V| − 4

There exists at least one vertex V ∈ G, such that deg(V) ≤ 5


6. If 'G' is a simple connected planar graph (with at least 2 edges) and no
triangles, then

|E| ≤ {2|V| – 4}

7. Kuratowski's Theorem
A graph 'G' is non-planar if and only if 'G' has a subgraph which is homeomorphic to
K5 or K3,3.

Graph coloring is nothing but a simple way of labelling graph components such as
vertices, edges, and regions under some constraints. In a graph, no two adjacent
vertices, adjacent edges, or adjacent regions are colored with minimum number of
colors. This number is called the chromatic number and the graph is called
a properly colored graph.
While graph coloring, the constraints that are set on the graph are colors, order of
coloring, the way of assigning color, etc. A coloring is given to a vertex or a
particular region. Thus, the vertices or regions having same colors form
independent sets.

Vertex Coloring
Vertex coloring is an assignment of colors to the vertices of a graph ‘G’ such that no
two adjacent vertices have the same color. Simply put, no two vertices of an edge
should be of the same color.

Chromatic Number
The minimum number of colors required for vertex coloring of graph ‘G’ is called as
the chromatic number of G, denoted by X(G).
χ(G) = 1 if and only if 'G' is a null graph. If 'G' is not a null graph, then χ(G) ≥ 2

Example

Note − A graph ‘G’ is said to be n-coverable if there is a vertex coloring that uses at
most n colors, i.e., X(G) ≤ n.

Region Coloring
Region coloring is an assignment of colors to the regions of a planar graph such
that no two adjacent regions have the same color. Two regions are said to be
adjacent if they have a common edge.

Example

Take a look at the following graph. The regions ‘aeb’ and ‘befc’ are adjacent, as
there is a common edge ‘be’ between those two regions.
Similarly the other regions are also coloured based on the adjacency. This graph is
coloured as follows −

Example

The chromatic number of Kn is


a) n
b) n–1
c) ⌊n 2 ⌋
d) ⌈n 2 ⌉
Consider this example with K4.
In the complete graph, each vertex is adjacent to remaining (n – 1) vertices. Hence,
each vertex requires a new color. Hence the chromatic number of K n = n.

Applications of Graph Coloring


Graph coloring is one of the most important concepts in graph theory. It is used in
many real-time applications of computer science such as −

 Clustering
 Data mining
 Image capturing
 Image segmentation
 Networking
 Resource allocation
 Processes scheduling
 Bipartite Graph - If the vertex-set of a graph G can be split into two disjoint
sets, V1 and V2 , in such a way that each edge in the graph joins a vertex in
V1 to a vertex in V2 , and there are no edges in G that connect two vertices in
V1 or two vertices in V2 , then the graph G is called a bipartite graph.


 Complete Bipartite Graph - A complete bipartite graph is a bipartite graph in
which each vertex in the first set is joined to every single vertex in the second
set. The complete bipartite graph is denoted by K x,y where the graph G
contains x vertices in the first set and y vertices in the second set.

Tree
A connected acyclic graph is called a tree. In other words, a connected graph with
no cycles is called a tree.
The edges of a tree are known as branches. Elements of trees are called
their nodes. The nodes without child nodes are called leaf nodes.
A tree with ‘n’ vertices has ‘n-1’ edges. If it has one more edge extra than ‘n-1’, then
the extra edge should obviously has to pair up with two vertices which leads to form
a cycle. Then, it becomes a cyclic graph which is a violation for the tree graph.

Example 1

The graph shown here is a tree because it has no cycles and it is connected. It has
four vertices and three edges, i.e., for ‘n’ vertices ‘n-1’ edges as mentioned in the
definition.

Note − Every tree has at least two vertices of degree one.

Example 2
In the above example, the vertices ‘a’ and ‘d’ has degree one. And the other two
vertices ‘b’ and ‘c’ has degree two. This is possible because for not forming a cycle,
there should be at least two single edges anywhere in the graph. It is nothing but
two edges with a degree of one.

Forest
A disconnected acyclic graph is called a forest. In other words, a disjoint
collection of trees is called a forest.

Example

The following graph looks like two sub-graphs; but it is a single disconnected graph.
There are no cycles in this graph. Hence, clearly it is a forest.

Spanning Trees
Let G be a connected graph, then the sub-graph H of G is called a spanning tree of
G if −

 H is a tree
 H contains all vertices of G.
A spanning tree T of an undirected graph G is a subgraph that includes all of the
vertices of G.

Example
In the above example, G is a connected graph and H is a sub-graph of G.
Clearly, the graph H has no cycles, it is a tree with six edges which is one less than
the total number of vertices. Hence H is the Spanning tree of G.

Circuit Rank
Let ‘G’ be a connected graph with ‘n’ vertices and ‘m’ edges. A spanning tree ‘T’ of
G contains (n-1) edges.
Therefore, the number of edges you need to delete from ‘G’ in order to get a
spanning tree = m-(n-1), which is called the circuit rank of G.
This formula is true, because in a spanning tree you need to have ‘n-1’ edges. Out
of ‘m’ edges, you need to keep ‘n–1’ edges in the graph.
Hence, deleting ‘n–1’ edges from ‘m’ gives the edges to be removed from the graph
in order to get a spanning tree, which should not form a cycle.

Example

Take a look at the following graph −

For the graph given in the above example, you have m=7 edges and n=5 vertices.
Then the circuit rank is
G = m – (n – 1)
= 7 – (5 – 1)
= 3

Example

Let ‘G’ be a connected graph with six vertices and the degree of each vertex is
three. Find the circuit rank of ‘G’.
By the sum of degree of vertices theorem,
n ∑ i=1 deg(Vi) = 2|E|
6 × 3 = 2|E|
|E| = 9
Circuit rank = |E| – (|V| – 1)
= 9 – (6 – 1) = 4

Kirchoff’s Theorem
Kirchoff’s theorem is useful in finding the number of spanning trees that can be
formed from a connected graph.

Example

The matrix ‘A’ be filled as, if there is an edge between two vertices, then it should be
given as ‘1’, else ‘0’.
Cut Set of a Graph
Let ‘G’= (V, E) be a connected graph. A subset E’ of E is called a cut set of G if
deletion of all the edges of E’ from G makes G disconnect.
If deleting a certain number of edges from a graph makes it disconnected, then
those deleted edges are called the cut set of the graph.

Example

Take a look at the following graph. Its cut set is E1 = {e1, e3, e5, e8}.
After removing the cut set E1 from the graph, it would appear as follows −

Similarly there are other cut sets that can disconnect the graph −

 E3 = {e9} – Smallest cut set of the graph.


 E4 = {e3, e4, e5}

Edge Connectivity
Let ‘G’ be a connected graph. The minimum number of edges whose removal
makes ‘G’ disconnected is called edge connectivity of G.
Notation − λ(G)
In other words, the number of edges in a smallest cut set of G is called the edge
connectivity of G.
If ‘G’ has a cut edge, then λ(G) is 1. (edge connectivity of G.)

Example

Take a look at the following graph. By removing two minimum edges, the connected
graph becomes disconnected. Hence, its edge connectivity (λ(G)) is 2.
Here are the four ways to disconnect the graph by removing two edges −

Vertex Connectivity
Let ‘G’ be a connected graph. The minimum number of vertices whose removal
makes ‘G’ either disconnected or reduces ‘G’ in to a trivial graph is called its vertex
connectivity.
Notation − K(G)

Example

In the above graph, removing the vertices ‘e’ and ‘i’ makes the graph disconnected.
If G has a cut vertex, then K(G) = 1.
Notation − For any connected graph G,
K(G) ≤ λ(G) ≤ δ(G)
Vertex connectivity (K(G)), edge connectivity (λ(G)), minimum number of degrees of
G(δ(G)).

Example

Calculate λ(G) and K(G) for the following graph −

Solution
From the graph,
δ(G) = 3
K(G) ≤ λ(G) ≤ δ(G) = 3 (1)
K(G) ≥ 2 (2)
Deleting the edges {d, e} and {b, h}, we can disconnect G.
Therefore,
λ(G) = 2
2 ≤ λ(G) ≤ δ(G) = 2 (3)
From (2) and (3), vertex connectivity K(G) = 2
Traversal is a process to visit all the nodes of a tree and may print their values too.
Because, all nodes are connected via edges (links) we always start from the root
(head) node. That is, we cannot randomly access a node in a tree. There are three
ways which we use to traverse a tree −

 In-order Traversal
 Pre-order Traversal
 Post-order Traversal
Generally, we traverse a tree to search or locate a given item or key in the tree or to
print all the values it contains.

In-order Traversal
In this traversal method, the left subtree is visited first, then the root and later the
right sub-tree. We should always remember that every node may represent a
subtree itself.
If a binary tree is traversed in-order, the output will produce sorted key values in an
ascending order.

We start from A, and following in-order traversal, we move to its left subtree B. B is
also traversed in-order. The process goes on until all the nodes are visited. The
output of inorder traversal of this tree will be −
D→B→E→A→F→C→G

Algorithm
Until all nodes are traversed −
Step 1 − Recursively traverse left subtree.
Step 2 − Visit root node.
Step 3 − Recursively traverse right subtree.

Pre-order Traversal
In this traversal method, the root node is visited first, then the left subtree and finally
the right subtree.

We start from A, and following pre-order traversal, we first visit A itself and then
move to its left subtree B. B is also traversed pre-order. The process goes on until
all the nodes are visited. The output of pre-order traversal of this tree will be −
A→B→D→E→C→F→G

Algorithm
Until all nodes are traversed −
Step 1 − Visit root node.
Step 2 − Recursively traverse left subtree.
Step 3 − Recursively traverse right subtree.

Post-order Traversal
In this traversal method, the root node is visited last, hence the name. First we
traverse the left subtree, then the right subtree and finally the root node.
We start from A, and following Post-order traversal, we first visit the left
subtree B. B is also traversed post-order. The process goes on until all the nodes
are visited. The output of post-order traversal of this tree will be −
D→E→B→F→G→C→A

Algorithm
Until all nodes are traversed −
Step 1 − Recursively traverse left subtree.
Step 2 − Recursively traverse right subtree.
Step 3 − Visit root node.

Boolean algebra deals with binary variables and logic operation. A Boolean
Function is described by an algebraic expression called Boolean
expression which consists of binary variables, the constants 0 and 1, and the logic
operation symbols. Consider the following example.

Here the left side of the equation represents the output Y. So we can state equation
no. 1

Truth Table Formation


A truth table represents a table having all combinations of inputs and their
corresponding result.
It is possible to convert the switching equation into a truth table. For example,
consider the following switching equation.
The output will be high (1) if A = 1 or BC = 1 or both are 1. The truth table for this
equation is shown by Table (a). The number of rows in the truth table is 2 n where n
is the number of input variables (n=3 for the given equation). Hence there are 2 3 = 8
possible input combination of inputs.

Methods to simplify the boolean function


The methods used for simplifying the Boolean function are as follows −

 Karnaugh-map or K-map, and


 NAND gate method.

Karnaugh-map or K-map
The Boolean theorems and the De-Morgan's theorems are useful in manipulating
the logic expression. We can realize the logical expression using gates. The
number of logic gates required for the realization of a logical expression should be
reduced to a minimum possible value by K-map method. This method can be done
in two different ways, as discussed below.

Sum of Products (SOP) Form

It is in the form of sum of three terms AB, AC, BC with each individual term is a
product of two variables. Say A.B or A.C etc. Therefore such expressions are
known as expression in SOP form. The sum and products in SOP form are not the
actual additions or multiplications. In fact they are the OR and AND functions. In
SOP form, 0 represents a bar and 1 represents an unbar. SOP form is represented
by  .
Given below is an example of SOP.
Product of Sums (POS) Form

It is in the form of product of three terms (A+B), (B+C), or (A+C) with each term is in
the form of a sum of two variables. Such expressions are said to be in the product
of sums (POS) form. In POS form, 0 represents an unbar and 1 represents a bar.
POS form is represented by  .
Given below is an example of POS.

NAND gates Realization


NAND gates can be used to simplify Boolean functions as shown in the example
below.
Simplification Using Algebraic Functions
In this approach, one Boolean expression is minimized into an equivalent
expression by applying Boolean identities.

Problem 1

Minimize the following Boolean expression using Boolean identities −


F(A,B,C)=A′B+BC′+BC+AB′C′F(A,B,C)=A′B+BC′+BC+AB′C′

Solution

Given,F(A,B,C)=A′B+BC′+BC+AB′C′F(A,B,C)=A′B+BC′+BC+AB′C′
Or,F(A,B,C)=A′B+(BC′+BC′)+BC+AB′C′F(A,B,C)=A′B+(BC′+BC′)+BC+AB′C′
[By idempotent law, BC’ = BC’ + BC’]
Or,F(A,B,C)=A′B+(BC′+BC)+(BC′+AB′C′)F(A,B,C)=A′B+(BC′+BC)+(BC′+AB′C
′)
Or,F(A,B,C)=A′B+B(C′+C)+C′(B+AB′)F(A,B,C)=A′B+B(C′+C)+C′(B+AB′)
[By distributive laws]
Or,F(A,B,C)=A′B+B.1+C′(B+A)F(A,B,C)=A′B+B.1+C′(B+A)
[ (C' + C) = 1 and absorption law (B + AB')= (B + A)]
Or,F(A,B,C)=A′B+B+C′(B+A)F(A,B,C)=A′B+B+C′(B+A)
[ B.1 = B ]
Or,F(A,B,C)=B(A′+1)+C′(B+A)F(A,B,C)=B(A′+1)+C′(B+A)
Or,F(A,B,C)=B.1+C′(B+A)F(A,B,C)=B.1+C′(B+A)
[ (A' + 1) = 1 ]
Or,F(A,B,C)=B+C′(B+A)F(A,B,C)=B+C′(B+A)
[ As, B.1 = B ]
Or,F(A,B,C)=B+BC′+AC′F(A,B,C)=B+BC′+AC′
Or,F(A,B,C)=B(1+C′)+AC′F(A,B,C)=B(1+C′)+AC′
Or,F(A,B,C)=B.1+AC′F(A,B,C)=B.1+AC′
[As, (1 + C') = 1]
Or,F(A,B,C)=B+AC′F(A,B,C)=B+AC′
[As, B.1 = B]
So,F(A,B,C)=B+AC′F(A,B,C)=B+AC′is the minimized form.

Problem 2

Minimize the following Boolean expression using Boolean identities −


F(A,B,C)=(A+B)(A+C)F(A,B,C)=(A+B)(A+C)

Solution

Given, F(A,B,C)=(A+B)(A+C)F(A,B,C)=(A+B)(A+C)
Or, F(A,B,C)=A.A+A.C+B.A+B.CF(A,B,C)=A.A+A.C+B.A+B.C [Applying
distributive Rule]
Or, F(A,B,C)=A+A.C+B.A+B.CF(A,B,C)=A+A.C+B.A+B.C [Applying Idempotent
Law]
Or, F(A,B,C)=A(1+C)+B.A+B.CF(A,B,C)=A(1+C)+B.A+B.C [Applying
distributive Law]
Or, F(A,B,C)=A+B.A+B.CF(A,B,C)=A+B.A+B.C [Applying dominance Law]
Or, F(A,B,C)=(A+1).A+B.CF(A,B,C)=(A+1).A+B.C [Applying distributive Law]
Or, F(A,B,C)=1.A+B.CF(A,B,C)=1.A+B.C [Applying dominance Law]
Or, F(A,B,C)=A+B.CF(A,B,C)=A+B.C [Applying dominance Law]
So, F(A,B,C)=A+BCF(A,B,C)=A+BC is the minimized form.

Karnaugh Maps
The Karnaugh map (K–map), introduced by Maurice Karnaughin in 1953, is a grid-
like representation of a truth table which is used to simplify boolean algebra
expressions. A Karnaugh map has zero and one entries at different positions. It
provides grouping together Boolean expressions with common factors and
eliminates unwanted variables from the expression. In a K-map, crossing a vertical
or horizontal cell boundary is always a change of only one variable.

Example 1

An arbitrary truth table is taken below −

A B A operation B

0 0 w

0 1 x

1 0 y

1 1 z

Now we will make a k-map for the above truth table −

Example 2

Now we will make a K-map for the expression − AB+ A’B’


Simplification Using K-map
K-map uses some rules for the simplification of Boolean expressions by combining
together adjacent cells into single term. The rules are described below −
Rule 1 − Any cell containing a zero cannot be grouped.

Wrong grouping
Rule 2 − Groups must contain 2n cells (n starting from 1).

Wrong grouping
Rule 3 − Grouping must be horizontal or vertical, but must not be diagonal.

Wrong diagonal grouping


Proper vertical grouping

Proper horizontal grouping


Rule 4 − Groups must be covered as largely as possible.

Insufficient grouping

Proper grouping
Rule 5 − If 1 of any cell cannot be grouped with any other cell, it will act as a group
itself.

Proper grouping
Rule 6 − Groups may overlap but there should be as few groups as possible.

Proper grouping
Rule 7 − The leftmost cell/cells can be grouped with the rightmost cell/cells and the
topmost cell/cells can be grouped with the bottommost cell/cells.

Proper grouping

Problem

Minimize the following Boolean expression using K-map −


F(A,B,C)=A′BC+A′BC′+AB′C′+AB′CF(A,B,C)=A′BC+A′BC′+AB′C′+AB′C

Solution
Each term is put into k-map and we get the following −

K-map for F (A, B, C)


Now we will group the cells of 1 according to the rules stated above −

K-map for F (A, B, C)


We have got two groups which are termed as A′BA′B and AB′AB′.
Hence, F(A,B,C)=A′B+AB′=A⊕BF(A,B,C)=A′B+AB′=A⊕B. It is the minimized
form.

You might also like