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.
The maximum flow from all professors to all courses show the matching.