此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)

MaximalIndependentEdgeSet

MaximalIndepndentEdgeSet[g]
gives a maximal independent edge set of an undirected graph g.
  • MaximalIndependentEdgeSet 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
Needs["GraphUtilities`"]
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]=