A bipartite graph is a graph whose vertices can be divided into two disjoint sets. Given two lists: {1, 2, 3}
and {x, y, z}
, where some of the elements are connected:
{{1, x}, {1, y}, {1, z},{2, x}, {2, y}, {3, x}}
I want to draw a bipartite graph with the numbers {1, 2, 3}
on one side, the letters {x, y, z}
on the other, and with edges connecting those which are paired together. How can I draw such a graph?
Furthermore, how can one generate bipartite graphs? All I was able to find in the Mathematica documentation is BipartiteGraphQ
that tests whether or not a graph is bipartite. I found nothing on how to generate one. Is there a way to do this without the Combinatorica`
package?
Read the FAQs
! 3) When you see good Q&A, vote them up byclicking the gray triangles
, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem,by clicking the checkmark sign
` $\endgroup$