简单图论术语
我刚刚开始学习图论的基础知识,我的教科书对一个简单的概念有点不清楚。据我所知,术语“邻接”,给定一个无向图,如果 A 和 B 节点连接,A 与 B 相邻,B 与 A 相邻。我想知道给定一个有向图,这是否仍然正确A指向B?
谢谢
I'm just starting out to learn the basics of graph theory, and my textbook is a little unclear about a simple concept. The term "adjacency" as far as I understand, given a undirected graph, if A and B nodes are connected, A is adjacent to B, and B is adjacent to A. I was wondering if this was still true given a directed graph where A points to B?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来解释得很好,但提供了一些视觉效果。相邻边是相连的两个节点,有两种基本设置:
在无向图中,由一条边连接的两个节点 A 和 B 彼此相邻
在有向图中,两个节点 A 和 B 通过边连接从 A 到 B 意味着可以到达 B从A(或,B 毗邻 A):
It looks like it was pretty well explained, but to provide some visuals. Adjacent edges are two nodes that are connected, and there are two basic setups:
In an undirected graph, two nodes A and B connected by an edge are adjacent to each other
In a directed graph, two nodes A and B connected by an edge from A to B means that you can get to B from A (or, B is adjacent to A):
在 A 指向 B 的有向图中,
{A,B}
将包含在图的邻接列表中,而{B,A}
则不会。也就是说,A 与 B 相邻,但反之则不然。In a directed graph where A points to B,
{A,B}
would be included in the graph's adjacency list and{B,A}
would not be. That is, A is adjacent to B, but not vice-versa.在有向图中,有一条从
v1
到v2
的边,则v2
与v1
相邻。 (从v1
到v2
,如v2
是头,v1
是尾。)在无向图中这是对称的 - 如果
v2
与v1
相邻,那么v1
也与v2
相邻,我们说 <代码>v1 ~ v2。在有向图中,
v1
不一定也与v2
相邻,因此我们说v1 ↓ v2
。编辑:另外,您将来可以尝试在 CSTheory Stackexchange 网站上提出此类问题 - 您可能会得到更好的答案。
In a digraph, there is an edge from
v1
tov2
, thenv2
is adjacent tov1
. (Fromv1
tov2
as inv2
is the head andv1
is the tail.)In an undirected graph this is symmetric - if
v2
is adjacent tov1
thenv1
is also adjacent tov2
, and we sayv1 ~ v2
.In a digraph,
v1
may not necessarily also be adjacent tov2
, so we sayv1 ↓ v2
.EDIT: also, you could try asking this sort of question on the CSTheory Stackexchange site in the future - you might get better answers.