MaximalIndependentEdgeSet

MaximalIndepndentEdgeSet[g]
gives a maximal independent edge set of an undirected graph g.

更多信息更多信息

  • To use , you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
  • gives an approximate maximal set of pairwise nonadjacent edges of g.
  • A maximal independent edge set of a graph is also called a maximal matching.
  • The following option can be given:
  • WeightedFalsewhether edges with higher weights are preferred when forming the maximal independent edge set

范例范例打开所有单元关闭所有单元

基本范例 (1)基本范例 (1)

In[1]:=
Click for copyable input

This defines a small graph:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

This shows that the maximal independent edge set contains three edges:

In[4]:=
Click for copyable input
Out[4]=

This plots the hexagon with maximal edges highlighted in red:

In[5]:=
Click for copyable input
Out[5]=
New to Mathematica? Find your learning path »
Have a question? Ask support »