Ask Your Question

mengen's profile - activity

2015-02-14 15:11:38 +0200 received badge  Student (source)
2015-01-04 19:16:02 +0200 asked a question Error in code or need more runtime?

Hello everyone,

I would like to compute the number of sub-multisets (of a particular cardinality) of a multiset. The "mother" multiset contains exactly 2 copies of the numbers 0 through 52 (it has cardinality 106), and I would like to compute the number of distinct sub-multisets of size 14. I am attempting to do this with Sage (of course), and the code I am trying to use is as follows:

S = range(53); S.extend(range(53))

// This makes my mother set of two copies of the numbers 0 through 52

Hands = Subsets(S, 14, submultiset=true); Hands.cardinality()

// This defines a set of the sub-multisets of size 14, and then outputs their cardinality.

When I run this (in the Sage Notebook running inside Oracle VirtualBox with 2gb of allotted RAM), it gives me a small green rectangle that changes the cursor to a 'watch' as if it's still running. It's been like this for over and hour now. Is there an error in my code or should I expect such a calculation to take a 'long' time? I'm not familiar with 'large' calculations such as this one.

Thanks in advance!