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

Discrete_Structure_Notes

The document outlines the syllabus and key concepts of Discrete Structure, covering topics such as basic set theory, relations, functions, and operations on sets. It includes definitions, examples, and properties of sets, including unions, intersections, and complements, as well as the concepts of relations and equivalence relations. The notes are prepared by Prof. (Dr.) Mahtab Alam from Mewar International University for the session 2023-24.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Discrete_Structure_Notes

The document outlines the syllabus and key concepts of Discrete Structure, covering topics such as basic set theory, relations, functions, and operations on sets. It includes definitions, examples, and properties of sets, including unions, intersections, and complements, as well as the concepts of relations and equivalence relations. The notes are prepared by Prof. (Dr.) Mahtab Alam from Mewar International University for the session 2023-24.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Discrete Structure SEN 207

Discrete Structure
Syllabus of Discrete Structure

Basic Set Theory: Basic definitions, Relations, Equivalence Relations Partition, Ordered Sets. Boolean
Algebra & Lattices, Logic, Graph theory: Directed and Undirected graphs, Graph Isomorphism, Basic
Graph Theorems, Matrices; Integer and Real matrices, Boolean Matrices, Matrices med m, Path
matrices. Adjacency Vectors/Matrices: Path adjacency matrix, Numerical & Boolean Adjacency
matrices. Applications to counting, Discrete Probability Generating Functions,

Notes prepared by
Prof. (Dr.) Mahtab Alam
Mewar International University
Session 2023-24

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Basic Set Theory

A “well-defined collection” of distinct objects can be considered to be a set. Thus, the


principal property of a set is that of “membership” or “belonging”. Well-defined, in this
context, would enable us to determine whether a particular object is a member of a set or not.

A set is typically expressed by curly braces, { } enclosing its elements. If A is a set and a is an
element of it, we write a ∈ A.

Example

Let X = {apple,tomato, orange}. Here, orange ∈ X,

Example

Consider the list of digits 1, 2, 1, 4, 2. Is it a set?

Let X = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Then X is the set of first 10 natural numbers. Or


equivalently, X is the set of integers between 0 and 11.

Definition.

 The set S that contains no element is called the empty set or the null set and is denoted
by { } or ∅.
 A set that has only one element is called a singleton set.

One has three main ways for specifying a set. They are: 1. Listing all its elements (list
notation), e.g., X = {2, 4, 6, 8, 10}. Then X is the set of even integers between 0 and 12.

Stating a property with notation (predicate notation), e.g.,

(a) X = {x : x is a prime number}. This is read as “X is the set of all x such that x is a prime
number”. Here, x is a variable and stands for any object that meets the criteria after the
colon.

(b) The set X = {2, 4, 6, 8, 10} in the predicate notation can be written as

i. X = {x : 0 < x ≤ 10, x is an even integer },

or

ii. X = {x : 1 < x < 11, x is an even integer }, or iii. x = {x : 2 ≤ x ≤ 10, x is an even integer
} etc

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Definition

Let X and Y be two sets.

1. Suppose X is the set such that whenever x ∈ X, then x ∈ Y as well. Here, X is said to be a
subset of the set Y , and is de ed by X ⊆ Y . When there exists x ∈ X such that x not ∈ Y ,
then we say that X is not a subset of Y ; and we write X not ⊆ Y .

2. If X ⊆ Y and Y ⊆ X, then X and Y are said to be equal, and is denoted by X = Y

3. If X ⊆ Y and X Not= Y , then X is called a proper subset of Y . Thus, X is a proper subset


of Y if and only if X ⊆ Y and X Y.

Example

For any set X, we see that X ⊆ X. Thus, ∅ ⊆ ∅. Also, ∅ ⊆ X. Hence, the empty set is a subset
of every set. It thus follows that there is only one empty set.

Power Sets: The power of any given set A is the set of all subsets of A and is denoted by P
(A). If A has n elements, then P (A) has 2n elements.
Example: A = {1, 2, 3}
P (A) = {∅, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}.
Operations on Sets
The basic set operations are:
1. Union of Sets: Union of Sets A and B is defined to be the set of all those elements which
belong to A or B or both and is denoted by A∪B.
A∪B = {x: x ∈ A or x ∈ B}
Example: Let A = {1, 2, 3}, B= {3, 4, 5, 6}
A∪B = {1, 2, 3, 4, 5, 6}.

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

2. Intersection of Sets: Intersection of two sets A and B is the set of all those elements which
belong to both A and B and is denoted by A ∩ B.

A ∩ B = {x: x ∈ A and x ∈ B}

Example: Let A = {11, 12, 13}, B = {13, 14, 15}

A ∩ B = {13}.

3. Difference of Sets: The difference of two sets A and B is a set of all those elements which
belongs to A but do not belong to B and is denoted by A - B.

A - B = {x: x ∈ A and x ∉ B}

Example: Let A = {1, 2, 3, 4} and B = {3, 4, 5, 6} then A - B = {3, 4} and B - A = {5, 6}

4. Complement of a Set: The Complement of a Set A is a set of all those elements of the
universal set which do not belong to A and is denoted by Ac.

Ac = U - A = {x: x ∈ U and x ∉ A} = {x: x ∉ A}

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Example: Let U is the set of all natural numbers.

A = {1, 2, 3}
Ac = {all natural numbers except 1, 2, and 3}.

Algebra of Sets
Sets under the operations of union, intersection, and complement satisfy various laws
(identities) which are listed in Table

Table: Law of Algebra of Sets

dempotent Laws (a) A ∪ A = A (b) A ∩ A = A

Associative Laws (a) (A ∪ B) ∪ C = A ∪ (B ∪ C) (b) (A ∩ B) ∩ C = A ∩ (B ∩


C)

Commutative Laws (a) A ∪ B = B ∪ A (b) A ∩ B = B ∩ A

Distributive Laws (a) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) (b) A ∩ (B ∪ C) =(A ∩ B) ∪


(A ∩ C)

De Morgan's Laws (a) (A ∪B)c=Ac∩ Bc (b) (A ∩B)c=Ac∪ Bc

Identity Laws (a) A ∪ ∅ = A (c) A ∩ U =A


(b) A ∪ U = U (d) A ∩ ∅ = ∅

Complement Laws (a) A ∪ Ac = U (c) Uc = ∅


(b) A ∩ Ac= ∅ (d) ∅c = U

Involution Law (a) (Ac)c = A

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Relations
Definition Let X and Y be two sets. Then their Cartesian product, denoted by X × Y , is
defined as X × Y = {(a, b) : a ∈ X, b ∈ Y }. The elements of X × Y are also called ordered
pairs with the elements of X as the first entry and elements of Y as the second entry. Thus, (a1,
b1) = (a2, b2) if and only if a1 = a2 and b1 = b2.

Example

Let X = {a, b, c} and Y = {1, 2, 3, 4}. Then X × X = {(a, a),(a, b),(a, c),(b, a),(b, b),(b, c),(c,
a),(c, b),(c, c)}.

The Euclidean plane, denoted by R 2 = R × R = {(x, y) : x, y ∈ R}. 3. By convention, ∅ × Y =


X × ∅ = ∅. In fact, X × Y = ∅ if and only if X = ∅ or Y = ∅

Definition

Let X and Y be two nonempty sets and let R be a relation from X to Y . Then, the inverse
relation, denoted by R−1 , is a relation from Y to X, defined by R−1 = {(y, x) ∈ Y × X : (x, y)
∈ R}. So, for all x ∈ X and y ∈ Y (x, y) ∈ R if and only if (y, x) ∈ R −1

Example

1. If R = {(1, a),(1, b),(2, c)} then R−1 = {(a, 1),(b, 1),(c, 2)}.
2. 2. Let R = {(a, b),(b, c),(a, c)} be a relation on A = {a, b, c} then R−1 = {(b, a),(c, b),(c,
a)} is also a relation on A.

Let R be a relation from X to Y . Consider an element x ∈ X. It is natural to ask if there


exists y ∈ Y such that (x, y) ∈ R. This gives rise to the following three possibilities:

1. (x, y) ∉ R for all y ∈ Y .

2. There is a unique y ∈ Y such that (x, y) ∈ R.

3. There exists at least two elements y1, y2 ∈ Y such that (x, y1),(x, y2) ∈ R. One can ask
similar questions for an element y ∈ Y . To accommodate all these, we introduce a notation
in the following definition.

Definition 3. Let R be a nonempty relation from X to Y . Then,

1. The set dom R:= {x : (x, y) ∈ R} is called the domain of R1 , and

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

2. The set rng R:= {y ∈ Y : (x, y) ∈ R} is called the range of R.

Notation.

Let R be a nonempty relation from X to Y . Then,

1. For any set Z, one writes R(Z) := {y : (z, y) ∈ R for some z ∈ Z}.

2. for any set W, one writes R−1 (W) := {x ∈ X : (x, w) ∈ R for some w ∈ W}.

Example

Let a, b, c, and d be distinct symbols and let R = {1, a),(1, b),(2, c)}. Then,

1. dom R = {1, 2}, rng R = {a, b, c},

2. R({1}) = {a, b}, R({2}) = {c}, R({1, 2}) = {a, b, c}, R({1, 2, 3}) = {a, b, c}, R({4}) = ∅. 3.
dom R−1 = {a, b, c}, rng R−1 = {1, 2}, 4. R−1 ({a}) = {1}, R−1 ({a, b}) = {1}, R−1 ({b, c}) =
{1, 2}, R−1 ({a, d}) = {1}, R−1 ({d}) = ∅.

Functions
Definition Let X and Y be nonempty sets and let f be a relation from X to Y

1. f is called a partial function from X to Y , denoted by f : X * Y , if for each x ∈ X, f({x}) is


either a singleton or ∅.

2. For an element x ∈ X, if f({x}) = {y}, a singleton, we write f(x) = y. Hence, y is referred to


as the image of x under f; and x is referred to as the pre-image of y under f. f(x) is said to be
undefined at x ∈ X if f({x}) = ∅.

3. If f is a partial function from X to Y such that for each x ∈ X, f({x}) is a singleton then f is
called a function and is denoted by f : X → Y . Observe that for any partial function f : X * Y ,
the condition (a, b),(a, b0 ) ∈ f implies b = b 0 . Thus, if f : X * Y , then for each x ∈ X, either
f(x) is undefined, or there exists a unique y ∈ Y such that f(x) = y. Moreover, if f : X → Y is a
function, then f(x) exists for each x ∈ X, i.e., there exists a unique y ∈ Y such that f(x) = y. It
thus follows that a partial function f : X * Y is a function if and only if dom f = X, i.e., domain
set of f is X.

Example

Let A = {a, b, c, d}, B = {1, 2, 3, 4} and X = {3, 4, b, c}.

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

1. Consider the relation R1 = {(a, 1),(b, 1),(c, 2)} from A to B. The following are true.

(a) R1 is a partial function.

(b) R1(a) = 1, R1(b) = 1,

(c) R1(a)= 2. Also, R1({d}) = ∅; thus R1(d) is undefined.

Equivalence Relation

Let A be a nonempty set. Then, a relation R on A is said to be

1. Reflexive if for each a ∈ A, (a, a) ∈ R.

2. Symmetric if for each pair of elements a, b ∈ A, (a, b) ∈ R implies (b, a) ∈ R.

3. Transitive if for each triple of elements a, b, c ∈ A, (a, b),(b, c) ∈ R imply (a, c) ∈

Partial Orders

A relation can also be used to define an order on a set. For example, the words in a dictionary
are arranged according to a lexicographic ordering. So, ordering the objects according to a
particular rule brings a certain structure to the area of study. In the set of natural numbers, the
relation “less than or equal to” enables us to conclude whether a number precedes or succeeds
another number. Similarly, the relation ⊆ also brings an ordering to the set of sets. In this
section, we study the concept of “order”. The reader is already aware of what reflexive,
symmetric and transitive relations are. We now introduce a fourth relation called an
“antisymmetric” relation.

Definition :

The relation f defined on a nonempty set X is called an anti-symmetric relation if and only if,
∀ x, y ∈ X, the property (x, y) ∈ f and (y, x) ∈ f implies that x = y. It is possible to interpret an
anti-symmetric relation using the arrow diagrams of relations. In this context, a relation is
called anti-symmetric if, whenever there is an arrow going from one element to an element
different from it, there does not exist an arrow going back from the second element to the first.

Example 1 is an anti-symmetric relation. Let R1 = {(x, y) ∈ Z + × Z + | x divides y} and R2 =


{(x, y) ∈ Z \ {0} × Z | x divides y}.

(a) Show that R1 is an anti-symmetric relation on the set of positive integers.

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

(b) Show that R2 is not an anti-symmetric relation on the set of integers by giving a counter
example. There are two relations which play a prominent role in mathematics. One of them is
the equivalence relation, which we have already seen is a relation which is reflexive,
symmetric and transitive. We now introduce the other relation called a partial order.

Definition A relation f on a nonempty set X is called a partial order if f is reflexive, transitive


and anti-symmetric. Here (X, f) is a partially ordered set and is colloquially referred to as a
poset.

Definition The Hasse diagram of a finite poset (X, ≤) is a picture drawn in the following way:

1. Each element of X is represented by a point and is labeled with the element.

2. If a ≤ b then the point labeled a must appear at a lower height than the point labeled b and
further the two points are joined by a line.

3. If a ≤ b and b ≤ c then the line between a and c is removed. We will see later that for each
finite poset a Hasse diagram exists; see Discussion 8.1.23. Example 8.1.16. Hasse diagram for
the poset (A, ≤) with A = {1, 2, 3, 9, 18} and ≤ as the „divides‟

Exercise 1: . Draw the Hasse diagram for

1. {1, 2, 3} × {1, 2, 3, 4} under lexicographic order.

2. {1, 2, 3, 6, 9, 18} (all positive divisors of 18) with the relation as „divides‟.

3. {2, 3, 4, 5, 6, 7, 8} with the „divides‟ relation

Definition :

Let (X, ≤) be a poset and let A ⊆ X.

1. We say that an element x ∈ X is an upper bound of A if for each z ∈ A, z ≤ x; or


equivalently, when each element of A is less than or equal to x. An element y ∈ X is called a
lower bound of A if for each z ∈ A, y ≤ z; or equivalently, when y is less than or equal to each
element of A.

2. An element x ∈ A is called the maximum of A, if x is an upper bound of A. Thus, maximum


of A is an upper bound of A which is contained in A. Such an element is unique provided it
exists. In this case, we denote x = max{z : z ∈ A}. Similarly, minimum of A is an element y ∈

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

A which is a lower bound of A. If minimum of A exists, then it is unique; and we write y =


min{z : z ∈ A}

3. An element x ∈ X is called the least upper bound (lub) of A in X if x is an upper bound of A


and for each upper bound y of A, we have x ≤ y; i.e., when x is the minimum (least) element of
the set of all upper bounds of A. Similarly, the greatest lower bound (glb) of A is a lower
bound of A which is greater than or equal to all upper bounds of A; it is the maximum (largest)
of the set of all lower bounds of A. 4. An element x ∈ A is a maximal element of A if x ≤ z for
some z ∈ A implies x = z; or equivalently, when no element in A is larger than x. An element
y ∈ A is called a minimal element of A if z ≤ y for some z ∈ A implies y = z; or equivalently,
when no element in A is less than y.

Lattices
In a poset, it is not necessary that two elements x, y should have a common upper bound. For
instance, consider the poset {1, 2, . . . , 6} with “a ≤ b if and only if a divides b”. The elements
5 and 3 have no common upper bound. Similarly, in a poset, if a pair {x, y} has at least one
upper bound, it is not necessary that the set {x, y} has an lub. For example, look at the poset
described by the third Hasse diagram in Figure 8.2. The set {a, b} has c and d as upper bounds,
but there is no lub of {a, b}

Definition.

1. A poset (L, ≤) is called a lattice if each pair x, y ∈ L has an lub and also a glb. An lub of x, y
is also written as x ∨ y (read as „x or y‟ / „join of x and y‟) and a glb of x, y as x ∧ y (read as „x
and y‟ / „meet of x and y‟).

2. A lattice is called a distributive lattice if for all pairs of elements x, y the following
conditions, called distributive laws, are satisfied : x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z), x ∧ (y ∨ z) =
(x ∧ y) ∨ (x ∧ z).

Example 1.

Consider the poset L = {0, 1}, where 0 < 1. So, L is a linearly ordered set. In this case, a ∨ b =
max{a, b} and a ∧ b = min{a, b}. Hence, L is a distributive lattice.

Boolean Algebras
In a distributive complemented lattice the binary operations ∨, ∧, and the unary operation ¬
satisfy certain properties. Taking cue from these properties, we define an algebraic structure

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

and later show that the algebraic structure is capable of capturing the seemingly more general
notion of a distributive complemented lattice.

Definition:. A Boolean algebra is a nonempty set S which is closed under the binary
operations ∨ (called join), ∧ (called meet), and the unary operation ¬ (called inverse or
complement) satisfying the following properties for all x, y, z ∈ S:

1. [Commutativity] : x ∨ y = y ∨ x and x ∧ y = y ∧ x.

2. [Distributivity] : x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z) and x ∧ (y ∨ z) = (x ∧ y) ∨ (x ∧ z).

3. [Identity elements] : There exist elements 0, 1 ∈ S such that x ∨ 0 = x and x ∧ 1 = x.

4. [Inverse] : x ∨ ¬x = 1 and x ∧ ¬x = 0.

Groups

Before coming to the definition and its properties, let us look at the properties of the sets N, Z,
Q, R and C. We know that the set S, which may be Z, Q, R or C, satisfies the following:
Binary operation: For all a, b ∈ S, a + b, called the addition of a and b, is an element of S.
Addition is associative: For all a, b, c ∈ S, (a + b) + c = a + (b + c). Additive identity: S
contains an element, called zero, denoted 0, so that for each a ∈ S, a + 0 = a = 0 + a. Additive
inverse: For every element a ∈ S, there exists an element −a ∈ S such that a + (−a) = 0 = −a +
a. Addition is commutative: For all a, b ∈ S, a + b = b + a. Write S ∗ = S \ {0}.
Correspondingly, we write Z ∗ = Z \ {0}, Q∗ = Q \ {0}, R ∗ = R \ {0} and C ∗ = C \ {0}. As in
the previous case, we see that similar statements hold true for S ∗ with respect to the
multiplication operation, with one exception. They are as follows: Binary operation: For all a,
b ∈ S ∗ , a · b, called the multiplication of a and b, is an element of S ∗ .

Multiplication is associative: For all a, b, c ∈ S ∗ , (a · b) · c = a · (b · c). Multiplicative


identity: S ∗ contains an element, called a unit element, or one, denoted 1, is such that for each
a ∈ S ∗ , a · 1 = a = 1 · a. Multiplication is commutative: For all a, b ∈ S ∗ , a · b = b · a.
Observe that if we choose a ∈ Z ∗ with a 6= 1, −1, then there does not exist an element b ∈ Z ∗
such that a · b = 1 = b · a. Whereas, for the sets Q∗ , R ∗ and C ∗ one can always find a b such
that a · b = 1 = b · a. Based on the above examples, an abstract notion called a group is
defined. Formally, one defines a group as follows.

Definition Let G be a nonempty set and let ∗ be a binary operation on G. The pair (G, ∗) is
called a group if the following are satisfied:

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

1. For all a, b, c ∈ G, (a ∗ b) ∗ c = a ∗ (b ∗ c). (Associativity Property holds in G.)

2. There exists e ∈ G such that for each a ∈ G, a ∗ e = a = e ∗ a. (Existence of Identity in G.) 3.


For each a ∈ G, there exists b ∈ G such that a ∗ b = e = b ∗ a. (Existence of Inverse in G. ) In
addition, if the statement “For all a, b ∈ G a ∗ b = b ∗ a” is true, then the group (G, ∗) is called
an an abelian (commutative) group.

Example : Show that Cube roots of unity is an abelian group under multiplication
2
Soln: The Cube roots of unity are 1, and
2 2 3
And we know 1 X 1 = 1, 1 X = , X = and X = =1

X 1
_____________________________

2
1 1
2
1
2 2
1

The above results show that the outputs are equal under Commutative law hence it is an
abelian group.

Sub Group

Let (G, ∗) be a group. A nonempty subset H of G is said to be a subgroup of G, if (H, ∗) is a


group. Note that the binary operation ∗ on H is the restriction of ∗ on G to the subset H. We
informally say that the binary operation on H is same as that in G, and use the notation ∗ for
the restriction of ∗ to H. Thus, H is a subgroup of G if and only if H ⊆ G, H not= ∅ and H
forms a group with the same binary operation of the group G.

1) De Morgan's law of union

= (A ∪B)' = A' ∩ B'

2) De Morgan's law of intersection

= (A ∩B)' = A' ∪ B'

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Question

If U = {2, 3, 4, 5, 6, 7, 8, 9}, A = {5,6,7} and B = {6,7,9}. Show that

(A ∪ B)' = A' ∩ B'.

Solution:

We know that,

U = {2, 3, 4, 5, 6, 7, 8, 9}

A = {5, 6, 7}

B = {6, 7, 9}

A ∪ B = {5, 6, 7} ∪ {6, 7, 9}

= {5, 6, 7, 9}

Therefore, (A ∪ B)' = {2, 3, 4, 8} ……………… (i)

Now, A = {5, 6, 7} so, A' = {2, 3, 4, 8, 9}

And, B = {6, 7, 9} so, B' = {2, 3, 4, 5, 8}A' ∩ B' = {2, 3, 4, 8, 9} ∩ {2, 3, 4, 5, 8}

Therefore, A' ∩ B' = {2, 3, 4, 8 } ……………… (ii)

Combining equation (i) and (ii) we get;

(A ∪ B)' = A' ∩ B'

Graph
Definition. Let G = (V, E) be a graph. Then the following definitions and notations are in
order. 1. we sometimes use V (G) in place of V for the vertex set and E(G) in place of E for
the edge set. 2. The number |V (G)| is called the order of the graph G, and is denoted by |G|.
By kGk, we denote the number of edges of G. A graph with n vertices and m edges is called an
(n, m) graph. 3. An edge {u, v} is sometimes denoted uv. An edge uu is called a loop. The
vertices u and v are called the end vertices of the edge uv. Let e be an edge. We say „e is
incident on u‟ to mean that „u is an end vertex of e‟. 4. If uv is an edge in G, then we say that

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

the vertices u and v are adjacent in G, and also that u is a neighbor of v. We write u ∼ v to
denote that u is adjacent to v. 5. If v ∈ V (G), by N(v) or NG(v), we denote the set of
neighbors of v in G and |N(v)| is called the degree of v. It is usually denoted by dG(v) or d(v).
A vertex of degree 0 is called isolated. A vertex of degree one is called a pendant vertex. 6.
Two edges e1 and e2 are called adjacent if they have a common end vertex. 7. A graph is said
to be non-trivial if it has at least one edge; else it is called a trivial graph. 8. A multigraph is a
pseudograph without loops. A multigraph is a simple graph if no edge appears twice. 9. In this
book, we consider only simple graphs with finite vertex sets. Thus, by a graph, we will mean a
simple graph with a finite vertex set, unless stated otherwise. 10. A set of vertices or edges is
said to be independent if no two of them are adjacent. The maximum size of an independent
vertex set is called the independence number of G, denoted α(G).

Definition. Let G = (V, E) be a graph on n vertices, say V = {1, . . . , n}. Then, G is said to be
a. Complete graph, denoted Kn, if each pair of vertices in G are adjacent.

2. Path graph, denoted Pn, if E = {{i, i + 1} : 1 ≤ i ≤ n − 1}.

3. Cycle graph, denoted Cn, if E = {{i, i + 1} : 1 ≤ i ≤ n − 1} ∪ {n, 1}.

4. Bipartite graph if V = V1 ∪ V2 such that |V1|, |V2| ≥ 1, V1 ∩ V2 = ∅ and e = {u, v} ∈ E if


either u ∈ V1 and v ∈ V2, or u ∈ V2 and v ∈ V1.

5. Complete bipartite graph, denoted Kr,s if E = {{i, j} : 1 ≤ i ≤ r, 1 ≤ j ≤ s}.

Theorem In a graph G with n = |G| ≥ 2, there are two vertices of equal degree.

Proof. If G has two or more isolated vertices, we are done. First, suppose G has exactly one
isolated vertex. Then, the remaining n − 1 vertices have degrees between 1 and n − 2 and
hence by PHP, the result follows. Otherwise, G has no isolated vertex. Then G has n vertices
whose degrees lie between 1 and n − 1. Again by PHP, we get the required result.

Exercise.

Let G = (V, E) be a graph with a vertex v ∈ V of odd degree. Then, prove that there exists a
vertex u ∈ V such that there is a path from v to u and deg(u) is also odd.

2. Let G = (V, E) be a graph having exactly two vertices, say u and v, of odd degree.
Then, prove that there is a path in G connecting u and v.

Definition . Let G = (V, E) be a graph. Then,

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

1. the minimum degree of a vertex in G is denoted by δ(G) and the maximum degree of a
vertex in G is denoted by ∆(G).

2. a graph G is called k-regular if d(v) = k for all v ∈ V (G).

3. a 3-regular graph is called cubic.

Example.

1.The cycle graph Cn is 2-regular whereas the complete graph Kn is (n − 1)- regular.

2. The Petersen graph and the complete graph K4 are cubic.

3. The graph P4 is not regular.

Let G = (V (G), E(G)) be a graph.

1. If v ∈ V (G) then the graph G − v, called the vertex deleted subgraph, is obtained from G by
deleting v and all the edges that are incident with v.

2. If e ∈ E(G), then the graph G − e = (V, E(G) \ {e}) is called the edge deleted subgraph.

3. If u, v ∈ V (G) such that u v, then G + uv = (V, E(G) ∪{uv}) is called the graph obtained
by edge addition. 4. The complement G of a graph G is defined as (V (G), E), where E = {uv :
u 6= v, uv /∈ E(G)}.

Directed Graph

The directed graph is also known as the digraph, which is a collection of set of vertices edges.
Here the edges will be directed edges, and each edge will be connected with order pair of
vertices. In a graph, the directed edge or arrow points from the first/ original vertex to the
second/ destination vertex in the pair. In the V-vertex graph, we will represent vertices by the
name 0 through V-1. If there are two vertices, x and y, connected with an edge (x, y) in a
directed graph, it is not necessary that the edge (y, a) is also available in that graph.

According to the definition of a directed graph, the same source and destination nodes are not
allowed to have more than one arrow, but border definition is considered by some authors,
which say that the same source and destination nodes can contain multiple arrows in the
directed graph because they allow the arrow set to be a multiset. More specifically, we can
address these types of entities as directed multigraphs.

On the basis of the aforementioned definition of a directed graph, a digraph is allowed to have
loops. That means they can contain the arrows which directly connects nodes to themselves. If

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

the directed graph has loops, that graph will be known as the loop digraph. In the following
directed graph, there are only directed edges. It contains a directed edge from one vertex to
any other vertex and a loop.

if the digraph does not have the loops, that graph will be known as the simple directed
graph. In the following directed graph, there are only directed edges. It contains a directed
edge from one vertex to any other vertex, and it is not allowing looping.

Example

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

In this example, we will consider the following graph where G = {N, E}. Now we have to find
out the vertex and edges set in this graph.

Example 3

The Adjacent matrix for the above-directed graph is described as follows:

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

The adjacency list for a directed graph is described as follows:

Undirected Graph

The undirected graph is also referred to as the bidirectional. The two nodes are connected with
a line, and this line is known as an edge. The undirected graph will be represented as G = (N,
E). Where N is used to show the set of edges and E is used to show the set of edges, which are
unordered pairs of elements N. The main difference between the directed and undirected graph
is that the directed graph uses the arrow or directed edge to connect the two nodes. While in
the undirected graph, the two nodes are connected with the two direction edges.

The undirected graph is very common in practice. With the help of undirected graphs, we can
easily model many real-world relationships. The relationship "is a friend of" can be called the

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

typical symmetric relationship, for instance. This relationship is symmetric because if there is
a case that "Mary is a friend of Harry", then "Harry is a friend of Mary" is also true.

Example

There is another way to draw the undirected graph with the help of given vertices and edges:

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

The Adjacent matrix for the above-undirected graph is described as follows:

The adjacency list for an undirected graph is described as follows:

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Euler Path:

A Euler Path through a graph is a path whose edge list contains each edge of the graph exactly
once.

Euler Circuit: An Euler Circuit is a path through a graph, in which the initial vertex appears a
second time as the terminal vertex.

Euler Graph: An Euler Graph is a graph that possesses a Euler Circuit. A Euler Circuit uses
every edge exactly once, but vertices may be repeated.

State and Prove Euler's Theorem:

Statement: Consider any connected planar graph G= (V, E) having R regions, V vertices and
E edges. Then V+R-E=2.

Dijkstra's Algorithm:

This algorithm maintains a set of vertices whose shortest paths from source is already known.
The graph is represented by its cost adjacency matrix, where cost is the weight of the edge. In
the cost adjacency matrix of the graph, all the diagonal values are zero. If there is no path from
source vertex Vs to any other vertex Vi then it is represented by +∞.In this algorithm, we have
assumed all weights are positive.

1. Initially, there is no vertex in sets.


2. Include the source vertex Vs in S.Determine all the paths from Vs to all other vertices
without going through any other vertex.

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

3. Now, include that vertex in S which is nearest to Vs and find the shortest paths to all the
vertices through this vertex and update the values.
4. Repeat the step until n-1 vertices are not included in S if there are n vertices in the
graph.

After completion of the process, we got the shortest paths to all the vertices from the source
vertex.

Example: Find the shortest paths between K and L in the graph shown in fig using Dijkstra's
Algorithm.

Isomorphism in graphs. Two graphs G = (V, E) and G0 = (V 0 , E0 ) are said to be


isomorphic if there is a bijection f : V → V 0 such that u ∼ v in G if and only if f(u) ∼ f(v) in
G0 , for each u, v ∈ V . In other words, an isomorphism is a bijection between the vertex sets
which preserves adjacency. We write G ∼= G0 to mean that G is isomorphic to G0 .

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Probability

The word 'Probability' means the chance of occurring of a particular event. It is generally
possible to predict the future of an event quantitatively with a certain probability of being
correct. The probability is used in such cases where the outcome of the trial is uncertain.

Probability Definition:
The probability of happening of an event A, denoted by P(A), is defined as

Thus, if an event can happen in m ways and fails to occur in n ways and m+n ways is equally
likely to occur then the probability of happening of the event A is given by

And the probability of non-happening of A is

Note:

1. The probability of an event which is certain to occur is one.


2. The probability of an event which is impossible to zero.
3. If the probability of happening of an event P(A) and that of not happening is P(A),
then
P(A)+ P(A) = 1, 0 ≤ P(A) ≤ 1,0≤ P(A)≤1.

Important Terms related to Probability:


1. Trial and Event: The performance of an experiment is called a trial, and the set of its
outcomes is termed an event.

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Example: Tossing a coin and getting head is a trial. Then the event is {HT, TH, HH}

2. Random Experiment: It is an experiment in which all the possible outcomes of the


experiment are known in advance. But the exact outcomes of any specific performance are
not known in advance.

Example:

1. Tossing a Coin
2. Rolling a die
3. Drawing a card from a pack of 52 cards.
4. Drawing a ball from a bag.

3. Outcome: The result of a random experiment is called an Outcome.

Example: 1. Tossing a coin is an experiment and getting head is called an outcome.


2. Rolling a die and getting 6 is an outcome.

4. Sample Space: The set of all possible outcomes of an experiment is called sample space
and is denoted by S.

Example: When a die is thrown, sample space is S = {1, 2, 3, 4, 5, 6}


It consists of six outcomes 1, 2, 3, 4, 5, 6

Theorem1: If A and B are two mutually exclusive events, then


P(A ∪B)=P(A)+P(B)

Proof: Let the n=total number of exhaustive cases


n1= number of cases favorable to A.
n2= number of cases favorable to B.

Now, we have A and B two mutually exclusive events. Therefore, n1+n2 is the number of cases
favorable to A or B.

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Example: Two dice are tossed once. Find the probability of getting an even number on first
dice or a total of 8.

Solution: An even number can be got on a die in 3 ways because any one of 2, 4, 6, can
come. The other die can have any number. This can happen in 6 ways.

∴ P (an even number on Ist die) =

A total of 8 can be obtained in the following cases: {(2,6),(3,5),(4,4),(5,3),(6,2)}

∴ P (a total of 8) =

∴ Total Probability =

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Counting Principles
Sum Rule Principle: Assume some event E can occur in m ways and a second event F can
occur in n ways, and suppose both events cannot occur simultaneously. Then E or F can occur
in m + n ways.

In general, if there are n events and no two events occurs in same time then the event can
occur in n1+n2..........n ways.

Example: If 8 male processor and 5 female processor teaching DMS then the student can
choose professor in 8+5=13 ways.

Product Rule Principle: Suppose there is an event E which can occur in m ways and,
independent of this event, there is a second event F which can occur in n ways. Then
combinations of E and F can occur in mn ways.

In general, if there are n events occurring independently then all events can occur in the
order indicated as n1 x n2 x n3.........n ways.

Example: In class, there are 4 boys and 10 girls if a boy and a girl have to be chosen for the
class monitor, the students can choose class monitor in 4 x 10 = 40 ways.

Mathematical Functions:
Factorial Function: The product of the first n natural number is called factorial n. It is
denoted by n!, read "n Factorial."

The Factorial n can also be written as

1. n! = n (n-1) (n-2) (n-3)......1.


2. 1!= 1 and 0! = 1.

Example1: Find the value of 5!

Solution:

5! = 5 x (5-1) (5-2) (5-3) (5-4)


= 5 x 4 x 3 x 2 x 1 = 120

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Example2: Find the value of

Solution: = = 10 x 9=90

Binomial Coefficients: Binomial Coefficient is represented by nCr where r and n are positive
integer with r ≤ n is defined as follows:

Example: 8C2 = = = 28.

Generating Functions
Generating function is a method to solve the recurrence relations.

Let us consider, the sequence a0, a1, a2....ar of real numbers. For some interval of real numbers
containing zero values at t is given, the function G(t) is defined by the series
G(t)= a0, a1t+a2 t2+⋯+ar tr+............equation (i)

This function G(t) is called the generating function of the sequence ar.

Now, for the constant sequence 1, 1, 1, 1.....the generating function is

It can be expressed as

G(t) =(1-t)-1=1+t+t2 +t3+t4+⋯[By binomial expansion]

Comparing, this with equation (i), we get

a0=1,a1=1,a2=1 and so on.

For, the constant sequence 1,2,3,4,5,..the generating function is


G(t) = ,because it can be expressed as
( )

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

G(t) =(1-t)-2=1+2t+3t2 +4t3+⋯+(r+1) tr

Comparing, this with equation (i), we get


a0=1,a1=2,a2=3,a3=4 and so on.

The generating function of Zr,(Z≠0 and Z is a constant)is given by


G(t)=1+Zt+Z2 t2+Z3 t3+⋯+Zr tr
G(t)= [Assume |Zt|<1]
( )

So, G(t)= generates Zr,Z≠0


( )

Also,If a(1)r has the generating function G1(t) and a(2)r has the generating function G2(t), then
λ1 a(1)r+λ2 a(2)r has the generating function λ1 G1(t)+ λ2 G2(t). Here λ1 and λ2 are constants.

Application Areas:
Generating functions can be used for the following purposes -

o For solving recurrence relations


o For proving some of the combinatorial identities
o For finding asymptotic formulae for terms of sequences

Example: Solve the recurrence relation ar+2-3ar+1+2ar=0

By the method of generating functions with the initial conditions a0=2 and a1=3.

Solution: Let us assume that

Multiply equation (i) by tr and summing from r = 0 to ∞, we have

(a2+a3 t+a4 t2+⋯)-3(a1+a2 t+a3 t2+⋯)+2(a0+a1 t+a2 t2+⋯)=0


[∴ G(t)=a0+a1 t+a2 t2+⋯]

+2G(t)=0............equation (ii)

Prof. (Dr.) Mahtab Alam


Mewar International University
Discrete Structure SEN 207

Now, put a0=2 and a1=3 in equation (ii) and solving, we get

Put t=1 on both sides of equation (iii) to find A. Hence


-1=- A ∴A=1

Put t= ½ on both sides of equation (iii) to find B. Hence

= B ∴ B =1

Thus G (t) = + Hence, ar=1+2r.

Prof. (Dr.) Mahtab Alam


Mewar International University

You might also like