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

Traceback (most recent call last):<br />

...<br />

ValueError: ’pro<strong>of</strong>’ flag only valid for matrices over the integers<br />

AUTHOR:<br />

•Rob Beezer (2011-02-05)<br />

right_nullity()<br />

Return the right nullity <strong>of</strong> this matrix, which is the dimension <strong>of</strong> the right kernel.<br />

EXAMPLES:<br />

sage: A = MatrixSpace(QQ,3,2)(range(6))<br />

sage: A.right_nullity()<br />

0<br />

sage: A = matrix(ZZ,3,range(9))<br />

sage: A.right_nullity()<br />

1<br />

rook_vector(check=False)<br />

Return the rook vector <strong>of</strong> the matrix self.<br />

Let A be an m by n (0,1)-matrix with m ≤ n. We identify A with a chessboard where rooks can be placed<br />

on the fields (i, j) with a i,j = 1. The number r k = p k (A) (the permanental k-minor) counts the number<br />

<strong>of</strong> ways to place k rooks on this board so that no rook can attack another.<br />

The rook vector <strong>of</strong> the matrix A is the list consisting <strong>of</strong> r 0 , r 1 , . . . , r m .<br />

The rook polynomial is defined by r(x) = ∑ m<br />

k=0 r kx k .<br />

INPUT:<br />

•self – an m by n (0,1)-matrix with m ≤ n<br />

•check – Boolean (default: False) determining whether to check that self is a (0,1)-matrix.<br />

OUTPUT:<br />

The rook vector <strong>of</strong> the matrix self.<br />

EXAMPLES:<br />

sage: M = MatrixSpace(ZZ,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.rook_vector()<br />

[1, 12, 40, 36]<br />

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

sage: rv = A.rook_vector()<br />

sage: rook_polynomial = sum([rv[k] * x^k for k in range(len(rv))])<br />

sage: rook_polynomial<br />

36*x^3 + 40*x^2 + 12*x + 1<br />

AUTHORS:<br />

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

row_module(base_ring=None)<br />

Return the free module over the base ring spanned by the rows <strong>of</strong> self.<br />

EXAMPLES:<br />

249

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

Saved successfully!

Ooh no, something went wrong!