Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Finding all n-partitions of a set

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98747] Re: [mg98707] Finding all n-partitions of a set
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Fri, 17 Apr 2009 04:31:02 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200904160818.EAA17706@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Your question seems unclear. After all, mathematically, the SET 
{a,a,b,b} actually is identical to the set {a,b}.

What you seem to have is some "base" set, in this case, {a,b}, along 
with a specified "frequency" for each member of the set, in this case a 
frequency of 2 for each of the two elements.

Moreover, if there is "no order" implicit here, then why would you not 
also expect in the output some additional two-member non-empty lists, 
e.g., the following:

   { {b,b}, {a,a} }
   { {b,a}, {b,a} }



Joe.Mapasapam wrote:
> Please how can I find all n-partions of a set ?
> 
> 
> Say, i want partitions of the set (no order) {a,a,b,b} into 2,
> 
> so we have 
> {
> {{a,a,b,},{b}},
> {{a,b,b},{a}},
> {{a,a},{b,b}},
> {{a,b},{a,b}}
> }
> 
> is there already a built in function in mathematica ?
> 
> i need so n can be any number
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Finding all n-partitions of a set
  • Next by Date: Re: problem with replace all and functions
  • Previous by thread: Re: Finding all n-partitions of a set
  • Next by thread: Re: Finding all n-partitions of a set