function g = nokclique(G,k) % G has no k-clique n = size(G,1); cliq = generate_combs_g([1:n],k); g = 1; for c = 1:size(cliq,1) nodes = cliq(c,:); if isclique(G,nodes) g = 0; break end end return function b = isclique(G,nodes) b = 1; for i=1:length(nodes) for j=i+1:length(nodes) b = b & G(nodes(i),nodes(j)); if ~b return end end end return