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.Sun, 04 Jan 2015 19:16:02 +0100Error in code or need more runtime?https://ask.sagemath.org/question/25394/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!mengenSun, 04 Jan 2015 19:16:02 +0100https://ask.sagemath.org/question/25394/