1

In how many ways a positive number X can be represented as a sum of Y positive integer numbers and how to find them?

Eg 1: 7 (X) can be represented as a sum of 2 (Y) numbers in following way: (3+4), (2+5), (1+6).

Eg 2: 7 (X) can be represented as a sum of 3 (Y) numbers in following way: (1+1+5), (1+2+4), (1+3+3), (2+2+3).

What happens when p = 1 here.

Dr.PB
  • 143
  • See whether this helps you: http://math.stackexchange.com/questions/217597/number-of-ways-to-write-n-as-a-sum-of-k-nonnegative-integers –  Jan 09 '17 at 16:10

1 Answers1

0

A helpful fuction code is available here.

Dr.PB
  • 143