Gale-Shapley Deferred Acceptance in R

October 15, 2012
By

(This article was first published on is.R(), and kindly contributed to R-bloggers)

In honor of today’s announcement of the Nobel Prize for Roth and Shapley, I found an illustration of the deferred acceptance algorithm from 1962 in R. Credit for the code goes to the blogger at Letters from London, and I’ve included a Gist below that illustrates the use of their deferred acceptance function.

It looks like it’s supposed to produce an animation, but it doesn’t seem to be doing so. Nevertheless, it does produce a nice, stable matching, useful for anything from marriages to Teaching Assistant assignments!

To leave a comment for the author, please follow the link and comment on his blog: is.R().

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.