简体   繁体   中英

Finding all cycles that do not contain sub-cycles in an undirected graph

I'm trying to find a fast way to find all the cycles that do not contain any sub-cycles within them in an undirected graph.

Here's an example of a graph that contains five cycles of this kind:

示例图

The cycles here would be the following: {1,2,3,4}, {1,4,5}, {5,4,7,6}, {4,3,7}, {7,3,9,8}

How could I approach this problem?

Cycles that don't contain subcycles are called " induced cycles ", if you search this term maybe you will find something that you will find of use.

For example, I found this article regarding exactly the problem you have described: Finding and listing induced paths and cycles .

For my personal needs I recently programmed an algorithm that finds cycles without subcycles in a directed graph, but it will require some modifications to work for undirected graphs, also I'm not sure how fast will it be if used on an undirected graph.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM