||'''Book'''|| Linear Algebra || ||'''Author'''|| Gilbert Strang || ||'''Edition'''|| || /* code_begins */ {{{ #To Determine whether the given the given graph is a tree or not #Which means are the rows of incidence matrix independent A = matrix([[-1,1,0,0],[-1,0,1,0],[0,1,0,-1],[0,0,-1,1]]) print 'The incidence matrix is ' print A print 'The determinant of the matrix is' print det(A) if det(A)==0: print 'Since incidence matrix is singular, it is not a tree' else: print 'Since incidence matrix is non-singular, it is a tree' }}} /* code_ends */ * '''Solution by''': * Arnab Basu, Student, IIT Roorkee * Amit Tewari, Student, IIT Roorkee * Rachit Jha, Student, IIT Roorkee * Shubham Mittal, Student, IIT Roorkee