MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply TodayGiven a symmetric adjacency matrix, determine the number of unique **undirected** cycles.

For example, the graph represented by adjacency matrix

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];

has 6 cycles. They are:

[1 -> 2 -> 3 -> 1] [1 -> 3 -> 5 -> 1] [2 -> 3 -> 4 -> 2] [1 -> 2 -> 4 -> 3 -> 1] [1 -> 2 -> 3 -> 5 -> 1] [1 -> 2 -> 4 -> 3 -> 5 -> 1]

The input is an adjacency matrix of 0s and 1s, and the output should be the number of unique (simple) undirected cycles in the graph.

4 correct solutions
4 incorrect solutions

Last solution submitted on Dec 21, 2015

1 Comment

Clark Grismond
on 18 Apr 2015

Can you please send me your code for this??? Really struggling on this for a school assignment clarkieg123@gmail.com

1 Comment

Clark Grismond
on 18 Apr 2015

Can you please send me your code for this??? Really struggling on this for a school assignment clarkieg123@gmail.com

1 Comment

Clark Grismond
on 18 Apr 2015

Can you please send me your code for this??? Really struggling on this for a school assignment clarkieg123@gmail.com

4 Comments