   function [I, C] = IS(A)  
%%   function [colors, p, nIS] = IS(A)  
n = size(A,1);
Mark = zeros(n,1);
I = [];
C = [];
for  i=1:n
%-------------------- if i not marked
  if (Mark(i)) 
    continue
  end
  Mark(i) = 1;
  I = [I, i];
  [ii, jj, val] = find(A(:,i));
  for k=1:length(ii) 
    j = ii(k) ;
    if (Mark(j) == 0)
      Mark(j) = 1;
      C = [C,j];
    end
  end
end
