Counting with conditions: JEE Main PYQ with Solutions
26 questions on Counting with conditions from the Permutations and Combinations chapter, newest first. Open "Show answer and solution" under a question to check your work.
Two players A and B play a series of games of badminton. The player, who wins 5 games first, wins the series. Assuming that no game ends in a draw, the number of ways, in which player A wins the series is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 126 (exact integer)
If the series ends at game k (k=5,…,9), A wins game k and exactly 4 of the first k−1 games: k−1C4 ways. Total 4C4+5C4+6C4+7C4+8C4=1+5+15+35+70=126.
Three persons enter in a lift at the ground floor. The lift will go upto 10th floor. The number of ways, in which the three persons can exit the lift at three different floors, if the lift does not stop at first, second and third floors, is equal to ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 210 (exact integer)
The lift can stop at floors 4 to 10: 7 floors. The three persons leave at three different floors: 7×6×5=210 ways.
The number of strictly increasing functions f from the set {1,2,3,4,5,6} to the set {1,2,3,…,9} such that f(i)=i for 1≤i≤6, is equal to:
A27
B22
C21
D28
Show answer and solution
Answer: (D)
For a strictly increasing f, f(i)≥i, so f(i)=i means f(i)≥i+1. Put g(i)=f(i)−i. Then g never decreases, g(1)≥1 and g(6)=f(6)−6≤3, so every g(i) is 1, 2 or 3. A non-decreasing list of six values from {1,2,3} is fixed by how many 1's, 2's and 3's it has: 6+2C2=28 ways.
For n≥2, let Sn denote the set of all subsets of {1,2,…,n} with no two consecutive numbers. For example {1,3,5}∈S6, but {1,2,4}∈/S6. Then n(S5) is equal to ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 13 (exact integer)
Count the subsets of {1,2,3,4,5} by size. No element: 1. One element: 5. Two elements, not consecutive: 5C2−4=6. Three elements: only {1,3,5}, 1. Larger subsets must contain two consecutive numbers. Total 1+5+6+1=13.
The number of ways, in which the letters A, B, C, D, E can be placed in the 8 boxes of the figure below so that no row remains empty and at most one letter can be placed in a box, is:
A5880
B960
C840
D5760
Show answer and solution
Answer: (D)
The rows have 3, 3 and 2 boxes. Without the row condition: choose 5 of the 8 boxes and arrange the letters, 8C5×5!=6720. Third row empty: the letters go into the 6 boxes of the first two rows, 6C5×5!=720. First row empty: exactly the 5 boxes of rows two and three, 5!=120. Second row empty: 120 in the same way. Two rows cannot be empty together. Required count 6720−720−120−120=5760.
The number of ways, 5 boys and 4 girls can sit in a row so that either all the boys sit together or no two boys sit together, is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 17280 (exact integer)
All boys together: the block and the four girls make 5 units, 5!×5!=14400 ways. No two boys together: the four girls make 5 gaps and the five boys must fill all of them, 4!×5!=2880 ways. The two cases cannot happen together. Total 14400+2880=17280.
In a group of 3 girls and 4 boys, there are two boys B1 and B2. The number of ways, in which these girls and boys can stand in a queue such that all the girls stand together, all the boys stand together, but B1 and B2 are not adjacent to each other, is:
A96
B144
C120
D72
Show answer and solution
Answer: (B)
The girls' block and the boys' block can be ordered in 2 ways. The girls can be arranged in 3!=6 ways. The boys can be arranged in 4!=24 ways, of which 2×3!=12 have B1 and B2 next to each other, leaving 12. Total 2×6×12=144.
A person forgets his 4-digit ATM pin code. But he remembers that in the code all the digits are different, the greatest digit is 7 and the sum of the first two digits is equal to the sum of the last two digits. Then the maximum number of trials necessary to obtain the correct code is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 72 (exact integer)
The digits come from 0 to 7 and include 7. Let 7 be paired with p; the other pair must have the same sum 7+p, using two different digits from 0 to 6 other than p. p=0: (1,6),(2,5),(3,4). p=1: (2,6),(3,5). p=2: (3,6),(4,5). p=3: (4,6). p=4: (5,6). p=5,6: none. That is 9 choices. In each, the two pairs can swap places (2 ways) and each pair can be written in 2 orders: 2×2×2=8 codes. Total 9×8=72.
In an examination, 5 students have been allotted their seats as per their roll numbers. The number of ways, in which none of the students sits on the allotted seat, is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 44 (exact integer)
This is the number of derangements of 5 objects: 5!(1−1!1+2!1−3!1+4!1−5!1)=60−20+5−1=44.
The number of permutations of the digits 1,2,3,…,7 without repetition, which neither contain the string 153 nor the string 2467, is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 4898 (exact integer)
All permutations: 7!=5040. Containing 153: treat it as one block with the other four digits, 5!=120. Containing 2467: one block with the other three digits, 4!=24. Containing both: the two blocks in either order, 2. Containing at least one: 120+24−2=142. Required count 5040−142=4898.
The number of ways of selecting two numbers a and b, a∈{2,4,6,…,100} and b∈{1,3,5,…,99} such that 2 is the remainder when a+b is divided by 23 is
A186
B54
C108
D268
Show answer and solution
Answer: (C)
a+b is odd and lies between 3 and 199. The odd numbers of the form 23k+2 in that range are 25,71,117,163. Sum 25: a=2,4,…,24, 12 pairs. Sum 71: a=2,4,…,70, 35 pairs. Sum 117: b≤99 needs a≥18, so a=18,…,100, 42 pairs. Sum 163: a=64,…,100, 19 pairs. Total 12+35+42+19=108.
Let S={1,2,3,5,7,10,11}. The number of non-empty subsets of S that have the sum of all elements a multiple of 3, is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 43 (exact integer)
Sort S by remainder on division by 3: {3}, {1,7,10} (remainder 1), {2,5,11} (remainder 2). Take i elements from the second group and j from the third. The sum is a multiple of 3 when i−j is a multiple of 3: (i,j)=(0,0),(1,1),(2,2),(3,3),(0,3),(3,0), giving 1+9+9+1+1+1=22 choices. The element 3 can be in or out: 22×2=44. Leaving out the empty set gives 43.
Let x and y be distinct integers where 1≤x≤25 and 1≤y≤25. Then, the number of ways of choosing x and y, such that x+y is divisible by 5, is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 120 (exact integer)
Each remainder 0,1,2,3,4 on division by 5 occurs for exactly five of the numbers 1 to 25. Count ordered pairs (x,y). Both multiples of 5 and different: 5×4=20. Remainders (1,4),(4,1),(2,3),(3,2): 5×5=25 each, so 100. Total 20+100=120.
Let S be the set of all passwords which are six to eight characters long, where each character is either an alphabet from {A,B,C,D,E} or a number from {1,2,3,4,5} with the repetition of characters allowed. If the number of passwords in S whose at least one character is a number from {1,2,3,4,5} is α×56, then α is equal to ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 7073 (exact integer)
For length n there are 10n passwords in all and 5n made of letters only, so 10n−5n have at least one number. Adding for n=6,7,8: (106−56)+(107−57)+(108−58)=56[(26−1)+5(27−1)+25(28−1)]=56(63+635+6375)=7073×56. So α=7073.
Let b1b2b3b4 be a 4-element permutation with bi∈{1,2,3,…,100} for 1≤i≤4 and bi=bj for i=j, such that either b1,b2,b3 are consecutive integers or b2,b3,b4 are consecutive integers. Then the number of such permutations b1b2b3b4 is equal to ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 18915 (exact integer)
Take consecutive to mean increasing by 1 each time. b1,b2,b3 consecutive: b1 can be 1 to 98, and b4 is any of the other 97 numbers, so 98×97=9506. b2,b3,b4 consecutive: 9506 in the same way. Both at once means four consecutive integers: b1 from 1 to 97, so 97. Required count 9506+9506−97=18915.
The number of ways, 16 identical cubes, of which 11 are blue and rest are red, can be placed in a row so that between any two red cubes there should be at least 2 blue cubes, is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 56 (exact integer)
There are 5 red cubes, with 4 gaps between them. Put 2 blue cubes in each gap first: that uses 8. The remaining 3 blue cubes go anywhere among 6 places (the four gaps and the two ends). The number of ways is 3+6−1C6−1=8C5=56.
In an examination, there are 5 multiple choice questions with 3 choices, out of which exactly one is correct. There are 3 marks for each correct answer, −2 marks for each wrong answer and 0 mark if the question is not attempted. Then, the number of ways a student appearing in the examination gets 5 marks is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 40 (exact integer)
With a correct and b wrong answers, 3a−2b=5 and a+b≤5. The only solution is a=3, b=2. Choose the three questions answered correctly: 5C3=10 ways. Each of the other two is answered wrongly in 2 ways: 22=4. Total 10×4=40.
Let S={1,2,3,4,5,6,9}. Then the number of elements in the set T={A⊆S:A=ϕ and the sum of all the elements of A is not a multiple of 3} is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 80 (exact integer)
Sort S by remainder on division by 3: {3,6,9} (remainder 0), {1,4} (remainder 1), {2,5} (remainder 2). Elements of the first group do not change the remainder, so they can be chosen in 23=8 ways. Take i elements from {1,4} and j from {2,5}: the sum has remainder of i+2j, which is a multiple of 3 only when i=j. That happens in 1+2⋅2+1=6 of the 16 choices, so 10 choices give a sum that is not a multiple of 3. Total 8×10=80 (the empty set has sum 0 and is already left out).
Two families with three members each and one family with four members are to be seated in a row. In how many ways can they be seated so that the same family members are not separated?
A2!3!4!
B(3!)3⋅(4!)
C(3!)2⋅(4!)
D3!(4!)3
Show answer and solution
Answer: (B)
Treat each family as one block. The three blocks can be ordered in 3! ways. Inside the blocks the members can be ordered in 3!, 3! and 4! ways. Total 3!×3!×3!×4!=(3!)3⋅4!.
A test consists of 6 multiple choice questions, each having 4 alternative answers of which only one is correct. The number of ways, in which a candidate answers all six questions such that exactly four of the answers are correct, is ______.
Numerical answer. Work it out before you open the answer.
Show answer and solution
Answer: 135 (exact integer)
Pick the four questions answered correctly: 6C4=15 ways. Each of the other two questions must get one of its 3 wrong answers: 32=9 ways. Total 15×9=135.
There are m men and two women participating in a chess tournament. Each participant plays two games with every other participant. If the number of games played by the men between themselves exceeds the number of games played between the men and the women by 84, then the value of m is :
A11
B12
C7
D9
Show answer and solution
Answer: (B)
Games among men: 2×mC2=m(m−1). Games between men and the two women: 2×2m=4m. So m(m−1)−4m=84, that is m2−5m−84=0, so (m−12)(m+7)=0 and m=12.
Let A={x1,x2,…,x7} and B={y1,y2,y3} be two sets containing seven and three distinct elements respectively. Then the total number of functions f:A→B that are onto, if there exist exactly three elements x in A such that f(x)=y2, is equal to:
A12⋅7C2
B16⋅7C3
C14⋅7C3
D14⋅7C2
Show answer and solution
Answer: (C)
Choose the three elements sent to y2: 7C3 ways. The other four elements go to y1 or y3: 24=16 ways, but the two ways that send all four to the same value are not onto. So there are 16−2=14 ways, and the total is 14⋅7C3.
Two women and some men participated in a chess tournament in which every participant played two games with each of the other participants. If the number of games that the men played between themselves exceeds the number of games that the men played with the women by 66, then the number of men who participated in the tournament lies in the interval
A(11,13]
B(14,17)
C[10,12)
D[8,9]
Show answer and solution
Answer: (C)
Let there be m men. Games among men: 2×mC2=m(m−1). Games between men and the two women: 2×2m=4m. So m(m−1)−4m=66, that is m2−5m−66=0, giving m=11. This lies in [10,12) (the interval (11,13] does not contain 11).
Let X={1,2,3,4,5}. The number of different ordered pairs (Y,Z) that can be formed such that Y⊆X, Z⊆X and Y∩Z is empty, is
A52
B35
C25
D53
Show answer and solution
Answer: (B)
Each element of X has three choices: it is in Y only, in Z only, or in neither (it cannot be in both). With 5 elements choosing independently there are 35 ordered pairs.