#10170: Speed up the computation of Bell numbers
------------------------------+---------------------------------------------
   Reporter:  gerbicz         |       Owner:  sage-combinat
       Type:  enhancement     |      Status:  new          
   Priority:  major           |   Milestone:               
  Component:  combinatorics   |    Keywords:  bell number  
     Author:  Robert Gerbicz  |    Upstream:  N/A          
   Reviewer:                  |      Merged:               
Work_issues:                  |  
------------------------------+---------------------------------------------
 For large n values use the formula:
 bell(n)=exp(-1)*sum(k=0,infinity,k**n/k!)

 Currently my code beats all known implementations, also sage's code which
 wraps GAP's Bell is slow and using lots of memory, and unable to compute
 bell_number(n) if n is large.

 Some timings on Amd 2.1 GHz:

 n       time (Wall time)

 300     0.01 sec.

 1000    0.03 sec.

 3000    0.18 sec.

 10000   2.88 sec.

 30000   46.79 sec.

 100000  819.37 sec.

 Compare these with another programs:
 http://fredrik-j.blogspot.com/2009/03/computing-generalized-bell-
 numbers.html

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10170>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to