Cody

Solution 472008

Submitted on 14 Jul 2014
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   Fail
A = [ 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 1 0 0]; nCycles = 6; assert(isequal(count_undirected_cycles(A),nCycles))

ans = 6

Error using VisibleTest1 (line 8) Output argument "ans" (and maybe others) not assigned during call to "count_undirected_cycles".

2   Fail
A = [ 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 1 1 1 0]; nCycles = 136; assert(isequal(count_undirected_cycles(A),nCycles))

ans = 136

Error using VisibleTest2 (line 11) Output argument "ans" (and maybe others) not assigned during call to "count_undirected_cycles".

3   Fail
A = [ 0 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 1 0 1 0 0 0 1 0]; nCycles = 251; assert(isequal(count_undirected_cycles(A),nCycles))

ans = 251

Error using VisibleTest3 (line 13) Output argument "ans" (and maybe others) not assigned during call to "count_undirected_cycles".

4   Fail
A = [ 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 0 1 1 0]; nCycles = 1579; assert(isequal(count_undirected_cycles(A),nCycles)) A = [ 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 1 1 1 1 0]; nCycles = 147; assert(isequal(count_undirected_cycles(A),nCycles))

ans = 1579

Error using VisibleTest4 (line 13) Output argument "ans" (and maybe others) not assigned during call to "count_undirected_cycles".