ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 30 Jul 2015 22:05:49 +0200Some combinatorial lists related to partitions.https://ask.sagemath.org/question/28725/some-combinatorial-lists-related-to-partitions/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?Peter LuschnyThu, 30 Jul 2015 22:05:49 +0200https://ask.sagemath.org/question/28725/Seeking an efficient filter for partitions.https://ask.sagemath.org/question/27321/seeking-an-efficient-filter-for-partitions/From the docs:
sage: Partitions(4, max_part=2).list()
[[2, 2], [2, 1, 1], [1, 1, 1, 1]]
I find this parlance confusing. Obviously
the partition [1, 1, 1, 1] has no max part = 2. Be that as it may, I do want to filter those
partitions which greatest part is 2, so in the
example would return
[[2, 2], [2, 1, 1]].
What is the most efficient way to implement
P(n,k) = Partitions(n, MAX_PART=k)
where MAX_PART is defined in my sense?
Peter LuschnyMon, 13 Jul 2015 11:38:26 +0200https://ask.sagemath.org/question/27321/multi-symmetric functions and multi-partitionshttps://ask.sagemath.org/question/7761/multi-symmetric-functions-and-multi-partitions/Does sage support manipulating multi-symmetric functions/polynomials and/or multi-partitions? Multi-symmetric functions are like the usual symmetric ones, except the symmetric group acts by permuting "vectors" of variables simultaneously, e.g. for an two vectors $x=(x_1,x_2\dotsc), y=(y_1,y_2,\dotsc)$, $\Sigma_2$, acts by permuting $x,y$. A multi-partition of a $n$-tuple $B=(b_1,\dotsc,b_n)$ of natural numbers is a unordered set of $n$-tuples $A_1,\dotsc,A_l$ with $A_1 + \dotsm + A_l = B$.
I'd like to have a combinatorial class of multi-partitions with similar functionality as partitions, e.g. `.first()`, `.last()` methods and `iter()`. I'd also like to have a class like `SymmetricFunctionAlgebra`, but with multi-symmetric functions instead. I've had a bit of a poke around and there's some functionality in Maxima (in the Sym) package that might help, but not quite like what I want (that I can find). So, before writing code, I'm asking here.
If the code needs to be written, I'm quite keen to make it my first (hopefully of many) contribution to sage...
Paul BryanThu, 11 Nov 2010 19:45:56 +0100https://ask.sagemath.org/question/7761/