Placement AptitudeVery hardTCS Digital · Infosys SP · CAT
How many solutions in integers does x₁ + x₂ + x₃ + x₄ = 20 have with 1 ≤ xᵢ ≤ 8 for every i?
- A. 315
- B. 969
- C. 285
- D. 309
Correct answer: A. 315
Put yᵢ = xᵢ - 1, so the yᵢ sum to 16 with 0 ≤ yᵢ ≤ 7. Inclusion-exclusion: C(19,3) - 4·C(11,3) + 6·C(3,3) = 969 - 660 + 6 = 315.
Practise more Permutations, Combinations and Probability (Placement) questionsPermutations, Combinations and Probability (Placement): notes and key points
More Permutations, Combinations and Probability (Placement) questions
- Four fair dice are rolled. What is the probability that the sum of the four numbers is 15?
- A gambler starts with ₹2 and plays repeated rounds, winning ₹1 with probability 2/3 and losing ₹1 with probability 1/3 each round. He…
- A fair coin is tossed repeatedly. What is the expected number of tosses needed to see the pattern H T H for the first time?
- A bag holds three coins: one fair, one with heads on both sides, and one that lands heads with probability 1/3. A coin is picked at random…
- Four people each have a birthday on a uniformly random day of the week, independently. What is the probability that exactly two of them…
- Five married couples are seated around a circular table. Two seatings are the same only if one is a rotation of the other. In how many…