quickgraph有向图枚举所有简单路径 [英] quickgraph directed graph enumerate all simple path

查看:398
本文介绍了quickgraph有向图枚举所有简单路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助枚举有向图中所有可用的简单路径。我正在使用quickgraph库。是否有一个特定的算法可以枚举有向图中的所有路径?我将用它来创建一个机器翻译的解码器,并尝试过DFS和BFS,但它似乎只生成一个路径。



我正在考虑在光束搜索探索中使用DFS,但我无法掌握所有简单路径的想法和算法。



使用C#编程语言..

I need help in enumerating all available simple paths in a directed graph. I am using quickgraph library. Is there a specific algorithm that would enumerate all paths in a digraph? I will use it to create a decoder for a machine translation and have tried DFS and BFS but it seems it only generates one path.

I am thinking of using DFS in beam search exploration but i cant grasp the idea and the algorithm to enumerate all simple paths.

Using C# programming language..

推荐答案

这个问题的答案之一描述了算法:http://stackoverflow.com/questions/1830607/complexity-of-finding-all-simple -paths-using-depth-first-search [ ^ ]。



你可以找到更多,只有谷歌。这个话题很受欢迎。



-SA
One of the answers to this questions describes the algorithm: http://stackoverflow.com/questions/1830607/complexity-of-finding-all-simple-paths-using-depth-first-search[^].

You can find a lot more, just Google for it. This topic is quite popular.

—SA


这篇关于quickgraph有向图枚举所有简单路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆