#14496: unify the three implementations of gaussian q-binomial coefficients
-------------------------------------+--------------------------------------
       Reporter:  chapoton           |         Owner:  tbd       
           Type:  task               |        Status:  needs_info
       Priority:  major              |     Milestone:  sage-5.10 
      Component:  combinatorics      |    Resolution:            
       Keywords:  gaussian binomial  |   Work issues:            
Report Upstream:  N/A                |     Reviewers:            
        Authors:  Frédéric Chapoton  |     Merged in:            
   Dependencies:                     |      Stopgaps:            
-------------------------------------+--------------------------------------
Changes (by chapoton):

  * status:  needs_work => needs_info


Comment:

 Here is a new patch.

 Point 1 is indeed a problem. I do not understand either what is computed
 in the weight function. The procedure q_bin was returning 1 for any
 negative values of n and any k. This is not a very natural behaviour.

 Point 4 : I have chosen that the name to be kept would be q_binomial.

 There is another problem remaining. The existing algorithm in
 sage.combinat.q_analogues uses cyclotomic polynomials and become faster
 than the naive one when the arguments are big (and of similar size ?), but
 is much slower in some cases (when n is small or k is small ?).
 {{{
 sage: timeit("sage.combinat.q_analogues.q_binomial(85,3)")
 625 loops, best of 3: 246 µs per loop
 sage: timeit("sage.combinat.q_analogues.q_binomial_via_cyclotomic(85,3)")
 125 loops, best of 3: 2.78 ms per loop
 sage: timeit("sage.combinat.q_analogues.q_binomial(85,43)")
 25 loops, best of 3: 9.21 ms per loop
 sage: timeit("sage.combinat.q_analogues.q_binomial_via_cyclotomic(85,43)")
 25 loops, best of 3: 8.18 ms per loop
 }}}
 So one needs to keep both and find a strategy of choice..

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14496#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to