This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

FindIndependentEdgeSet

FindIndependentEdgeSet[g]
finds an independent edge set of the graph g with a maximum number of edges.
  • An independent edge set is a set of edges that are never incident to the same vertex.
  • An independent edge set is also known as a matching.
Find an independent edge set in a complete graph:
In a directed graph:
Find an independent edge set in a complete graph:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
In a directed graph:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
FindIndependentEdgeSet works with undirected graphs:
Directed graphs:
A company has a number of different jobs. Each employee is suited for some of these jobs, and each person can perform at most one job at a time:
Maximize the number of jobs that can be performed simultaneously:
Given a set of women, each of whom has a preference for some subset of men, find a maximal matching where only matches that agree with preferences are allowed:
Compute a maximal matching:
An art history department would like to offer six courses. There are eight professors, each of whom is willing to teach certain courses. Find a maximal matching where professors only teach courses they are interested in teaching:
Match preferences to courses:
Test whether a set of edges is an independent edge set using IndependentEdgeSetQ:
Bipartite graphs have independent edge sets and vertex covers of equal length:
For a graph without isolated vertices, the sum of the size of the independent edge set and the size of the edge cover is equal to the number of vertices:
New in 8