The GATE Grind

GATE 2015 CS (CS3) – Question 25

Engineering Mathematics · Discrete Mathematics: Combinatorics (Counting, Recurrence Relations, Generating Functions) · 1 mark · Numerical answer

How many four-digit numbers using only 1,2,3 have digits in nondecreasing order from left to right?

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 15

Explanation

Such a number is uniquely determined by counts x₁,x₂,x₃ of the three digits, with x₁+x₂+x₃=4 and each count nonnegative. Stars and bars gives C(4+3−1,3−1)=C(6,2)=15. Sorting the chosen multiset gives exactly one permitted number.

More Discrete Mathematics: Combinatorics (Counting, Recurrence Relations, Generating Functions) questions

All Discrete Mathematics: Combinatorics (Counting, Recurrence Relations, Generating Functions) questions →