First time here? Check out the FAQ!

Ask Your Question
0

Some combinatorial lists related to partitions.

asked 9 years ago

Peter Luschny gravatar image

I want to generate the lists on the right hand side of the arrow.

P (partitions)        --> D (no name?)
[1, 1, 1, 1, 1, 1, 1] --> [0, 0, 0, 0, 0, 0, 1]
[2, 2, 2, 1]          --> [0, 0, 1, 1]
[2, 2, 1, 1, 1]       --> [0, 1, 0, 0, 1]
[2, 1, 1, 1, 1, 1]    --> [1, 0, 0, 0, 0, 1]
[3, 3, 1]             --> [0, 2, 1]
[3, 2, 2]             --> [1, 0, 2]
[3, 2, 1, 1]          --> [1, 1, 0, 1]
[3, 1, 1, 1, 1]       --> [2, 0, 0, 0, 1]
[4, 3]                --> [1, 3]
[4, 2, 1]             --> [2, 1, 1]
[4, 1, 1, 1]          --> [3, 0, 0, 1]
[5, 2]                --> [3, 2]
[5, 1, 1]             --> [4, 0, 1]
[6, 1]                --> [5, 1]
[7]                   --> [7]

Assume 1-based lists. They have the properties:

   P[1]   = sum(D)
   sum(P) = sum(i*t for (i,t) in enumerate(D))

My questions: is there a method in Sage which returns these lists? If not, what is the best method to generate them given the other methods of Sage? What is the name of these lists if they have one?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 9 years ago

tmonteil gravatar image

I am not familiar with partitions, so i do not know if this has a name. However, if i understand correctly, P is a kind of discrete integral of D, so D is a kind of discrete derivative, that is defined by first differences. So, you can do something like:

sage: for p in Partitions(7):
....:    print p, [p[i]-p[i+1] for i in range(len(p)-1)] + [p[-1]]
....:     
[7] [7]
[6, 1] [5, 1]
[5, 2] [3, 2]
[5, 1, 1] [4, 0, 1]
[4, 3] [1, 3]
[4, 2, 1] [2, 1, 1]
[4, 1, 1, 1] [3, 0, 0, 1]
[3, 3, 1] [0, 2, 1]
[3, 2, 2] [1, 0, 2]
[3, 2, 1, 1] [1, 1, 0, 1]
[3, 1, 1, 1, 1] [2, 0, 0, 0, 1]
[2, 2, 2, 1] [0, 0, 1, 1]
[2, 2, 1, 1, 1] [0, 1, 0, 0, 1]
[2, 1, 1, 1, 1, 1] [1, 0, 0, 0, 0, 1]
[1, 1, 1, 1, 1, 1, 1] [0, 0, 0, 0, 0, 0, 1]
Preview: (hide)
link

Comments

Yes, this is also the way I generated the list. So I probably did not miss a standard procedure (sage.combinat is big as a blue whale). I think that also bijectivity is ensured. And "discrete derivative of a partition" sounds interesting :)

Peter Luschny gravatar imagePeter Luschny ( 9 years ago )

If you want to know the name, perhaps could you ask on the sage-combinat mailing list.

tmonteil gravatar imagetmonteil ( 9 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 9 years ago

Seen: 235 times

Last updated: Jul 30 '15