Math, asked by Kaifkhan6702, 1 year ago

Number of ways to write n as a sum of k positive integers

Answers

Answered by aryandesi
3
it can be infinite in this case but if take a no. than it depends on it
Answered by danielgilchrist
2

Answer:

The answer is (n-1) choose (k-1), or (n-1)!/{(k-1)!(n-k)!}.

Step-by-step explanation:

To see why think of the step by step cumulative sum of your k integers. It will be an increasing sequence of k numbers, the last of which is n. The others can be anywhere between 1 and n-1, and there are k-1 of them. So there are as many ways to write n as a sum of k positive integers as there are ways to choose k-1 numbers from the set of integers between 1 and n-1: and that is (n-1) choose (k-1).

Similar questions