由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
CS版 - Question about Bipartite Graphs
相关主题
一道graph的问题求教!(from MIT Intro to Algo)Re: 请教一个 graph connectivity 的问题
This Woman is really cute请问一个图的分解问题
请推荐几个大的 graph datasetTSP for a special graph
graph question: what is "genus" ? (转载)怎样随机建立线性graph的adjacency matrix?
BFSjava 保存 graph
put graph & text in the same page latexGraph visualization
[转载] MetaPost emulate matb graphindependent set in cubic planar graph
max independent set这里哪些方向在工业界比较有前途?
相关话题的讨论汇总
话题: bipartite话题: graphs话题: question话题: n1话题: n2
进入CS版参与讨论
1 (共1页)
s***i
发帖数: 49
1
How can I give algorithm that checks whether a graph is bipartite (a graph
whose nodes can be divided into two sets N1 and N2, and every edge is
between a member of N1 and N2)?
And since non-bipartite means there must be a cycle of odd length, how can I
check bipartite, and if false, prints a cycle of odd length?
Thanks in advance.
v********e
发帖数: 1058
2
BFS

I

【在 s***i 的大作中提到】
: How can I give algorithm that checks whether a graph is bipartite (a graph
: whose nodes can be divided into two sets N1 and N2, and every edge is
: between a member of N1 and N2)?
: And since non-bipartite means there must be a cycle of odd length, how can I
: check bipartite, and if false, prints a cycle of odd length?
: Thanks in advance.

y*******f
发帖数: 26
3

Breadth first search
I
Record the parent of each node visited.

【在 s***i 的大作中提到】
: How can I give algorithm that checks whether a graph is bipartite (a graph
: whose nodes can be divided into two sets N1 and N2, and every edge is
: between a member of N1 and N2)?
: And since non-bipartite means there must be a cycle of odd length, how can I
: check bipartite, and if false, prints a cycle of odd length?
: Thanks in advance.

s***i
发帖数: 49
4
Thanks. Can you give me some pseudo-code?
1 (共1页)
进入CS版参与讨论
相关主题
这里哪些方向在工业界比较有前途?BFS
请问Geometric Graphs有什么应用?put graph & text in the same page latex
graph theory book[转载] MetaPost emulate matb graph
paper helpmax independent set
一道graph的问题求教!(from MIT Intro to Algo)Re: 请教一个 graph connectivity 的问题
This Woman is really cute请问一个图的分解问题
请推荐几个大的 graph datasetTSP for a special graph
graph question: what is "genus" ? (转载)怎样随机建立线性graph的adjacency matrix?
相关话题的讨论汇总
话题: bipartite话题: graphs话题: question话题: n1话题: n2