Cody

# Problem 2646. Determine the number of maximal cliques in an undirected graph

Solution 539719

Submitted on 3 Dec 2014 by Jan Orwat
• Size: 139
• This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
%% A = 0; assert(isequal(maximalcliques(A),1))

2   Pass
%% for ii=1:10 N = randi(100); A = ones(N)-eye(N); assert(isequal(maximalcliques(A),1)) end

3   Pass
%% for ii=1:10 N = randi(100); A = zeros(N); assert(isequal(maximalcliques(A),N)) end

4   Pass
%% A = [ 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 ]; assert(isequal(maximalcliques(A),3))

5   Pass
%% A = [ 0 1 0 0 0 1 0 1 1 0 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 ]; assert(isequal(maximalcliques(A),3))

6   Pass
%% A = [ 0 1 1 0 0 0 1 0 1 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 ]; assert(isequal(maximalcliques(A),5))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!