Wolfram Language & System 10.0 (2014)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

Assignment Problems

A math department would like to offer seven 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.

    
Build a bipartite graph between professors and courses they are interested in teaching.
In[1]:=
Click for copyable input
The maximum flow from all professors to all courses shows the matching.
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=