50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


matchingR (version 1.0.1)

galeShapleyMatching: Compute the Gale-Shapley Algorithm

Description

This function computes the Gale-Shapley Algorithm with one-to-one matching. This function requires very specific types of arguments. It might be more convenient to call the function one2one() instead that allows for more flexible input choices.

Usage

galeShapleyMatching(proposerPref, reviewerUtils)

Arguments

proposerPref
is a matrix with the preference order of the proposing side of the market
reviewerUtils
is a matrix with cardinal utilities of the courted side of the market

Value

  • A list with the successful proposals and engagements. proposals is a vector whose nth element contains the id of the reviewer that proposer n is matched to. engagements is a vector whose nth element contains the id of the proposer that reviewer n is matched to.