[w,S] = omega(g) --- clique number Returns w, the size of a largest clique, and S, a largest clique. Note: Uses integer programming so may run slowly (if at all) on larger graphs. REQUIRES THE OPTIMIZATION TOOLBOX
0001 function [w,S] = omega(g) 0002 % [w,S] = omega(g) --- clique number 0003 % Returns w, the size of a largest clique, and S, a largest clique. 0004 % Note: Uses integer programming so may run slowly (if at all) on larger 0005 % graphs. 0006 % 0007 % REQUIRES THE OPTIMIZATION TOOLBOX 0008 0009 % Note: Our implementation is simply alpha(-g). 0010 0011 h = graph; 0012 copy(h,g); 0013 complement(h); 0014 [w,S] = alpha(h); 0015 free(h);