无向图中环的定义
我无法在无向图中找到循环的正式定义。 CLRS 仅报告简单循环的定义,我无法将其概括为通用循环。
这是 CLRS 定义:无向图中的单循环是一条路径
,因此:
k >= 3
- < code>v0 = vk
v1,..,vk
是不同的
I can't find a formal definition of cycle in an undirected graph. The CLRS only reports a definition of symple cycles that i can't manage to generalize for a generic cycle.
This is the CLRS definition: a symple cycle in a undirected graph is a path <v0,v1,..,vk>
so that:
k >= 3
v0 = vk
v1,..,vk
are distincts
So i tried to remove the 3
condition to define a generic cycle but this can't work because we can have something like this: <a, b, c, b, a>
that is obviously not a cycle.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你可以将 3 概括如下:
I think you can generalize 3 as follows:
图论中的路径是指满足某些连通条件的边或/和顶点的列表。循环是闭合路径,第一个和最后一个列表元素相同。 维基百科文章
如果没有重复的顶点或边,则路径或循环被称为简单路径或循环比起始和结束顶点。你的例子是循环,但不是简单的循环。
Path in graph theory means list of edges or/and vertices satisfying some connectivity conditions. Cycle is closed path, first and last list element are same. Wikipedia article
Path or cycle is called simple if there are no repeated vertices or edges other than the starting and ending vertices. Your example is cycle, but not simple cycle.