Re: Integer Partitioning
- To: mathgroup at smc.vnet.net
- Subject: [mg4714] Re: [mg4694] Integer Partitioning
- From: Allan Hayes <hay at haystack>
- Date: Sat, 31 Aug 1996 03:57:34 -0400
- Sender: owner-wri-mathgroup at wolfram.com
"Kenneth J. Mascola" <76504.2375 at CompuServe.COM>
[mg4694] Integer Partitioning
Asks about partitions of integers.
Kenneth,
There is a function Partitions in the standard package
DiscreteMath`Combinatorica` :
<<DiscreteMath`Combinatorica`
Partitions[5]
{{5}, {4, 1}, {3, 2}, {3, 1, 1}, {2, 2, 1}, {2, 1, 1, 1},
{1, 1, 1, 1, 1}
}
Allan Hayes
hay at haystacj.demon.co.uk
==== [MESSAGE SEPARATOR] ====