Workbook Discrete Mathematics CS-IT
Workbook Discrete Mathematics CS-IT
Workbook
GATE
unacademy
Discrete Mathematics
Workbook
Computer Science Engineering
Information Technology
No part of this publication may be reproduced or distributed in any form or by any means,
electronic, mechanical, photocopying, recording, or otherwise or stored in a database or retrieval
system without the prior written permission of the publishers. The program listings (if any) may be
entered, stored and executed in a computer system, but they may not be reproduced for
publication.
Printing of books passes through many stages - writing, composing, proof reading, printing etc. We
try our level best to make the book error- free. If any mistake has inadvertently crept in, we regret
it and would be deeply indebted to those who point it out. We do not take any legal responsibility.
Edition : DM-2024/2025
Discrete Mathematics 1
13. The maximum number of distinct 18. How many 4 digit even numbers have
subwords of the word AXIOMATIZABLE all 4 digits distinct?
is (a) 2240 (b) 2296
(a) 183 (b) 111 (c) 2620 (d) 4536
(c) 92 (d) 88 19. Two girls have picked 10 roses, 15
14. Find the sum of the terms in the nth sunflowers and 14 daffodils. What is
bracket of {1}, {2, 3, 4}, {5, 6, 7, 8, 9}, …. the number of ways they can divide the
flowers amongst themselves?
(a) 2n 1 (b) 4n n 1
2 3
[GATE-1999]
(c) n 1 n (d) n n 1
3 3 3 3 (a) 1638 (b) 2100
(c) 2640 (d) None of these
15. The minimum number of cards to be 20. How many different nine digit numbers
dealt from an arbitrary shuffled deck of can be formed from the number
52 cards to guarantee that three cards 223355888 by arranging its digits so
are from same suit is that the odd digits occupy even
[GATE 2000] positions?
(a) 3 (b) 6 (a) 16 (b) 36
(c) 9 (d) 12 (c) 60 (d) 150
16. n couples are invited to a party with the 21. There are 12 stations on railway line.
condition that every husband should be How many ways a special train can stop
accompanied by his wife. However, a at 4 of these stations sot that no two
wife need not be accompanied by her stops are consecutive stations?
husband. The number of different Let us denote the stations where train
gatherings possible at the parts is stops by 0 seconds and other stations
[GATE 2003] by 1 second.
22. The number of positive integral
(a) nCn 2
2 n n
(b) 3
solutions of x y z t 20 is
(c)
2n! (d)
2n
Cn (a)
19
C2 (b)
19
C3
n
2 18 18
(c) C3 (d) C2
17. m identical balls are to be placed in n
23. How many solutions are there of
distinct bags. You are given that m kn
x y z 17 in positive integers?
, where k is a natural number 1. In
how many ways can the balls be placed (a) 120 (b) 171
in the bags if each bag must contain (c) 180 (d) 221
atleast k balls 24. Florist sells reses of 5 different colours.
[GATE 2003] How many bunches of a half-dozen
roses can be formed?
m k
(a)
25. Number of ways of placing 20 similar
n 1 balls into 5 boxes where
m kn n 1 first box contains atleast 3 bolls,
(b)
second box contains atleast 2 balls,
n 1 third box contains atleast 4 balls,
m 1 fourth and fifth boxes are non-empty.
(c)
n k 26. Number of ways of placing atmost 6
similar balls into 3 boxes.
m kn n k 2 27. How many ways we can distribute 16
(d)
similar balls into 4 numbered distinct
n k boxes so that each box contain atleast
one ball?
2 Discrete Mathematics
28. How many friends you must have (a) 3 4
n n
(b) 3 1
n
n1 n1
(c) 3 2 (d) 3 2
n n
43. How many substrings can be formed
37. Consider the following recurrence from a character sting of length n?
relation [GATE-1994]
T n 4T n 1 3T n 2 0 , (a) n (b) n
2
Discrete Mathematics 3
44. In how many ways can we distribute 5 distinct paths are there for the robot to
distinct balls, B1 , B2 ,.....B5 in 5 distinct reach (10, 10) starting from (0, 0)?
9
cells C1 , C2 ,....C5 such that ball Bi is (a) 2
not in cell Ci i 1,2,.....5 and each cell
19
(b) 2
(c) C4
8 11
contains exactly one ball? C5
[GATE-2004]
(d)
20
C10 8C4 11
C5
(a) 44 (b) 96
51. The exponent of 11 in the prime
(c) 120 (d) 3125
factorization of (300)! is
Let G x 1 x g i xi where
2
45. [GATE-2008]
i
52. The number of distinct positive integral
x 1 what is g(i)? [GATE-2005] factors of 2014 is
(a) 1 (b) i + 1 [GATE-2014]
(c) 2i (d) 2 + i
Let n p q , where p, q are distinct
2
46.
prime numbers. How many numbers m
satisfy 1 m n and g(d) (m, n) = 1.
Note: g(d) (m, n) is greatest common
divisor of m, n
[GATE-2005]
(a) p q 1 (b) pq
(c) p 2
1 q 1 (d) p p 1 q 1
set.
(b) P S P P S
(b) Not more than one of the sets S i (c) P S S P S
can be finite.
(d) S P S
(c) At least one of the sets S i is infinite
7. Let A be a set with n elements. Let C
(d) Not more than one of the sets S i is be a collection of distinct subsets of A
an infinite set. such that for any two subsets S1 and
2. Let A be a finite set of size n. The
S2 in C, either S1 S2 or S2 S1 . What
number of elements in the power set
is the maximum cardinality of C?
of A x A is
[GATE-1993] [GATE-2005]
2n n2
(a) n (b) n 1
(A) 2 (b) 2
(c) 2 1
n1
n
(d) n!
2
(c) 2 (d) n 8. Let A, B and C be three sets. Then (A -
3. Let A and be two sets and let A and
c
B) - C = ____
B c denote the complements of the (a) (A – B) – (B – C)
sets A and B. The set (b) (B – C) – (A – C)
(c) (A – B) – (A – C)
A B B A A B is equal to
(d) (A – C) – (B – C)
[GATE-1996] 9. Let E, F and G be finite sets.
A B (b) A B Let X E F F G and
c c
(a)
(c) A B (d) A B Y E E G E F
c c
Discrete Mathematics 5
(a) Only S1 is correct How many students have not taken any
(b) Only S2 is correct of the three courses?
(c) Both S1 and S2 are correct [GATE-2004]
(d) None of S1 and S2 is correct (a) 15 (b) 20
11. For a set A, the power set of A is (c) 25 (d) 35
A
denoted by 2 . If A = {5, {6}, {7}}, which 16. Let R be a symmetric and transitive
of the following options are TRUE? relation on a set A. Then
[GATE-1995]
I. 2A II. 2A
(a) R is reflexive and hence and
III. 5, 6 2
A
IV. 5,6 2 A
equivalence relation.
[GATE-2015] (b) R is reflexive and hence partial
(a) I and III only (b) II and III only order.
(c) I, II and III only (d) I, II and IV only (c) R is not reflexive and hence not an
equivalence relation.
12. The cardinality of the power set of {0,
1, 2, ……., 10} is (d) None of the above.
[GATE-2015] 17. Let X = {2, 3, 6, 12, 24}. Let be the
13. What is the cardinality of the set of partial order defined by x y if x
integers X defined below? divides y. The number of edges in the
X {n |1 n 123 , n is not divisible by Hasse diagram of X , is
either 2, 3 or 5} [GATE-1996]
[GATE-2006] (a) 3
(a) 28 (b) 33 (b) 4
(c) 37 (d) 44 (c) 9
14. In a room containing 28 people, there (d) None of the above
are 18 people who speak English, 15 18. Suppose X and Y are sets and X and
people who speak Hindi and 22 people
who speak Kannada. 9 persons speak Y are their respective cardinalities. It
both English and Hindi, 11 persons is given that there are exactly 97
speak both Hindi and Kannada, functions from X to Y. From this, one
whereas 13 persons speak both can conclude that
Kannada and English. How many people [GATE-1996]
speak all the three languages? (a) X 1, Y 97
[GATE-1998]
(a) 9 (b) 8 (b) X 97, Y 1
(c) 7 (d) 6 (c) X 97, Y 97
15. In a class of 200 students, 125 students
(d) None of the above
have taken programming language
course, 85 students have taken Data 19. Let R1 and R2 be two equivalence
Structures course, 65 students have relations on a set. Consider the
taken Computer Organisation course, following assertions:
50 students have taken both (i) R1 R2 is an equivalence relation
Programming Language and Data
(ii) R1 R2 is an equivalence relation
Structures, 35 students have taken
both Programming Languages and Which of the following is correct?
Computer Organisation: 30 students [GATE-1998]
have taken both Data Structures and (a) Both assertions are true
Computer Organisation; 15 students (b) Assertion (i) is true but assertion (ii)
have taken all the three course. is not true
6 Discrete Mathematics
(c) Assertion (i) is true, but assertion (ii) (i) An element x in A is related to an
is true element y in B (under R1 ) if x + y is
(d) Neither (i) nor (ii) is true divisible by 3.
20. The number of binary relations on a set (ii) An element x in B is related to an
with n elements is:
element y in C (under R2 ) if x + y is
[GATE-1999]
2
even but not divisible by 3.
(a) n
Which is the composite relation R1R2
n
(b) 2
from A to C?
n2
(c) 2 (a)
(d) None of the above R1R2 1, 2 , 1, 4 , 3,3 , 5, 4 , 7,3
21. Consider the following relations:
R1 (a, b) iff (a + b) is even over the set (b)
of integers R1R2 1, 2 , 1,3 , 3, 2 , 5, 2 , 7,3
R2 (a, b) iff (a + b) is odd over the set (c)
of integers
R1R2 1, 2 , 3, 2 , 3, 4 , 5, 4 , 7,3
R3 (a, b) iff a.b > 0 over the set of non-
zero rational numbers (d)
R4 (a, b) iff a b 2 over the set of R1R2 3, 2 , 3, 4 , 5,1 , 5,3 , 7,1
natural numbers 24. The following is the Hasse diagram of
Which of the following statements is the poset [{a, b, c, d, e}, ].
correct? The poset is:
[GATE-2001] [GATE-2005]
(a) R1 and R2 are equivalence relations,
R3 and R4 are not
(b) R1 and R3 are equivalence relations,
R2 and R4 are not
(c) R1 and R4 are equivalence relations,
R2 and R3 are not
(d) R1, R2, R3 and R4 are all equivalence
relations (a) not a lattice
22. Consider the binary relation: (b) a lattice but not a distributive lattice
S { x, y | y x 1 (c) a distributive lattice but not a
Boolean algebra
and x, y 0,1, 2,....}
(d) a Boolean algebra
The reflexive transitive closure of S is 25. The set {1, 2, 4, 7, 8, 11, 13, 14} is a group
[GATE-2004] under multiplication modulo 15. The
(a) x, y | y x and x, y 0,1, 2,.... inverse of 4 and 7 are respectively:
[GATE-2005]
(b) x, y | y x and x, y 0,1, 2,.... (a) 3 and 13 (b) 2 and 11
(c) x, y | y x and x, y 0,1, 2,....
(c) 4 and 13 (d) 8 and 14
26. Let ‘f’ be a function from a set A to set
(d) x, y | y x and x, y 0,1, 2,.... B, ‘g’ be a function from B and C and ‘h’
be a function from A to C, such that
23. Let R1 be a relation from A = {1, 3, 5, 7}
h(a) = g(f(a)) for all a A . Which of the
to B = {2, 4, 6, 8} and R2 be another following statements is always true for
relation from B to C = {1, 2, 3, 4} as all such functions f and g?
defined below: [GATE-2005]
Discrete Mathematics 7
(a) g is onto h is onto (a) n
2
(b) 2
n
(II) f x, y max x, y
(III) f x, y x
y
(a) n and n
2
(b) n and n g G such that a g 1bg
2
(c) n and 0 (d) n and 1 R2: a, b G , aR2b if and only if
31. What is the maximum number of a b1
different Boolean functions involving n Which of the above is / are equivalence
Boolean variables? relation / relations?
[GATE-2007] [GATE-2019]
8 Discrete Mathematics
(a) R1 only (c) (A, *) is a monoid but not a group.
(b) Neither R1 nor R2 (d) (A, *) is a group but not an abelian
(c) R1 and R2 group
(d) R2 only 42. Let R denote the set of real numbers.
36. Let R be the set of all binary relations Let f : R R R R be a bijective
on the set {1, 2, 3}. Suppose a relation function defined by
in chosen from R at random. The f x, y x y , x y . The inverse
probability that the chosen relation is
function of f is given by
reflexive (round off to 3 decimal places)
is [GATE-1996]
1
x, y
37. Let G be a group of 35 elements. Then 1 1
the largest possible size of a subgroup
(a) f ,
x y x y
of G other than G itself is
(b) f x, y x y, x y
1
[GATE-2020]
38. The complement(s) of the element ‘a’ x y x y
(c) f
1
x, y ,
2
in the lattice shown in figure is
[GATE-1988]
2
(d) f
1
x, y 2 x y , 2 x y
43. Let R be a non-empty relation on a
R
collection of sets defined by A B if and
only if A B . Then (pick the true
statements)
[GATE-1996]
(a) R is reflexive and transitive
(b) R is symmetric and not transitive
39. The transitive closure of the relation {(1, (c) R is an equivalence relation
2) (2, 3) (3, 4) (5, 4)} on the set A = {1, 2, (d) R is not reflexive and not symmetric
3, 4, 5} is
44. Which of the following is false?
[GATE-1989]
[GATE-1996]
40. Some group (G, o) is known to be
(a) The set of all bijective functions on
abelian. Then, which of the following is
a finite set forms a group under
true for G?
function composition.
[GATE-1994]
(b) The set of {1, 2, …., p-1} forms a
1
(a) g g for every g G group under multiplication mod p
and where p is a prime member.
(b) g g for very g G
2
4 a, b, c, d
Let be the partial order on the set of
partitions S ' 1 , 2 , 3 , 4 defined
The last row of the table is
[GATE-2004]
10 Discrete Mathematics
as follows : i j if and only if i (a) (i) and (iv) only
(b) (ii) and (iii) only
refines j . The poset diagram for
(c) (iii) only
S ', is (d) (i), (ii) and (iv) only
[GATE-2007] 66. For the composition table of a cyclic
group shown below
Discrete Mathematics 11
69. The number of onto functions 75. Which of the following statements is
(subjective functions) from set X = {1, 2, false?
3, 4} to set Y = {a, b, c} is [GATE-1996]
[GATE-2015] (a) The set of all rational numbers is an
70. Let X and Y denote the sets containing abelian group under addition.
2 and 20 distinct objects respectively (b) The set of all integers is an abelian
and F denote the set of all possible group under addition.
functions defined from X to Y. Let f be (c) The set of all rational numbers form
randomly chosen from F. The an abelian group under
probability of f being one-to-one is multiplication.
[GATE-2015] (d) The set of all real numbers
71. Let R be a relation on the set of ordered excluding zero is an abelian group
pairs of positive integers such that under multiplication
((p,q), (r,s)) R if and only if p – s = q 76. The set {1, 2, 3, 5, 7, 8, 9} under
– r. Which of the following is true about multiplication modulo 10 is not a group.
R? Given below are four possible reasons.
[GATE-2015] Which one of them is false?
(a) Both reflexive and symmetric [GATE-2006]
(b) Reflexive but not symmetric (a) It is not closed
(c) Not reflexive but symmetric (b) 2 does not have an inverse
(d) Neither reflexive nor symmetric (c) 3 does not have an inverse
72.
A function f : N N , defined on the (d) 8 does not have an inverse
77. In the lattice defined by the Hasse
set of positive integers N , satisfies
diagram given in following figure, how
the following properties:
many complements does the element
f(n) = f(n/2) if n is even ‘e’ have?
f(n) = f(n+5) if n is odd [GATE-1997]
Let R i | : f j i be the set of
distinct values that f takes. The
maximum possible size of R is
[GATE-2016]
73. Let G be a finite group on 84 elements.
The size of largest possible proper
subgroup of G is _____.
[GATE-2018]
74. Let N be the set of natural numbers.
(a) 2 (b) 3
Consider the following sets.
(c) 0 (d) 1
P : Set of Rational numbers (positive &
78. From the following two diagrams 1 and
negative)
2, determine
Q : Set of functions from {0, 1} to N
R : Set of functions from N to {0, 1}
S : Set of finite subsets of N.
Which of the sets above are countable?
[GATE-2018]
(a) Q and S only (b) P and S only
(c) P and R only (d) P, Q and S only
12 Discrete Mathematics
(a) both 1 and 2 are lattice 80. Which of the following is not a Boolean
(b) 1 is poset and 2 is lattice algebra?
(c) 1 is lattice and 2 is poset (a) D40 (b) D66
(d) both 1 and 2 are poset not lattice
(c) D210 (d) D646
79. Over the set A = {1, 2, 3, 4, 5} two
partitions a and b are defined as = {{1,
2, 3}, {4}, {5}} and b = {{1}, {2, 3}, {4, 5}}.
The MEET and JOIN (under refinement
relation between partitions) are
respectively
(a) {(1), (2, 3), (4), (5)} and {(1, 2, 3), (4,
5)}
(b) {(1, 2, 3), (4, 5)} and {(1, 2), (3), (4, 5)}
(c) {(1, 2), (3, 4), (5)} and {(1, 2), (3, 4),
(5)}
(d) {(1, 2, 3, 4, 5)} and {(1), (2), (3), (4),
(5)}
Discrete Mathematics 13
3 Graph Theory
1. Which one of the following graphs is (b) n n 1 / 2
2
(a) n
NOT planar?
[GATE-2005] (c) n 1 (d) n 1 n / 2
6. Let G be an arbitrary graph with n
nodes and k components. If a vertex is
removed from G, the number of
components in the resultant graph
must necessarily lie between
[GATE-2003]
(a) k and n (b) k – 1 and k + 1
(c) k – 1 and n – 1 (d) k + 1 and n – k
7. Consider the following graph among
the following sequences
(I) a b e g h f (II) a b f e h g
(a) G1 (b) G2 (III) a b f h g e (IV) a f g h b e
(c) G3 (d) G4
14 Discrete Mathematics
10. Let G be a simple graph with 20 (a) 1 (b) 5
vertices and 100 edges. The size of the (c) 4 (d) 3
minimum vertex cover of G is 8. Then, 16. Consider a weighted undirected graph
the size of the maximum independent with positive edge weights and let uv
set of G is: be an edge in the graph. It is known
[GATE-2005] that the shortest path from the source
(a) 12 (b) 8 vertex s to u has weight 53 and the
(c) Less than 8 (d) More than 12 shortest path from s to v has weight 65.
11. Consider a weighted complete graph G Which one of the following statements
on the vertex set v1, v2 ,......vn such is always true?
[GATE-2007]
that the weight of the edge v1 , v2 is (a) weight (u, v) < 12
2 i j . The weight of a minimum (b) weight (u, v) 12
spanning tree of G is (c) weight (u, v) > 12
[GATE-2006] (d) weight (u, v) 12
(a) n 1 (b) 2n 2 17. What is the chromatic number of the
following graph?
n
(c) [GATE-2008]
2
(d) n
2
12. If all the edge weights of an undirected
graph are positive, then any subset of
edges that connects all the vertices
and has minimum total weight is a
[GATE-2006]
(a) Hamiltonian cycle
(b) grid
(c) hypercube
(d) tree
13. Let G be the non-planar graph with (a) 2 (b) 3
minimum possible number of edges. (c) 4 (d) 5
Then G has 18. What is the size of the smallest MIS
[GATE-2007] (Maximal Independent Set) of a chain of
(a) 9 edges and 5 vertices nine nodes?
(b) 9 edges and 6 vertices [GATE-2008]
(c) 10 edges and 5 vertices (a) 5 (b) 4
(d) 10 edges and 6 vertices (c) 3 (d) 2
14. The height of a binary tree is the 19. What is the chromatic number of n-
maximum number of edges in any root vertex simple connected graph which
to leaf path. The maximum number of does not contain any odd length cycle?
nodes in a binary tree of height h is: Assume n 2 .
[GATE-2007] [GATE-2009]
(a) 2 1
h
(b) 2
h1
1 (a) 2 (b) 3
(c) n - 1 (d) n
(c) 2 1
h1 h1
(d) 2
20. Which one of the following is TRUE for
15. The maximum number of binary tree s
any simple connected undirected graph
that can be formed with three
with more than 2 vertices?
unlabeled nodes is:
[GATE-2009]
[GATE-2007]
Discrete Mathematics 15
(a) No two vertices have the same (a) 1/8 (b) 1
degree. (c) 7 (d) 8
(b) Atleast two vertices have the same 25. Which of the following statements is /
degree. are TRUE for undirected graphs?
(c) Atleast three vertices have the P: Number of odd degree vertices is
same degree even.
(d) All vertices have the same degree. Q: Sum of degrees of all vertices is
21. Let G = (V, E) be a graph. Define even.
G id d , where id is the [GATE-2013]
d (a) P only (b) Q only
number of vertices of degree d in G. If (c) Both P and Q (d) Neither P nor Q
S and T are two different trees with 26. Let G = (V, E) be a directed graph,
S T , then [GATE-2010] where V is the set of vertices and E the
set of edges. Then which one of the
(a) S 2 T (b) S T 1
following graphs has the same strongly
(c) S T (d) S T 1 connected components as G?
22. K4 and Q3 are graphs with the following [GATE-2014]
structures. (a) G1 V , E1 where E1 u, v E
(b) G2 V , E2 where E2 u, v E
(c) G3 V , E3 where E3 { u , v |
there is a path of length 2 from u
to v in E}
(d) G4 V4 , E where V4 is the set of
vertices in G which are not isolated.
Which one of the following statements 27. The maximum number of edges in a
is TRUE in relation to these graphs? bipartite graph on 12 vertices is _____
[GATE-2011] [GATE-2014]
(a) K4 is planar while Q3 is not 28. The minimum number of colours that is
(b) Both K4 and Q3 are planar sufficient to vertex-colour any planar
(c) Q3 is planar while K3 is not graph is ______
(d) Neither K4 nor Q3 is planar [GATE-2016]
23. Let G be a simple undirected planar 29. Let T be tree with 10 vertices. The sum
graph on 10 vertices with 15 edges. If G of the degree of all the vertices in T is
is a connected graph, then the number ______.
of bounded faces in any embedding of [GATE-2017]
G on the plane is equal to 30. G is an undirected graph with n vertices
[GATE-2012] and 25 edges such that each vertex of
(a) 3 (b) 4 G has degree at least 3. Then the
(c) 5 (d) 6 maximum possible value of n is
24. Consider an undirected random graph _______.
of eight vertices. The probability that [GATE-2017]
there is an edge between a pair of 31. Let G be an undirected complete graph
vertices is 1/2. What is the expected on n vertices, where n > 2. Then, the
number of unordered cycles of length number of different Hamiltonian cycles
three? in G is equal to
[GATE-2013] [GATE-2019]
16 Discrete Mathematics
(a) 1 (b)
n 1! (b) If emax is in a minimum spanning
2 tree, then its removal must
disconnect G
(c) n ! (d) n 1 !
(c) No minimum spanning tree contains
32. Which of the following graphs is / are emax
planar?
(d) G has a unique minimum spanning
[GATE-1989] tree
38. How many undirected graphs (not
necessarily connected) can be
constructed out of a given set
V v1 , v2 ,....., vn of n vertices?
[GATE-2001]
(a) n n 1 / 2
n
(b) 2
n n1/2
33. A graph is planar if and only if, (c) n ! (d) 2
[GATE-1990] 39. How many perfect matchings are there
(a) it does not contain subgraphs in a complete graph of 6 vertices?
homeomorphic to K 5 and K 3,3 . [GATE-2003]
(a) 15 (b) 24
(b) It does not contain subgraphs (c) 30 (d) 60
isomorphic to K 5 or K 3,3 .
40. A graph G = (V, E) satisfies E 3 V 6
(c) It does not contain subgraphs . The min-degree of G is defined as
isomorphic to K 5 and K 3,3 .
min deg ree v . Therefore, min-
vV
(d) It does not contain subgraphs
degree of G cannot be
homeomorphic to K 5 or K 3,3 .
[GATE-2003]
34. The maximum number of possible (a) 3 (b) 4
edges in an undirected graph with a (c) 5 (d) 6
vertices and k components is _____. 41. The minimum number of colours
[GATE-1991] required to colour the following graph,
35. Maximum number of edges in a planar such that no two adjacent vertices are
graph with n vertices is assigned the same colour is
[GATE-1992] [GATE-2004]
36. Prove that in a finite graph, the number
of vertices of odd degree is always
even. [GATE-1995]
37. Let G be an undirected connected
graph with distinct edge weights. Let
emax be the edge with maximum weight
and emin the edge with minimum
weight. Which of the following (a) 2 (b) 3
statements is false? (c) 4 (d) 5
42. How many graphs on n labeled vertices
[GATE-2000]
(a) Every minimum spanning tree of G exist which have at least n 2
3n / 2
must contain emin edges?
[GATE-2004]
Discrete Mathematics 17
(a)
n n/2 C
2
(c) There is a planar embedding in
n 3n/2
2
which the number of faces is less
k 0 Ck
n
n 3n /2 n n
2
2 2
(b) than
2
(c)
n n/2 C
2
(d) There is a planar embedding in
n
which the number of faces is at
C
n n2 n /2
(d) k 0 k n
most .
43. Let G1 V , E1 and G2 V , E2 be 1
connected graphs on the same vertex 47. Find the matching number for the
set V with more than two vertices. If following graph.
G1 G2 V , E1 E2 is not a
connected graph, then the graph.
G1 G2 V , E1 E2
[GATE-2004]
(a) cannot have a cut vertex
(b) must have a cycle
48. Find the matching number for the
(c) must have a cut-edge (bridge_
following graph.
(d) has chromatic number strictly
greater than those of G1 and G2
44. What is the number of vertices in an
undirected connected graph with 27
edges, 6 vertices of degree 2, 3 vertices
of degree 4 and remaining of degree 3?
[GATE-2004]
(a) 10 (b) 11
(c) 18 (d) 19 49. Consider the graph below:
45. If G is a forest with n vertices and k
connected components, how many
edges does G have?
[GATE-2014]
(a) n / k (b) n / k
(c) n k (d) n k 1
46. Let denote the minimum degree of a
vertex in a graph. For all planar graphs
on n vertices with 3 , which one of
the following is TRUE? (i) What is the chromatic number of G?
[GATE-2014] (ii) How many edges are present in
(a) In any planar embedding, the complimentary graph G of the
n given graph G?
number of faces is at least 2 .
2 (iii) A connected cubic planar graph
(b) In any planar embedding, the with no bridges has exactly 5 edges
n in boundary of each region. Find the
number of faces is less than 2 number of edges of the graph.
2
18 Discrete Mathematics
50. Find the number of spanning trees for Identify the correct answer. G is a
the following graph. (a) bipartite and regular but not a
Hamiltonian graph
(b) regular and Hamiltonian but not a
bipartite graph
(c) Hamiltonian and bipartite but not a
regular graph
(d) regular, bipartite and Hamiltonian
51. Consider the following graphs: graph
54. Which one of the following statements
is false?
(a) A spanning tree is a tree that
contains all edges of a graph
(b) The degree of a vertex in a simple
graph is the number of vertices
adjacent to it
(c) A loop is a special case of cycle in
which a single are begins and ends
with same node
(d) The adjacency matrix of a directed
graph with no cycles must have all
diagonal elements as 0’s
Identify the correct statement? 55. A binary tree of height h has
(a) Only G1 is hamiltonian
(a) at least h and at most 2 1 interior
h
(b) Only G2 is Hamiltonian
nodes
(c) Both G1 and G2 are Hamiltonian
(b) at least log 2 h 1 and at most
(d) Neither G1 nor G2 is Hamiltonian
52. How many chromatic partition(s) the 2h 1 interior nodes
given graph has? (c) at least log 2 h 1 and at most h
interior nodes
(d) nothing can be said with certainty
56. A connected multigraph has an Eulerian
path (not circuit) if and only if
(a) every vertex in it has even degree
(b) every vertex in has odd degree
(c) it has one vertex which is of odd
degree
(a) Three (b) Two (d) it has two vertices which are of odd
(c) One (d) Zero degree
53. For the graph G shown in the figure, 57. In a directed graph, if there is a directed
path from any node u to v or vice versa,
for any pair of nodes of the graph, the
graph is
(a) weakly connected
(b) unilaterally connected
(c) strongly connected
(d) disconnected
Discrete Mathematics 19
58. Consider the following graph. 59. Let G be a planar graph such that every
face is bordered by exactly three edges.
What are the possible values for
chromatic number of G?
(a) only G (b) only 4
(c) 3 or 4 (d) None of these
20 Discrete Mathematics
4 Mathematical & Propositional Logic
(d) a b b c
(a) x y x y
3. Using Modus ponens A, A B B
(b) ~ x y ~ x ~ y x
or resolution to show that the following
set is inconsistent: (c) x x y
[GATE-1992] (d) x y ~ x ~ y
(i) Q x P x ~ R a 9. What is the converse of the following
(ii) R a ~ Q a assertion? I stay only if you go
(iii) Q(a)
[GATE-1998]
(iv) ~ P y
(a) I stay if you go
Where x and y are universally quantifies (b) If I stay then you go
variables, a is a constant and P, Q, R are (c) If you do not go then I do not stay
monadic predicates. (d) If I do not stay then you go
4. Show that proposition C is a logical 10. (a) Show that the formula
consequence of the formula ~ p q q p is not a
A A B C B ~ A
tautology.
[GATE-1993] (b) Let A be a tautology and B be any
5. The proposition p ~ p q is other formula. Prove that A B is
[GATE-1993] a tautology.
(a) a tautology (b) p q [GATE-1999]
11. Let a, b, c, d be propositions. Assume
(c) p q (d) a contradiction
that the equivalences a b ~ b and
6. Let p and q be propositions. Decide
b c hold. Then the truth value of the
whether p q does not imply
formulae
p ~ q is true or false
a b a c d is always
[GATE-1994]
Discrete Mathematics 21
[GATE-2000] (c) P Q is satisfiable if and only if
(a) True
P R Q ~ R is satisfiable
(b) False
(c) Same as truth value of b (d) P Q FALSE if and only if both
(d) Same as truth value of d P and Q are unsatisfiable
12. Consider two well-formed formulas in 16. The following propositional statement
propositional logic is
F1 : P ~ P P Q R P Q R
F2 : P ~ P ~ P P
[GATE-2004]
Which of the following statement is (a) Satisfiable but not valid
correct?
(b) Valid
[GATE-2001]
(c) A contradiction
(a) F1 is a satisfiable, F2 is valid
(b) F1 is ansatisfiable, F2 is satisfiable (d) None of the above
(c) F1 is unsatisfiable, F2 is valid 17. Let p, q, r and s be four primitive
(d) F1 and F2 are both satisfiable statements. Consider the following
arguments:
13. “If X then Y unless Z” is represented by
which of the following formulas in P : ~ p q r s p r ~ s q
propositional logic? (“~” is negation, “
" " is conjunction, and " " Q : ~ p q q p r ~ r
implication) R : q r p ~ q p r
[GATE-2002]
(a) X ~ Z Y (b) X Y ~ Z S : p p r q ~ r q
(b) I1 is correct but I2 is not a correct 27. Consider the following two statements.
S1: If a candidate is known to be
inference
corrupt, then he will not be elected
(c) I1 is not correct but I2 is a correct
S2: If a candidate is kind, he will be
inference elected. Which one of the following
(d) Both I1 and I2 are not correct statements follows from S1 and S2 as
inferences per sound inference rules of logic?
23. Consider the following statements: [GATE-2015]
P: Good mobile phones are not cheap (a) If a person is known to be corrupt
Q: Cheap mobile phones are not good be is kind
Discrete Mathematics 23
(b) If a person is not known to be not pleasant only if it is raining and it is
corrupt, he is not kind cold” is represented by
(c) If a person is kind, he is not known [GATE-2017]
to be corrupt (a) ~ p r ~ r p q
(d) If a person is not kind, he is not
(b) ~ p r p q ~ r
known to be corrupt
28. Let p, q, r, s represent the following (c) ~ p r p q ~ r
propositions.
(d) ~ p r r p q
p : x 8, 9, 10, 11, 12
First Order Logic
q: x is a composite number
33. Which of the following predicate
r: x is a perfect square
calculus statements is / are valid?
s: x is a prime number
[GATE-1992]
[GATE-2016]
The integer x 2 which satisfies
(a) x P x x Q x
~ p q ~ r ~ s is ________. x P x Q x
29. Consider the following expressions: (b)
(i) false (ii) Q x P x x x P x Q x
(iii) true (iv) P Q
(c) x P x Q x
(v) ~ Q P
x P x x Q x
The number of expressions given above
that are logically implied by P P Q (d) x P x Q x
is _____ ~ x P x x Q x
[GATE-2016]
34. Identify the correct translation into
30. The statement ~ p ~ q is logically logical notation of the following
equivalent to which of the statements assertion.
below? Some boys in the class are taller than
[GATE-2017] all the girls
(I) p q (II) q p [GATE-2004]
(III) ~ q p (IV) ~ p q Note: taller (x, y) is true if x is taller
than y.
(a) I only (b) I and IV only
(a)
(c) II only (d) II and III only
31. Let p, q and r be propositions and the x boy x y girl y taller x, y
expression p q r be a (b)
contradiction. Then, the expression x boy x y girl y taller x, y
r p q is (c)
[GATE-2017] x boy x y girl y taller x, y
(a) a tautology (d)
(b) a contradiction
x boy x y girl y taller x, y
(c) always TRUE when p is FALSE
(d) always TRUE when q is TRUE 35. Let a (x, y), b(x, y) and c(x, y) be three
32. Let p, q, r denote the statements “It is statements with variables x and y
raining”, “ It is cold” and “It is pleasant”, chosen from some universe. Consider
respectively. Then the statement “It is the following statement
not raining and it is pleasant, and it is x y a x, y b x, y ~ c x, y
24 Discrete Mathematics
Which one of the following is its 38. Which one of the first order predicate
equivalent? calculus statements given below
[GATE-2004] correctly expresses the following
(a) x y a x, y b x, y c x, y English statement?
Tigers and lions attack if they are
(b) hungry or threatened.
x y a x, y b x, y ~ c x, y [GATE-2006]
(c) (a)
~ x y a x, y b x, y c x, y tiger x lion x
(d) x hungry x threatened x
~ x y a x, y b x, y c x, y attacks x
36. What is the first order predicate (b)
calculus statement equivalent to the tiger x lion x
following?
x hungry x threatened x
Every teacher is liked by some student.
[GATE-2005] attacks x
teacher x (c)
(a) x student y tiger x lion x
y
likes y, x x attacks x
teacher x hungry x threatened x
(b) x
y student y likes y, x
(d)
tiger x lion x
teacher x
(c) y x x hungry x threatened x
student y likes y, x
teacher x attacks x
39. Consider the following first order logic
(d) x student y
y formula in which R is a binary relation
likes y, x symbol.
37. Let P(x) and Q(x) be arbitrary xy R x, y R y, x .
predicates. Which of the following
The formula is
statement is always TRUE?
[GATE-2005] [GATE-2006]
(a) Satisfiable and valid
(a) x P x Q x (b) Satisfiable and so it its negation
xP x xQ x (c) Unsatisfiable but its negation is
valid
(b) x P x Q x (d) Satisfiable but its negation is
xP x xQ x unsatisfiable
40. Let Graph(x) be a predicate which
x P x x Q x
(c) denotes that x is graph. Let
x P x Q x Connected(x) be a predicate which
denotes that x is connected. Which of
x P x x Q x the following first order logic sentences
(d)
x P x Q x DOES NOT represent the statement:
“Not every graph is connected”?
[GATE-2007]
Discrete Mathematics 25
(a) ~ x Graph x Connected x x can fool person y at time t. Which one
of the statements below expresses
(b) x Graph x ~ Connected x
best the meaning of the formula
(c) ~ x ~ Graph x Connected x xyt ~ F x, y, t ?
26 Discrete Mathematics
(d) ~ x F x P x 53. Which one of the following well-
formed formulae in predicate calculus
49. Which one of the following is NOT
is NOT valid?
logically equivalent to
[GATE-2016]
~ x y z ? (a) xp x xq x
[GATE-2013]
x ~ p x xq x
(a) x z ~ y
(b) xp x xq x x p x q x
(b) x z y ~
(c) x p x q x xp x xq x
(c) x y z ~
(d) x y ~ z ~ (d) x p x q x xp x xq x
50. Consider the statement 54. Consider the first-order logic sentence
“Not all that glitters is gold” F : x yR x, y . Assuming non-empty
Predicate glitters(x) is true if x glitters logical domain, which of the sentences
and predicate gold(x) is true if x is gold. below are implied by F?
Which one of the following logical (I) y xR x, y
formulae represents the above
statement? (II) y xR x, y
[GATE-2014]
(III) y xR x, y
(a) x : glitters x ~ gold x
(IV) ~ x y R x, y [GATE-2017]
(b) x : gold x glitters x
(a) IV only (b) I and IV only
(c) x : gold x ~ glitters x
(c) II only (d) II and III only
(d) x : glitters x ~ gold x
55. Consider the first-order logic sentence
51. The CORRECT formula for the st uv wxy s, t,u, v, w, x, y .
sentence, “not all rainy days are cold”
Where s, t,u, v, w, x, y is a quantifier-
is
[GATE-2014] free first-order logic formula using only
predicate symbols and possibly
(a) d Rainy d ~ Cold d
equality, but no function symbols.
(b) d ~ Rainy d Cold d Suppose has a model with a universe
(c) d ~ Rainy d Cold d containing 7 elements.
Which one of the following statements
(d) d Rainy d ~ Cold d
is necessarily true? [GATE-2018]
52. Which one of the following well formed (a) There exists atleast one model of
formulae is a tautology?
with universe of size less than or
[GATE-2015] equal to 3
(a) x y R x, y y xR x, y (b) There exists no model of with
(b) x y R x, y S x, y universe of size less than or equal
to 3
xyS x, y
(c) There exists no model of with
(c) xy P x, y R x, y universe of size greater than 7
xy ~ P x, y R x, y (d) Every model of has a universe of
size equal to 7
(d) xyP x, y xyP y, x
Discrete Mathematics 27
56. Consider the fist order predicate (d) x p x W xp x W
formula
: x z z | x z x z 1
z z | w
w w x
w z z 1
Here ‘a|b’ denotes that ‘a divides b’,
where a and b are integers.
Consider the following sets:
S1. {1, 2, 3…….. 100}
S2. Set of all positive integers
S3. Set of all integers
Which of the above sets satisfy ?
[GATE-2019]
(a) S2 and S3 (b) S1, S2 and S3
(c) S1 and S2 (d) S1 and S3
57. Which one of the following predicate
formulae is NOT logically valid?
[GATE-2020]
Note that W is predicate formula
without any free occurrence of x.
(a) x p x W xp x W
(b) x p x W xp x W
(c) x p x W xp x W
28 Discrete Mathematics