Ask Your Question
0

Some combinatorial lists related to partitions.

asked 2015-07-30 22:05:49 +0100

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-30 23:09:17 +0100

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]
edit flag offensive delete link more

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 ( 2015-07-30 23:35:34 +0100 )edit

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

tmonteil gravatar imagetmonteil ( 2015-07-31 10:09:41 +0100 )edit

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: 2015-07-30 22:05:49 +0100

Seen: 187 times

Last updated: Jul 30 '15