Monograph PDF
Monograph PDF
Representation of a Set:-
Sets can be represented in two ways:
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.
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)}
Example 2: The set {1,3,5,7,9} is written as: 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∈ S and if an element y is not a
member of set S, it is denoted by y ∉ S.
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∈N and 70 > x > 50}
Infinite Set: - A set which contains infinite number of elements is called an infinite set.
Example: S = {x | x∈N and x > 10}
Example 1: Let, X = {1, 2, 3, 4, 5, 6 } and Y = { 1, 2 }. Here set Y is a subset ofset X as all the
elements of set Y is in set X. Hence, we can write Y ⊆ X.
Example 2: Let, X = {1, 2, 3} and Y = {1, 2, 3}. Here set Y is a subset (Not a propersubset) of
set X as all the elements of set Y is in set X. Hence, we can write Y ⊆ X.
Proper Subset: - The term “proper subset” can be defined as “subset of but not equal to”. A
Set X is aproper subset of set Y (Written as X ⊂ Y) if every element of X is an element of set Y
and |X| < |Y|.
Example: Let, X = {1, 2, 3, 4, 5, 6} and Y = {1, 2}. Here set Y⊂X since all elementsin Y are
contained in X too and X has at least one element is more than set Y.
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 U.
Example: We may define U as the set of all animals on earth. In this case, set of allmammals
is a subset of U, set of all fishes is a subset of U, set of all insects is a subset of U, 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.
Singleton Set or Unit Set:-Singleton set or unit set contains only one element. A singleton
set is denoted by {s}.
Equal Set:-If two sets contain the same elements they are said to be equal.
Example: If A = {1, 2, 6} and B = {6, 1, 2}, they are equal as every element of setA 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} and B = {16, 17, 22}, they are equivalent as cardinality of Ais equal to
the cardinality of B. i.e. |A|=|B|=3
Overlapping Set:-Two sets that have at least one common element are called overlapping
sets.In case of overlapping sets:
Example: Let, A = {1, 2, 6} and B = {6, 12, 42}.There is a common element ‘6’,hencethese 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:
1. n(A ∩ B) = ∅
2. n(A ∪ B) = n(A) + n(B)
Example: Let, A = {1, 2, 6} and B = {7, 9, 14}; there is not a single common element,hence these
sets are overlapping sets.
Venn Diagrams:-Venn diagram, invented in1880 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 ∪ 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}.
Example: If A = {10, 11, 12, 13} and B = {13, 14, 15}, then A∪B = {10, 11, 12, 13,14, 15}. (The
common element occurs only once)
A B
Example: If A = {11, 12, 13} and B = {13, 14, 15}, then A∩B = {13}.
Example: If A = {10, 11, 12, 13} and B = {13, 14, 15}, then (A−B) = {10, 11, 12} and(B−A) =
{14,15}. Here, we can see (A−B) ≠ (B−A)
A A
B B
Example: If A ={x | x belongs to set of odd integers} then A' ={y | y does not belongto set of
odd integers}
Therefore (AB)C=(ACBC)
(ii)(A B)C=ACBC
PROOF
x (A B)C =x (A B)= x A or x B = x AC or x BC = x ACBC
Therefore (A B)C=ACBC
Associative law
1. (A U B) U C = AU (BUC)
2. (AՌ B) Ռ 𝐂 = A Ռ (BՌ 𝐂)
1. (A U B) U C = A U (BUC)
Let x be any arbitrary element of (A U B). then
X ∈(AUB) U C = X ∈(AUB) OR X ∈ C
X ∈ 𝐴 OR X∈ 𝐵 OR X∈ 𝐶
X ∈ 𝐴 OR ( X∈ 𝐵 OR X∈ 𝐶)
X ∈ 𝐴 OR (X∈(B U C))
X ∈ 𝐴 𝑈(B U C)
(AUB) U C ⊊ 𝐴 𝑈(𝐵 𝑈 𝐶)………….1
A U (BUC) =>X ∈ 𝐴 OR X∈ (B U C)
X ∈ 𝐴 OR X∈ 𝐵 OR X∈ 𝐶
X ∈ 𝐴 OR ( X∈ 𝐵) OR X∈ 𝐶
X ∈ (A U B) OR X∈ 𝐶
X ∈ ( A U B) U C
A U (BUC) ⊊(A U B) U C………………..2
From eqn 1 and 2 we get
(A U B) U C = A U (BUC)
2. (AՌ B) Ռ 𝐂 = A Ռ (BՌ 𝐂)
Let X ∈(A Ռ B) Ռ C => X ∈(A Ռ B)and X∈ C
(X ∈ 𝐴and X∈ 𝐵) and X∈ 𝐶
X ∈ 𝐴 and ( X∈ 𝐵 and X∈ 𝐶)
X ∈ 𝐴 and (X∈(BՌ C))
X ∈ 𝐴 Ռ(B Ռ C)
(A Ռ B)Ռ C ⊊ 𝐴 Ռ(𝐵 Ռ 𝐶)………….1
Let x ∈ 𝐴 Ռ(𝐵 Ռ 𝐶) =>X∈ 𝐴and X∈ (B Ռ C)
(X ∈ 𝐴and X∈ 𝐵) and X∈ 𝐶
(X ∈ 𝐴 ՌB) and X∈ 𝐶
X ∈ (𝐴 ՌB) Ռ 𝐶
A Ռ (B Ռ C) ⊊(A Ռ B) Ռ C………………...2
From eqn 1 and 2 we get
(AՌ B) Ռ C = A Ռ (BՌ C)
Commutative law
1. A U B =B U A
2. A Ո B =B Ո A
1. A U B =B U A
Let x be any arbitrary element of A U B. Then
X ∈(A U B) = { X: X ∈A OR X ∈B }
X: X ∈B OR X∈A
X ∈B U A
X ∈(A UB) =>X ∈(B U A)
A U B ⊊B U A ………………….1
Similarly
X ∈(B U A)= { X : X ∈B OR X∈A }
{ X : X ∈B OR X∈A }
X: X ∈(A U B)
X ∈(B U A) =>X ∈(A U B)
B U A ⊊ A U B ………………2
From eqn 1 and 2 we get
A U B =B U A
2. A Ո B =B Ո A
Let x be any arbitrary element of A U B. Then
X ∈(A Ո B) = { X: X ∈A and X ∈B }
X: X ∈B and X∈A
X ∈B Ո A
X ∈(A ՈB) =>X ∈(B Ո A)
A Ո B ⊊B Ո A ………………….1
Similarly
X ∈(B Ո A)= { X : X ∈B and X∈A }
{ X : X ∈B and X∈A }
X: X ∈(A Ո B)
X ∈(B Ո A) =>X ∈(A Ո B)
B Ո A ⊊ AՈ B ………………2
From eqn 1 and 2 we get
A Ո B =B Ո A
Distributive Law
1. Union of sets distributive w.r.t intersection of sets.
A U (B Ո C) = (A U B) Ո (A U C)
2. Intersection of sets is distributive w.r.t union of sets.
A Ո(B U C) = (A Ո B) U (A Ո C)
1. A U (B Ո C) = (A U B) Ո (A U C)
Let X ∈A U (BՈ C) =>X ∈ 𝐴 𝑂𝑅 X ∈ (BՈC)
X ∈ 𝐴 𝑂𝑅 (X∈ 𝐵 𝑂𝑅 X ∈ 𝐶)
(X ∈ 𝐴 𝑂𝑅X∈ 𝐵) AND (X∈ 𝐴 𝑂𝑅 (X∈ 𝐶)
X ∈(A U B) AND X∈ (A U C)
X ∈(A U B) Ո (A U C)
A U(B U C) ⊊ (𝐴 𝑈 𝐵)Ո (A U C)……………1
Similarly
(A U B) Ո(A U C) ⊊ 𝐴 𝑈 (𝐵 Ո C)…………..2
From eqn 1 and 2 we get
A U (BՈ C) = (A U B) Ո (A U C)
2. A Ո(B U C) = (A Ո B) U (A Ո C)
Let X ∈A Ո (BU C) =>X ∈ 𝐴 𝐴𝑁𝐷 X ∈ (BU C)
X ∈ 𝐴 𝐴𝑁𝐷 (X∈ 𝐵 𝐴𝑁𝐷 X ∈ 𝐶)
(X ∈ 𝐴 𝐴𝑁𝐷X∈ 𝐵) OR (X∈ 𝐴 𝐴𝑁𝐷 (X∈ 𝐶)
X ∈(A Ո B) ORX ∈ (A Ո C)
X ∈(A Ո B) U (A Ո C)
A Ո (B Ո C) ⊊ (𝐴 Ո 𝐵)Ո (A Ո C)……………1
Similarly
A Ո (BU C) = (A Ո B) U (A Ո C)
Cartesian Product / Cross Product:-The Cartesian product of n number of sets A1,
A2.....An, denoted as A1× A2 ×..... × An, can be defined as all possible ordered pairs (x1,x2,....xn)
where x1∈ A1 , x2∈ A2 , ...... xn∈ An .
The Cartesian product of A and B is written as: 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)}
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 2n. Power set is denoted as P(S).
| P(S) | = 24 =16
1. Pi does not contain the empty set. [ Pi ≠ {∅} for all 0 < i ≤ n]
2. The union of the subsets must equal the entire original set. [P1
∪ P2 ∪ .....∪Pn = S]
Example
Let S = {a, b, c, d, e, f, g, h}
For three sets A, B and C, the principle states: |A∪B∪C | = |A| + |B| + |C| – |A∩B| –
Definition:-A binary relation R from set x to y (written as xRy or R(x,y)) is a subset of the
Cartesian product x × y. If the ordered pair of G is reversed, the relation also changes.
Generally an n-ary relation R between sets A1, ... , and An is a subset of the n-ary product
A1×...×An. The minimum cardinality of a relation R is Zero and maximum is n2 in this case.
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.
Types of Relations:
1. The Empty Relation between sets X and Y, or on E, is the empty set ∅.
2. The Full Relation between sets X and Y is the set X×Y.
3. The Identity Relation on set X is the set {(x,x) | x ∈ X}
4. The Inverse Relation R' of a relation R is defined as: R’= {(b,a) | (a,b) ∈R}
6. A relation R on set A is called Irreflexive if no a∈A is related to a (aRa does not hold).
Example: The relation R = {(a,b), (b,a)} on set X={a,b} is irreflexive
7. A relation R on set A is called Symmetric if xRy implies yRx, ∀x∈A and ∀y∈A.
Example: The relation R = {(1, 2), (2, 1), (3, 2), (2, 3)} on set A={1, 2, 3} issymmetric.
9. A relation R on set A is called Transitive if xRy and yRz implies xRz, ∀x,y,z∈ A. Example:
The relation R = {(1, 2), (2, 3), (1, 3)} on set A= {1, 2, 3} is transitive.
Example: The relation 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} is an equivalence relation since it is reflexive, symmetric, and transitive.
11. Partially Ordered Set (POSET):- A partially ordered set consists of a set with a binary
relation which is reflexive, anti-symmetric and transitive. "Partially ordered set" is
abbreviated as POSET.
Proof- For a relation R to be an equivalence relation, it must have the following properties, viz. R must
be:
• reflexive
• symmetric
• transitive
Proof Reflexive
Clearly, it is true that a = a for all values a. So = is reflexive.
Symmetric
Transitive
If a = b and b = c, this says that a is the same as b which in turn is the same as c. So a is then the same as
c, so a = c, and thus = is transitive.
FUNCTION
Definition:A function or mapping (Defined as f: X→Y) is a relationship from elements of one
set X to elements of another set Y (X and Y are non-empty sets). X is called Domain and Y is
called Codomain of function ‘f’.
Function ‘f’ is a relation on X and Y such that for each x ∈ X, there exists a unique y ∈ Y such
that (x,y) ∈ R. ‘x’ is called pre-image and ‘y’ is called image of function f.
A function can be one to one or many to one but not one to many.
f(x) = x2
then we have
#TYPES OF FUNCTIONS
Note:-
Mathematical induction
Step 1(Base step): It proves that a statement is true for the initial value.
Step 2(Inductive step): It proves that if the statement is true for thenthiteration (ornumber n),
then it is also true for (n+1)th iteration ( or number n+1).
How to Do It:-
Step 1: Consider an initial value for which the statement is true. It is to be shown thatthe
statement is true for n=initial value.
Step 2: Assume the statement is true for any value ofn=k. Then prove the statement istrue for
n=k+1. We actually break n=k+1 into two parts, one part is n=k (which is already proved) and try
to prove the other part.
MATHEMATICAL LOGIC
The rules of mathematical logic specify methods of reasoning mathematical statements. Greek
philosopher, Aristotle, was the pioneer of logical reasoning. Logical reasoning provides the
theoretical base for many areas of mathematics and consequently computer science. It has
many practical applications in computer science like design of computing machines, artificial
intelligence, definition of data structures for programming languages etc.
Propositional Logicis concerned with statements to which the truth values, “true” and“false”,
can be assigned. The purpose is to analyze these statements either individually or in a
composite manner.
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.
Connectives:
In propositional logic generally we use five connectives which are:
1. OR (V)
2. AND (Λ)
A B AVB
AND (Λ):The AND operation of two propositions A and B (written as AΛB) is true if boththe
propositional variable A and B is true.
A B AΛB
Negation (¬):The negation of a proposition A (written as ¬A) is false when A is true andis true
when A is false.
A ¬A
False
True
False True
Implication / if-then (→):An implication A→B is the proposition “if A,then B”. Itisfalse if A is
true and B is false. The rest cases are true.
A B A→B
If and only if (⇔): A⇔B is bi-conditional logical connective which is true when p and q are
same, i.e. both are false or both are true.
A B A⇔B
Tautologies:-A Tautology is a formula which is always true for every value of its propositional
variables.
Contradictions:-A Contradiction is a formula which is always false for every value of its
propositional variables.
Contingency:-A Contingency is a formula which has both some true and some false values for
every value of its propositional variables.
The truth tables of each statement have the same truth values.
1. Hypothesis , p
2. Conclusion , q
Inverse:An inverse of the conditional statement is the negation of both the hypothesisand 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→q is ¬p→¬q.
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.
UNIT-2
Recurrence Relations
In this chapter, we will discuss how recursive techniques can derive sequences and be used for
solving counting problems. The procedure for finding the terms of a sequence in a recursive
manner is called recurrence relation. We study the theory of linear recurrence relations and
their solutions. Finally, we introduce generating functions for solving recurrence relations.
Recurrence
Relations
x2 − Ax − B = 0
Case 1: If this equation factors as (x- x1)(x- x1) = 0 and it produces two distinct real rootsx1 and
x2, then Fn = ax1n+ bx2n is the solution. [Here, a and b are constants]
Case 2: If this equation factors as (x- x1)2= 0 and it produces single real root x1, thenFn = a x1n+
bn x1n is the solution.
Case 3: If the equation produces two distinct complex roots, x1 and x2 in polar form
x1 = r ∠ θ and x2 = r ∠(- θ), then Fn = rn (a cos(nθ)+ b sin(nθ)) is the solution.
Problem 1
x2−5x+6=0,x2−5x+6=0,
So, (x−3)(x−2)=0(x−3)(x−2)=0
Hence, the roots are −
Fn=axn1+bxn2Fn=ax1n+bx2n
Here, Fn=a3n+b2n (As x1=3 and x2=2)Fn=a3n+b2n (As x1=3 and x2=2)
Therefore,
1=F0=a30+b20=a+b1=F0=a30+b20=a+b
4=F1=a31+b21=3a+2b4=F1=a31+b21=3a+2b
Solving these two equations, we get a=2a=2 and b=−1b=−1
Hence, the final solution is −
Fn=2.3n+(−1).2n=2.3n−2nFn=2.3n+(−1).2n=2.3n−2n
Problem 2
x2−10x−25=0x2−10x−25=0
So (x−5)2=0(x−5)2=0
Hence, there is single real root x1=5x1=5
As there is single real valued root, this is in the form of case 2
Fn=axn1+bnxn1Fn=ax1n+bnx1n
3=F0=a.50+b.0.50=a3=F0=a.50+b.0.50=a
17=F1=a.51+b.1.51=5a+5b17=F1=a.51+b.1.51=5a+5b
Solving these two equations, we get a=3a=3 and b=2/5b=2/5
Hence, the final solution is − Fn=3.5n+(2/5).n.2nFn=3.5n+(2/5).n.2n
Problem 3
x2−2x−2=0x2−2x−2=0
Fn=(2–√)n(acos(n.⊓/4)+bsin(n.⊓/4))Fn=(2)n(acos(n.⊓/4)+bsin(n.⊓/4))
1=F0=(2–√)0(acos(0.⊓/4)+bsin(0.⊓/4))=a1=F0=(2)0(acos(0.⊓/4)+bsin(0.⊓/4))=a
3=F1=(2–√)1(acos(1.⊓/4)+bsin(1.⊓/4))=2–√(a/2–√+b/2–
√)3=F1=(2)1(acos(1.⊓/4)+bsin(1.⊓/4))=2(a/2+b/2)
Solving these two equations we get a=1a=1 and b=2b=2
Hence, the final solution is −
Fn=(2–√)n(cos(n.π/4)+2sin(n.π/4))Fn=(2)n(cos(n.π/4)+2sin(n.π/4))
First part is the solution (ah) of the associated homogeneous recurrence relation and the
second part is the particular solution (at).
an= ah + at
Solution to the first part is done using the procedures discussed in the previous section.
Let f(n) = cxn ; let x2= Ax + B be the characteristic equation of the associated homogeneous
recurrence relation and let x1 and x2 be its roots.
Let a non-homogeneous recurrence relation be Fn= AFn–1+ BFn-2+ f(n) with characteristic roots
x1 = 2 and x2 = 5. Trial solutions for different possible values of f(n) are as follows:
4 A
5.2n An2n
8.5n An5n
4n A4n
2n2 + 3n + 1 An2 + Bn + C
Problem 1
What are the generating functions for the sequences {ak}{ak} with ak=2ak=2 and ak=3kak=3k?
Solution
For solving a variety of counting problems. For example, the number of ways to make
change for a Rs. 100 note with the notes of denominations Rs.1, Rs.2, Rs.5, Rs.10, Rs.20
and Rs.50
Binary Operator:
A binary operator defined on a set of elements is a rule that assigns to each pair of elements a
unique element from that set. For example, given the set A={1,2,3,4,5}, we can say ⊗ is a
binary operator for the operation = ⊗ , if it specifies a rule for finding c for the pair of (a,b),
such that a,b,c∈ A.
Closure :-A set is closed with respect to a binary operator if for every pair of elements in the
set; the operator finds a unique element from that set.
Associative Laws:-A binary operator ⊗ on a set A is associative when it holds the following
property:
Distributive Laws:-Two binary operators ⊗ and ⊛ on a set A, are distributive over operator
⊛ when the following property holds:
Inverse:-If a set A has an identity element with respect to a binary operator ⊗, it is said to
have an inverse whenever for every element x ∈ A, there exists another element y ∈ A, such
that the following property holds:
x⊗y= e
De Morgan’s Law:-De Morgan’s Laws gives a pair of transformations between union and
intersection of two (or more) sets in terms of their complements. The laws are
Semigroup:-A finite or infinite set ‘S’ with a binary operation ‘0’ (Composition) is called
semigroup if it holds following two conditions simultaneously:
Closure: For every pair (a, b)∈S, (a 0 b) has to be present in the set S.
Associative: For every element a, b, c∈S, (a 0 b) 0 c = a 0 (b 0 c) must hold.
Monoid:-A monoid is a semigroup with an identity element. The identity element (denoted by
e or E) of a set S is an element such that (a 0 e) = a, for every element a∈S. An identityelement
is also called a unit element. So, a monoid holds three properties simultaneously: Closure,
Associative, Identity element.
Group:-A group is a monoid with an inverse element. The inverse element (denoted by I) of a
set S is an element such that (a 0 I) = (I 0 a) =a, for each element a ∈ S. So, a group holds four
properties simultaneously - i) Closure, ii) Associative, iii) Identity element, iv) Inverse element.
The order of a group G is the number of elements in G and the order of anelement in a group is
the least positive integer n such that an is the identity element of that group G.
Abelian Group:-An abelian group G is a group for which the element pair (a,b) ∈ G always
holds commutative law. So, a group holds five properties simultaneously - i) Closure, ii)
Associative, iii) Identity element, iv) Inverse element, v) Commutative.
Cyclic Group and Subgroup:-A cyclic group is a group that can be generated by a single
element. Every element of a cyclic group is a power of some specific element which is called a
generator. A cyclic group can be generated by a generator ‘g’, such that every other element of
the group can be written as a power of the generator ‘g’.
Note: A cyclic group is always an abelian group but not every abelian group is a cyclicgroup.
The rational numbers under addition is not cyclic but is abelian.
A subgroup H of a group G that does not include the whole group G is called a propersubgroup
(Denoted by H<G). A subgroup of a cyclic group is cyclic and aabelian subgroup is also abelian.
Rings:-A ring is a set equipped with two operations (usually referred to as addition and
multiplication) that satisfy certain properties: there are additive and multiplicative identities
and additive inverses, addition is commutative, and the operations are associative and
distributive.
Subring:-A subset S ⊆ R of a ring R is called a subring of R if it is itself a ring with the same operations
(and the same unity) as R.
Integral domains and fields :-(Zero divisor, integral domain, division ring, field).Suppose R
is a ring.
(i) A nonzero element r ∈ R is said to be a zero divisor if there exists a nonzero s ∈ R such that
rs = 0 or sr = 0.
(ii) A ring is said to be a domain if it has no zero divisors.
(iii) A commutative domain is called an integral domain.
(iv) If every nonzero element in a (not necessarily commutative) ring is a unit, then R is called a
division ring (or skew field).
(v) A commutative division ring is called a field.
Theorems:-
1. Let G be a group. Then, •
(i) ∀a ∈ G, aG = G = Ga, where Ga = {ga : g ∈ G} and aG = {ag : g ∈ G}.
(ii) If a, x, y ∈ G, then ax = ay =⇒ x = y.
(iii) If a, x, y ∈ G, then xa = ya =⇒ x = y.
2. G is a group. Then:
(i)G has only one identity element.
(ii)Each g ∈ G has only one inverse g −1 .
4. If H and K are two subgroup of a group G. Then show that H⋂K is the subgroup of G but H⋃K may
not be subgroup of G.
5. If H and K are two subgroups of G, neither of which contains the other. Then show that there exist an
element of G belonging neither to H and K.
6. Let H be a subgroup of the group G and let a, b ∈ G. Then Ha = Hb if and only if ab−1 ∈ H.
12. The subgroup N of G is a normal subgroup of G if and only if g −1Ng ⊆ N for all g ∈ G
13. If N is a normal subgroup of G, then the cosets of N form a group. If G is finite, this group has order
|G : N|.
14. If G is a finite abelian group whose order is divisible by a prime p, then G contains an element of
order p.
COUNTING
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, …, Tmcan be done in w1, w2,…wmways
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 +… +wm. If we consider two tasks A
and B which are disjoint (i.e. A ∩ B = Ø), then mathematically |A ∪ B| = |A| + |B|
The Rule of Product: If a sequence of tasks T1, T2, …, Tmcan be done in w1, w2,…wm
ways respectively and every task arrives after the occurrence of the previous task, then
there are w1 × w2 ×...× wm ways to perform the tasks. Mathematically, if a task B
arrives after a task A, then |A×B| = |A|×|B|
Number of Permutations:- The number of permutations of ‘n’ different things taken ‘r’ at a
time is denoted by nPrn !
=
(n − r)!
So, the total no. of ways to fill up from first place up to r-th-place:
Hence,
nPr = n!/(n-r)!
ar) = n.
Pigeonhole Principle states that if there are fewer pigeon holes than total number ofpigeons
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.
GRAPH THEORY
A graph is a set of points, called nodes or vertices, which are interconnected by a set of lines
called edges. The study of graphs, or graph theory is an important part of a number of
disciplines in the fields of mathematics, engineering and computer science.
Definition:A graph (denoted as G = (V, E)) consists of a non-empty set of vertices ornodes V
and a set of edges E.
A 2 even
B 2 even
C 3 odd
D 1 odd
Even and Odd Vertex:If the degree of a vertex is even, the vertex is called an evenvertex
and if the degree of a vertex is odd, the vertex is called an odd vertex.
Degree of a Graph: Thedegree of a graph is the largest vertex degree of that graph. Forthe
above graph the degree of the graph is 3.
The Handshaking Lemma:In a graph, the sum of all the degrees of all the vertices isequal to
twice the number of edges.
Null Graph:- A null graph has no edges. The null graph of n vertices is denoted by Nn
Simple Graph:- A graph is called simple graph/strict graph if the graph is undirected and does
not contain any loops or multiple edges.
Simple graph
Multi-Graph:- If in a graph multiple edges between the same set of vertices are allowed, it is
called Multi-graph. In other words, it is a graph having at least one loop or multiple edges.
a c
b
Multi-graph
Directed and Undirected Graph:- A graph G = (V, E) is called a directed graph if the edge
set is made of ordered vertex pair and a graph is called undirected if the edge set is made of
unordered vertex pair.
a c
Undirected graph
Directed graph
Connected and Disconnected Graph:- A graph is connected if any two vertices of the
graph are connected by a path; while a graph is disconnected if at least two vertices of the
graph are not connected by a path. If a graph G is disconnected, then every maximal connected
subgraph of G is called a connected component of the graph G.
a c
Connected Graph
b d dc
d
a c
b d
Unconnected graph
Regular Graph:- A graph is regular if all the vertices of the graph have the same degree. In a
regular graph G of degree r, the degree of each vertex of G is r.
a b
Complete Graph:- A graph is called complete graph if every two vertices pair are joined by
exactly one edge. The complete graph with n vertices is denoted by Kn
a c
Complete graph K3
Cycle Graph:-If a graph consists of a single cycle, it is called cycle graph. The cycle graph with
n vertices is denoted by Cn.
a c
b Cyclic graph C3
Bipartite Graph:- If the vertex-set of a graph G can be split into two disjoint sets, 1 and 2, in
such a way that each edge in the graph joins a vertex in 1 to a vertex in 2, and there are no
edges in G that connect two vertices in 1 or two vertices in 2, then the graph G is called a
bipartite graph.
a c
b d
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 , where the graph G contains x vertices in the first set and y vertices in the
second set.
a c
b d
Adjacency Matrix:- An Adjacency Matrix A[V][V] is a 2D array of size V×V where V is the
number of vertices in a undirected graph. If there is an edge between Vx to Vy then the value of
A[Vx][ Vy]=1 and A[Vy][ Vx]=1, otherwise the value will be zero. And for a directed graph, if
there is an edge between Vx to Vy, then the value of A[Vx][ Vy]=1, otherwise the value will be
zero.
An undirected graph
a b c D
a 0 1 1 0
b 1 0 1 0
c 1 1 0 1
d 0 0 1 0
Adjacency matrix of the above undirected graph will be:
Adjacency Matrix of a Directed Graph:- Let us consider the following directed graph and
construct its adjacency matrix:
a c
b d
A directed graph
A b C D
a 0 1 1 0
b 0 0 1 0
c 0 0 0 1
d 0 0 0 0
Adjacency List:- In adjacency list, an array (A[V]) of linked lists is used to represent the graph
G with V number of vertices. An entry A[Vx] represents the linked list of vertices adjacent to the
Vx-th vertex.
Planar graph:A graph G is called a planar graph if it can be drawn in a plane without anyedges
crossed. If we draw graph in the plane without edge crossing, it is called embedding the graph
in the plane.
a c
b d
Planar graph
Isomorphism:- If two graphs G and H contain the same number of vertices connected in the
same way, they are called isomorphic graphs (denoted by G≅H).
Example
Properties of Homomorphisms:
A homomorphism is an isomorphism if it is a bijective mapping.
Homomorphism always preserves edges and connectedness of a graph.
The compositions of homomorphisms are also homomorphisms.
To find out if there exists any homomorphic graph of another graph is a NP-complete
problem.
Euler Graphs:- A connected graph G is called an Euler graph, if there is a closed trail which
includes every edge of the graph G. An Euler path is a path that uses every edge of a graph
exactly once. An Euler path starts and ends at different vertices.
An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler circuit always
starts and ends at the same vertex. A connected graph G is an Euler graph if and only if all
vertices of G are of even degree, and a connected graph G is Eulerian if and only if its edge set
can be decomposed into cycles.
The above graph is an Euler graph as “a 1 b 2 c 3 d 4 e 5 c 6 f 7 g” covers all the edges of the
graph.
Non-Euler graph
If G is a simple graph with n vertices, where n ≥ 3 If deg(v) ≥ n/2 for each vertex v, then the
graph G is Hamiltonian graph. This is called Dirac's Theorem.
If G is a simple graph with n vertices, where n ≥ 2 if deg(x) + deg(y) ≥ n for each pair of non-
adjacent vertices x and y, then the graph G is Hamiltonian graph. This is called Ore'stheorem.
Graph Coloring:- Graph coloring is the procedure of assignment of colors to each vertex of a
graph G such that no adjacent vertices get same color. The objective is to minimize the number
of colors while coloring a graph. The smallest number of colors required to color a graph G is
called its chromatic number of that graph. Graph coloring problem is a NP Complete problem.
Step 2. Choose the first vertex and color it with the first color.
Step 3. Choose the next vertex and color it with the lowest numbered color that has notbeen
colored on any vertices adjacent to it. If all the adjacent vertices are colored with this
color, assign a new color to it. Repeat this step until all the vertices are colored.
Example
a b
d e
Graph coloring
In the above figure, at first vertex a is colored red. As the adjacent vertices of vertex a are again
adjacent, vertex b and vertex d are colored with different color, green and blue respectively.
Then vertex c is colored as red as no adjacent vertex of c is colored red. Hence, we could color
the graph by 3 colors. Hence, the chromatic number of the graph is 3.
Map Coloring
Centers and Bi-Centers of a Tree:- The center of a tree is a vertex with minimal
eccentricity. The eccentricity of a vertex X in a tree G is the maximum distance between the
vertex X and any other vertex of the tree. The maximum eccentricity is the tree diameter. If a
tree has only one center, it is called Central Tree and if a tree has only more than one centers, it
is called Bi-central Tree. Every tree is either central or bi-central.
Labeled Trees:- A labeled tree is a tree the vertices of which are assigned unique
numbersfrom 1 to n. We can count such trees for small values of n by hand so as to conjecture
a general formula. The number of labeled trees of n number of vertices is n n-2. Two labeled
trees are isomorphic if their graphs are isomorphic and the corresponding points of the two
trees have the same labels.
Unlabeled trees:-An unlabeled tree is a tree the vertices of which are not assigned any
numbers.
Rooted Tree:- A rooted tree G is a connected acyclic graph with a special node that is called
the root of the tree and every edge directly or indirectly originates from the root. An ordered
rooted tree is a rooted tree where the children of each internal vertex are ordered. If every
internal vertex of a rooted tree has not more than m children, it is called an m-ary tree. If every
internal vertex of a rooted tree has exactly m children, it is called a full m-ary tree. If m = 2, the
rooted tree is called a binary tree.
Spanning Tree:- A spanning tree of a connected undirected graph G is a tree that minimally
includes all of the vertices of G. A graph may have many spanning trees.
A Graph G
Algorithm:-
Step 1: Arrange all the edges of the given graph G (V,E) in non-decreasing order as pertheir
edge weight.
Step 2: Choose the smallest weighted edge from the graph and check if it forms a cyclewith the
spanning tree formed so far.
Step 3: If there is no cycle, include this edge to the spanning tree else discard it.
Step 4: Repeat Step 2 and Step 3 until (V-1) number of edges are left in the spanningtree.
Algorithm:-
1. Initialize the minimal spanning tree with a single vertex, randomly chosen from the
graph.
2. Repeat steps 3 and 4 until all the vertices are included in the tree.
3. Select an edge that connects the tree with a vertex not yet in the tree, so that the
weight of the edge is minimal and inclusion of the edge does not form a cycle.
4. Add the selected edge and the vertex that it connects to the tree.
Difference between general tree and binary tree