[seqfan] Re: Partitioning the sequence (?)

zak seidov zakseidov at yahoo.com
Thu Dec 25 19:23:13 CET 2008


Joshua, 
this (with "s" at end!) is better 
but still is not what i need: 

<<DiscreteMath`Combinatorica`;Partitions[4]
{{4},{3,1},{2,2},{2,1,1},{1,1,1,1}}

while this is OK:
<< DiscreteMath`Combinatorica`; Permutations /@ Partitions[4]
{{{4}},{{3,1},{1,3}},{{2,2}},{{2,1,1},{1,2,1},{1,1,2}},{{1,1,1,1}}} 

- exactly what Franklin gave in his message below
(though in the reverse order).
thx, zak

That is we need some editing of 

%t A080577 <<DiscreteMath`Combinatorica`; Partition[6]

this way :

%t A080577 <<DiscreteMath`Combinatorica`; Permutations /@  Partitions[6] -
Zak Seidov (zakseidov(AT)yahoo.com) Dec 25 2008




--- On Thu, 12/25/08, Joshua Zucker <joshua.zucker at gmail.com> wrote:

> From: Joshua Zucker <joshua.zucker at gmail.com>
> Subject: Re: [seqfan] Re: Partitioning the sequence (?)
> To: "zak seidov" <zakseidov at yahoo.com>
> Date: Thursday, December 25, 2008, 11:43 AM
> I'm not expert, and I haven't checked to see if this
> is right since I
> don't have a copy of the software on this computer, but
> maybe it's
> supposed to be IntegerPartition?
> --Joshua
> 
> On Wed, Dec 24, 2008 at 10:37 AM, zak seidov
> <zakseidov at yahoo.com> wrote:
> > BTW is this code OK:
> >
> > %t A080577 <<DiscreteMath`Combinatorica`;
> Partition[6]
> > thx, zak
> >
> > My shot gives(?!):
> >
> > <<DiscreteMath`Combinatorica`;Partition[6]
> > Partition::argbu: Partition called with 1 argument;
> between 2 and 6 arguments are expected.
> > Partition[6]
> >
> >
> >
> > --- On Sun, 12/21/08, franktaw at netscape.net
> <franktaw at netscape.net> wrote:
> >
> >> From: franktaw at netscape.net
> <franktaw at netscape.net>
> >> Subject: [seqfan] Re: Partitioning the sequence
> (?)
> >> To: seqfan at list.seqfan.eu
> >> Date: Sunday, December 21, 2008, 4:51 PM
> >> Written a little differently, these are called
> >> "compositions".
> >> Instead of writing names for the elements, just
> write the
> >> length of each part.  Your example then becomes:
> >>
> >> 1,1,1,1
> >> 1,1,2
> >> 1,2,1
> >> 2,1,1
> >> 2,2
> >> 1,3
> >> 3,1
> >> 4
> >>
> >> See, e.g., A066099.
> >>
> >> Franklin T. Adams-Watters




      




More information about the SeqFan mailing list