Macaulay2 » Documentation
Packages » BinomialEdgeIdeals :: weightedConnectedComponents
next | previous | forward | backward | up | index | toc

weightedConnectedComponents -- Counting the weighted number of connected components of a graph

Synopsis

Description

This computes the (weighted) number of connected components of a graph. The weights are all one if WeightMethod='BEI' is chosen and if WeightMethod='PBEI', then bipartite components count twice.
i1 : G={{1,2},{2,3},{3,1},{4,5},{6,7},{7,8},{6,8}};
i2 : weightedConnectedComponents(G,WeightMethod=>"BEI")

o2 = 3
i3 : weightedConnectedComponents(G,WeightMethod=>"PBEI")

o3 = 4

See also

Ways to use weightedConnectedComponents :

For the programmer

The object weightedConnectedComponents is a method function with options.