# Creating Bipartite Graphs

• 03-08-2011, 04:47 PM
jessie
Creating Bipartite Graphs
Hello,

Does anybody know how to create bipartite graphs with Java. I have a text file containing nodes and edges and i want to visualize it as a bipartite graph. i found a java class called Bipartite.java from the web, but i couldn't get a graph out of it.

Thanks
Jessie
• 03-08-2011, 06:15 PM
JosAH
Quote:

Originally Posted by jessie
Does anybody know how to create bipartite graphs with Java. I have a text file containing nodes and edges and i want to visualize it as a bipartite graph. i found a java class called Bipartite.java from the web, but i couldn't get a graph out of it.

The vertexes of a bipartite graph can be divided in two sets A and B such that no vertex a_i and a_j in set A have a connecting edge. Same goes for vertexes b_i and b_j in set B. You have to construct sets A and B from your graph. If a graph isn't bipartite you can't construct those sets A and B.

kind regards,

Jos
• 03-14-2011, 11:51 AM
jessie
if i have the two sets A and B how can i generate a bipartite graph from it?
• 03-14-2011, 12:27 PM
JosAH
Quote:

Originally Posted by jessie
if i have the two sets A and B how can i generate a bipartite graph from it?

Create an edge from each a_i in A to b_j in B. This creates a connected bipartite graph. You can remove edges at will, the graph stays bipartite.

kind regards,

Jos