[Date Index]
[Thread Index]
[Author Index]
Re: A special kind of partitions of an integer
*To*: mathgroup at smc.vnet.net
*Subject*: [mg48162] Re: A special kind of partitions of an integer
*From*: drbob at bigfoot.com (Bobby R. Treat)
*Date*: Fri, 14 May 2004 20:59:32 -0400 (EDT)
*References*: <200405131305.JAA24791@smc.vnet.net> <c81hq6$4uc$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
The same problem was solved in another thread, a few weeks ago. Also
look up CatalanNumber in Help; it counts the number of these
partitions.
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&th=ff1de8017f9f5222&seekm=c38uvb%24g39%241%40smc.vnet.net#link2
wolf[{arg_}, op_] := {arg}
wolf[{args__}, op_] := Flatten[ReplaceList[{args}, {a__, b__} :>
Outer[
op, wolf[{a}, op], wolf[{b}, op], 1]], 2]
wolf[Array[1 &, 5], CenterDot]
Displaying with Plus is a bit tricky:
stringIt[a_, b_] := "(" <> ToString[a] <> "+" <> ToString[b] <> ")"
List @@ (2 @@ wolf[Array[1 &, 5], List] /. List -> stringIt)
DrBob
Cezar Augusto de Freitas Anselmo <cafa at ime.unicamp.br> wrote in message news:<c81hq6$4uc$1 at smc.vnet.net>...
> Dear friends,
>
> I'm looking in literature theory of certain partitions of a integer.
>
> Have you worked with partitions of a integer n in n terms where the
> summation is not associative (or know someone or texts about it, or
> other discussion list)?
>
> Example:
> I have to count P(n): the number of partitions of n with n positive
> integers (the only so integer is one) terms where the + operator is not
> associative, but is commutative; but the recurrence isn't simple. See
> below
>
> 2 = (1+1);
> (thus P(2)=1)
> 3 = ((1+1)+1);
> (thus P(3)=1)
> 4 = (((1+1)+1)+1), ((1+1)+(1+1));
> (thus P(4)=2)
> = ((((1+1)+1)+1)+1), (((1+1)+(1+1))+1), (((1+1)+1)+(1+1));
> (thus P(5)=3)
>
>
> P(6)=6
> P(7)=11
>
> Thanks for all help,
>
> --
> ========================================
> Cézar Freitas (ICQ 109128967)
> IMECC - UNICAMP / IME - USP
> Campinas / São Paulo, SP - Brasil
Prev by Date:
**RE: Selecting by first element of each list**
Next by Date:
**Plot rendering problem in linux**
Previous by thread:
**Re: A special kind of partitions of an integer**
Next by thread:
**Re: A special kind of partitions of an integer**
| |