GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 13(c)

Ordered positive compositions into k parts

Discrete Mathematics · Combinatorics & Counting · Full GATE CSE 2002 paper

GATE 2002, Q13(c) Descriptive
Report issue

Combinatorics & Counting

Question 13(c), GATE 2002: Original13(c): For n≥k≥1, count ordered expressions of n as a sum of k positive integers, allowing repeated summands. Give only the answer without explanation.
Question 13(c), GATE 2002: Original13(c): For n≥k≥1, count ordered expressions of n as a sum of k positive integers, allowing repeated summands. Give only the answer without explanation.
Tap to enlarge
Answer & solution

Answer: C(n−1,k−1) (no official key was published)

For n≥k≥1, separate a row of n unit objects into k nonempty consecutive groups by choosing k−1 of its n−1 internal gaps. Group lengths give an ordered k-tuple of positive integers summing to n, and every such tuple yields exactly one separator choice. Therefore the count is C(n−1,k−1). This also gives one composition when n=k or k=1.

Original paper, page 8