On Oct 24, 6:52 pm, Jaap Spies <[EMAIL PROTECTED]> wrote:
> mabshoff wrote:
>
> > On Oct 24, 6:27 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> >> On 10/24/07, Jaap Spies <[EMAIL PROTECTED]> wrote:
>
> > I am on that, I got a 32 bit build of 2.8.9.alpha0.
> >> By the way, could you remind me where dance is defined?
>
> >> sage: search_src('dance')
> >> [nothing]
> >> sage:
>
> It is not in matrix2.pyx, It is on the bottom of my first message and heer 
> below.
>
> It uses some functions/methods present in matrix2.pyx:
> rook_vector, permanental_minor, prod_of_row_sums, permanent.
>

Yep, you are obviously right, sorry for the confusion.

> >>>> increase the amount of swap you have in that box. Adding more physical
> >>>> RAM will probably makes the problem go away, too.
> >>> I rebooted with no succes. Same error using 50-60% of 1 GB memory.
> >>> Swap space is 5 GB.
> >>> Jaap
>
> > Ok, I will investigate on a 32 bit box then. Could you give us
> > distribution/gcc and so on please? It might be related to specific
> > compilers.
>
> Linux paix 2.6.22.9-91.fc7 #1 SMP Thu Sep 27 23:10:59 EDT 2007 i686 i686 i386 
> GNU/Linux
>
> gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-27)

Great, I have

Linux localhost.localdomain 2.6.22.1-41.fc7 #1 SMP Fri Jul 27 17:26:33
EDT 2007 i686 i686 i386 GNU/Linux

gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)

so I will apply the latest FC7 updates.

>
> Jaap
>

Cheers,

Michael

> -------
>
> ##########################################################################
> #  Copyright (C) 2006 Jaap Spies, [EMAIL PROTECTED]
> #
> #  Distributed under the terms of the GNU General Public License (GPL):
> #
> #                  http://www.gnu.org/licenses/
> ##########################################################################
>
> """
>           Usage from sage
>
>           sage: attach 'dancing.sage'
>
>           sage: dance(4)
>           h^4 - 2*h^3 + 9*h^2 - 8*h + 6
>
> """
>
> # use variable 'h' in the polynomial ring over the rationals
>
> h = QQ['h'].gen()
>
> def dance(m):
>       """
>           Generates the polynomial solutions of the Dancing School Problem
>           Based on a modification of theorem 7.2.1 from Brualdi and Ryser,
>           Combinatorial Matrix Theory.
>
>           See NAW 5/7 nr. 4 december 2006 p. 285
>
>           INPUT: integer m
>
>           OUTPUT: polynomial in 'h'
>
>           EXAMPLE:
>               sage: dance(4)
>               h^4 - 2*h^3 + 9*h^2 - 8*h + 6
>
>           AUTHOR: Jaap Spies (2006)
>       """
>       n = 2*m-2
>       M = MatrixSpace(ZZ, m, n)
>       A = M([0 for i in range(m*n)])
>       for i in range(m):
>           for j in range(n):
>               if i > j or j > i + n - m:
>                   A[i,j] = 1
>       rv = A.rook_vector()
> #   print rv
>       s = sum([(-1)^k*rv[k]*falling_factorial(m+h-k, m-k) for k in 
> range(m+1)])
>       print s


--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to