ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 12 Jun 2014 06:13:12 -0500Simple counting on restricted n-ary k-tupleshttp://ask.sagemath.org/question/11068/simple-counting-on-restricted-n-ary-k-tuples/I have some simple counting problems, for example, how many n-ary k-tuples, i.e. $(v_0,v_1,\ldots, v_k)$ with $0\le v_i < n$, are there which have $v_0=1$, and $m$ non-zero coordinates.
What sort of functionality is there is Sage or other computer algebra systems for answering such questions for general $n,k$ and $m$?Wed, 11 Jun 2014 00:57:19 -0500http://ask.sagemath.org/question/11068/simple-counting-on-restricted-n-ary-k-tuples/Answer by kcrisman for <p>I have some simple counting problems, for example, how many n-ary k-tuples, i.e. $(v_0,v_1,\ldots, v_k)$ with $0\le v_i < n$, are there which have $v_0=1$, and $m$ non-zero coordinates.</p>
<p>What sort of functionality is there is Sage or other computer algebra systems for answering such questions for general $n,k$ and $m$?</p>
http://ask.sagemath.org/question/11068/simple-counting-on-restricted-n-ary-k-tuples/?answer=16091#post-id-16091I'm not quite sure how to interpret your question, but do you mean [integer vectors](http://www.sagemath.org/doc/reference/combinat/sage/combinat/integer_vector.html)?Wed, 11 Jun 2014 02:32:26 -0500http://ask.sagemath.org/question/11068/simple-counting-on-restricted-n-ary-k-tuples/?answer=16091#post-id-16091Comment by alejandroerickson for <p>I'm not quite sure how to interpret your question, but do you mean <a href="http://www.sagemath.org/doc/reference/combinat/sage/combinat/integer_vector.html">integer vectors</a>?</p>
http://ask.sagemath.org/question/11068/simple-counting-on-restricted-n-ary-k-tuples/?comment=16152#post-id-16152they are a restricted class of integer vectors, since every vector would have the same number of coordinates, $k$, and the maximum in each coordinate is also fixed at $n$. edit: the biggest difference, however, is that I think IV computes all of the vectors with the given parameters, whilst I want algebraic answers for general parameters.Wed, 11 Jun 2014 02:37:03 -0500http://ask.sagemath.org/question/11068/simple-counting-on-restricted-n-ary-k-tuples/?comment=16152#post-id-16152Comment by kcrisman for <p>I'm not quite sure how to interpret your question, but do you mean <a href="http://www.sagemath.org/doc/reference/combinat/sage/combinat/integer_vector.html">integer vectors</a>?</p>
http://ask.sagemath.org/question/11068/simple-counting-on-restricted-n-ary-k-tuples/?comment=16151#post-id-16151But I'm wondering whether they might have that built in as well...Thu, 12 Jun 2014 06:13:12 -0500http://ask.sagemath.org/question/11068/simple-counting-on-restricted-n-ary-k-tuples/?comment=16151#post-id-16151