IISC InterviewPrep
IISC InterviewPrep
• Recursion
• Arrays
• Stacks
• Queues
• Linked lists
• Trees
• Binary search trees
• Binary heaps
• Graphs
• Limits
• Continuity and differentiability
• Maxima and minima
• Mean value theorem
• Theorems of integral calculus
• Evaluations of definite and improper integrals
• Taylor series
• Partial derivatives
• Multiple integrals
• Vector identities
• Directional derivatives
• Vector space, basis
• Linear dependence and independence
• Matrix algebra, rank, determinants
• System of linear equations
• Eigenvalues and eigenvectors
• LU decomposition
• Random variables
• Uniform, normal, exponential, Poisson and binomial distributions
• Mean, median, mode and standard deviation
• Conditional probability and Bayes theorem
• Correlation and regression analysis
• Propositional and first order logic
• Sets, relations, functions
• Partial orders and lattices, groups
• Graphs: connectivity, matching, coloring
• Combinatorics: counting, recurrence relations, generating functions.
https://www.youtube.com/watch?v=b-UZJVdLbXc&list=PLvTTv60o7qj_tdY9zH7YceES7jfXiZkAz
DETERMINANTS
Δ = (1 − 𝑎2 )𝑛
1
det(𝐴) = det(𝐴𝑇 ) =
det(𝐴−1 )
For any matrix 3 × 3 or above, if the numbers (in row major format) are consecutive, then the
determinant will be zero. For example –
11 12 13
det (14 15 16) = 0
17 18 19
TYPES OF MATRICES
NOTE
When we take the complex conjugate of every element of a matrix, then the resulting matrix is called
the conjugate matrix and is denoted by 𝑨∗ . Additionally, we can define the trajugate of a matrix as
follows –
𝐴𝜃 = (𝐴∗ )𝑇 = (𝐴𝑇 )∗
NOTE
https://byjus.com/maths/inverse-of-3-by-3-matrix/
(𝐴𝐵)−1 = 𝐵 −1 𝐴−1
For a 𝑚 × 𝑛 matrix, the number of minors of size 𝑟 × 𝑟 is given by –
𝑚
𝑁𝑜 𝑜𝑓 𝑚𝑖𝑛𝑜𝑟𝑠 (𝑜𝑓 𝑠𝑖𝑧𝑒 𝑟) = 𝑟𝐶 ∗ 𝑛𝑟𝐶
The number of linearly independent rows of a matrix is termed as the rank of that matrix. Rank is also
the highest order of minors of a matrix that are not all singular.
• The NULL Matrix is the only matrix with rank (denoted by 𝜌) as zero.
• Elementary row/column ops don’t change the rank
• Rank of a scalar matrix is the same as the order of the matrix
• For a matrix of order 𝑚 × 𝑛, the max rank can be 𝑎 where 𝑎 = min(𝑚, 𝑛)
• For a 𝑛 × 𝑛 non-singular matrix, 𝜌(𝐴) = 𝜌(𝐴−1 ) = 𝜌(𝐴𝑇 ) = 𝜌(𝑎𝑑𝑗 𝐴) = 𝑛
• If a matrix has all the elements as the same value, then the rank is 1
NULLITY
It is the number of zero rows in the row echelon form. The sum of rank and nullity is equal to the
number of rows of the matrix.
If a system of linear equations have no solution, then they are said to be inconsistent. Otherwise, if
they have either a unique solution of infinitely many solutions, they are said to be consistent. Also,
when the constant term of each equation is zero, then the system is said to be homogeneous. Else, it
is called non-homogeneous.
𝐴𝑋 = 𝐵
Homogeneous equations always result in a consistent solution. This is because the 𝐵 matrix is always
0 so 𝜌(𝐴) = 𝜌(𝐴 ∶ 𝐵). Now, if rank of A is the same as the number of equations, then there will be a
single solution. If the rank of A is lesser than the number of equations, then there will be infinitely
many solutions.
NOTE
Let us assume we have 2 vectors – 𝑋 and 𝑌. Vectors are either row or column matrices. Now, if we
have –
𝑋𝑌 𝑇 = 0 𝑋𝑋 𝑇 ≠ 0 𝑌𝑌 𝑇 ≠ 0
Then the two vectors are said to be mutually orthogonal vectors. On the other hand, if we have –
𝑋𝑌 𝑇 = 0 𝑋𝑋 𝑇 = 1 𝑌𝑌 𝑇 = 1
Then the two vectors are said to be mutually orthonormal vectors.
|𝐴 − 𝜆𝐼| = 0
This gives us values of 𝜆 which will be our Eigenvalues. Now, if we solve the set of homogeneous
equations –
[𝐴 − 𝜆𝐼][𝑋] = 𝑂
Then, the solution vectors 𝑋 are called Eigenvectors. Basically, each eigenvalue has its own
eigenvector.
NOTE
If a matrix has eigenvector 𝑋, then the vector 𝑐𝑋 may also be an eigenvector where 𝑐 is some constant.
Also, the solution to the equation [𝐴 − 𝜆𝐼][𝑋] = 𝑂 is always non-trivial.
Question
𝜆 = 1,6
−1 4
𝑋1 = 𝑐 [ ] 𝑋2 = 𝑐 [ ]
1 1
NOTE
This says that every matrix can be expressed as a product of a lower triangle and an upper triangle
matrix.
𝑎11 𝑎12 𝑎13 1 0 0 𝑢11 𝑢12 𝑢13
𝐴 = [𝑎21 𝑎22 𝑎23 ] = 𝐿𝑈 = [𝑙21 1 0] [ 0 𝑢22 𝑢23 ]
𝑎31 𝑎32 𝑎33 𝑙31 𝑙32 1 0 0 𝑢33
It states that every square matrix satisfies its own characteristic equation. Basically, the equation we
get when we solve 𝐴 − 𝜆𝐼 is the characteristic equation. If we substitute 𝐴 instead of 𝜆, then we get
NULL matrix. This is the statement of the theorem. For eg, let us take –
1 2
𝐴=[ ]
0 2
Here, the characteristic equation will be –
|𝐴 − 𝜆𝐼| = 𝜆2 − 3𝜆 + 2
Here is an interesting concept. It states that every order of a matrix can be represented as a function
of its original form. Basically, it states that for a matrix 𝐴 –
𝐴𝐾 = 𝑐1 𝐴 + 𝑐2 𝐼
Now, we just need to calculate the constants. This can be done using eigenvalues. Suppose the matrix
𝐴 has eigenvalue 𝜆. Then,
𝜆𝐾 = 𝑐1 𝜆 + 𝑐2
1 2
For eg, if we have 𝐴 = [ ], then what will be the value of 𝐴9 ? For 𝐴, we have –
0 2
𝜆 = 1,2
Thus, we get –
19 = 𝑐1 1 + 𝑐2
29 = 𝑐1 2 + 𝑐2
Solving the 2 equations, we get –
𝑐1 = 511 𝑐2 = −510
Hence, we get –
𝐴9 = 511𝐴 − 510𝐼
For a set of vectors, write them in a matrix and then calculate the rank of the matrix. If the matrix rank
is the same as the number of rows, then the vectors are linearly independent. Otherwise, they are
linearly dependent.
Question
Answer
It is a set of vectors that share a certain common property. A subset of the vector space is called a
vector subspace.
LINEAR SPAN
In the above case, let us write –
𝑉𝑖 = 𝑐1 𝑋1 + 𝑐2 𝑋2 + 𝑐3 𝑋3 + ⋯ + 𝑐𝑛 𝑋𝑛
Watch -
https://www.youtube.com/watch?v=SzMQzgQHIkg&list=PLvTTv60o7qj_tdY9zH7YceES7jfXiZkAz&inde
x=12
59:00 onwards
Basically, if we need to find whether a vector space spans another vector space, we create a set of
non-homogeneous equations. If these set of equations have either a unique or infinitely many
solutions, then the vector space is spanned. Else, it is not spanned
BASIS OF VECTORS
𝑆⃗ = {𝑖̂, 𝑗̂, 𝑘̂ }
In this case, we can use 𝑆⃗ to get 𝐴⃗ by altering the weights. Thus, we can say that 𝑺
⃗⃗ is the basis of 𝑨
⃗⃗ .
For a vector space 𝑆⃗ to be a basis of vector space 𝐴⃗, we need –
Question
Answer
We can see that the 3 vectors are linearly independent (their matrix has rank 3). Now for spanning,
we form the augmented matrix (non-homogeneous equations) as follows –
1 0 0∶ 𝑥
[0 1 0 ∶ 𝑦]
0 0 1∶ 𝑧
We can see that 𝜌(𝐴) = 𝜌(𝐴𝐵) = 3. Hence, there exists a unique solution. Hence, 𝑩 spans 𝑽. Since
both the conditions satisfy, 𝑩 is the basis vector of 𝑽
DIMENSION
The number of distinct elements in the basis of the vector space is the dimension of the vector space.
It has a few properties –
https://www.youtube.com/watch?v=W8uG3SUGjVM&list=PLvTTv60o7qj_tdY9zH7YceES7jfXiZkAz&in
dex=14
LIMITS
• Determinant
• Indeterminant
• Undefined
To check the form, first equate the number expression to a variable (say 𝑥) and then find the values of
𝑥. If –
15
=𝑥
3
𝑥=5
Since 𝑥 takes a unique value, the number is in determinate form. Now let us take the example –
15
=𝑥
0
0. 𝑥 = 15
We can see that no value of 𝑥 can satisfy the equation. Hence, the number is in undefined form. Finally,
let us take the example –
0
=𝑥
0
0. 𝑥 = 0
Here, 𝑥 can take infinitely many values and hence the number is in indeterminate form. Given below
are some standard indeterminate forms –
To calculate the limit, we need to first calculate both – the Left-Hand Limit (LHL) and the Right-Hand
Limit (RHL). Suppose we take the function –
sin 𝑥
𝑓(𝑥) =
𝑥
Now, we get –
We see that –
𝐿𝐻𝐿 = 𝑅𝐻𝐿
When this happens, we declare that the limit exists at that point and the value of the limit is 1.
Question
𝑓(0) = 𝑢𝑛𝑑𝑒𝑓𝑖𝑛𝑒𝑑
But, let’s calculate the limits –
Since 𝐿𝐻𝐿 = 𝑅𝐻𝐿, we can say that the limit exists and the value is 2.
Question
Answer
𝐿𝐻𝐿 = lim−[𝑥] = −1
𝑥→0
𝑅𝐻𝐿 = lim+[𝑥] = 0
𝑥→0
Since the LHL and RHL don’t match, the limit doesn’t exists at 𝑥 = 0
STANDARD FORMS AND APPROACHES
Answer
sin 𝑥 cos 𝑥
lim = lim =1
𝑥→0 𝑥 𝑥→0 1
Question
𝑥3 𝑥5 𝑥7
sin 𝑥 = 𝑥 − + − + ⋯
3! 5! 7!
Hence,
sin 𝑥 𝑥2 𝑥4 𝑥6
= 1 − + − + ⋯ = 1−
𝑥 3! 5! 7!
Therefore,
sin 𝑥
lim [ ]=0
𝑥→0 𝑥
𝑠𝑖𝑛 −1 (𝑥)
lim = 1+
𝑥→0 𝑥
tan 𝑥
lim = 1+
𝑥→0 𝑥
𝑡𝑎𝑛−1 𝑥
lim = 1−
𝑥→0 𝑥
MODEL 2
Question
Answer
1
𝑙 = lim 𝑥 ∗ =1
𝑥→0 𝑥
Hence, we get –
𝟏
𝐥𝐢𝐦(𝟏 + 𝒙)𝒙 = 𝒆
𝒙→𝟎
MODEL 3
Question
Answer
We take –
−𝑥
𝑦 = lim (1 + 𝑥 2 )𝑒
𝑥→∞
−𝑥 2)
ln(1 + 𝑥 2 )
ln 𝑦 = lim 𝑒 ∗ ln(1 + 𝑥 = lim
𝑥→∞ 𝑥→∞ 𝑒𝑥
Now, we can apply the L’Hospital rule on the RHS
ln(1 + 𝑥 2 )
lim =0
𝑥→∞ 𝑒𝑥
Therefore, we get –
ln 𝑦 = 0
𝒆−𝒙
𝒚 = 𝐥𝐢𝐦 (𝟏 + 𝒙𝟐 ) =𝟏
𝒙→∞
MODEL 4
This is the final model and the limit is of the form ∞ − ∞. To solve this case, just try to rationalize and
simplify the expression so that it becomes one of the 3 other models – preferably Model 1.
Question
Now, the limit is in the 0⁄0 form which is Model 1. We can now solve using L’Hospital rule and get the
answer.
LEIBNITZ RULE
CONTINUITY
𝐿𝐻𝐿 ≠ 𝑅𝐻𝐿
For example, let us take the signum function itself –
1 𝑥>0
𝑠𝑔𝑛(𝑥) = { 0 𝑥 = 0}
−1 𝑥<0
Now, at 𝑥 = 0, we get –
𝐿𝐻𝐿 = −1 ; 𝑅𝐻𝐿 = 1
This cannot be made into a continuous function and hence is termed as a non-removable discontinuity.
Type 2 Discontinuity
This is the case where either LHL, RHL or the function value either tends to ±∞ or is oscillatory (can’t
know the exact value).
Question
Here,
NOTE
DIFFERENTIABILITY
To calculate whether a function is differentiable around a point 𝑥 = 𝑎, we calculate the left hand and
right hand differential –
𝑓(𝑎) − 𝑓(𝑎 − ℎ)
𝐿𝐻𝐷 = lim
ℎ→0 ℎ
𝑓(𝑎 + ℎ) − 𝑓(𝑎)
𝑅𝐻𝐷 = lim
ℎ→0 ℎ
If, 𝐿𝐻𝐷 = 𝑅𝐻𝐷 = 𝑓𝑖𝑛𝑖𝑡𝑒 𝑣𝑎𝑙𝑢𝑒, then the function is differentiable at 𝑥 = 𝑎
Question
Answer
For a mod function, the point where the function becomes zero is the point of non-differentiability.
Let us take 𝑥 = −2
|−2 + 2| − |−2 − ℎ + 2| −|−ℎ|
𝐿𝐻𝐷 = lim = lim = −1
ℎ→0 ℎ ℎ→0 ℎ
|−2 + ℎ + 2| − |−2 + 2| |ℎ|
𝑅𝐻𝐷 = lim = lim =1
ℎ→0 ℎ ℎ→0 ℎ
As we can see, 𝐿𝐻𝐷 ≠ 𝑅𝐻𝐷 at 𝑥 = −2. That is the point of non-diff. However, the range asked is from
[0,4]. Therefore, there are no points of non-diff in the given range.
NOTE
• Increasing
• Decreasing
• Constant
The points where the function attains the max and min values are called maxima and minima
respectively. The points where the function doesn’t attain a max or a min value is called a saddle point.
To get the range of values where the function is either decreasing or increasing, we first find the
derivative of the function and plot the same. The range where the derivate is positive is the one where
the function is monotonically increasing and the range where the derivative is negative is the one
where the function is monotonically decreasing.
Question
Answer
𝐷𝑜𝑚𝑎𝑖𝑛 𝑜𝑓 𝑓(𝑥) = 𝑅
Now, we find the derivate of the function as follows –
𝑓 ′ (𝑥) = 2 ∗ (𝑥 2 − 4) ∗ 2𝑥 = 4𝑥 3 − 16𝑥
For Monotonically Increasing
4𝑥 3 − 16𝑥 > 0
Thus,
𝒙 ∈ (−𝟐, 𝟎) ∪ (𝟐, ∞)
For Monotonically Decreasing
4𝑥 3 − 16𝑥 < 0
Thus,
To find the local maxima and minima, we need to examine the critical points which are –
Question
𝑓(𝑥) = (𝑥 2 − 4)2
Answer
First we need to find critical points. Since the function is both continuous and differentiable, we need
only look at the points where the derivate becomes zero.
For 𝒙 = 𝟎
𝑓 ′ (0 − ℎ) > 0
Similarly, we can see that –
𝑓 ′ (0 + ℎ) < 0
Therefore, we can conclude from the first derivate test that 𝒙 = 𝟎 is a local maxima.
Similarly, we perform the analysis for the other two critical points and find that the points 𝒙 = ±𝟐 are
local minima.
First, we find the critical points. Then we calculate the second derivative at those points.
𝑍(𝑥, 𝑦) = 𝑎𝑥 + 𝑏𝑦 + 𝑐
To find the local maxima and minima of the function, we first find the partial derivates wrt to 𝑥, 𝑦 –
𝜕𝑍
𝑝= =𝑎
𝜕𝑥
𝜕𝑍
𝑞= =𝑏
𝜕𝑦
𝜕2𝑍
𝑟= =0
𝜕𝑥 2
𝜕2𝑍
𝑠= =0
𝜕𝑥𝜕𝑦
𝜕2𝑍
𝑡= =0
𝜕𝑦 2
Equating both 𝑝 and 𝑞 to zero will give us the critical points of the form (𝑥, 𝑦). Once we have the critical
point, we calculate the value of –
𝐴 = 𝑟𝑡 − 𝑠 2
Answer
𝐴 = 𝑟𝑡 − 𝑠 2 = 4 > 0
Since 𝐴 > 0 and 𝑟 > 0, the point is the local minima.
INTEGRAL CALCULUS
When we do integration without limits, it is called an indefinite integral and when we do with limits,
it is called a definite integral. There are some properties of definite integrals –
NOTE
𝜋⁄
2
(𝑚 − 1)(𝑚 − 3)(𝑚 − 5) …
∫ 𝑠𝑖𝑛𝑚 (𝑥)𝑑𝑥 = { }∗𝐾
𝑚(𝑚 − 2)(𝑚 − 4) …
0
Where,
1 𝑚 𝑖𝑠 𝑜𝑑𝑑
𝐾 = {𝜋 𝑚 𝑖𝑠 𝑒𝑣𝑒𝑛}
⁄2
NOTE
We can evaluate the GIF integral by splitting the limits into integral subsets as follows –
2 −2 −1 0 1 2
For example, let us try to find the area enclosed between the curves –
𝐶1 ∶ 𝑦 2 = 4𝑥
𝐶2 ∶ 𝑥 2 = 4𝑦
We can plot the graph as follows –
SPHERICAL COORDINATES
Here,
𝜃 ∈ [0, 𝜋]
𝜙 ∈ [0,2𝜋]
To convert the rectangular coordinates into spherical coordinates, we use –
If we have a random variable 𝑋, then the CDF of the same can be given as –
• 𝐹(∞) = 𝑃(𝑋 ≤ ∞) = 1
• 𝐹(−∞) = 𝑃(𝑋 ≤ −∞) = 0
• 0 ≤ 𝐹(𝑥) ≤ 1
• CDF is right continuous, i.e. 𝐹(𝑎) = 𝐹(𝑎+ )
• 𝑓≥0
∞
• ∫−∞ 𝑓(𝑥)𝑑𝑥 = 1
∞
• 𝑓(𝑥) will always be an even function. If it were an odd function, then the ∫−∞ limit would have
resulted in zero instead of 1.
Question
Answer
𝜎 2 = 𝐸[𝑋 2 ] − (𝐸[𝑋])2
Standard Deviation can be defined as –
𝜎 = √𝑉𝑎𝑟𝑖𝑎𝑛𝑐𝑒
Question
A fair coin is tossed thrice. Let 𝑋 be the number of heads. Find the mean, variance and SD of the same.
Answer
𝑋 = (0,1,2,3)
We can write –
𝑿 0 1 2 3
𝑷(𝑿) 1/8 3/8 3/8 1/8
𝜎 = √0.75 = 𝟎. 𝟖𝟔𝟔
• Uniform
• Triangular
• Gaussian/normal
• Rayleigh
• Exponential
• Binomial
• Poisson
Uniform Distribution
𝑎+𝑚+𝑏 𝑎2 + 𝑚2 + 𝑏 2 − 𝑎𝑏 − 𝑏𝑚 − 𝑎𝑚
Triangular See image
3 18
Gaussian/ 1 −(𝑥−𝜇)2
𝑓(𝑥) = 𝑒 2𝜎2 𝜇 𝜎2
Normal 𝜎√2𝜋
𝑓(𝑥)
2
𝑥 −𝑥2 𝜋 4−𝜋
Rayleigh = {𝜎 2 𝑒 2𝜎 𝑥 ≤ 0} 𝜎√ 𝜎2 ∗
2 2
0 𝑒𝑙𝑠𝑒
𝑛 𝑟 𝑛−𝑟
Binomial 𝑟𝐶 𝑝 𝑞 𝑛𝑝 𝑛𝑝𝑞
−𝜆 𝑟
𝑒 𝜆
Poisson 𝜆 𝜆
𝑟!
−𝜆𝑥 1 1
Exponential 𝑓(𝑥) = { 𝜆𝑒 𝑥 > 0}
0 𝑒𝑙𝑠𝑒 𝜆 𝜆2
Question
Calculate the integral below.
∞
2
∫ 𝑒 −𝑥 𝑑𝑥
0
Answer
This is an interesting case. First thing to observe here is that the function is an even function –
2 2
𝑓(−𝑥) = 𝑒 −(−𝑥) = 𝑒 −𝑥 = 𝑓(𝑥)
Thus, we can say –
0 ∞
−𝑥 2 2
∫𝑒 𝑑𝑥 = ∫ 𝑒 −𝑥 𝑑𝑥
−∞ 0
2 1 −(𝑥−0)2
𝑒 −𝑥 = √𝜋 ∗ 𝑒 1
√𝜋 ∗ 1
This resembles a gaussian distribution with 𝜇 = 0 and 2𝜎 2 = 1. We can now use the property of a
gaussian distribution 𝐺(𝑥) –
∞
∫ 𝐺(𝑥)𝑑𝑥 = 1
−∞
Therefore, we get –
√𝜋
𝐼= ∗ 1 = 𝟎. 𝟖𝟖𝟔
2
STATISTICS
STANDARD DEVIATION
We can define –
∑(𝑥𝑖 − 𝑥̅ )2 𝑓𝑖
𝜎=√
∑ 𝑓𝑖
Question
Find all the central tendencies.
Answer
Here,
𝑥𝑖 = {3,9,15,21,27,33,39}
Thus, we can get –
∑ 𝑥𝑖 𝑓𝑖 (3 ∗ 6) + (9 ∗ 11) + (15 ∗ 25) + (21 ∗ 35) + (27 ∗ 18) + (33 ∗ 12) + (39 ∗ 6)
𝑥̅ = =
∑ 𝑓𝑖 6 + 11 + 25 + 35 + 18 + 12 + 6
̅ = 𝟐𝟎. 𝟕𝟑
𝒙
For Median, we need to find the Median Class. The Median class is the class with the middle element
which is the 18 − 24 class. Thus, we can define –
𝐿 = 18 ; 𝐾 = 6 ; 𝑓 = 35
𝐹 = ∑ 𝑓𝑖 = 113 ; 𝐶 = 6 + 11 + 25 = 42
Now, we can calculate the Mode. To do so, we need to find the Modal Class which is the class with
max frequency. This is also 18-24. Thus, we get –
𝑙 = 18 ; 𝐹 = 35 ; 𝐹1 = 18 ; 𝐹−1 = 25 ; 𝐾 = 6
Thus, we can write –
𝐹 − 𝐹−1
𝑀𝑜𝑑𝑒 = 𝑙 + ( ) 𝐾 = 𝟐𝟎. 𝟐𝟐
2𝐹 − 𝐹−1 − 𝐹1
Question
Answer
Option C is the correct answer
PROPOSITIONAL LOGIC
This is a bunch of declarative statements that can either be “TRUE” or “FALSE”. To define the
statements, we use a bunch of connectives –
SYMBOL EXPRESSION DEFINITION
OR 𝐴⋁𝐵 This is equivalent to logical OR
AND 𝐴⋀𝐵 This is equivalent to logical AND
NEGATION ¬𝐴 This is equivalent to logical NOT
IMPLICATION 𝐴→𝐵 This means “if A then B”. It is equivalent to 𝐴̅ + 𝐵
IFF 𝐴⇔𝐵 This is equivalent with XNOR.
• Tautologies – When the statements are always true.
• Contradictions – When the statements are always false.
• Contingencies – When the statements are sometimes true, sometimes false.
If two statements have the same truth table or are true under IFF statement, then they are said to be
Propositional Equivalent. Suppose we have an implication 𝑋 → 𝑌, then we say that 𝑋 is the hypothesis
and 𝑌 is the conclusion. For an implication, we have the following definitions –
PREDICATE LOGIC
A predicate is an expression of one of more variables defined on some domain. We can quantify it
using two main quantifiers –
• Universal Quantifier – It is the for all (∀) operator.
• Existential Quantifier – It is the there exists some (∃) operator.
Now, we can also define the quantifiers as follows –
∀𝑥𝑃(𝑥) = 𝑃(𝑥1 ) ∧ 𝑃(𝑥2 ) ∧ … ∧ 𝑃(𝑥𝑛 )
∃𝑥𝑃(𝑥) = 𝑃(𝑥1 ) ∨ 𝑃(𝑥2 ) ∨ … ∨ 𝑃(𝑥𝑛 )
Therefore, we can define their negations as follows –
RULES OF INFERRENCE
As the name suggests, we can use these to infer statements. The standard form is as follows –
𝑋
𝑌
𝑍
∴𝑆
The statements on the top (𝑋, 𝑌, 𝑍) are called hypothesis or premises. The statement at the bottom
(𝑆) is called the conclusion. Basically, we say that if premises 𝑋, 𝑌, 𝑍 are true, then the conclusion 𝑆 is
a tautology. Let us take an example –
𝑃→𝑄
𝑄→𝑅
∴𝑃→𝑅
How do we check this? Let us draw the truth tables –
𝑷 𝑸 𝑹 𝑷→𝑸 𝑸→𝑹 𝑷→𝑹
0 0 0 1 1 1
0 0 1 1 1 1
0 1 0 1 0 1
0 1 1 1 1 1
1 0 0 0 1 0
1 0 1 0 1 1
1 1 0 1 0 0
1 1 1 1 1 1
We can see that whenever the hypothesis 𝑃 → 𝑄 and 𝑄 → 𝑅 are true, then the conclusion 𝑃 → 𝑅 is
also true making it a tautology. We can also understand this with intuition. Let us take –
𝑃 − 𝑌𝑜𝑢 ℎ𝑎𝑣𝑒 𝑡ℎ𝑒 𝑝𝑎𝑠𝑠𝑤𝑜𝑟𝑑
𝑄 − 𝑌𝑜𝑢 𝑐𝑎𝑛 𝑙𝑜𝑔𝑖𝑛 𝑡𝑜 𝑦𝑜𝑢𝑟 𝑒𝑚𝑎𝑖𝑙 𝑎𝑐𝑐𝑜𝑢𝑛𝑡
𝑅 − 𝑌𝑜𝑢 𝑐𝑎𝑛 𝑠𝑒𝑛𝑑 𝑎𝑛 𝑒𝑚𝑎𝑖𝑙
So this problem becomes – “If you have the password, you can login to your email account. If you can
login to your email account, you can send an email. Therefore, if you have the password, you can send
an email.”
There are some standard rules of inference. You need not remember this by-heart as you can prove
them. Just try to remember the “Modus” rules.
SET THEORY
We already know a bunch of things about sets, but there are some concepts about relations and
functions that need to be explored. First, let us explore the concept of Relations.
A relation 𝑥𝑅𝑦 between two sets 𝑥 and 𝑦 is basically a subset of 𝑥 × 𝑦. Therefore, if the cardinality of
the sets are |𝑥| = 𝑚 ; |𝑦| = 𝑛, then the cardinality of 𝑅 can vary from 0 ≤ |𝑅| ≤ 𝑚𝑛. For any relation
𝑥𝑅𝑦, the 𝑥 and 𝑦 values make up the domain and range respectively.
Types of Relations
TYPE DEFINITION
Null 𝑥𝑅𝑦 = 𝜙
Full 𝑥𝑅𝑦 = 𝑋 × 𝑌
Reflexive If (𝑎, 𝑎) is a part of the relation ∀𝑎 ∈ 𝐴
Identity 𝑅 = {(𝑥, 𝑥) | 𝑥 ∈ 𝑋}
′
Inverse 𝑅 = {(𝑏, 𝑎)| (𝑎, 𝑏) ∈ 𝑅}
Symmetric If 𝑥𝑅𝑦 implies 𝑦𝑅𝑥 ∀𝑥, 𝑦 ∈ 𝐴
Anti-symmetric If 𝑥𝑅𝑦 and 𝑦𝑅𝑥 implies 𝑥 = 𝑦, ∀𝑥, 𝑦 ∈ 𝐴
Transitive If 𝑥𝑅𝑦 𝑎𝑛𝑑 𝑦𝑅𝑧 implies 𝑥𝑅𝑧 ∀𝑥, 𝑦, 𝑧 ∈ 𝐴
Equivalence A relation that is reflexive, symmetric and transitive
FUNCTIONS
A function 𝑓: 𝑋 → 𝑌 is a relationship from elements in one set 𝑋 (also called domain) to another set 𝑌
(also called codomain). Basically, 𝑥 ∈ 𝑋 and 𝑦 ∈ 𝑌, if there is a unique (𝑥, 𝑦) ∈ 𝑅, then it is a function.
Here, 𝑥 is called the pre-image and 𝑦 is the image. These definitions are fine and all, but not really
important. The important stuff is the TyPeS oF fUnCtIoNs –
Injective Functions
These are one-to-one functions. A function 𝑓: 𝐴 → 𝐵 is said to be injective if for each value in 𝐵, there
exists only one pre-image in 𝐴. For example, 𝑓: 𝑁 → 𝑁, 𝑓(𝑥) = 𝑥 2 is injective as for each natural
number there is a unique square. On the other hand, 𝑓: 𝑅 → 𝑅, 𝑓(𝑥) = 𝑥 2 is NOT injective as real
numbers include positive and negative numbers and both give the same square. So, for one element
in co-domain, there are two pre-images in domain.
Surjective Functions
These are onto functions. If for a function, every element in the co-domain has at least one pre-image
in domain, then it is an onto function.
Bijective Functions
If a function is both injective and surjective, then it is bijective. For a function 𝑓: 𝐴 → 𝐵 to be bijective,
|𝑨| = |𝑩|.
NOTE
If 𝑓 and 𝑔 are injective, then 𝑓𝑜𝑔(𝑥) = 𝑓(𝑔(𝑥)) is also injective. Similarly, if 𝑓 and 𝑔 are surjective,
then 𝑓𝑜𝑔(𝑥) = 𝑓(𝑔(𝑥)) is also surjective.
GROUP THEORY
Let us consider a non-void set 𝐺 and a binary operator ⨁ such that for 𝑎, 𝑏 ∈ 𝐺, we get 𝑐 = 𝑎⨁𝑏 and
𝑐 ∈ 𝐺. This property is called closure property. A set following the closure property is called a group,
if –
• The binary operator is associative
• There is an identity element in 𝐺
• There is an inverse element in 𝐺
A group wherein the binary operator is commutative is called an abelian. A group has certain theorem
attached to them –
• A group has a unique identity element
• A group has a unique inverse element
• In a group 𝐺, (𝑎−1 )−1 = 𝑎 ∀𝑎 ∈ 𝐺. Also, (𝑎𝑏)−1 = 𝑏 −1 𝑎−1.
The number of elements in the group is called its order. Minimum order value will be 1 which will be
the identity element. We can define some terms that help to get the bigger picture –
• Semi-group – This is a non-empty set that with a binary operation that follows the closure and
associative properties.
• Monoid – This is a semi-group that has an identity element.
• Group – It is a Monoid that has an inverse element.
• Abelian – It is a group which satisfies the commutative property.
• Cyclic Group – A group 𝐺 is said to be cyclic if there is an element 𝑥 ∈ 𝐺 such that all elements
in 𝐺 can be written as 𝑥 𝑛 where 𝑛 ∈ 𝑍. A cyclic group is always an abelian group.
• Sub-group – A subset 𝐺′ of a group 𝐺 is said to be a sub-group if 𝐺′ satisfies the properties of
a group. If 𝐺 is cyclic, then 𝐺′ will also be cyclic. If 𝐺 is abelian, then 𝐺′ will also be abelian.
• Partially Ordered Set (POSET) – This is a non-void set with a binary relation that is reflexive,
anti-symmetric and transitive.
More about POSETs, Hasse Diagram and Lattices here -
https://www.tutorialspoint.com/discrete_mathematics/discrete_mathematics_group_theory.htm
GRAPH THEORY
We already know a little bit about general graphs, vertices and edges. Here is some more points that
were not covered before.
Bi-partite Graph
A graph 𝐺 is bi-partite if it can be split into two disjoint sets in such a way that each edge has one end
in 1 set and the other end in the other set. If every node in one set is connected to every node in the
other set, then it is called a complete bi-partite graph.
Planar Graph
A graph which can be drawn and doesn’t have any edges crossing over each other is called a planar
graph.
Euler Graph
A connected graph 𝐺 is called an Euler graph, if there is a closed trail which includes every edge of the
graph 𝐺. An Euler path is a path that uses every edge of a graph exactly once. An Euler path starts and
ends at different vertices.
Graph Colouring
This is the process to assign a colour to each node in such a way that the neighbours have a different
colour. The minimum number of colours needed is called the chromatic number.
COMBINATORICS
This is the study of counting, combination and permutations.
BINOMIAL THEOREM
(𝑥 + 𝑦)𝑛 = 𝐶0𝑛 𝑥 𝑛 + 𝐶1𝑛 𝑥 𝑛−1 𝑦 + 𝐶2𝑛 𝑥 𝑛−2 𝑦 2 + ⋯ + 𝐶𝑛−1
𝑛
𝑥𝑦 𝑛−1 + 𝐶𝑛𝑛 𝑦 𝑛
This works when 𝑛 is a non-negative integer. This can be used to also write –
Question
Answer
25
𝐶𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 = 𝐶13 ∗ 213 ∗ (−3)12
NOTE
Suppose we have 𝑟 types of a product and we have to select 𝑛 products of any type. Then the number
of ways to do so is given by 𝑪𝒏+𝒓−𝟏
𝒏
Question
A man wants to buy 7 birds. The shop has pigeons, sparrows and finches. What is the total number of
ways for the man to buy the birds?
Answer
Here, 𝑛 = 7 ; 𝑟 = 3. Therefore,
𝑁 = 𝐶77+3−1 = 𝟑𝟔
DERANGEMENT
It is the situation where none of the objects are in their designated places. For 𝑛 objects, the
derangement is given by –
1 1 1 1 1
𝐷𝑛 = 𝑛! ∗ ( − + − + ⋯ + (−1)𝑛 )
2! 3! 4! 5! 𝑛!
Here, 𝑛 = 8. Thus, we get –
𝐷8 = 𝟏𝟒𝟖𝟑𝟑
GENERATING FUNCTIONS
𝐺(𝑥) = ∑ 𝑎𝑖 𝑥 𝑖
𝑖=1
For example, let us take 𝐴 = [1,2,3, … ]. The generating function can be written as –
𝐺(𝑥) = 1 + 2𝑥 + 3𝑥 2 + 4𝑥 3 + ⋯
𝑥𝐺(𝑥) = 𝑥 + 2𝑥 2 + 3𝑥 3 + 4𝑥 4 + ⋯
Thus, we get –
𝐺(𝑥)(1 − 𝑥) = 1 + 𝑥 + 𝑥 2 + 𝑥 3 + ⋯
𝑥𝐺(𝑥)(1 − 𝑥) = 𝑥 + 𝑥 2 + 𝑥 3 + ⋯
Now, we get –
𝐺(𝑥)(1 − 𝑥)2 = 1
𝟏
𝑮(𝒙) =
(𝟏 − 𝒙)𝟐
TAYLOR SERIES
DIAGONALIZATION OF A MATRIX
𝐴 = 𝐶𝐷𝐶 −1
Where 𝐶 is the matrix where every column is an eigenvector of 𝐴 and 𝐷 is a diagonal matrix where the
diagonal elements are eigenvalues of 𝐴. The question now is, why even do this? Why even diagonalize
a square matrix? The answer to this is in the process of finding the power of diagonal matrix. Basically,
“the 𝑛𝑡ℎ power of a diagonal matrix is the same as taking the 𝑛𝑡ℎ power of each element.” For example,
1 0 10 10
010 ] = [1 0
[ ] = [110 10 ]
0 2 0 2 0 1024
Now, let’s find the value of 𝐴2 –
𝐴𝑛 = 𝐶𝐷 𝑛 𝐶 −1
It is now much easier to calculate higher powers of 𝐴. However, 𝐴 can only be diagonalized when 𝐶 is
invertible which in turn will only happen when it has 𝑛 linearly independent rows/columns. Therefore,
for a matrix 𝐴 to be diagonalizable, we need –
Question
We can see that for this matrix, 𝜆 = {0,1, −1}. We can now create the eigen vectors of the matrix as
follows –
1 −1 1
𝐶 = [1 1 1]
1 0 2
We can see that 𝐶 has 3 linearly independent rows and also |𝐶| = 2 ≠ 0. Therefore, 𝐶 is invertible and
hence 𝐴 is diagonalizable.
INTEGRATION TRICKS
𝐼 = ∫ 𝑒 𝑔(𝑥) 𝑓(𝑥)𝑑𝑥
Let us assume 𝐷 = 𝑒 𝑔(𝑥) and 𝐹 = 𝑓(𝑥). Then, the integration can be solved as –
𝐼 = 𝐷𝐹 ′ − 𝐷 ′ 𝐹 ′′ + ∫ 𝐷′′𝐹′′
Question
𝑑𝑥
𝐼=∫
𝑥2 +𝑥+1
Answer
Here,
𝐷 = 𝑏 2 − 4𝑎𝑐 = −3 < 0
Hence,
2 2𝑥 + 1
𝐼= 𝑡𝑎𝑛−1 ( )
√3 √3
Question
𝑑𝑥
𝐼=∫
𝑥 2 + 3𝑥 + 2
Answer
Here,
𝐷 = 𝑏 2 − 4𝑎𝑐 = 1 > 0
Hence, we need to find the roots of the equation. We get –
𝛼 = 1 ;𝛽 = 2
Thus, we get –
1 𝑥+1
𝐼= log | |
√1 𝑥+2
Integration by parts
TO WATCH AGAIN
• https://www.youtube.com/watch?v=HtuVQxzT73k&list=PLvTTv60o7qj_tdY9zH7YceES7jfXiZk
Az&index=20
• https://www.youtube.com/watch?v=HtuVQxzT73k&list=PLvTTv60o7qj_tdY9zH7YceES7jfXiZk
Az&index=21
• https://www.youtube.com/watch?v=HtuVQxzT73k&list=PLvTTv60o7qj_tdY9zH7YceES7jfXiZk
Az&index=22
•