08.02.2015 Views

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Sage</strong> <strong>Reference</strong> <strong>Manual</strong>: <strong>Matrices</strong> <strong>and</strong> <strong>Spaces</strong> <strong>of</strong> <strong>Matrices</strong>, Release 6.1.1<br />

sage: A.permanent()<br />

24<br />

sage: M = MatrixSpace(QQ,3,6)<br />

sage: A = M([1,1,1,1,0,0,0,1,1,1,1,0,0,0,1,1,1,1])<br />

sage: A.permanent()<br />

36<br />

sage: M = MatrixSpace(RR,3,6)<br />

sage: A = M([1.0,1.0,1.0,1.0,0,0,0,1.0,1.0,1.0,1.0,0,0,0,1.0,1.0,1.0,1.0])<br />

sage: A.permanent()<br />

36.0000000000000<br />

See Sloane’s sequence OEIS A079908(3) = 36, “The Dancing School Problems”<br />

sage: oeis(79908)<br />

# optional -- internet<br />

A079908: Solution to the Dancing School Problem with 3 girls <strong>and</strong> n+3 boys: f(3,n).<br />

sage: _(3)<br />

# optional -- internet<br />

36<br />

sage: M = MatrixSpace(ZZ,4,5)<br />

sage: A = M([1,1,0,1,1,0,1,1,1,1,1,0,1,0,1,1,1,0,1,0])<br />

sage: A.permanent()<br />

32<br />

See Minc: Permanents, Example 2.1, p. 5.<br />

sage: M = MatrixSpace(QQ,2,2)<br />

sage: A = M([1/5,2/7,3/2,4/5])<br />

sage: A.permanent()<br />

103/175<br />

sage: R. = PolynomialRing(ZZ)<br />

sage: A = MatrixSpace(R,2)([[a,1], [a,a+1]])<br />

sage: A.permanent()<br />

a^2 + 2*a<br />

sage: R. = PolynomialRing(ZZ,2)<br />

sage: A = MatrixSpace(R,2)([x, y, x^2, y^2])<br />

sage: A.permanent()<br />

x^2*y + x*y^2<br />

AUTHORS:<br />

•Jaap Spies (2006-02-16)<br />

•Jaap Spies (2006-02-21): added definition <strong>of</strong> permanent<br />

permanental_minor(k)<br />

Return the permanental k-minor <strong>of</strong> an m × n matrix.<br />

This is the sum <strong>of</strong> the permanents <strong>of</strong> all possible k by k submatrices <strong>of</strong> A.<br />

See Brualdi <strong>and</strong> Ryser: Combinatorial Matrix Theory, p. 203. Note the typo p 0 (A) = 0 in that reference!<br />

For applications see Theorem 7.2.1 <strong>and</strong> Theorem 7.2.4.<br />

Note that the permanental m-minor equals per(A) if m = n.<br />

For a (0,1)-matrix A the permanental k-minor counts the number <strong>of</strong> different selections <strong>of</strong> k 1’s <strong>of</strong> A with<br />

no two <strong>of</strong> the 1’s on the same row <strong>and</strong> no two <strong>of</strong> the 1’s on the same column.<br />

INPUT:<br />

219

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!