Opened 11 years ago

Closed 8 years ago

#10630 closed enhancement (fixed)

Add a multi-partition implementation to sage

Reported by: pabryan Owned by: pabryan
Priority: minor Milestone: sage-5.12
Component: combinatorics Keywords: multipartition multi-partition multi-partite multipartite partition
Cc: Merged in: sage-5.12.beta0
Authors: Amritanshu Prasad Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by amri)

As discussed here[1], multi-partitions would be a useful addition to sage. I have an initial implementation soon to be uploaded.

[1] http://groups.google.com/group/sage-combinat-devel/browse_thread/thread/aefcc71ad217d023/439360dc6b2641c5

Apply: trac_10630-vector_partition-ap.patch

Attachments (2)

trac_10630_multi_partitions.patch (31.3 KB) - added by pabryan 11 years ago.
Implementation of multi-partitions
trac_10630-vector_partition-ap.patch (9.5 KB) - added by amri 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 11 years ago by pabryan

  • Authors changed from pabryan to Paul Bryan

Changed 11 years ago by pabryan

Implementation of multi-partitions

comment:2 Changed 10 years ago by ebriand

Some comments:

  • The functions for multipartitions do not seem to work correctly. Here is an incorrect (incomplete) result:
 
M=MultiPartitions([2,2])
for x in M.list(): print x
[[2, 2]]
[[1, 2], [1, 0]]
[[2, 1], [0, 1]]
[[1, 0], [1, 0], [0, 2]]
[[1, 1], [1, 0], [0, 1]]
[[2, 0], [0, 1], [0, 1]]
[[1, 0], [1, 0], [0, 1], [0, 1]]

Two multipartitions are missed: [[1,1],[1,1]] and [[2,0],[0,2]]

  • Should one represent the Multipartitions as lists of vectors with integer coordinates rather than lists of lists ? (because sometimes one has to do the sum of the parts).
  • A few typos:
    • Line 6 of the file: "the" should not be repeated.
    • Line 9 of the file: replace "it's" with "its".
    • Line 63 of the file: replace "lexicographically order integer lists" with "lexicographically weakly decreasing lists of integers" or something better.
    • Also, one might replace the definition of multipartition as "equivalence class of tuples" (lines 4 to 10) with "multiset of tuples".

comment:3 Changed 8 years ago by amri

  • Authors changed from Paul Bryan to Amritanshu Prasad
  • Description modified (diff)
  • Reviewers set to Travis Scrimshaw
  • Status changed from new to needs_review

Vector partitions is now implemented. I am calling it VectorPartitions? instead of MutliPartitions?, to remove the conflict with the standard usage of the latter.

Apply: trac_10630-vector_partition-ap.patch

Changed 8 years ago by amri

comment:4 Changed 8 years ago by tscrim

  • Status changed from needs_review to positive_review

Looks good to me.

Apply: trac_10630-vector_partition-ap.patch

comment:5 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:6 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.12.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.