Ask Your Question
0

Sage code that receives a symmetric partition as an input and returns the corresponding partition with odd parts.

asked 2017-03-16 08:14:32 -0500

updated 2017-04-06 12:04:32 -0500

FrédéricC gravatar image

I am a beginner in Sage . I Just got how to find number of partitions and cardinality of partitions. But this questions is being complicated to me. Please help.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2017-03-16 23:23:53 -0500

fidbc gravatar image

updated 2017-03-16 23:25:00 -0500

Not sure if what you meant was to convert a partition with all parts distinct to a partition where each part is odd. If it was, then, following the bijection from page 10 here and assuming you are representing a partition p as a list of natural numbers results in something of the form:

sorted([x.odd_part() for x in p for i in range(x/x.odd_part())],reverse=True)
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2017-03-16 08:14:32 -0500

Seen: 157 times

Last updated: Mar 16