MTH202 Finalterm Solved Subjective Lecture 23 To 45 With Reference
MTH202 Finalterm Solved Subjective Lecture 23 To 45 With Reference
In the basic definition we've to find P(1) is true. So what's the reason of using P(0)?
Ans.
Principle of Mathematical Induction is defined as follow:
Let P(n) be a property that is defined for integers n, and let ' a ' be a fixed integer.
1. P(a) is true.
Here P(1) is not fixed, we take P(a) for some fixed ' a ' and than suppose for some k ≥ a,
and so on.
Q. Explain the last exercise of the lecture ( DeMorgan's Law )
Ans.
That is the DeMorgan's Law for the n sets. For understanding it, you should see first
DeMorgan's Law for two sets A and B which is following:
( A U B )c = Ac ∩ Bc
For n number of sets A1, A2, ..., An, DeMorgan's Law is the following:
In the example, we take n = 1 in the series. It means we take only one term in the series
as an initial value for our Mathematical Induction.
Lecture No.24.
Q.what is consecutive positive integer and inequality?
Consecutive integers are integers that follow each other in order.
For Example
1,2,3,... are called consecutive positive integers. You can see, we will get next integer by
adding 1 in the current integer.
Inequality is a statement in which equal sign is not involved or which is not equal.
For example:
2 < 5 or 7 > 4.
Lecture No. 25
Q. What is the rule of direct proof?
In direct proof, the conclusion is established by logically combining the axioms, definitions, and
earlier theorems. For example, direct proof can be used to establish that the sum of two even
integers is always even.
Q. What is rational number and integer?
The natural numbers including 0 (0, 1, 2, 3, ...) together with the negatives of the non-zero
natural numbers (−1, −2, −3, ...). they are numbers that can be written without a fractional or
decimal component, and fall within the set {... −2, −1, 0, 1, 2, ...}. For example, 65, 7, and −756
are integers; 1.6 and 1½ are not integers.
A rational number is a number that can be in the form p/q where p and q are integers and q is not
equal to zero.
Any whole number is rational. Its denominator is 1. For instance, 8 equals 8/1, which is the
quotient of two integers. A number like square root of 16 is rational, since it can be expressed as
the quotient of two integers in the form 4/1. The following are also examples of rational
numbers: 5/6,-6/7,3/1 etc
Q. Define Prime number?
A prime number is a whole number greater than 1, whose only two whole-number factors are 1
and itself. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. Diviser is the
number that can divide your desired number. e.g. 6 has the following divisor 1,2,3,6.
Lecture No.26
Q. What is Direct Method and Indirect method?
There are two methods of proof Direct Method and Indirect Methods.
In Direct Method we try to prove the statement directly as it is .
For example "Prove that the sum of two odd integers is even." We will take two odd integers and
try to prove that their sum is even.
While in Indirect Methods we try to restate the given statement and use this to prove our
objective.
Q. Define Geometric Sequence or Geometric Progression (G.P.)?
A sequence in which every term after the first is obtained from the preceding term by
multiplying it with a constant number is called a geometric sequence or geometric
progression (G.P.)
The constant number, being the ratio of any two consecutive terms is called the common
ratio of the G.P. commonly denoted by “r”.
Example: 6, -2, 2/3, - 2/9, … (common ratio = r = -1/3).
The sum of the terms of a geometric sequence forms a geometric series (G.S.). In general,
if a is the first term and r the common ratio of a geometric series, then the series is given
as: a + ar + ar 2 + ar3 + …
For Example: 6 -2 + 2/3 - 2/9 +… (common ratio = r = -1/3)
is geometric series.
For finite series the formula is
Sn= (a(1-rn) /(1-r)) since r ¹1.
For the given example: 6 -2 + 2/3 - 2/9 +… (common ratio = r = -1/3) is an infinite
geometric series so the formula to find sum is
Sn= (a/(1-r)) since |r| < 1.
Sn= (a/(r-1)) if |r| > 1.
Lecture No. 27
Q. Define RECURSION?
It is the process of describing an action in terms of itself. OR
The process of defining an object in terms of smaller versions of itself is called recursion.
A recursive definition has two parts:
1.BASE:
An initial simple definition which cannot be expressed in terms of smaller versions of itself.
2. RECURSION:
The part of definition which can be expressed in terms of smaller versions of itself
For any integer n and a positive integer d, there exist unique integers q and r such that n = d • q +
r and 0 ≤ r < d.
For example, for integers 5 and 3, there exist 1 and 2 such that 5 = 3x1 + 2
The Euclidean algorithm takes integers a and b with a > b ≥ 0 and calculate their greatest
common divisor.
Q. Lemma?
Lemma is a proven result or proposition that helps for drawing the larger results.
Q. Euclidean algorithm?
In mathematics, the Euclidean algorithm (also called Euclid's algorithm) is an efficient
method for computing the greatest common divisor (GCD) of two integers, also known as
the greatest common factor (GCF) or highest common factor (HCF). It is named after the
Greek mathematician Euclid.
The Euclidean algorithm is an algorithm for finding the greatest common divisor (G.C.D)
of two numbers a and b.
Example: Suppose that a = 2322, b = 654.
2322 = 654•3 + 360
654 = 360•1 + 294
360 = 294•1 + 66
294 = 66•4 + 30
66 = 30•2 + 6
30 = 6•5
So gcd(2322,654) = 6
Lecture No.29
Q .What is combinatores?
Combinatory is the mathematics of counting and arranging objects.Counting of objects with
certain properties (enumeration) is required to solve many different types of problem .For
example,counting is used to:
(i) Determine number of ordered or unordered arrangement of objects.
(ii)Generate all the arrangements of a specified kind which is important in computer simulations.
(iii)Compute probabilities of events.
(iv)Analyze the chance of winning games, lotteries etc.
(v)Determine the complexity of algorithms
RULES FOR SUM
If one event can occur in n1 ways, a second event can occur in n2 (different) ways, then the total
number of ways in which exactly one of the events (i.e., first or second) can occur is n 1 + n2.
EXAMPLE:
Suppose there are 7 different optional courses in Computer Science and 3 different optional
courses in Mathematics. Then there are 7 + 3 = 10
choices for a student who wants to take one optional course
EXERCISE:
A student can choose a computer project from one of the three lists. The three lists contain 23, 15
and 19 possible projects, respectively. How many possible projects are there to choose from?
SOLUTION:
The student can choose a project from the first list in 23 ways, from the second list in 15 ways,
and from the third list in 19 ways. Hence, there are
23 + 15 + 19 = 57 projects to choose from
PRDUCT RULE IN TRMS OF SET
If A1, A2, …, Am are finite sets, then the number of elements in the Cartesian product of these
sets is the product of the number of elements in each set.
If n(Ai) denotes the number of elements in set Ai, then
n(A1 ´ A2 ´ … ´Am) = n (A1) · n(A2) ·… ·n (Am,)
EXERCISE:
Find the number n of ways that an organization consisting of 15 members can elect a president,
treasurer, and secretary. (assuming no person is elected to more than one position)
SOLUTION:
The president can be elected in 15 different ways; following this, the treasurer can be elected in
14 different ways; and following this, the secretary can be elected in 13 different ways. Thus, by
product rule, there are
n = 15 × 14 × 13 = 2730
different ways in which the organization can elect the officers
Lecture No.30
Q.FACTORIAL OF A POSITIVE INTEGER?
For each positive integer n, its factorial is defined to be the product of all the integers from 1 to n
and is denoted n!. Thus n! = n(n - 1) (n - 2) … 3×2 ×1
In addition, we define
0! = 1
REMARK:
n! can be recursively defined as
Base: 0! = 1
Recursion n! = n (n - 1)! for each positive integer N
Lecture No.30
FACTORIAL OF A POSITIVE INTEGER:
For each positive integer n, its factorial is defined to be the product of all the integers from 1 to n
and is denoted n!. Thus n! = n(n - 1) (n - 2) … 3×2 ×1
In addition, we define
0! = 1
REMARK:
n! can be recursively defined as
Base: 0! = 1
Recursion n! = n (n - 1)! for each positive integer N
Lecture No.31
A k-combination of a set of n elements is a choice of k elements taken from the set of n elements
such that the order of the elements does not matter and elements can’t be repeated.
The symbol C(n, k) denotes the number of k-combinations that can be chosen from a set of n
elements.
EXAMPLE:
Let X = {a, b, c}. Then 2-combinations of the 3 elements of the set X are:
{a, b}, {a, c}, and {b, c}. Hence C(3,2) = 3.
EXERCISE:
Let X = {a, b, c, d, e}.
List all 3-combinations of the 5 elements of the set X, and hence find the value of C(5,3).
SOLUTION:
Then 3-combinations of the 5 elements of the set X are:
{a, b, c}, {a, b, d}, {a, b, e}, {a, c, d}, {a, c, e},
{a, d, e}, {b, c, d}, {b, c, e}, {b, d, e}, {c, d, e}
Lecture No.32
DEFINITION:
A k-selection of a set of n elements is a choice of k elements taken from a set of n elements such
that the order of elements does not matter and elements can be repeated.
REMARK:
1. k-selections are also called k-combinations with repetition allowed or multisets of size k.
2. With k-selections of a set of n elements repetition of elements is allowed. Therefore k need not
to be less than or equal to n.
Lecture No.38
RANDOM VARIABLE
PROBABILITY DISTRIBUTION
EXPECTATION AND VARIANCE
INTRODUCTION:
Suppose S is the sample space of some experiment. The outcomes of the experiment, or the
points in S, need not be numbers. For example in tossing a coin, the outcomes are H (heads) or
T(tails), and in tossing a pair of dice the outcomes are pairs of integers. However, we frequently
wish to assign a specific number to each outcome of the experiment. For example, in coin
tossing, it may be convenient to assign 1 to H and 0 to T; or in the tossing of a pair of dice, we
may want to assign the sum of the two integers to the outcome. Such an assignment of numerical
values is called a random variable.
RANDOM VARIABLE:
A random variable X is a rule that assigns a numerical value to each outcome in a sample Space
S.
OR
It is a function which maps each outcome of the sample space into the set of real numbers.
We shall let X(S) denote the set of numbers assigned by a random variable X, and refer to X(S)
as the range space.
In formal terminology, X is a function from S(sample space) to the set of real numbers R, and
X(S) is the range of X.
REMARK:
1. A random variable is also called a chance variable, or a stochastic variable(not called simply a
variable, because it is a function).
2. Random variables are usually denoted by capital letters such as X, Y, Z; and the values taken
by them are represented by the corresponding small letters.
EXAMPLE:
A pair of fair dice is tossed. The sample space S consists of the 36 ordered pairs i.e
S = {(1,1), (1,2), (1,3), …, (6,6)}
Let X assign to each point in S the sum of the numbers; then X is a random variable with range
space i.e
X(S) = {2,3,4,5,6,7,8,9,10,11,12}
Let Y assign to each point in S the maximum of the two numbers in the outcomes; then Y is a
random variable with range space.
Y(S) = {1,2,3,4,5,6}
PROBABILITY DISTRIBUTION OF A RANDOM VARIABLE:
Let X(S) = {x1, x2, …, xn} be the range space of a random variable X defined on a finite sample
space S.
Define a function f on X(S) as follows:
f(xi) = P (X = xi)
Lecture No.39
Q. Graph Theory?
Graph theory plays an important role in several areas of computer science such as:
• switching theory and logical design
• Artificial intelligence
• Formal languages
• Computer graphics
• Operating systems
• Compiler writing
• Information organization and retrieval.
GRAPH
A graph is a non-empty set of points called vertices and a set of line segments joining pairs of
vertices called edges.
Formally, a graph G consists of two finite sets:
(i) A set V=V(G) of vertices (or points or nodes)
(ii)A set E=E(G) of edges; where each edge corresponds to a pair of vertices.
e4 {v1,v5}
SOLUTION:
Given V(H) = {v1, v2, v3, v4, v5}
and E(H) = {e1, e2, e 3, e4}
with edge endpoint function
SOLUTION:
There are C(4,2) = 6 ways of choosing two vertices from 4 vertices. These edges may be listed as:
{u,v},{u,w},{u,x},{v,w}, {v,x},{w,x}
One edge of the graph is specified to be {u,v}, so any of the remaining five from this list may be
chosen to be the second edge. This required graphs are:
Lecture No.40
PATHS AND CIRCUITS
KONIGSBERG BRIDGES PROBLEM
DEFINITIONS:
Let G be a graph and let v and w be vertices in graph G.
1. WALK
A walk from v to w is a finite alternating sequence of adjacent vertices and edges of G.
Thus a walk has the form
v0e1 v1e2 … vn-1envn
where the v’s represent vertices, the e’s represent edges v0=v , vn=w, and for all
i = 1, 2 … n, vi-1 and vi are endpoints of e i.
The trivial walk from v to v consists of the single vertex v.
2. CLOSED WALK
A closed walk is a walk that starts and ends at the same vertex.
3. CIRCUIT
A circuit is a closed walk that does not contain a repeated edge. Thus a circuit is a walk of the
form
Lecture No.41
Q. Matrix Representation of Graphs?
Definitions:
In this section, we introduce two kinds of matrix representations of a graph,
that is, the adjacency matrix and incidence matrix of the graph.
A graph G with the vertex-set V (G) = {x1, x2, · · · , vv} can be described by
means of matrices. The adjacency matrix of G is a v × v matrix
A(G) = (aij), where aij = μ(xi, xj) = |EG(xi, xj)|.
If an isomorphism exists between two graphs, then the graphs are called isomorphic and we write
. In the case when the bijection is a mapping of a graph onto itself, i.e., when G and H are one
and the same graph, the bijection is called an automorphism of G.
The graph isomorphism is an equivalence relation on graphs and as such it partitions the class of
all graphs into equivalence classes. A set of graphs isomorphic to each other is called an
isomorphism class of graphs
ISOMORPHIC GRAPHS:
Let G and G’ be graphs with vertex sets V(G) and V(G’) and edge sets E(G) and E(G’),
respectively.
G is isomorphic to G’ if, and only if, there exist one-to-one correspondences g: V(G)®V(G’) and
h: E(G) ®E(G’) that preserve the edge-endpoint functions of G
and G’ in the sense that for all v ÎV(G) and eÎ E(G).
v is an endpoint of e Û g(v) is an endpoint of h(e).
EQUIVALENCE RELATION:
Graph isomorphism is an equivalence relation on the set of graphs.
1. Graphs isomorphism is Reflexive (It means that the graph should be isomorphic to itself).
2. Graphs isomorphism is Symmetric (It means that if G is isomorphic to G’ then G’ is also
isomorphic to G).
3. Graphs isomorphism is Transitive (It means that if G is isomorphic to G’ and G’ is isomorphic
to G’’, then G is isomorphic to G’’).
ISOMORPHIC INVARIANT:
A property P is called an isomorphic invariant if, and only if, given any graphs G and G’, if G
has property P and G’ is isomorphic to G, then G’ has property P.
THEOREM OF ISOMORPHIC INVARIANT:
Each of the following properties is an invariant for graph isomorphism, where n, m and k are all
non-negative integers, if the graph:
1. has n vertices.
2. has m edges.
3. has a vertex of degree k.
4. has m vertices of degree k.
5. has a circuit of length k.
6. has a simple circuit of length k.
7. has m simple circuits of length k.
8. is connected.
9. has an Euler circuit.
10. has a Hamiltonian circuit.
DEGREE SEQUENCE:
The degree sequence of a graph is the list of the degrees of its vertices in non-increasing order.
GRAPH ISOMORPHISM FOR SIMPLE GRAPHS:
If G and G’ are simple graphs (means the “graphs which have no loops or parallel edges”) then G
is isomorphic to G’ if, and only if, there exists a one-to-one correspondence (1-1 and onto
function) g from the vertex set V (G) of G to the vertex set
V (G’) of G’ that preserves the edge-endpoint functions of G and G’ in the sense that for all
vertices u and v of G,
{u, v} is an edge in G Û {g(u), g(v)} is an edge in G’.
OR
You can say that with the property of one-one correspondence, u and v are adjacent in graph G Û
if g (u) and g (v) are adjacent in G’.
Note:
It should be noted that unfortunately, there is no efficient method for checking that whether two
graphs are isomorphic(methods are there but take so much time in calculations).Despite that
there is a simple condition. Two graphs are isomorphic if they have the same number of
vertices(as there is a 1-1 correspondence between the vertices of both the graphs) and the same
number of edges(also vertices should have the same degree.
Q.Degree sequence?
The degree sequence of an undirected graph is the non-increasing sequence of its vertex degrees.
The degree sequence is a graph invariant so isomorphic graphs have the same degree sequence.
However, the degree sequence does not, in general, uniquely identify a graph; in some cases,
non-isomorphic graphs have the same degree sequence.
The degree sequence problem is the problem of finding some or all graphs with the degree
sequence being a given non-increasing sequence of positive integers. (Trailing zeroes may be
ignored since they are trivially realized by adding an appropriate number of isolated vertices to
the graph.) A sequence which is the degree sequence of some graph, i.e. for which the degree
sequence problem has a solution, is called a graphic or graphical sequence. As a consequence of
the degree sum formula, any sequence with an odd sum, such as (3, 3, 1), cannot be realized as
the degree sequence of a graph. The converse is also true: if a sequence has an even sum, it is the
degree sequence of a multigraph.
Lecture No.43
PLANAR GRAPHS
GRAPH COLORING
Graph coloring is a special case of graph labeling; it is an assignment of labels traditionally
called "colors" to elements of a graph subject to certain constraints. In its simplest form, it is a
way of coloring the vertices of a graph such that no two adjacent vertices share the same color;
this is called a vertex coloring. Similarly, an edge coloring assigns a color to each edge so that no
two adjacent edges share the same color, and a face coloring of a planar graph assigns a color to
each face or region so that no two faces that share a boundary have the same color.
Vertex coloring is the starting point of the subject, and other coloring problems can be
transformed into a vertex version. For example, an edge coloring of a graph is just a vertex
coloring of its line graph and a face coloring of a plane graph is just a vertex coloring of its dual
However, non-vertex coloring problems are often stated and studied as is. That is partly for
perspective, and partly because some problems are best studied in non-vertex form, as for
instance is edge coloring.
The convention of using colors originates from coloring the countries of a map, where each face
is literally colored. This was generalized to coloring the faces of a graph embedded in the plane.
By planar duality it became coloring the vertices, and in this form it generalizes to all graphs. In
mathematical and computer representations, it is typical to use the first few positive or
nonnegative integers as the "colors". In general, one can use any finite set as the "color set". The
nature of the coloring problem depends on the number of colors but not on what they are.
In this graph, note it that each vertex is connected to every other vertex, but no edge is crossed.
Note: The graphs shown above are complete graphs with four vertices (denoted by K4).
DEFINITION:
A graph is called planar if it can be drawn in the plane without any edge crossed (crossing means
the intersection of lines). Such a drawing is called a plane drawing of the graph.
OR
You can say that a graph is called planar in which the graph crossing number is “0”.
HOW TO DRAW A GRAPH FROM A MAP:
1. Each map in the plane can be represented by a graph.
2. Each region is represented by a vertex (in 1 st map as there are 7 regions, so 7 vertices are used
in drawing a graph, similarly we can see 2 nd map).
3. If the regions connected by these vertices have the common border, then edge connect two
vertices.
4. Two regions that touch at only one point are not adjacent.
DEFINITION:
1. A coloring of a simple graph is the assignment of a color to each vertex of the graph so that no
two adjacent vertices are assigned the same color.
2. The chromatic number of a graph is the least (minimum) number of colors for coloring of this
graph
Lecture No.44
TREES
APPLICATION AREAS:
Trees are used to solve problems in a wide variety of disciplines. In computer science trees are
employed to
1) construct efficient algorithms for locating items in a list.
2) construct networks with the least expensive set of telephone lines linking distributed
computers.
3) construct efficient codes for storing and transmitting data.
4) model procedures that are carried out using a sequence of decisions, which are valuable in the
study of sorting algorithms.
TREE:
A tree is a connected graph that does not contain any non-trivial circuit. (i.e. it is circuit-free).
A trivial circuit is one that consists of a single vertex.