A partition of an integer, n, is one way of writing n as the sum of positive integers where the order of the addends (terms being added) does not matter. p(n, k) = number of partitions of n with k parts. p(4,2)= 2, because (2+2) , (1+3).
i want to find a recurrence relation for p(n,k)?
i read some note about Ferrer diagram, but i couldn't find such recurrence.
any hint or idea?
Hint: the partition either has a 1 for one of its parts, or it doesn't.
Answer: If one of the parts is 1, then the remaining $k-1$ parts partition $n-1$, so there are $p(n-1,k-1)$ partitions where at least one part is 1. Otherwise, every part is at least 2: removing one from each part leaves a partition of $n-k$ into $k$ parts, so there are $p(n-k,k)$ of these partitions. These are all possible cases, proving the recurrence $$ p(n,k) = p(n-1,k-1) + p(n-k,k) $$