I make these notes available with the intent of making it easier to plan and/or take notes from class.
Student facing resources for each topic are all available at vknight.org/gt/.
Use this preference sheet and ask students to work in groups to identify preferences for each mathematician and physicist.
Arrive at this:
Mathematicians
Physicists
The following will obtain a stable matching:
import matching
import matching.games
mathematicians = [
matching.Player("Gauss"),
matching.Player("Noether"),
matching.Player("Turing"),
matching.Player("Euler"),
]
physicists = [
matching.Player("Einstein"),
matching.Player("Curie"),
matching.Player("Newton"),
matching.Player("Feynman"),
]
gauss, noether, turing, euler = mathematicians
einstein, curie, newton, feynman = physicists
gauss.set_prefs([curie, newton, feynman, einstein])
noether.set_prefs([curie, feynman, einstein, newton])
turing.set_prefs([feynman, curie, einstein, newton])
euler.set_prefs([newton, curie, einstein, feynman])
einstein.set_prefs([noether, gauss, turing, euler])
curie.set_prefs([noether, euler, turing, gauss])
newton.set_prefs([gauss, euler, noether, turing])
feynman.set_prefs([turing, noether, gauss, euler])
game = matching.games.StableMarriage(mathematicians, physicists)
game.solve()
Show students the notes, when you get to the algorithm work through the algorithm with the students.
Source code: @drvinceknight Powered by: Jekyll Github pages Bootsrap css