function g = nokneigh(G,k) % no node has more than k neighbors nn = sum(G); g = all(nn<=k); return