0% found this document useful (0 votes)
104 views121 pages

MFDS - All Webinars-Min

a) R1 U R2 = {(a,b) | a Ξ b (mod 3) or a Ξ b (mod 4)} This is the union of the two relations R1 and R2. It contains all ordered pairs (a,b) that are congruent either modulo 3 or modulo 4.

Uploaded by

Lok Bharatendu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views121 pages

MFDS - All Webinars-Min

a) R1 U R2 = {(a,b) | a Ξ b (mod 3) or a Ξ b (mod 4)} This is the union of the two relations R1 and R2. It contains all ordered pairs (a,b) that are congruent either modulo 3 or modulo 4.

Uploaded by

Lok Bharatendu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 121

BITS Pilani

Mathematical Foundations for Data Science


DSECL ZC416

G. Venkiteswaran
[email protected]
BITS Pilani
Work Integrated Learning Programmes
Application Example – Traffic control

●  Figure shows the flow of downtown traffic in a certain city during the rush
hours on a typical week day. The arrows indicate the direction of traffic flow
on each one – way road, and the average number of vehicles per hour
entering and leaving each intersection appears beside the road. 5th Avenue
and 6th Avenue can each handle up to 2000 vehicles per hour without causing
congestion, whereas the maximum capacity of both 4th Street and 5th Street is
1000 vehicles per hour. The flow of traffic is controlled by traffic lights
installed at each of the four intersections.
Q1 : Write a general expression involving the
rates of flow – x1, x2 ,x3 ,x4 and suggest two
possible flow patterns that will ensure no
traffic congestion
Q2: Suppose the part of 4th street between 5th
Avenue and 6th Avenue is to be resurfaced
and that traffic flow between the two junctions
must be therefore reduced to at most 300
vehicles per hour. Find two possible flow
patterns that will result in a smooth flow of
traffic
Traffic control System of linear equations:
x1 + x4 = 1500
x1 + x2 = 1300
x2 + x3 = 1800
x3 + x4 = 2000

⎡ 1 0 0 1 ⎤ 1500
⎢ ⎥ Row operations
⎢ 1 1 0 0 ⎥ 1300
⎢ 0 1 1 0 ⎥ 1800
⎢ ⎥ 2000
⎣ 0 0 1 1 ⎦

1 0 0 1 1500

x1 = 1500 t 0 1 0 −1 -200
x2 = -200 + t 0 0 1 1 2000
x3 = 2000 t 0 0 0 0 0
x4 = t

For a meaningful solution we must have 200 ≤ t ≤ 1000


as x1 , x2, x3, x4 must be non negative
Rank Nullity Theorem

The null space of a real m x n matrix A is defined to be set of all real solutions
to the associated homogeneous linear system Ax = 0

The dimension of null space is referred as nullity of A, denoted as nullity(A)


To find nullity (A) we need to determine a basis for nullspace (A)
Matrix Representation, Rank and Nullity of
Linear Transformation T : R2 à R3

Standard basis vectors


for R2
Matrix Representation, Rank and Nullity of Linear
Transformation T : R2 à R3
Matrix Representation, Rank and Nullity of Linear
Transformation T : R2 à R3
Matrix Representation, Rank and Nullity of Linear
Transformation T : R2 à R3
Matrix Representation, Rank and Nullity of Linear
Transformation T : R2 à R3

Rank Nullity Theorem verified


Eigen Values, Eigen Vectors
Algebraic Multiplicity and Geometric Multiplicity
Defect
Singular Value Decomposition

Columns of U are Left


singular vectors Columns of V are
Right singular vectors
Singular
Values of
A
Singular Value Decomposition
Singular Value Decomposition
BITS Pilani
presentation
BITS Pilani MFDS Team
Pilani Campus
BITS Pilani
presentation
BITS Pilani MFDS Team
Pilani Campus
Sensitivity Analysis
In Linear Programming, the parameters (input data) of the model can
change within the certain limits without causing the optimum solution
to change. This is called Sensitivity Analysis
Changes in Right Hand Side
Changes in Right Hand Side
Changes are made in the capacity
of Machine 1 when the daily
capacity is increased from 8 hrs to
9 hrs

Dual Price or Shadow Price

Change in the optimal B


objective value per unit
change in the availability of C
the resource(machine
capacity)
A
D
Changes in Right Hand Side – Feasibility Ranges

Any changes outside this range


will produce a different dual
price

F
Changes in Right Hand Side – Feasibility Ranges

D
Changes in Right Hand Side
Questions
Changes in the Objective Coefficients

Changes in revenue units


(objective –function
coefficients) will change the
slope of z. However the
optimum solution will remain
at C as long as objective
function lies between lines
BF and DE

C
Changes in the Objective Coefficients

Write the objective function in the general format


Changes in the Objective Coefficients

c1/c2 = 35/25 = 1.4 Remains within the optimality range(.333,2)

Note: Although the values of variable at the optimum point C remain


unchanged, the optimum value of z changes to 35 x 3.2 + 25 x 1.6 = $152
Changes in the Objective Coefficients
Shadow price for R1 = Z1 (3,0) – Z(8/3 ,0) = 135 – 120 = 15
Since there would be no change in the value of Z for a unit
increase in the availability of R2, the shadow price is 0
BITS Pilani
presentation
BITS Pilani MFDS Team
Pilani Campus
Critical Point

BITS Pilani, Pilani Campus


Critical Points – maxima, minima
saddle points (Multivariate)
Investigate the nature of critical points for the following
function f(x,y) = x3 – 3x2 + y2

BITS Pilani, Pilani Campus


Critical Points – maxima, minima
saddle points(Multivariate)
f(x,y) = x3 – 3x2 + y2
fx = 3x2 – 6x
fy = 2y

3x(x – 2) = 0 and 2y = 0 è x = 0 or 2 and y = 0


The critical points are (0,0) and (2,0)
fxx = 6x – 6
fyy = 2
fxy = 0

BITS Pilani, Pilani Campus


Critical Points – maxima, minima
saddle points (Multivariate)

Critical Point (a,b) (0,0) (2,0)


fxx -6 6
fyy 2 2
fxy 0 0
D -12 12
Saddle Point Relative Minimum

BITS Pilani, Pilani Campus


Lagrange Multiplier

BITS Pilani, Pilani Campus


Lagrange Multiplier
Find the maximum and minimum values of f(x,y) = 6x + 8y on the circle x2 + y2 = 25

BITS Pilani, Pilani Campus


Lagrange Multiplier

BITS Pilani, Pilani Campus


Sets
Problem 20/Page 140:Show that if A and B are sets, then

BITS Pilani, Pilani Campus


Sets

BITS Pilani, Pilani Campus


Sets
Problem 46/Page 140 : For Ai =
{...,-2,-1,0,1,...i} Find

BITS Pilani, Pilani Campus


Sets

BITS Pilani, Pilani Campus


Functions
Problem 14:Determine whether
f : Z x Z à Z is onto if

BITS Pilani, Pilani Campus


Graph of the function
Draw the graph of the function

Evaluate the function at a few values and plot corresponding


points on set of axis

BITS Pilani, Pilani Campus


Graph of the function

Green Points
represent points
that are included in
the graph while
red points are not
included

BITS Pilani, Pilani Campus


BITS Pilani
presentation
BITS Pilani MFDS Team
Pilani Campus
Congruent Modulo
If a and b are integers and m is a positive integer, then a is congruent to b
modulo m if m divides a – b. We use the notation a Ξ b (mod m) to indicate
that a is congruent to b modulo m.
Problem 39/Page 468 : Let R1 and R2 be the “congruent modulo 3” and the
“congruent modulo 4” relations, respectively, on the set of integers. That R1 =
{(a,b) | a Ξ b(mod 3)} and R2 = {(a,b) | a Ξ b(mod 4)} Find a) R1 U R2

BITS Pilani, Pilani Campus


Congruent Modulo
Problem 39/Page 468 : Let R1 and R2 be the “congruent modulo 3” and the
“congruent modulo 4” relations, respectively, on the set of integers. That R1 = {(a,b)
| a Ξ b(mod 3)} and R2 = {(a,b) | a Ξ b(mod 4)} Find b) R1 Π R2

BITS Pilani, Pilani Campus


Congruent Modulo
Problem 39/Page 468 : Let R1 and R2 be the “congruent modulo 3” and the
“congruent modulo 4” relations, respectively, on the set of integers. That R1 = {(a,b)
| a Ξ b(mod 3)} and R2 = {(a,b) | a Ξ b(mod 4)} Find d) R2 - R1

BITS Pilani, Pilani Campus


Transitive Closure

BITS Pilani, Pilani Campus


Need for Warshall’s Algorithm

The graphical method is unsystematic and impractical


for large sets.

The matrix method is better than the graphical method
and can be implemented with the help of a program, but
it tends to become costly in terms of time and space
requirement in the case of large matrices. So this method
is inefficient too

The Warshall’s algorithm as described next helps to
overcome these drawbacks.

BITS Pilani, Pilani Campus


Warshall’s Algorithm

BITS Pilani, Pilani Campus


Warshall’s Algorithm

BITS Pilani, Pilani Campus


Partial Ordering
Definition 1: A relation R on a set S is called a partial ordering, or
partial order, if it is reflexive, antisymmetric, and transitive. A set
together with a partial ordering R is called a partially ordered set,
or poset, and is denoted by (S, R). Members of S are called
elements of the poset.
Problem 2/Page 518:Which of these relations on {0,1,2,3} are partial orderings?
Determine the properties of partial ordering that the others lack

BITS Pilani, Pilani Campus


Hasse Diagram

Problem 24/Page 519 : Draw the Hasse diagram for


inclusion on the set P(S) where S = {a,b,c,d}
Add a straight line between
P(S) represents the set of all two dots if one of the sets is
subsets of S {a,b,c,d} a subset of the other set
Draw a dot for each element
in P(S)
Place all sets with the same
number of elements in same
{a,b,c} {a,b,d} {a,c,d} {b,c,d}
row
Sets with least number of
elements are placed at
bottom
{a,b} {a,c} {a,d} {b,c} {b,d} {c,d}

{a} {b} {c} {d}

ϕ
BITS Pilani, Pilani Campus
Poset

Problem 34/Page 519:


Answer these questions for
72
the poset
({2,4,6,9,12,18,27,36,48,60,72},|)
a)Find the maximal elements
60 48 36

12 18 27
27,48,60,72
b)Find the minimal elements
4 6 9 2,9
c)Is there a greatest element?
2
Does not exist
d)Is there a least element?
Does not exist


BITS Pilani, Pilani Campus
Poset
Problem 34/Page 519:
Answer these questions for
72 the poset
({2,4,6,9,12,18,27,36,48,60,72},|)
60 48 36 e)Find all upper bounds of {2,9}
18,36,72
12 18 27
f)Find the least upper bound of
{2,9} if exists
4 6 9
Least Upper bound = 18
2
g) Find all lower bounds of {60,72}
Lower Bounds = 2,4,6,12
h)Find the greatest lower bound
of {60,72}, if it exists
Greatest Lower Bound = 12
BITS Pilani, Pilani Campus
Lattice

Determine whether poset given in the


figure with Hasse diagram, is a lattice

{a,b} has upper bounds c,d, and e


Since e is larger than either c or d ,
it cannot be the least upper bound.
c and d are not related in any way
Hence there is no LEAST UPPER
BOUND for subset {a,b}
It is not a lattice

BITS Pilani, Pilani Campus


Mathematical Foundations for Data
Science
BITS Pilani MFDS Team
Pilani Campus
Handshaking Theorem

BITS Pilani, Pilani Campus


Euler’s Degree Sum Theorem

BITS Pilani, Pilani Campus


Exercise Problem 2/ Page 546
Find the number of vertices,
number of edges and degree
of each vertex.
Find the sum of the degrees
of the vertices of graph and
verify that it equals twice the
number of edges in the graph

Sum of the degree of vertices = 6 +6 +6+5+3 = 26


Number of edges = 13
Hence 2 x E = 26 = sum of the degree of vertices
Theorem is verified

BITS Pilani, Pilani Campus


Bipartite Graph
Definition: A simple graph G is bipartite if V can be partitioned into two
disjoint subsets V1 and V2 such that every edge connects a vertex in V1 and
a vertex in V2. In other words, there are no edges which connect two
vertices in V1 or in V2.

RED RED

BLUE BLUE

RED
RED

It is possible to color the vertices RED or BLUE so that no two adjacent vertices
are the same color. Hence above graph is BIPARTITE
BITS Pilani, Pilani Campus
Graph Isomorphism

1.  Simple Graphs G1 = (V1, E1) and G2 =(V2,E2) are ISOMORPHIC If


there is ONE TO ONE and ONTO function f from V1 to V2
2.  If there is ONE TO ONE correspondence between vertices of two
graphs that preserves ADJACENCY RELATIONSHIP, then two
simple graphs are isomorphic
3.  GRAPH INVARIANTS – Property preserved by isomorphism of
graphs
Ø  Number of VERTICES in both the graphs must be same
Ø  Number of EDGES of both the graphs must be same
Ø  Degree sequence of both the graphs must be same
Ø  If a cycle of length k is formed by the vertices {v1,v2,....vk} in one
graph, then cycle of same length k must be formed by the vertices
{ f(v1), f(v2),.....f(vk)} in the other graph as well

BITS Pilani, Pilani Campus


Graph Isomorphism
Determine whether the given pair of graph is isomorphic. Exhibit an
isomorphism or provide a rigorous argument that none exists
1 1

1 4 4 3 1

1 1 1

1 1

1 4 3 4 1

1 1 1

BITS Pilani, Pilani Campus


Graph Isomorphism
Prove that if graphs G and H are isomorphic, then their
complements G and H are also isomorphic
Given : G and H are isomorphic simple graphs
G = (V1, E1) and H = (V2,E2) be isomorphic
There exists one to one and onto function f:V1 à V2 such that a and b are
adjacent in G if f(a) and f(b) are adjacent in H
G = (V1, E1) H = (V1, E2) Complementary graphs contain same set of
vertices while contain edges not contained in original graphs
If c and d are adjacent in G, c and d are not adjacent in G(by definition of
complementary graph)
f(c) and f(d) can then also not be adjacent in H, f(c) and f(d) are adjacent in
H
Hence G and H are also isomorphic (with the same function as isomorphic
relation between G and H)
BITS Pilani, Pilani Campus
Path – Problem 2/Page 567

C and d are NOT a PATH as in c,


there is no edge from d to b and e to a
In d, there is no edge from b to d

A)  Path is simple, as none of edges are used more than once, length
of the path is 4, which is the number of edges in the path
B)  Path is not simple as edges (a,d) and (d,a) are used twice,
length is 4
BITS Pilani, Pilani Campus
Euler Path and Circuit
The town of Kӧnigsberg, Prussia (now Kalingrad, Russia) was divided
into four sections by the branches of the Pregel river. In the 18th century
seven bridges connected these regions.
People wondered whether whether it was possible to follow a path that
crosses each bridge exactly once and returns to the starting point.
The Swiss mathematician Leonard Euler proved that no such path exists.
This result is often considered to be the first theorem ever proved in
graph theory.



Multigraph
Model of the
Bridges of
Kӧnigsberg
The 7 Bridges of K nigsberg

BITS Pilani, Pilani Campus


Euler Path and Circuit

BITS Pilani, Pilani Campus


Euler Path and Euler Circuit

BITS Pilani, Pilani Campus


Euler Path and Euler Circuit

Only two
vertices
have Odd
degree
hence there
is EULER
PATH and
no Euler
Circuit

BITS Pilani, Pilani Campus


Euler Path and Euler Circuit

To determine whether given graph has Euler path or circuit


•  Find the degree spectrum of the graph
•  If any value in the spectrum is zero, graph is not
connected and it cannot have Euler path or circuit
•  If all the values in the spectrum are even, graph has both
Euler path and Euler circuit
•  If exactly two values are odd, then G has Euler path but
no Euler circuit
•  In all other cases, G does not have either an Euler path or
an Euler circuit

BITS Pilani, Pilani Campus


Euler Path and Euler Circuit

a)  A graph with Euler path


b) A graph with both Euler path and circuit
c)  A graph with neither Euler path nor Euler circuit

BITS Pilani, Pilani Campus

You might also like