P P Q P PQ P PQ TQ T: MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
P P Q P PQ P PQ TQ T: MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
P P Q P PQ P PQ TQ T: MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
Answer : ( p ) → ( p → q ) p ( p q ) ( p p ) q T q T
4. Write the truth table for the formula ( p → q ) (p → q ).
Answer :
p q p q p → q p → q ( p → q ) ( p → q ).
T T F F T T T
T F F T F T F
F T T F T F F
F F T T T T T
5. What are the negation of the statements x( x 2 x ) and x( x 2 = 2)?
(
Answer : The negation of x( x 2 x ) is x( x 2 x ) )
x ( x 2 x )
x( x 2 x )
(
The negation of x( x 2 = 2)is x( x 2 = 2) )
x ( x 2 = 2)
x( x 2 2)
6. Write an equivalent formula for P ( Q R ) which contains neither the
biconditional nor the conditional operators.
(
Answer : P ( Q R ) P ( Q → R ) ( R → Q ) )
St. Joseph’s College of Engineering Page No.: 1
MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
P ( ( Q R ) ( R Q ) )
7. Write in symbolic form “If you work hard, then you will be rewarded”
[APR 2023]
Answer : Let P: ‘you work hard’ and Q: ‘you will be rewarded’
Symbolic Form: P → Q .
8. When do you say that two compound propositions are equivalent?
Answer : Two statements A and B are equivalent if and only if A B is a tautology.
It is denoted by the symbol A B which is read as “A is equivalence to B”
9. Prove that ( p q ) ( p q ) ( p q )
Answer : ( p q ) ( p → q ) ( q → p )
( p q ) ( q p )
( p q ) ( p p ) ( q q ) ( p q )
( p q ) ( p q )
10. Given P = {2,3,4,5,6} state the truth value of the statement
( x P) ( x +3=10)
Answer : P = {2,3,4,5,6}, None of the values taken from the set P satisfies the
Equation ( x +3=10). Therefore, Truth value of the quantified statement is false.
11. Define Contradiction.
Answer : A propositional formula which is always false irrespective of the truth
values of the individual variables is a contradiction.
12. Express the statement, “some people who trust others are rewarded” in
symbolic form.
Answer : Let P ( x ) : x is a person ; T ( x ) : x trusts others ; R ( x ) : x is rewarded
Symbolic form: ( x ) P ( x ) T ( x ) R ( x )
13. Give the converse and the contrapositive of the implication “If it is raining,
then I get wet”. [NOV 2023]
Answer : P : It is raining ; Q : I get wet.
Q → P : (converse) if I get wet, then it is raining.
Q → P : (contrapositive) If I do not get wet, then it is not raining.
14. Express in symbolic form, everyone who is healthy can do all kinds of work
[NOV 2023]
Answer : Let P(x): x is healthy and Q(x): x do all work
Symbolic form x(P( x) → Q( x)) .
15. Write the statement in symbolic form “Some real numbers are rational
Answer : Let 𝑅(𝑥): 𝑥 is a real number and 𝑄(𝑥): 𝑥 is rational
Symbolic form: x ( R ( x ) Q ( x ) ) .
Answer : p → ( q → r ) p ( q r )
( p q ) r ( p q ) r ( p q ) → r
20. What is the duality law of logical expression? Give the dual of
( P F ) (Q T )
Answer : In an expression, if we replace ,, T, F respectively by ,, F, T the
resulting new formula is the dual of the given expression.
Dual of the given formula: ( P T ) (Q F )
PART B
1. Prove that ( P → Q ) ( Q → R ) ( P → R ) .
2. Prove that ( Q → P ) ( R → Q ) ( P → R ) .
Answer : We have to prove that S : ( Q → P ) ( R → Q ) → ( P → R ) is a tautology.
(( Q → P ) ( R → Q )) → ( P → R )
( (Q P ) ( R Q ) ) ( P R ) By P → Q P Q
( Q P ) ( (Q R ) P ) By P T P
(Q P ) ( (Q P ) R ) By Associative Law & Demorgan’s Law
( (Q P ) (Q P ) ) R By Associative Law
T R By P P T
T By P T T . Hence the implication
3. Without constructing truth table verify whether Q ( P Q ) (P Q )
is a contradiction or tautology. [APR 2023]
Answer
Q ( P Q ) ( P Q )
Q (( P P ) Q ) By Distributive Law
(Q ( P P )) (Q Q ) By Distributive Law
(Q T ) T By P P T
T T = T By P T T
Hence, Q ( P Q ) (P Q ) is tautology.
4. Show the following implications without constructing the truth table.
( P → Q) → Q ( P Q)
Answer : To Prove this, it is enough prove that [(P→Q) →Q ]→PQ is a tautology
(P → Q ) → Q → (P Q )
[((P Q )) Q] → ( P Q ) Rule P → Q P Q
[( P Q )) Q] → ( P Q ) Demorgan' s Law
[( P Q )) Q] ( P Q ) Rule P → Q P Q
[(P Q )) Q] ( P Q ) Demorgan' s Law
[( P Q ) (Q Q )] ( P Q ) Distributive Law
[( P Q ) F ] ( P Q ) Complement Law P P F
Answer : Let S ( P Q ) ( P R )
(( P Q ) T ) ((P R ) T ) By P T P
(( P Q ) (R R )) ((P R ) (Q Q )) By P P T
( P Q R ) ( P Q R ) (P R Q ) (P R Q )
( P Q R ) ( P Q R ) (P Q R ) (P Q R ) ( PDNF )
S The remaining min terms of P, Q and R.
S (P Q R) ( P Q R ) ( P Q R ) (P Q R ).
(S ) Apply duality principle to S
S (P Q R) (P Q R ) (P Q R ) ( P Q R ).
Which is the required PCNF.
6. Without constructing truth table obtain the product of sums canonical form
of the formula ( P → R ) ( Q P ) . Hence find the sum of products canonical.
[NOV 2023]
Answer : S ( P → R ) (Q P )
( P ) R (Q → P ) ( P → Q ) By P → Q P Q; Q P (Q → P ) ( P → Q )
7. E A T From(6) ( P → Q P Q )
6. R T From (3,5) P, P→ R R
8. P Q Rule P(3,7)
9. P Rule T(8) P Q P , Q
Answer :
Premise : x( p( x ) q( x )) ;
Assumed Premise : ( xp( x ) xq( x )) = x ( p( x )) x ( q( x ))
Conclusion : False
Steps Premises Rule Reason
1 x ( p( x )) x ( q( x )) P Assumed Premise
2 xp (x ) T P Q P ,Q
3 ( x ) q ( x ) T P Q P ,Q
4 p(a ) T E.S
5 q(a ) T US
6 p(a) q(a) T P ,Q P Q
11 F T P P F
18. Show the premises “One student in this class knows how to write programs in
JAVA” and “Everyone who knows how to write programs in JAVA can get a high
paying job” imply the conclusion “someone in this class can get a high paying
job”. [APR 2023]
Answer : C ( x ) : x is in this class ; J ( x ) : x knows JAVA programming
H ( x ) : x can get a high paying job
( ) (
Premises: x C ( x ) J ( x ) and x J ( x ) → H ( x ) . )
Conclusion : x ( C ( x ) H ( x ) )
Step Premises Rule
1 x ( C ( x ) J ( x ) ) P
5 x ( J ( x ) → H ( x ) ) P
6 J (a) → H (a) US and (5)
7 H (a) From (4) and (6)
8 C (a) H (a) From (3) and (7) ( P , Q P Q )
9 x ( C ( x ) H ( x ) ) EG and (8)
19. Verify the validity of the following argument. Every living thing is a plant or
an animal. John’s gold fish is alive and it is not a plant. All animals have hearts.
Therefore John’s gold fish has a heart. [NOV 2023]
Solution :
L(x) : x is a living thing P(x) : x is a plant ; A(x) : x is a animal
H(x) : x is a heart , j : Jack Gold Fish
Premises : x [L(x) →(P(x) A(x))] , L(j) ¬ P(j), x (A(x) → H(x))
Conclusion : H(j)
Steps Premises Rule
1 x [L(x) →( P(x) A(x))] Rule P
2 L(j) →( P(j) A(j)) Rule Universal Specification
3 L(j) ¬ P(j) Rule P
4 L(j) Rule T , From (3) P Q P,Q
5 ¬ P(j) Rule T , From (3) P Q P,Q
6 P(j) A(j) Rule T, From (2) & (4) P, P→ R R
7 ¬ P(j) → A(j) Rule T, From (6) , P→Q¬PQ
8 A(j) Rule T, From (5) & (7) P, P→ R R
9 x (A(x) → H(x)) Rule P
10 A(j) → H(j) Rule Universal Specification
11 H(j) Rule T, From (8) & (10) P, P→ R R
20. Show that the following is valid. Babu is in this class watches whale watching.
Everyone who watches whale watching cares about ocean pollution.
Therefore, someone in the class cares about the ocean pollution.
Answer :
S ( x ) : x is in this class ; W ( x ) : x watches whale watching programme
O ( x ) : x cares about ocean pollution. ; b : Babu
Premises : S ( b ) W ( b ) and x (W ( x ) → O ( x ) ) ;
Conclusion : (x) ( B ( x ) O ( x ) )
Steps Premises Rule
1 S (b) W (b ) Rule P
2 W (b) Rule T (1) P Q P,Q
3 ( x) (W ( x ) → O ( x ) ) Rule P
4 W (b) → O (b ) Rule US
5 O (b) Rule T(3,5) ( P, P → Q Q)
6 B (b) O (b ) Rule T (3,6) ( P, Q P Q)
7 (x) ( B ( x ) O ( x ) ) Rule EG
UNIT – II COMBINATORICS
PART A
n( n + 1)
1. Use Mathematical induction to show that 1 + 2 + 3 + + n = .
2
n(n + 1)
Answer : Let P ( n) : 1 + 2 + 3 + + n =
2
Basis: LHS = 1; RHS = 1(1 + 1) = 1, LHS = RHS . Therefore , P(1) is true.
2
Induction: Assume that P ( k ) is true, i.e., 1 + 2 + 3 + + k = k(k + 1)
2
Claim: P ( k + 1) is true
k(k + 1) k 2 + 3k + 2
Now 1 + 2 + 3 + + k + ( k + 1) = + ( k + 1) =
2 2
= (k + 1)(k + 2) = (k + 1)((k + 1) + 1)
2 2
Therefore, P ( k + 1) is true. By induction, 1 + 2 + 3 + + n = n(n + 1)
2
2. State pigeon hole principle.
Answer : If ( n + 1) pigeon occupies n holes then at least one hole has more
than 1 pigeon.
3. State the generalized pigeon hole principle.
Answer : If m pigeon occupies n holes ( m n ) , then at least one hole has
m − 1
more than + 1 pigeon.
n
4. Show that, among 100 people, at least 9 of them were born in the same month.
[NOV 2023]
Answer : Here m = no. of people =100 ; n = no. of month =12. Then by
100 − 1
generalized pigeon hole principle, + 1 = 9 Were born in the same month.
12
St. Joseph’s College of Engineering Page No.: 12
MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
8. How many ways are there to form a committee, if the committee consists of 3
educationalist and 4 socialist ,if there are 9 educationalist and 11 socialist?
Answer : The 3 educationalists can be chosen from 9 educationalists in 9C3 ways.
The 4 socialists can be chosen from 11 socialist in 11C4 ways. By product rule, the
no of ways to select, the committee is = 9C3 .11C4 = 27720 ways.
9. There are 5 questions in a question paper in how many ways can a boy solve
one or more questions?
Answer : The boy can dispose of each question in two ways. He may either solve
it or leave it. Thus, the number of ways of disposing all the questions= 25 . But this
includes the case in which he has left all the questions unsolved. The total no of
ways of solving the paper = 25 − 1 = 31.
10. What is well ordering principle?
Answer : Every non empty set of non-negative integers has the least element
11. Find the recurrence relation whose solution is S ( n) = a n , n 1 [NOV 2023]
n −1
Answer : Given S (n) = a S (n − 1) = a
n
an
S (n − 1) =
a
S (n) − aS (n − 1) = 0 is the required recurrence relation.
13. Find the associated homogeneous solution for an = 3an−1 + 2n . [APR 2023]
16. Find the generating function for the sequence ‘s’ with terms 1,2,3,4……..
1
Answer : G(x) = G(s,x) = (n+ 1)x
n=0
n
= 1 + 2x + 3x 2 + ......... = (1 − x )−2 =
(1 − x)2
.
r =0 2
n
3n+1 − 1
Answer : P(n): 3 =
r
r =0 2
Basis : To Prove P(0) is true
Take n=0
St. Joseph’s College of Engineering Page No.: 14
MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
30+1 − 1 2
LHS = 30 = 1; RHS = = = 1 LHS = RHS
2 2
P(0) is true
Induction. Let us assume that P(k) istrue
3k+1 − 1
(i .e.) P(k)= = 1 + 3 + 32 + 33 + ... + 3k − − − −( A)
2
Claim: P(k+1) is true
3k+1 − 1 k+1 3.3k +1 − 1
P(k + 1) = 1 + 3 + 32 + 33 + ... + 3k + 3k +1 = +3 = by ( A)
2 2
3k+2 − 1 3( k +1)+1 − 1
= =
2 2
3(k+1)+1 − 1
Hence P(k+1)= , P(k+1) is true.
2
By Principle of Mathematical Induction, P(n) is true for all positive integer n and
n
3n+1 − 1
hence 3
r =0
r
=
2
n
n(n + 1)(2n + 1)
2. Using Mathematical Induction, prove that i
i =1
2
=
6
n(n + 1)(2n + 1)
Answer: Let P(n):12 + 22 + 32 + ... + n2 =
6
Basis: To prove P(1) is true
For n = 1
1(1 + 1)(2 + 1)
LHS = 12 = = RHS . 1 = 1 . So P(1) is true.
6
Induction: Assume that P(k ) is true.
k(k + 1)(2k + 1)
(i .e.) 12 + 22 + 32 + ... + k 2 = − − − −( A)
6
Claim: P(k + 1) is true
(k + 1)(k + 2)(2k + 3)
(i .e.) To prove P(k + 1):12 + 22 + 32 + ... + ( k + 1 ) =
2
6
k(k + 1)(2k + 1)
Consider ( )
12 + 22 + 32 + ... + k 2 + ( k + 1) =
2
6
+ ( k + 1) (From A)
2
k(k + 1)(2k + 1) + 6 ( k + 1)
2
(k + 1)(2k 2 + k + 6k + 6)
= =
6 6
(k + 1)(2k 2 + 7k + 6) (k + 1)(k + 2)( 2k + 3)
= =
6 6
which is P(k + 1) . (i.e.) P(k + 1) is true whenever P(k ) is true.
By Principle of Mathematical Induction, P(n) is true for all positive integer n .
1 1 1 n
3. Using Mathematical Induction Show that + + ... + =
1.2 2.3 n(n + 1) n + 1
1 1 1 n
Answer : Let P(n): + + ... + =
1.2 2.3 n(n + 1) n + 1
Basis: To prove P(1) is true
For n = 1
1 1 1 1
LHS = = ; RHS = = . LHS = RHS . So P(1) is true.
1.2 2 1+1 2
Induction: Assume that P(k ) is true.
1 1 1 k
(i .e.,) + + ... + = − − − − − −( A)
1.2 2.3 k(k + 1) k + 1
Claim: P(k + 1) is true
1 1 1 k +1
(i .e.,) To prove P(k + 1): + + ... + =
1.2 2.3 (k + 1)(k + 2) k + 2
1 1 1 1 k 1
Consider + + ... + + = + (From A)
1.2 2.3 k(k + 1) (k + 1)(k + 2) k + 1 (k + 1)( k + 2)
k(k + 2) + 1 (k 2 + 2k + 1)
= =
(k + 1)(k + 2) (k + 1)(k + 2)
(k + 1)2 (k + 1)
= =
(k + 1) (k + 2) (k + 2)
which is P(k + 1) . (i.e.) P(k + 1) is true whenever P(k ) is true.
By Principle of Mathematical Induction, P(n) is true for all positive integer n .
4. Prove by mathematical induction that 6 + 7 is divisible by 43 for each
n+ 2 2n+ 1
6 5
(b) Two men can be selected in C 2 ways and two women can be selected in C2 .
6 5
Hence no. of ways of selecting 2 men and 2 women are C 2 X C 2 = 150 ways .
6 5
(c) Number of ways of selecting four people and all of same sex is C 4 + C 4 = 20
ways.
6. Find the number of integers between 1 and 250 that are not divisible by any
of the integers 2, 3, 5 &7. [APR 2023]
Answer : Let A, B, C,D are the set of integers between 1 and 250 that are divisible
by 2, 3, 5, 7 respectively.
250 250 250 250
| A |= = 125, | B |= 3 = 83 | C |= 5 = 50, | D |= 7 = 35
2
250 250 250 250 250 250
| A B |= = = = 41; | A C |= = = = 25
LCM(2,3) 2 3 6 LCM(2,5) 2 5 10
250 250 250 250 250 250
| A D |= = = = 17;| B C |= = = = 16
LCM(2,7) 2 7 14 LCM(3,5) 5 3 15
250 250 250 250 250 250
| B D |= = = = 11 ; | C D |= = = =7
LCM(7,3) 7 3 21 LCM(5,7) 5 7 35
250 250 250 250
| A B C |= = = 8 ;| A B D |= = =5
LCM(2,3,5) 2 3 5 LCM(2,3,7) 2 3 7
250 250 250 250
| A C D |= = = 3 ; | B C D |= = =2
LCM(2,5,7) 2 5 7 LCM(3,5,7) 3 5 7
250 250
| A B C D |= = =1
LCM(2,3,5,7) 2 3 5 7
| A B C D |=| A | + | B | + | C | + | D | − | A B | − | A C | − | A D | − | B C | − | B D |
−|C D| + | A B C | + | A B D| + | A C D| + | B C D|
−| A B C D|
= 125 + 83 + 50 + 35 – 41– 25–17 –16 –11–7 + 8 + 5 + 3 + 2 –1 = 193.
The number of integers between 1 and 250 that is divisible by any of the integers
2, 3, 5 and 7=193
Therefore, not divisible by any of the integers 2, 3, 5 and 7=250–193=57.
7. How many bit strings of length 10 contains (a) exactly four 1’s, (b) at most
four 1’s (c) at least four 1’s (d) an equal number of 0’s and 1’s
Answer : A bit string of length 10 can be considered to have 10 positions.
a) These 10 positions should be filled with four 1’s and six 0’s.
10!
Therefore, No. of required bit strings = = 210
4!6!
b) The 10 positions should be filled with (i) no 1’s and ten 0’s (ii) one 1’s and nine
0’s (iii) two 1’s and eight 0’s (iv) three 1’s and seven 0’s (v) four 1’s and six 0’s.
10! 10! 10! 10! 10!
Therefore Required no. of bit strings = + + + +
0!10! 1!9! 2!8! 3!7! 4!6!
= 1 + i ,1 − i
Therefore , an = A(1 + i )n + B(1 − i )n , where A and B are arbitrary constants
y
Now, we have z = x + iy = r[cos + i sin ] , where = tan
−1
; r = x 2 + y2
x
y
= tan−1 = tan−1 (1) = & r = x 2 + y2 = 1 + 1 = 2. since x = y = 1.
x 4
By Demovire’s theorem, we have
n n
n
(1 + i ) = 2 cos + i sin
n
= 2 cos + i sin
4 4 4 4
n n n
= 2 cos + i sin
4 4
n n
and (1 − i )n = [ 2]n cos − i sin
4 4
n n n n n n
Now, an = A 2 cos + i sin + B 2 cos − i sin
4 4 4 4
n n n
= 2 ( A + B )cos + i( A − B )sin
4 4
n n n
an = 2 C1 cos + C2 sin − − − − − (1)
4 4
(1) is the required solution. Let C1 =𝐴 + 𝐵, C2 =𝑖(𝐴 − 𝐵)
Since 𝑎0 = 1, 𝑎1 = 2
0
(1) a0 = 2 (C1 cos 0 + C2 sin 0) = C1
C1 = 1
1
Now, a1 = 2 C1 cos + C2 sin
4 4
1 1
2 = 2 C1 + C2 = C1 + C 2
2 2
C2 = 1 since C1 = 1
n n n
an = 2 cos + sin
4 4
11. Solve the recurrence relation an − 5an−1 + 6an−2 = 7 .
n
[NOV 2023]
Answer : Associated homogeneous equation is an − 5an−1 + 6an−2 = 0
The characteristic equation is r 2 − 5r + 6 = 0 r = 2,3
The solution is an( h) = 1(2)n + 2(3)n
To find PI:
Since F (n) = 7n then solution is of the form C .7n , where C is constant.
Therefore, the equation an = 5an−1 − 6an−2 + 7n becomes
C7n = 5C .7n−1 − 6C .7n−2 + 7n − − − −(1) (Replace an = C7n , an−1 = C7n−1 , an−2 = C7n−2 )
C 7n 5C .7n−1 6C .7n−2 7n
(1) = n −2 − n −2 + n −2
7n−2 7 7 7
7 C = 5C .7 − 6C + 7 49C = 35C − 6C + 49
2 2
49
20C = 49 C =
20
49
Hence, the PI is an( p ) = 7n
20
The general Solution is an = an( h) + an( p)
49
an = 1(2)n + 2(3)n + 7n
20
12. Solve the recurrence relation an = 6an−1 − 11an−2 + 6an−3 with a0 = 2, a1 = 5, a2 = 15 .
Answer: The recurrence relation can be written as an − 6an−1 + 11an−2 − 6an−3 = 0
The characteristic equation is r 3 − 6r 2 + 11r − 6 = 0 r = 1,2,3
The solution is an = 1 .(1)n + 2 .(2)n + 3 .(3)n − − − − − − − − − − − ( A)
Given a0 = 2, Put n = 0 in ( A),weget 1 + 2 + 3 = 2 − − − − − (1)
Given a1 = 5, Put n = 1 in ( A),weget 1 + 2 2 + 33 = 5 − − − − − (2)
Given a2 = 15, Put n = 2 in ( A),weget 1 + 4 2 + 93 = 15 − − − − − (3)
Solving (1),(2) and (3), we get , 1 = 1, 2 = −1, 3 = 2
( A) an = 1.(1)n − 1.(2)n + 2.(3)n
The Solution is an = (1)n − (2)n + 2.(3)n
13. Solve the recurrence relation an+2 − an+1 − 6an = 0 with a0 = 2, a1 = 1 using
generating functions.
Answer : The given recurrence relation is an+2 − an+1 − 6an = 0
Multiply x n on both sides,
an+2 x n − an+1 x n − 6an x n = 0
an+2 x n − an+1 x n − 6 an x n = 0
n =0 n =0 n =0
1
1
2 an+2 x n+2 − an+1 x n+1 − 6 an x n = 0
x n =0 x n =0 n =0
1 1
2
G( x ) − a0 − a1 x − G( x ) − a0 − 6G( x ) = 0 Take G( x ) = an x n
x x n =0
1 1
2 G( x ) − 2 − x − G( x ) − 2 − 6G( x ) = 0
x x
2
multiply by x on both side, we have
G( x ) − 2 − x − xG( x ) − 2x − 6x 2G( x ) = 0
(1 − x − 6x )G( x ) = 2 − x
2
2− x 2− x
G( x ) = =
(1 − x − 6x ) (1 − 3x )(1 + 2x )
2
2− x A B
= +
(1 − 3x )(1 + 2x ) (1 − 3x ) (1 + 2x )
2 − x = A ( 1 + 2x ) + B ( 1 − 3x )
1 1
Put x = − B = 1 Put x = A = 1
2 3
1 1
G( x ) = +
( 1 − 3x ) ( 1 + 2x )
G( x ) = (1 − 3x ) + (1 + 2x )
−1 −1
( ) (
G( x ) = 1 + 3x + (3x )2 + ... + (3x )n + .... + 1 − 2x + (2x )2 + ... + ( −1)n(2x )n + .... )
an = Coefficient of x n
an = 3n + ( −1)n 2n
14. Use generating function to solve the difference equation yn+ 2 − 5 yn+1 + 6 yn = 0
with y0 = y1 = 1. [APR 2023]
Answer: The given recurrence relation is an+2 − 5an+1 + 6an = 0
Multiply x n on both sides,
an+2 x n − 5an+1 x n + 6an x n = 0
an+2 x n − 5 an+1 x n + 6 an x n = 0
n =0 n =0 n =0
1
1
2 an+2 x n+2 − 5 an+1 x n+1 + 6 an x n = 0
x n =0 x n =0 n =0
1 1
2 G( x ) − a0 − a1 x − 5 G( x ) − a0 + 6G( x ) = 0 Take G( x ) = an x n
x x n=0
1 5
2 G( x ) − 1 − x − G( x ) − 1 + 6G( x ) = 0
x x
Both side multiply by x 2 , we have
G( x ) − 1 − x − 5x G( x ) − 1 + 6x 2G( x ) = 0
G( x ) − 1 − x − 5 xG( x ) − x + 6 x 2G( x ) = 0
( )
1 − 5x + 6 x 2 G( x ) = 1 − 4 x
1 − 4x 1 − 4x
G( x ) = =
( 1 − 5x + 6 x 2
) (1 − 2x )(1 − 3x )
1 − 4x A B
Consider = +
(1 − 2x )(1 − 3x ) (1 − 2x ) (1 − 3x )
1 − 4x = A (1 − 3x ) + B (1 − 2x )
1 1
Put x = A = 2 Put x = B = −1
2 3
2 1
G( x ) = −
( 1 − 2x ) ( 1 − 3 x )
G( x ) = 2(1 − 2x ) − (1 − 3x )
−1 −1
( ) (
G( x ) = 2 1 + 2x + (2x )2 + ... + (2x )n + .... − 1 + 3x + (3x )2 + ... + (3x )n + .... )
an = Coefficient of x n
an = 2.2n − 3n
15. Use generating function to solve the recurrence relation
S( n + 1) − 2S(n) = 4 n , with S( 0 ) = 1 and n 0 .
Answer : Given S (n + 1) − 2S (n) = 4n , with S(0) = 1 and n 0 ,
The recurrence relation can be written as an+1 − 2an = 4 , n 0 ------ (1)
n
Multiply (1) by x
n
an+2 x n − 2an x n = 4n x n
an+1 x n − 2 an x n = 4n x n
n=0 n=0 n=0
1
an+1 x n+1 − 2 an x n = 4n x n = 1 + 4 x + 4 x 2 + .....
x n =0 n =0 n =0
1 1
G( x ) − a0 − 2G( x ) = 1 + 4 x + 4 x 2 + ..... = (1 − 4 x )−1
x 1 − 4x
1 1
(G( x ) − 1) − 2G( x ) =
x 1 − 4x
Both side multiply by x , we have
x
G( x )(1 − 2x ) − 1 =
1 − 4x
x 1 − 3x
G( x )(1 − 2x ) = +1 =
1 − 4x x(1 − 4 x )
1 − 3x
G( x ) =
(1 − 2x )((1 − 4 x )
1 − 3x A B
Now, = +
(1 − 2x )((1 − 4 x ) 1 − 2x 1 − 4 x
1 − 3x = (1 − 4 x ) A + (1 − 2x ) B
1 1 1 1
Taking x = , we get B = & Taking x = , we get A = .
4 2 2 2
1 1
1 1
G( x ) = 2 + 2 = 1 − 2x + 1 − 4 x
−1 −1
1 − 2x 1 − 4 x 2 2
1 1
= 1 + 2x + (2x )2 + ... + 1 + 4 x + (4 x )2 + ...
2 2
1 n n 1 n n
= 2 x + 2
2 n =0 n =0
4 x
an = coefficient of x n in G( x )
2n 4n
an = + = 2n−1 + 2(4)n−1
2 2
3 + 7x
16. Find an if the generating function G( x ) = . [NOV 2023]
1 + 3x − 4 x 2
3 + 7x
Answer : Given that G( x ) =
( 1 + 3x − 4 x 2 )
3 + 7x
G( x ) =
(1 − x )(1 + 4x )
3 + 7x A B
= +
(1 − x )(1 + 4x ) (1 − x ) (1 + 4x )
3 + 7 x = A ( 1 + 4 x ) + B (1 − x )
1
Put x = − B = 1 Put x = 1 A = 2
4
2 1
G( x ) = +
(1 − x ) (1 + 4 x )
G( x ) = 2(1 − x ) + (1 + 4 x )
−1 −1
( ) (
G( x ) = 2 1 + x + x 2 + ... + x n + .... + 1 − 4 x + (4 x )2 + ... + ( −1)n(4 x )n + .... )
an = Coefficient of x n
an = 2 + ( −1)n 4n
32 − 22x
17. Find the sequence whose generating function is using partial
2
2 − 3x + x
fraction.
32 − 22x
Answer: Given that G( x ) =
( 2 − 3x + x 2 )
32 − 22x A B
G( x ) = = +
(1 − x )(2 − x ) (1 − x ) (2 − x )
32 − 22x = A ( 2 − x ) + B (1 − x )
Taking x = 2 B = 12 and Taking x = 1 A = 10
10 12
G( x ) = +
(1 − x ) ( 2 − x )
−1
x
G( x ) = 10 (1 − x )
−1
+ 6 1 −
2
x x
2
x
n
( n
)
G( x ) = 10 1 + x + x + ... + x + ..... + 6 1 + + + ... + + ......
2
2 2 2
an = Coefficient of x n
n
1
an = 10 + 6
2
St. Joseph’s College of Engineering Page No.: 23
MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
Answer : Vertex : {1, 2, 3, 4}; edges: (1,1), (1,3), (2,1), (2,3), (2,4), (3,1), (3,2), (4,1)
15. Draw the Hasse diagram of ( D20 ,/ ) , where D20 denotes the set of positive
divisors of 20 and / is the relation “divides”.
Answer: Given D20 = 1, 2, 4,5,10, 20 . The Hasse diagram is
17. Let U = {a, b, c, d, e, f } and A = {a, d, e}, then find X A where X A denotes the
characteristic function of A.
Answer: a A X A (a) = 1; d A X A (d ) = 1; e A X A (e ) = 1; b, c, f are not the
members of A. (i.e.) X A (b) = X A(c ) = X A( f ) = 0.
18. Define Hashing Function [NOV 2023]
Answer: Any transformation which maps the internal bit representation of the
set of keys to a set of addresses is called a Hashing function.
(i.e.) h(k ) = k (mod n)
19. Assume that there are 10,000 customer account records to be stored and
processed. The company’s computer is capable of searching a list of 100 items
in an acceptable amount of time and 101 lists are available for storage. If
hashing function h is defined from the set of 7-digit account number to the set
{0, 1, 2, …, 100} as h(k ) = k (mod n) . Where the customer account number
3563821 will be assigned?
Answer: Customer account number 3563821 (mod 101) = 36. Therefore, Customer
Account number is stored in the list 36.
20. Define Primitive Recursion Function
Answer: A function f is called Primitive Recursive function if it can be obtained
from initial function by a finite number of operations of compositions and
recursion.
PART B
1. State and Prove De Morgan’s Law [NOV 2023]
Statement : De Morgan’s Law : (i) ( A B) = A B (ii) ( A B) = A B
(i) To Prove ( A B) = A B
x ( A B ) = x A B x A B = x A and x B
= x A or x B = x A or x B
= x A and x B = xA B
= xA B = xA B
A B A B − − − −(1) A B A B − − − −(2)
From (1) and(2) we get ( A B) = A B .
(ii) To Prove ( A B) = A B
3. Let A be a finite set containing “ n” elements. Prove that power set of A has 2n
exactly elements.
Answer: We prove this theorem by mathematical induction.
Basis: For n=1, then A={a}
So that ( A) = { A, } = 2 = 21 elements . Hence P(1) is true.
Induction: Assume that the result is true for n=k
(i.e.) If |A|=k, then ( A) = 2k elements
Claim: Result is true for n= k+1
Now, Let |A|=k+1, For an element a A , consider the subset B = A − a . Since
x ( A X C ) ( B X D)
So ( A B) X(C D) ( A X C ) ( B X D) − − − − − −(1)
Conversely, suppose (x, y) ( AX C ) (BX D)
( x , y ) ( A X C ) and ( x , y ) ( B X D)
( x A and y C ) and ( x B and y D)
( x A and x B) and ( y C and y D)
x ( A B) and y (C D)
( x , y ) ( A B) X (C D)
So ( A X C ) ( B X D) ( A B) X (C D) − − − − − −(2)
From (1) and (2), we get ( A B ) X (C D) = ( A X C ) ( B X D)
6. For any sets A, B, C, prove that
(a) A − ( B C ) = ( A − B ) ( A − C ) (b) A − B = A − ( A B ) = ( A B ) − B
Answer :
(i) To prove A − ( B C ) = ( A − B ) ( A − C )
x A−(B C) Conversely, x ( A − B ) ( A − C )
x A and x ( B C ) x ( A − B ) or x ( A − C )
( )
x A and x B C ( x A and x B ) or ( x A and x C )
2023]
Solution:
1 1 0 0 1 0 0 1
0 0 1
1 0 0 1 1
(i ) M R1 = ; M R2 =
0 0 0 1 1 0 0 0
1 1 0 0 0 0 0 1
R1 . R2 = {(1,1),(1,4),(1,3),(2,1),(2,4),(3,4),(4,4),(4,1),(4,3)},
1 0 1 1
1 0 0 1
M R1R2 =
0 0 0 1
1 0 1 1
1 1 0 0 1 0 0 1 1 0 1 1
0 0 1 1 0 0 1 1 1 0 0 1
MR1 . MR2 = =
0 0 0 1 1 0 0 0 0 0 0 1
1 1 0 0 0 0 0 1 1 0 1 1
1 0 0 1
1 0 0 1
MRC =
1 0 1 0 0
0 1 1 0
(iii) ( R1.R2 ) = {(1,1),(4,1),(3,1),(1, 2),(4, 2),(4,3),(4, 4),(1, 4),(3, 4)}
C
11 1 0
00 0 0
M R R C =
( 1 2) 11 0 0
11 1 1
1 0 1 0 1 0 0 1 1 1 0 1
0 0 0 0 1 0 0 1 0 0 0 0
M R C .M R C = = =M
2 1 0 1 0 0 0 1 0 1 1 0 0 1 ( R1R2 )C
1 1 0 1 0 1 1 0 1 1 1 1
12. Let A = {1,2,3,4} and the relation R = {(1,1),(1,3),(2,3),(3,1),(4,2),(4,4)}
S = {(1,2),(2,3)(3,2),(3,1),(4,3)}. Compute ( i ) M R S ( ii ) M R S ( iii ) M R C
1 1 0 0
0 0 0 1
13. Show that (a) If R1 and R2 are equivalence relations on the set A, then R1 R 2
Therefore R1 R2 is symmetric.
Let ( a, b ) and ( b, c ) R1 R2 . Then ( a, b) , ( b, c ) R1 and ( a, b ) , ( b, c )R2 .
Since R1 , R2 are both transitive, then ( a, c ) R1 and ( a , c ) R2 . Hence ( a, c ) R1 R2 .
Therefore R1 R2 is transitive.
(ii) Consider the example, Let A = {a , b , c }
Take R1 = {(a, a),(b, b),(c , c ),(a, b),(b, a)} and R2 = {(a, a),(b, b),(c , c ),(a, c ),(c , a)} .
Clearly R1 , R2 are equivalent relations.
Now R1 R2 = {(a, a),(b, b),(c , c ),(a, b),(b, a),(a, c ),(c , a)} is not an equivalence relation
since it is not transitive. (i.e.) (b, a) and (a, c ) R1 R2 , but (b, c ) R1 R2 .
Hence R1 R2 need not be equivalence relation.
(i) T is Reflexive
a A, (a, a),(a, a) R Ris reflexive & Transitive
(a, a)T (By defn of T )
(ii) T is Symmetric
Let (a, b)T ,
(a, b),(b, a) R (by defn of T & R )
(b, a),(a, b) R
(b, a),(a, b) T
(b, a)T
(iii) T is Transitive
Let (a , b),(b, c ) T ,
By defn of T , (a , b),(b, a) R & (b, c ),(c , b) R
Now (a , b) R and (b, c ) R
(a , c ) R R is Transitive − − − (1)
Now (c , b) R and (b, a) R
(c , a ) R R is Transitive − − − (2)
From (1)& (2), we get
(a, c ) R and (c , a) R
(a, c )T
T is an equivalence relation.
16. If R is a relation on the set of integers such that ( a , b ) R if and only if
3a + 4b = 7n for some integer n. Show that R is an equivalence relation.
Solution: given that (a , b) R if and only if 3a + 4b = 7n for some integer n. To
Prove R is an equivalence relation
(i) R is Reflexive
3a + 4a = 7a where a Z
(a, a) R
(ii) R is Symmetric
Let (a, b) R 3a + 4b = 7n for some integer n
Now , 3b + 4a = (7b − 4b) + (7a − 3a)
= 7(b + a) − (3a + 4b)
= 7(b + a) − 7n
= 7(b + a − n) = 7m , for some integer m
Therefore , (b, a) R
(iii) R is Transitive
Let (a , b),(b, c ) R
since (a , b) R 3a + 4b = 7n for some integer n.
Also (b, c ) R 3b + 4c = 7m for some integer m
Now , 3a + 4b + 3b + 4c = 7n + 7m
3a + 7b + 4c = 7m + 7n
3a + 4c = 7m + 7n − 7b
= 7(m + n − b) = 7k , for some integer k
(a , c ) R
R is an equivalence relation.
17. Show that (N,≤) is a partially ordered set where N is set of all positive integers
and ≤ is defined by m≤ n if and only if n–m is a non-negative integer.
Solution: Given N is the set of all +ve integer.
The given relation is m≤ n if and only if n–m is a non-negative integer.
(i) Reflexive
x N , then x − x is a non-negative integer.
xRx , x N R is reflexive
(ii) Antisymmetric
Consider xRy and yRx
Since xRy x–y is a non-negative integer. -----(1)
yRx y–x is a non-negative integer.
–(x–y) is a non-negative integer. -----(2)
x =y From (1) and (2)
R is antisymmetric
(iii) Transitive
Consider xRy and yRz
Since xRy x–y is a non-negative integer. -----(1)
yRz y–z is a non-negative integer. -----(2)
( x–y+(y–z)) is a non-negative integer.
x-z is a non-negative integer From (1) and (2)
Therefore, xRy and yRz xRz. (i.e.) R is Transitive.
Hence (N,≤) is a partially ordered set.
18. In the set of natural numbers N={1,2,3,….}, show that the relation R defined
as aRb a = b k for a , b, k N is a partial order relation.
Solution: Given N is the set of all +ve integer.
The given relation is aRb a = b k for a, b, k N
(i) Reflexive
For k=1, a = a1 , for all a N .
So, R is reflexive
(ii) Antisymmetric
Suppose aRb and bRa both are true.
aRb a = b k1 & bRa b = a k2
a = (a k2 ) k1 = a
k1 k2
a1 = a 1 2
k k
k1 = k2 = 1.
so, we have a = b1 = b
Hence aRb and bRa are both true when a = b.
So, R is Antisymmetric
(iii) Transitive
Suppose aRb and bRa both are true.
aRb a = b k1 & bRc b = c k2
Since k1 and k2 are natural numbers.
22. Draw the Hasse diagram for X= { 2, 3, 6, 12, 24, 36}, and let the relation R be
“divides” on X. Find the Least upper bound and Greatest lower bound of
(2, 3), (24, 36), (6, 12). [APR 2023]
Answer: Hasse Diagram
23. Draw the Hasse diagram for (a) D24 = {1, 2, 3, 4, 6, 8, 12, 24}
(b) D30 = {1, 2, 3, 5, 6, 10, 15, 30}
Answer: Hasse Diagram D24 & D30
UNIT – IV GRAPHS
PART A
1. Define Graph .
Answer: A graph G = (V,E) consists of a finite non empty set V, the element of which
are the vertices of G, and a finite set E of ordered or unordered pairs of distinct
elements of V called the edges of G.
2. Define complete graph.
Answer: A graph of n vertices having each pair of distinct vertices joined by an
edge is called a Complete graph and is denoted by Kn. Complete graphs are often
called cliques.
Answer: A graph for which each pair of vertices is joined by a trail is connected.
16. State the necessary and sufficient conditions for the existence of an Eulerian
path in a connected graph.
Answer: A connected graph contains an Euler path if and only if it has exactly two
vertices of odd degree.
17. Define Eulerian Circuit.
Answer: A circuit in a graph that includes each edge exactly once, the circuit is
called an Eulerian circuit.
18. State the condition for Eulerian cycle. [APR 2023]
Answer: (i) Starting and ending points are same. (ii) Cycle should contain all
edges of graph but exactly once.
19. Give an example of a graph which is Eulerian and Hamiltonian.
Answer: G - Eulerian and Hamiltonian.
PART B
1. State and prove Handshaking theorem and Prove that maximum number of
edges in a connected graph with n vertices is n(n − 1) [NOV 2023]
2
Answer :
Handshaking theorem
Statement : If G = (V, E) is an undirected graph with e edges, then deg(vi ) = 2e
i
Proof: Since every edge is incident with exactly two vertices, every edge
contributes 2 to the sum of the degree of the vertices.
Therefore, all the e edges contribute (2e) to the sum of the degrees of the vertices.
Hence deg(vi ) = 2e .
i
(ii) By the Hand shaking theorem,
If G = (V, E) is an undirected graph with e edges, then deg(vi ) = 2e
i
(i.e.) 2e = deg(v1 ) + deg(v2 ) + deg(v3 ) + .... + deg(vn )
Since the maximum degree of each vertex in the simple graph G can be n–1.
n( n − 1)
2e = n − 1 + n − 1 + n − 1 + .... + n − 1 = n(n − 1) e = .
2
Alternative Method:
We prove this theorem by the principle of mathematical induction.
For n=1, a graph with one vertex and has no edge.
Therefore, the result is true for n = 1.
2(2 − 1)
For n=2, a graph with two vertices and one edge. Therefore E(G)= =1
2
Therefore, the result is true for n=2.
Assume that the result is true for n=k . (i.e.) a graph with ‘k’ vertices and at most
k ( k − 1)
edges.
2
When n=k+1, let G be a graph having ‘n’ vertices and G* be the graph obtained by
deleting one vertex (say) v V (G ) . Since G* has ‘ k ’ vertices , then by hypothesis ,
k ( k − 1) v v
G* has at most edges. Now add the vertex to G* such that may be
2
adjacent to all ‘k’ vertices of G*. Therefore, the number of edges in G, are
k (k − 1) k 2 − k + 2k k 2 + k
E (G ) = +k = =
2 2 2
k (k + 1) (k + 1)((k + 1) − 1)
= =
2 2
Therefore, the result is true for n = k+1.
n( n − 1)
Hence the maximum number of edges in a simple graph with ‘n’ vertices is
2
2. Prove that number of vertices of odd degree in a graph is always even.
[NOV 2023]
Answer : Let G = (V, E) be the undirected graph. Let 𝑉1 and 𝑉2 be the set of
vertices of G of even and odd degrees respectively.
Then by hand shaking theorem, 2e = deg(vi ) + deg(v j ) .
vi V1 v j V2
Since each deg(vj) is odd, the number of terms contained in deg(v ) or V2 is even.
v j V2
j
n1 + n2 + n3 + .... + nk = n
n1 − 1 + n2 − 1 + n3 − 1 + .... + nk − 1 = n − k
k
(n − 1) = n − k
i =1
i
2
k
i =1
( ni − 1) = n 2 − 2nk + k 2
2
k
n − 2nk + k =
2
2
i =1
(ni − 1)
= (n1 − 1) + (n2 − 1) + (n3 − 1) + ..... + (nk − 1)
2
= (n1 − 1)2 + (n2 − 1)2 + (n3 − 1)2 + ..... + (nk − 1)2 + 2(n1 − 1)(n2 − 1) + 2(n1 − 1)(n3 − 1) + 2(n1 − 1)(n4 − 1) + ...
k
n 2 − 2nk + k 2 n i =1
i
2
+ 2n + k
n
i =1
i
2
+ 2n + k n 2 − 2nk + k 2
k
that is n
i =1
i
2
n 2 − 2nk + k 2 + 2n − k
(n 2 − nk − nk + k 2 + n − k )
=
2
(n − nk + n + k 2 − nk − k )
2
=
2
(n(n − k + 1) + k (k − n − 1)
=
2
(n(n − k + 1) − k (n − k + 1)
=
2
(n − k )(n − k + 1)
2
Next, we prove “ A simple graph G with n vertices is connected if it has more than
(n − 1)(n − 2)
edges.”
2
We prove the above statement by contrapositive method
Suppose G with ‘n’ vertices is disconnected graph, then it has at least 2 components.
(n − k )(n − k + 1)
By above statement | E (G ) | . Here k =2.
2
( n − 1)( n − 2)
Therefore | E (G ) | .
2
By above result, we understood that G be a disconnected graph then it has almost
( n − 1)(n − 2)
edges. By contra positive method, If G is connected graph , then it has
2
(n − 1)(n − 2)
if it has more than edges
2
4. Prove that a graph G is bipartite if and only if all of its cycles are even.
Proof: If G is bipartite, then its vertex set V can be partitioned into two sets V1 and
V2 so that every edge of G joins a vertex in V1 with a vertex in V2.
Thus, every cycle [of length k] v1, v2, …, vk, v1 in G necessarily has its oddly
subscripted vertices in V1, say, and the others in V2, and so its length is even.
Otherwise, we would have the edge (vk, v1) connecting two vertices in V1,
contradicting our hypothesis.
For the converse, we assume without loss of generality that G is connected (for
otherwise we can consider the components of G separately). Take any vertex v1
V(G) and let [vertex set] V1 consist of v1 and all vertices at even distance from v1,
while [vertex set] V2 = V – V1.
Since all cycles of G are even, every edge of G joins a vertex of V1 with a vertex of
V2. For suppose there is an edge (u, v) joining two vertices of V1. Then the union of
geodesics [shortest paths] from v1 to v and from v1 to u together with the edge (u,
v) contains an odd cycle, a contradiction.
5. Show that G is connected if and only if any partition of V into two subsets V 1
and V2 , there is an edge joining a vertex V1 to a vertex V2
Proof; If G is a connected graph and V1 and V2 are non-empty subsets of its vertex
set V such that V1 V2 = V & V1 V2 = then the claim is that there must be at least
one edge in G that connects a vertex in V1 to a vertex in V2.
Assume, by way of contradiction, that there is no edge connecting any vertex in
V1 to any vertex in V2.
Since G is connected, there must be a path between any two vertices in G. This
implies that there exists a path between any vertex in V1 and any vertex in V2
Consider the shortest path between any vertex u in V1 and any vertex v in V2. Let x
be the first vertex on this path that belongs to V2 ., since there is no edge directly
connecting V1 and V2 , the vertex x cannot be the only vertex in V2 on the path. There
must be another vertex y in V2 on the path.
This implies that there is a shorter path from u to y that does not include x, which
contradicts the assumption that the original path was the shortest. Therefore, our
assumption that there is no edge connecting any vertex in V1 to any vertex in
V2must be false. Hence, there must be at least one edge in G that connects vertex in
V1 to a vertex in V2
This completes the proof by contradiction ,establishing that in a connected
graph with non-empty disjoint subsets V1 and V2 , there is always at least one edge
connecting a vertex in V1 to a vertex in V2
6. If all the vertices of an undirected graph are each of degree “ k ”, show that
the number of edges of the graph is a multiple of “k”.
Proof : To prove that the number of edges of an undirected graph is a multiple of
the degree k when all vertices have a degree of k, let's use the Handshaking Lemma
and some basic counting principles.
The Handshaking Lemma states that the sum of the degrees of all vertices in a graph
is equal to twice the number of edges in the graph.
Mathematically, for a graph with n vertices and m edges: 2m=∑𝑛𝑖=1 degree(𝑣𝑖)
Given that all vertices in the graph have a degree of k, we can rewrite the sum:
2m=∑𝑛𝑖=1(𝑘)
Since all vertices have degree k, the sum on the right side is equal to kn.
Therefore: 2m=kn, let's rearrange the equation to solve for m, the number of edges:
kn
m= . Since k is a constant (the degree of each vertex) and n is the number of
2
vertices, we can see that m is a multiple of k. Specifically, m is equal to k multiplied
n n
by , where is an integer because the number of vertices is assumed to be even
2 2
(since each edge contributes to the degree of two vertices). Therefore, when all the
vertices of an undirected graph have a degree of k, the number of edges (m) is a
multiple of k.
7. If G is a self-complementary graph, then prove that G has n 0 (or) 1(mod 4)
vertices.
Solution:
Same number of vertices and edges. Also an equal number of vertices with given
degree.
Consider the mapping f (u1 ) = v1; f (u2 ) = v3 ; f (u3 ) = v2 ; f (u4 ) = v5 ; f (u5 ) = v4
The adjacency matrices of the two graphs are
u1 u2 u3 u4 u5 v1 v3 v2 v5 v4
u1 0 1 0 1 1 v1 0 1 0 1 1
u2 1 0 1 1 1
v3 1 0 1 1 1
u3 0 1 0 1 0 and v2 0 1 0 1 0
u4 1 1 1 0 1 v5 1 1 1 0 1
u5 1 1 0 1 0 v4 1 1 0 1 0
Since the two adjacency matrices are the same, the two graphs are isomorphic.
9. Examine whether the following pairs of graphs G and H given in figures are
isomorphic or not.
G1 G2
Answer : In G1 the number of vertices is 7 and the number edges is 6, but in G2 the
number of vertices is 6 and the number edges is 5. The very first condition for
isomorphism of two graphs is that the number of vertices and the number edges
of both graphs must be same. Since the condition is not satisfied the graphs are not
isomorphic.
11. Define isomorphism between two graphs. Are the simple graphs with the
following adjacency matrices isomorphic? [APR 2023]
0 1 0 0 0 1 0 1 0 0 0 1
1 0 1 0 1 0 1 0 1 0 0 1
0 1 0 1 0 1 0 1 0 1 1 0
0 0 1 0 1 0 0 0 1 0 1 0
0 1 0 1 0 1 0 0 1 1 0 1
1 0 1 0 1 0 1 1 0 0 1 0
Answer : Isomorphism : Two graphs G1 = (V1, E1) and G2 = (V2, E2) are the same
or isomorphic, if there is a bijection ( one to one correspondence). F : V1 → V2 such
that (u, v) E1 if and only if (F(u), F(v)) E2..
12. Prove that a given connected graph G is Euler graph if and only if all vertices
of G are of even degree.
Proof : Suppose G is an Euler graph.
G contains an Euler cycle
G contains a closed path covering all edges.
To prove: All vertices of G is of even degree.
Since the Euler cycle covers all the edges , all the vertices of G will appear in this
Euler Cycle.
Case i : A vertex v of G may be an internal vertex of the Euler cycle.
Degree(v) = 2 X number of times that appear in the Euler cycle
= an even number
Case ii : A vertex u of G may be the starting and ending vertex of the Euler cycle.
Degree (u) = (1 + 1) + 2 X number of times that appear in the Euler cycle
= 2 + an even number
= an even number
In either case, degree of the vertex becomes an even number.
All the vertices of G has even degree.
Conversely, suppose that all vertices of G are of even degree.
To prove: G is an Euler graph.
(i.e.) to prove: G contains an Euler cycle.
Construct a closed path starting at an arbitrary vertex v and going through the edge
of G such that no edge is repeated.
Because, each vertex is of even degree, we can exit from each end, every vertex
where we enter, the tracing can stop only at the vertex v.
Name the closed path as C
Case (i) If C covers all edges of G, then h becomes an Euler cycle, and hence, G is an
Euler graph.
Case (ii) If C does not cover all edges of G then remove all edges of C from G and
obtain the remaining graph G *
Because both G and G * have all their vertex of even degree.
Every vertex in G * is also of even degree.
Since G is connected, C will touch G *. at least one vertex v 1.
Starting from v 1 , we can again construct a new path C in G *.
This will terminate only at v 1 , because, every vertex in G *. is also of even degree.
Now, this walk C combined with C forms a closed walk starts and ends at v and has
more edges than C. This process is repeated until we obtain a closed path covering
all edges of G. Thus, G is an Euler graph.
13. Prove that if a graph G has not more than two vertices of odd degree, then
there can be Euler path in G.
Proof: To prove that if a graph G has no more than two vertices of odd degree, then
there can be an Euler path in G, we can use the following theorem: ‘A connected
graph has an Eulerian path if and only if it has either 0 or 2 vertices of odd degree.’
Case i:
If G has 0 vertices of odd degree: If all vertices in G have even degree, then G is
Eulerian. An Eulerian circuit (a closed walk that traverses each edge exactly once)
exists in G.
Case ii:
If G has 2 vertices of odd degree: If G has exactly two vertices with odd degree, we
can construct an Eulerian path. Start the path at one of the odd-degree vertices and
end at the other odd-degree vertex. All other vertices have even degrees, so the
graph can be decomposed into cycles. Adding the Eulerian path between the two
odd-degree vertices connects these cycles into a single Eulerian path.
Case iii:
If G has more than 2 vertices of odd degree:
If G has more than two vertices of odd degree, it cannot have an Eulerian path. The
reason is that for any connected graph, the sum of the degrees of all vertices is even
(handshaking lemma). If there are more than two vertices of odd degree, the sum
of the degrees would be odd, which is not possible. therefore, if a graph G has no
more than two vertices of odd degree, there can be an Eulerian path in G.
14. If G is a connected simple graph with n vertices with n 3 ,such that the
degree of every vertex in G is at least n , then prove that G has Hamilton
2
cycle. [APR 2023]
Also, d (u ) + d (v) = S + T = S T + S T n
𝑛
But this contradicts the hypothesis that degree of each vertex ≥ 2. Hence the
theorem.
15. Define Eulerian and Hamiltonian graph. Also give an example for graphs
which are a) Eulerian but not Hamiltonian b) Hamiltonian but not Eulerian
c) Eulerian and Hamiltonian d) Neither Eulerian nor Hamiltonian.
Answer
Eulerian graph : A circuit (cycle) in a graph that includes each edge exactly once,
the circuit is called an Eulerian circuit. Any graph containing Eulerian cycle is called
Eulerian graph
Hamiltonian Graph : A circuit is called Hamiltonian circuit (cycle) if it includes
each vertex exactly once, except starting and ending vertices. Any graph containing
Hamiltonian cycle is called Eulerian graph
(a) Eulerian but not Hamiltonian (b) Hamiltonian but not Eulerian
A D
A B
C C
E D
B E
C D D C
16. Find Euler Path, Hamiltonian Path, Euler Circuit & Hamiltonian Circuit if it
exists in each of three graphs given below. If it does not exist, explain why ?
G2 G3
G1 A C E G A B
A B
C G
F C
C D E D
B D F
Answer: Let (S, *) and (T, ∆ ) be any two semigroups. A mapping 𝑔: 𝑆→𝑇 such that
for any two elements 𝑎, 𝑏 ∈ 𝑆, 𝑔(𝑎∗𝑏) = 𝑔(𝑎) ∆ 𝑔(𝑏) is called a semigroup
homomorphism. Let a S be an idempotent element. (i.e.) a * a = a . Now to prove
g (a ) is idempotent.
g (a)2 = g (a)
Therefore, g (a ) is an idempotent element in T. Thus, semigroup homomorphism
preserves idempotency.
15. Prove that group homomorphism preserves identity.
Answer: Let f : (G,*) → (G , )
Identity property is a*e = e * a = a, aG
Consider a * e = a
f( a * e ) = f(a)
f(a) f(e) = f(e)
f(e) is identity element of G . (i.e.) f(e) = e
16. Let f : (G , *) → (G ', ) be a group homomorphism. Then prove that
f (a)
−1
= f (a−1 ), a G.
Answer:
Let f : (G,*) → (G ', ) be a group homomorphism. Let a G a −1 G
We Know that a * a −1 = a −1 * a = e
a * a −1 = e f (a * a −1 ) = f (e)
f (a)f (a −1 ) = e ' − − − (1)
−1
Similarly f (a ) f (a) = e ' − − − (2)
−1
From (1) and (2) f (a ) is the inverse of f (a).
Hence f (a) = f (a −1 )
−1
19. Let G = ( Z12 , + 12 ) , Find the left cosets of H = [0],[4],[8] and show that the
distinct left cosets of H forms a partition of G. [APR 2023] [NOV 2023]
Answer: Z12 = [0],[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11] ; H = [0],[4],[8]
[0] + H = [0],[4],[8] = H = [4] + H = [8] + H
PART B
1 0 − 1 0 1 0 −1 0
1. Prove that G = , , , forms an abelian group
0 1 0 1 0 − 1 0 − 1
1 0 −1 0 1 0 −1 0
Answer: Let I = , A= , B= and C =
0 1 0 1 0 −1 0 −1
The matrix multiplication table is,
I A B C
I I A B C
A A I C B
B B C I A
C C B A I
Claim 1: Closure property
Since all the elements inside the table are the elements of G.
Hence, G is closed under multiplication.
Claim 2: Associative property
We know that matrix multiplication is always associative
Claim 3: Identity property
From the above table we observe that the matrix I G is the Identity
matrix.
Claim 4: Inverse property
From the above table we observe that all the matrices are inverse to each
other. Hence, Inverse element exists.
Claim 5: Commutative property
From the table we have
St. Joseph’s College of Engineering Page No.: 54
MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
A B = C = B A, A C = B = C A, B C = A = C B
Therefore, commutative property exists. Hence G forms an abelian group under
matrix multiplication.
+ ab
2. Show that (Q ,*) is an abelian group where * is defined by a * b = , for all
2
+
a, b Q . [NOV 2023]
Answer : Let Q = {Rational Numbers}, and a, b, c Q
Closure
Weknow that, Product of two positive rational numbers is again a rational number.
ab
a*b= Q
2
Associative
bc abc ab abc
LHS : a*(b*c)=a* = and RHS: (a*b)*c= *c=
2 4 2 4
(i.e)Associative is true
Identity
Let 'e' be the identity element.
a*e= a
ae
=a e = 2 is the identity element
2
Inverse
Let a −1 is the inverse element in Q
w .k .t a * a−1 = e = 2
aa−1 4
= 2 a−1 = Q
2 a
Commutative
Let a,b Q
ab ba
Then a*b= = =b*a , a, b Q
2 2
Therefore (Q,*) is abeliangroup
3. Show that ( R − {1},* ) is an abelian group , where * is defined by
a * b = a + b + ab, for all a , b R.
Answer: Given that a * b = a + b + ab, for all a , b R . We prove that ( R − {1},* ) is an
abelian group
(i) Closure
Let a,b R, Then a*b=a+b+ab (R-{1}) (a −1, b −1)
(ii) Associative
Let a,b,c R
LHS : (a*b)*c = (a+b+ab)*c = (a+b+ab)+c+(ac+bc+abc)
=a+b+c+ab+bc+ac+abc
RHS : a* (b*c) = a* (b+c+bc)=a+(b+c+bc)+(ab+ac+abc)
=a+b+c+ab+bc+ac+abc
LHS=RHS Associative is true
(iii) Identity
Let e be the identity element.
Then a*e=a a+e+ae=a e(1+a)=0 e=0
'0' isthe identity eleement in R-{1}.
(iv ) Inverse
Let a−1 bethe inverse element
Then a * a−1 = e = 0 a + a−1 + aa−1 = 0
a
a−1(1 + a) = −a a−1 = −
1+a
(v ) Commutative
a*b=a+b+ab=b+a+ba=b*a
R-{1}is abelian group
4. Show that a non-empty subset H of a group (G, *) is a subgroup G if and only
if a * b −1 H for all a , b H
Answer: Necessary Condition:
Let us assume that H is a subgroup of G. Since H itself a group, we have if a , b H
implies a * b H
−1 −1
Since b H then b H which implies a *b H
Sufficient Condition:
−1
Let a *b H , for a * b H
Claim 1: Identity property
−1
If a H , which implies a * a = e H
Hence the identity element e H .
Claim 2: Inverse property
−1 −1
Let a , e H , then e * a = a H
−1 a.
Hence a is the inverse of
Claim 3: Closure property
( )
−1
−1 −1
Let a , b H , then a * b = a * b H
Therefore H is closed.
Claim 4: Associative property
Clearly * is associative.
Hence H is a subgroup of G.
Answer:
Claim 1: Intersection of two subgroups is again a subgroup.
Let A and B be two subgroups of a group G. we need to prove that
A B is a subgroup.
(i.e.) It is enough to prove that A B and a,b A B a* b−1 A B .
Since A and B are subgroups of G, the identity element e A and B .
A B
Let a,b A B a,b A and a,b B
a * b −1 A and a * b −1 B
a* b−1 A B
Hence A B is a subgroup of G.
Claim 2: Union of two subgroups need not be a subgroup
Consider the following example, Consider the group ( Z ,+ ) , where Z is the set of
all integers and the operation + represents usual addition.
Let A = 2Z = 0, 2, 4, 6, ... and B = 3Z = 0, 3, 6, 9, ... .
So, x h x −1 H and x h x −1 K
x h x −1 H K
Thus H K is a Normal subgroup of G.
9. State and Prove Fundamental Theorem of Homomorphism (or) Every
homomorphic image of a group G is isomorphic to some quotient group of G.
[APR 2023]
wehave K * a = K * b
a b−1 K
f (a b−1 ) = e
f (a) f (b−1 ) = e
f (a) f (b)−1 = e
f (a) f (b)−1 * f (b) = e * f (b) multiply f(b) on both sides
f (a ) = f ( b )
is welldefined.
Claim (B) : isone-one
To prove (K * a) = (K * b)
K *a = K * b
we know that f (a) = f (b)
f (a)* f (b−1 ) = f (b)* f (b−1 ) = f (b * b−1 ) = f (e )
f (a)* f (b−1 ) = f (e ) = e Since f is homomorphism and f (e ) = e '
f (a * b−1 ) = e
a * b−1 K
K *a = K *b
isone − one
Claim (C) : is on - to
Let y G, since f is on − to, there exits a G such that f (a) = y.
Hence(K * a) = f (a) = y. From (1)
is on − to
Claim (D) : is homomorphism
Now (K * a * K * b) = (K * a * b) = f (a * b) From (1) (K * a) = f (a)
= f (a)* f (b) f is homomorphism (i.e) f (a * b) = f (a)* f (b)
= (k * a)* (k * b)
is homomorphism.
10. State and Prove Lagrange’s theorem on finite groups (or) Prove that in a
finite group, order of any subgroup divides the order of the group.
[APR 2023] [NOV 2023]
Proof:
If G is a finite group and H is a subgroup of G, then order of H is a divisor of order of
G.
Let O ( G ) = n, (Here n is finite)
Let G = a1 = e1 , a2 , a3 ,...., an and let H be a subgroup of G.
Consider the left cosets as follows.
e * H = e * h \ h H ; a2 * H = a2 * h \ h H
an * H = an * h \ h H
We know that by lemma 1, “ any two left cosets are either identical or disjoint”
Also
O (e * H ) = O ( H )
O ( ai * H ) = O ( H ) , ai G
Otherwise, if a * hi = a * h j for i j, by cancellation laws, we would have hi = h j
which is a contradiction.
Let there be k-disjoint cosets of H in K.
We know that by lemma 2, “ Let (H,*) be an subgroup of (G,*). The set of left cosets
of H in G forms a partition of G. ”
Therefore, their union equals G (i.e.) G = ( a1 * H ) ( a2 * H ) .... ( ak * H )
O ( G ) = O ( a1 * H ) + O ( a2 * H ) + ... + O ( ak * H )
= O ( H ) + O ( H ) + ..... + ..... + O ( H )
O ( G ) = k. O ( H ) ( k is the index of H in G )
This implies O ( H ) is a divisor of O ( G ) .
Solution:
O(K) < O(H) < O(G) and O(K) divides O(H) and O(H) divides O(G).
O(K ) = |K| = 66 = 2311.
O(G) = |G| = 660 = 223511.
|K| divides |H| and |K| < |H|
|H| = x |K| = x (2311), with x > 1
|H| divides |G| and |H| < |G|
|G| = y |H| = y x (2.3.11), with y > 1
660 = y x (2.3.11)
St. Joseph’s College of Engineering Page No.: 60
MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
22.3.5.11 = y x (2.3.11)
2.5= y x ,with x > 1, y > 1
x = 2 or x = 5
When x = 2 |H| = 2 (2.3.11) =132
When x = 5 |H| =5 (2.3.11) =330.
0 1
12. Show that (M , .) is an abelian group where M={A, A2, A3, A4} with A =
−1 0
and “.” is the ordinary matrix multiplication. Further prove that (M, .) is
isomorphic to the abelian group (G , .) where G={1, -1, i, -i} and “.” is the
ordinary multiplication.
Solution:
0 1 2 −1 0 3 0 −1 4 1 0
A= ; A = 0 −1 ; A = 1 0 ; A = 0 =I
−1 0 1
Cayley’s table
. I A A2 A3
I I A A2 A3
A A A2 A3 I
A2 A2 A3 I A
A3 A3 I A I
Claim 1: Closure property
Since all the elements inside the table are the elements of M . Hence, M is closed
under multiplication.
Claim 2: Associative property
We know that matrix multiplication is always associative
Claim 3: Identity property
1 0
From the above table we observe that the matrix A4 = = I is the Identity
0 1
matrix.
Claim 4: Inverse property
From the above table we observe that all the matrices are inverse to each other.
1 0 −1
( )
−1 1 −1 0
Inverse elements are A−1 = = A3
; A 2
= = A2 ;
1 1 0 1 0 −1
( ) ( )
−1 1 01 −1 1 1 0
A3 = = A and A4
= = I = A4
1 −1 0 1 0 1
Claim 5: Commutative property
From the table we have Am . An = Am+n = An+m = An . Am , Therefore, commutative
property exists. Hence (M , .) is an abelian group .
( )
Define f : M → G by f Ak = i k , k = 1,2,3,4
St. Joseph’s College of Engineering Page No.: 61
MA1453 - Discrete Mathematics Department of CSE, IT and ADS 2023-2024
This mapping is clearly bijective (one -one and on-to) and preserves the group
operation (matrix multiplication in M corresponds to ordinary multiplication in G).
Now to prove f is a homomorphism.
Let us consider two arbitrary matrices A = Ak and B = Am in M.
Now , f ( AB ) = f ( Ak . Am ) = f ( Ak +m ) = i k +m = i k . i m = f ( A). f (B ) .
Therefore, f is a homomorphism. Hence, M is isomorphic to G.
13. Let (G, *) and (H,*) be groups with respective identities eG , eH .If f :G→H is a
homomorphism, then show that
n
(c ) f (an ) = f (a) , a G and all n Z
−1
(a) f (eG ) = eH (b) f (a−1 ) = f (a) a G
( d ) f (S) is a subgroup of H for each subgroup S of G.
Answer :
(a)eH f(eG ) = f(eG ) = f(eG eG ) = f ( eG ) f ( eG )
eH = f ( eG ) ,by right cancellationlaw
−1
(b) Let a G , since G is a group, a G
Since G is a group, a * a−1 = eG
By homomorphism f (a * a −1 ) = f ( eG )
f (a) f (a −1 ) = eH
( )
Hence f a −1 is the inverse of f ( a )
−1
i.e., f (a −1) = f (a) a G
(c) a G and all n Z
Case(i): if n=0 then a n = a 0 = eG
f ( a 0 ) = f ( eG ) = eH = f ( a )
0
f ( a n ) = f ( a)
n
f (an ) = f (a) a G and all n Z
n
a b S,
f (a) f (b) = f ( a b ) f ( S )
x y f ( S ) , so f ( S ) is closed
−1
Finally, x−1 = f (a) = f [a −1]