Darwin Help

Back to Index

BipartiteGraph

Function BipartiteGraph - generate a random bipartite graph

Calling Sequence  BipartiteGraph(n1,n2,e)
Parameters
NameTypeDescription

n1 integeroptional number of nodes/vertices in first set
n2 integeroptional number of nodes/vertices in second set
e integeroptional number of edges
Return Type  Graph
Synopsis Generate a random bipartite graph with n1 nodes in one set and n2 nodes in another set and e edges connecting between the two. If e is not specified, it is chosen at random. If n1 and n2 are not specified, they are chosen at random between 5 and 20. A complete bipartite graph can be generated by requesting it to have n1*n2 edges. The edges are otherwise randomly chosen and have label 0.
Examples
> BipartiteGraph(3,4,5);
Graph(Edges(Edge(0,1,5),Edge(0,2,4),Edge(0,2,5),Edge(0,3,5),Edge(0,3,7)),Nodes(1
,2,3,4,5,6,7))
See also Clique,   DrawGraph,   Edge,   EdgeComplement,   Edges,   FindConnectedComponents,   Graph,   Graph_Rand,   InduceGraph,   MaxCut,   MaxEdgeWeightClique,   MST,   Nodes,   Path,   RegularGraph,   ShortestPath,   TetrahedronGraph,   VertexCover