This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: % % nz = NNZ(S) is the number of nonzero elements in S. % I = FIND(X) returns the linear indices corresponding to % the nonzero entries of the array X. X may be a logical expression. Ap = A; x = zeros(size(A,2),1); while (nnz(Ap) > 0) cov = sum(Ap,1); ind = find(max(cov) == cov); x(ind) = 1; 1 eInd = find(Ap(:,ind)==1); Ap(eInd,:) = 0; end What does the above code do? What is its bound to the optimum? What is the stopping criteria? 3 MST What is a minimum spanning tree? What type of algorithm is Kruskal’s algorithm? Why? Write out pseudo code for Kruskal’s algorithm. 2...
View
Full
Document
This note was uploaded on 03/31/2012 for the course MIE 335 taught by Professor Frances during the Spring '12 term at University of Toronto Toronto.
 Spring '12
 Frances

Click to edit the document details