Untitled

1831 days ago by bigdata2016

A=matrix(QQ,[[1,2,3,4,5,6],[1,1,2,2,3,3],[2,1,1,2,1,1]]) show(A)
 \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 1 & 2 & 3 & 4 & 5 & 6 \\ 1 & 1 & 2 & 2 & 3 & 3 \\ 2 & 1 & 1 & 2 & 1 & 1 \end{array}\right)
B=A.transpose()*A show(B) r=B.rank() print r
 \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 6 & 5 & 7 & 10 & 10 & 11 \\ 5 & 6 & 9 & 12 & 14 & 16 \\ 7 & 9 & 14 & 18 & 22 & 25 \\ 10 & 12 & 18 & 24 & 28 & 32 \\ 10 & 14 & 22 & 28 & 35 & 40 \\ 11 & 16 & 25 & 32 & 40 & 46 \end{array}\right) 3 3
x=B.eigenvalues() x=matrix(x) n=x.ncols() for i in range(n-r, n): html('$\lambda_%s=%s$,' %( n-i,latex(x[0,i].n(digits=5) ), ) )
 $\lambda_3=0.32485$, $\lambda_2=4.2111$, $\lambda_1=126.46$, , , ,
b1=matrix(RDF,B.nrows(),1) k=identity_matrix(RDF,B.nrows()) print (B-x[0,3]*k) (B-x[0,3]*k).solve_right(b1)
 Traceback (click to the left of this block for traceback) ... TypeError: _numerical_approx() got an unexpected keyword argument 'digit' Traceback (most recent call last): File "", line 1, in File "_sage_input_193.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YjE9bWF0cml4KFJERixCLm5yb3dzKCksMSkKaz1pZGVudGl0eV9tYXRyaXgoUkRGLEIubnJvd3MoKSkKcHJpbnQgKEIteFswLDNdKmspLm4oZGlnaXQ9MykKKEIteFswLDNdKmspLnNvbHZlX3JpZ2h0KGIxKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in File "/tmp/tmpopPPAG/___code___.py", line 5, in print (B-x[_sage_const_0 ,_sage_const_3 ]*k).n(digit=_sage_const_3 ) File "matrix2.pyx", line 11364, in sage.matrix.matrix2.Matrix._numerical_approx (sage/matrix/matrix2.c:55007) TypeError: _numerical_approx() got an unexpected keyword argument 'digit'
n=5 m=6 L=list(graphs(n)) R=[] for g in L: if g.size()==m: R.append(g) graphs_list.show_graphs(R)
n=11 L=list(graphs(n)) print len(L)