Count all cycles in simple undirected graph

버전 1.2.0.0 (5.43 KB) 작성자: Jeff Howbert
Counts all cycles in a simple undirected graph up to specified size limit, using backtracking.
다운로드 수: 1.5K
업데이트 날짜: 2011/8/29

라이선스 보기

Counts all cycles in input graph up to (optional) specified size limit, using a backtracking algorithm. Designed for undirected graphs with no self-loops or multiple edges. Returns count of each size cycle from 3 up to size limit, and elapsed time.

Algorithm is guaranteed to find each cycle exactly once. It is essentially equivalent to Johnson (SIAM J. Comput. (1975), 4, 77), but for undirected graphs, and without the look-ahead feature. The lack of look-ahead is expected to have negligible performance impact on dense random graphs.

Reads input graph using separate m-file readGraph(), which supports reading a graph from a file or workspace array in four different formats. A test file for each format is included.

In practice this algorithm is much faster than the ILCA cycle counting algorithm posted by Joe Kirk (run_loops.m).

인용 양식

Jeff Howbert (2024). Count all cycles in simple undirected graph (https://www.mathworks.com/matlabcentral/fileexchange/29438-count-all-cycles-in-simple-undirected-graph), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2011a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Undirected Graphs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

Wrong .zip file uploaded on previous submission.

1.1.0.0

Function cycleCountBacktrack now returns a vector containing counts of cycles, and elapsed time. (In previous version, counts and time were only output to console.)

1.0.0.0