Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Partition Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57621] Re: Partition Function
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Thu, 2 Jun 2005 05:16:58 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <d7k3qf$ooq$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <d7k3qf$ooq$1 at smc.vnet.net>,
 "Shug Boabby" <Shug.Boabby at gmail.com> wrote:

> is there any way to get mathematica to return the actual partitions of
> an integer? the only functions related to this, (e.g.
> http://mathworld.wolfram.com/PartitionFunctionP.html) only return the
> *number* of partitions, not the actual partititons (including
> permutations) themselves.
> 
> e.g. for 4, i'd like a function to return
>  {{1,1,1,1}, {2,1,1}, {1,2,1}, {1,1,2}, {3,1}, {2,2}, {1,3}, {4}}
> 
> with the ordering of the partitions not being important

  << DiscreteMath`

  Flatten[Permutations /@ Partitions[4], 1]

See also 

  IntegerPartitions[4]

Cheers,
Paul

-- 
Paul Abbott                                      Phone: +61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    
AUSTRALIA                               http://physics.uwa.edu.au/~paul
        http://InternationalMathematicaSymposium.org/IMS2005/


  • Prev by Date: Re: mml files
  • Next by Date: Re: locating points in mathematica plots
  • Previous by thread: Re: Partition Function
  • Next by thread: Re: Partition Function