See http://en.wikipedia.org/wiki/Partition_(number_theory).

On Saturday, March 1, 2014 10:25:57 AM UTC-6, kumar raja wrote:
>
> Given an integer how many number of ways u can partition the number?
>  
> e.g. 3  can be written as 3,1+2,1+1+1 
> and 4 can be written as  4, 1+1+1+1,2+2,1+3,1+1+2   
>
> So  for 3 --> 3
>       for 4 -->5.
>
> The order of the elements in the partition does not matter. 
> So how to calculate the number of ways to partition the given number?
>
> Can someone give idea on how to write the recurrence relation 
> for the problem? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].

Reply via email to