William Stein wrote: > On Nov 27, 2007 10:47 AM, Jaap Spies <[EMAIL PROTECTED]> wrote:
>> This is my favorite application of permanents: counting the number of >> permutations with restricted positions! > > That is indeed very beautiful. It's not so good from an efficiency > point of view though: > > sage: time a=derangements(10000,0) > CPU time: 45.73 s, Wall time: 47.70 s > sage: time b=rencontres_number(10000,0) > CPU time: 1.11 s, Wall time: 1.21 s > > at least not practically. This might be because factorial and > multiprecision arithmetic are both so fast in sage. > Yes, I know/knew, but a thing of beauty is a joy forever :-)! It is not always speed that counts. Jaap --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---