View Single Post
  #5  
Old 04-15-2005, 05:22 PM
fnord_too fnord_too is offline
Senior Member
 
Join Date: May 2004
Location: Norfolk, VA
Posts: 672
Default Re: Combinatoric Homework Problem

The only way I can think to do that is just iterate through them.

9
8,1
7,2
7,1,1
6,3
6,2,1
6,1,1,1
5,4
5,3,1
5,2,1,1
5,1,1,1,1
4,4,1
4,3,2
4,3,1,1
4,2,2,1
4,2,1,1,1
3,3,3
3,3,2,1
3,3,1,1,1
3,2,2,1,1
2,2,2,2,1

so 21 if I have not missed any. There is probably a more ellegant way, but it does not leap to mind. (I wish I could remeber what Bell(?) and Sterling(?) numbers were.)
Reply With Quote