Мне нужен рабочий алгоритм для нахождения всех простых циклов в неориентированном графе. Я знаю, что стоимость может быть экспоненциальной, и проблема NP-полная, но я собираюсь использовать ее на небольшом графике (до 20-30 вершин), а циклы малочисленны.
После долгого исследования (в основном здесь) у меня все еще нет рабочего подхода. Вот краткое изложение моего поиска:
Поиск всех циклов в неориентированном графе
Циклы в ненаправленном графике → обнаруживает только, есть ли цикл или нет
Поиск полигонов внутри неориентированного Графа → очень хорошее описание, но без решения
Поиск всех циклов в ориентированном графе → находит циклы только в ориентированных графах
Обнаружение циклов в неориентированном графе с использованием библиотеки ускорителей
Единственный ответ, который я нашел, который подходит моей проблеме, следующий:
Найти все циклы в графике, redux
Кажется, что поиск базового набора циклов и XOR-ing может сделать трюк. Найти базовый набор циклов легко, но я не понимаю, как их объединить, чтобы получить все циклы в графе...