Gale-Shapley Deferred Acceptance in R

[This article was first published on is.R(), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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 their blog: is.R().

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)