Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Dinesh Singh
COUNTING
1. The number of substrings (of all length inclusive) that can be formed from a
character string of length n is
(GATE CS - 1994)
A). n
2
B). n
C).
n(n 1)
2
D).
n(n 1)
2
(GATE CS - 1995)
2
B). n
C). 2n
D).
n(n 1)
2
4. The number of binary strings of n zeros and k ones such that no two ones are
adjacent is
(GATE CS - 1999)
A). n 1Ck
B). nCk
C). nCk 1
5. Two girls have picked 10 roses, 15sunflowers and 14 daffodils. What is the
number of way they can divide the flowers among themselves? (GATE CS - 1999)
A). 1638
B). 2100
C).2640
B). 8
C). 9
D). 12
B). 2296
C). 2620
(GATE CS - 2001)
D). 4536
8. (a) In how many ways can a given positive integer n 2 be expressed as the sum
of 2 positive integers (which are not necessarily distinct). For example, for n = 3, the
number of ways is 2, i.e., 1+2, 2+1. Give only the answer without any explanation.
(b) In how many ways can a given positive integer n 3 be expressed as the sum of 3
positive integers (which are not necessarily distinct). For example, for n = 4, the
number of ways is 3, i.e., 1+2+1, 2+1+1. Give only the answer without any
explanation.
(c) In how many ways can a given positive integer n k be expressed as the sum of
k positive integers (which are not necessarily distinct)? Give only the answer
without any explanation.
(GATE CS - 2002)
Discrete Mathematics
Dinesh Singh
B). 30
C). 56
D). 256
10. If n couples are invited to a party with the condition that every husband should
be accompanied by his wife. However, a wife need not be accompanied by her
husband. The number of different gatherings possible at the party is
2n
A). 2n
n
B). 3n
C).
(2n)!
2n
2n
D).
n
(GATE CS - 2003)
11. If m identical balls are to be placed in n distinct bags and you are given that
m kn , where k is a natural number ( 1) . In how many ways can the balls be placed
in the bags if each bag must contain at least k balls?
mk
A).
n 1
m kn n 1
m 1
B).
C).
n 1
nk
(GATE CS - 2003)
m kn n k 2
D).
.
nk
12. In how many ways can we distribute 5 distinct balls ; B1 , B2 ,........B5 in 5 distinct
cells ; C1 , C2 ,........C5 , such that Ball Bi B is not in cell Ci , i 1, 2,.....,5 and each cell
contains exactly one ball?
A). 44
(GATE IT - 2004)
B). 96
C). 120
D). 3125
13. What is the minimum number of ordered pair of non-negative numbers should
be chosen to ensure that there are two pair (a, b) and (c, d ) in the chosen set such that
a c mod 3 and b d mod 5
A). 4
B). 6
(GATE CS - 2005)
C).16
D). 24
Discrete Mathematics
Dinesh Singh
(GATE CS - 2007)
Suppose that a robot is placed on the Cartesian plane. At each step it is allowed to
move either one unit up or one unit right, i.e., if it is at (i, j ) then it can move to
either (i 1, j ) or (i, j 1) .
14. How many distinct paths are there for the robot to reach the point (10,10) starting
from the initial position (0, 0) ?
20
A).
10
B). 220
C). 210
15. Suppose that the robot is not allowed to traverse the line segment from (4, 4) to
(5, 4) . With this constraint, how many distinct paths are there for the robot to reach
(10,10) starting from (0, 0) ?
A). 29
B). 219
8 11
C).
4 5
20 8 11
D).
10 4 5
16. In how many ways b blue balls and r red balls can be distributed in n distinct
boxes?
(GATE IT - 2008)
A).
(n b 1)!(n r 1)!
(n (b r ) 1)!
(n (b r ) 1)!
n!
B).
C).
D).
(n 1)!b !(n 1)!r !
(n 1)!(n 1)!(b r )!
n !(b r 1)!
b !r !