{"id":2160,"date":"2024-09-23T19:59:03","date_gmt":"2024-09-24T00:59:03","guid":{"rendered":"https:\/\/sites.imsa.edu\/hadron\/?p=2160"},"modified":"2024-09-23T19:59:03","modified_gmt":"2024-09-24T00:59:03","slug":"stable-matching-and-its-discrepancies","status":"publish","type":"post","link":"https:\/\/sites.imsa.edu\/hadron\/2024\/09\/23\/stable-matching-and-its-discrepancies\/","title":{"rendered":"Stable Matching and its Discrepancies"},"content":{"rendered":"<div class=\"eq er es et eu l\">\n<article>\n<div class=\"l\">\n<div class=\"l\">\n<section>\n<div class=\"fj fk fl fm fn\">\n<div class=\"ab cb\">\n<div class=\"ci bh ev ew ex ey\">\n<p><span style=\"font-weight: 400\">Stable Matching and its Discrepancies<\/span><\/p>\n<p><span style=\"font-weight: 400\">Written by: Aryan Mansingh<\/span><\/p>\n<p><span style=\"font-weight: 400\">There are many topics in game theory, but one of the most basic yet fundamental is the idea of a stable matching. This can be used in a variety of fields from economics to 5G networks, yet is often left hidden just below the surface of what\u2019s known about their use. The basics of this topic, as well as another fundamental game theory topic will be covered in this article.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The marriage problem is one that has been acknowledged for centuries, albeit not directly. The method of pairing two groups of people based on their preferences such that each member pair is no better off with any other person than with their match. It hadn\u2019t even been known if it was possible to get such a matchup, let alone a way to achieve it without failure. However, before understanding how such a solution was found, a simpler concept has to be understood: Nash equilibria.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Every economist knows the concept of Nash equilibria. It\u2019s one of the fundamental ways to predict the actions of set of characters\/players by analyzing what the most desirable outcomes are for those players. This concept is commonly displayed by the prisoners dilemma, although it\u2019s applicable in practically any situation where the actions and consequences of those actions are known for any two players. In the prisoners dilemma, there are two prisoners, each of whom can either remain silent or confess about a joint crime. These prisoners are both \u201clogical,\u201d meaning that they will prefer less jail time to more. If both prisoners remain silent, they both are given two years of time. If one prisoner remains silent while the other confesses, then the prisoner that remains silent gets 8 years of time while the one that confesses gets a year in prison. However, if both prisoners confess, then they both get 5 years in prison. Here\u2019s a visual of the problem (Figure 1):<\/span><\/p>\n<p><span style=\"font-weight: 400\">Figure 1<\/span><\/p>\n<p class=\"pw-post-body-paragraph lo lp fq lq b lr ls lt lu lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml fj bk\" data-selectable-paragraph=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2165\" src=\"http:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.47.21\u202fPM-300x291.png\" alt=\"\" width=\"300\" height=\"291\" srcset=\"https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.47.21\u202fPM-300x291.png 300w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.47.21\u202fPM.png 560w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><span style=\"font-weight: 400\">2X2 payoff matrix for the prisoner\u2019s dilemma<\/span><\/p>\n<p><span style=\"font-weight: 400\">Courtesy of: Aryan Mansingh<\/span><\/p>\n<p><span style=\"font-weight: 400\">Looking at the diagram, it seems obvious that both prisoners should remain silent to receive the least possible punishment, right? However, the concept of Nash equilibria proves this wrong. Lets consider this question from prisoner A\u2019s perspective, responding to prisoner B\u2019s choices. if prisoner B decides to remain silent, the prisoner A is better off confessing, since they recieve a year less time. If prisoner B decides to confess, the prisoner A is better off confessing, since they get 3 years less time. So, in either scenario, it\u2019s more beneficial for prisoner A to confess. Because this scenario is symmetrical (prisoner B has the same choices and repercussions as prisoner A), prisoner B will also find it more beneficial to confess. This also leads to the combined jail time between the prisoners. So, even though both prisoners confessing is the least optimal in terms of jail time, they are forced to make that choice, leading to the Nash equilibria. The prisoners simply have no better choice to make.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A stable matching requires a similar idea. Instead of having different characters and analyzing their possible actions, a stable matching is based off the preferences of individuals and pair them accordingly. Here is one possible arrangement of preferences (Figure 2):<\/span><\/p>\n<p><span style=\"font-weight: 400\">Figure 2<\/span><\/p>\n<p><span style=\"font-weight: 400\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2166\" src=\"http:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.48.05\u202fPM-300x62.png\" alt=\"\" width=\"300\" height=\"62\" srcset=\"https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.48.05\u202fPM-300x62.png 300w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.48.05\u202fPM-768x160.png 768w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.48.05\u202fPM-600x125.png 600w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.48.05\u202fPM.png 828w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400\">Preference layout with w and m representing women and men accordingly<\/span><\/p>\n<p><span style=\"font-weight: 400\">Here, there are three men and three women, with each of them having a preference profile P and their preferences of the opposite gender in order. For example, man 1 (m1) prefers woman 2 (w2) to woman 1 (w1) to woman 3 (w3). Using these preference profiles, a stable matching has to be determined such that there\u2019s no way for any two pairs to switch their pairings to better satisfy their preference profiles. While it may seem difficult to figure out such a matching, David Gale and Lloyd Shapley created an algorithm in 1962 to solve this particular question. While there are many ways to understand how this algorithm works, a flowchart demonstrates it quite simply (Figure 3):<\/span><\/p>\n<p><span style=\"font-weight: 400\">Figure 3<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2168\" src=\"http:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.49.54\u202fPM-243x300.png\" alt=\"\" width=\"243\" height=\"300\" srcset=\"https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.49.54\u202fPM-243x300.png 243w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.49.54\u202fPM-600x740.png 600w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.49.54\u202fPM.png 720w\" sizes=\"auto, (max-width: 243px) 100vw, 243px\" \/><\/p>\n<p><span style=\"font-weight: 400\">Flow diagram of the Gale-Shapley algorithm<\/span><\/p>\n<p><span style=\"font-weight: 400\">This relatively simple algorithm achieves a stable matching, and applying this algorithm on the proposed scenario gives us this matching:<\/span><\/p>\n<p class=\"pw-post-body-paragraph lo lp fq lq b lr ls lt lu lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml fj bk\" data-selectable-paragraph=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2169\" src=\"http:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.50.34\u202fPM-300x33.png\" alt=\"\" width=\"300\" height=\"33\" srcset=\"https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.50.34\u202fPM-300x33.png 300w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.50.34\u202fPM-768x85.png 768w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.50.34\u202fPM-600x66.png 600w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.50.34\u202fPM.png 798w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><span style=\"font-weight: 400\">To show that this works, we can look at each individual case. m1 is matched to w1, even though w1 is his second choice. Why is this? This is because his first choice, w2, prefers m3 over m1, and since there are other conflicts between m3\u2019s more preferred choices, he is matched with w2. This can be can be demonstrated for any given pair, there\u2019s always another one that\u2019s preventing both players from switching. This algorithm was quite useful when it was made, as it was used to connect students to medical schools in a similar fashion. However, there\u2019s something to note. The women get much better preferences than the men do, and this is no accident. The men get their 2nd, 3rd, and 2nd choices, while the women get their 1st, 1st, and 2nd choices respectively; this is far better than what the men got. This is because there can be multiple stable matchings for the same preference profiles. The man favorable stable matching is as follows:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2170\" src=\"http:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.51.16\u202fPM-300x31.png\" alt=\"\" width=\"300\" height=\"31\" srcset=\"https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.51.16\u202fPM-300x31.png 300w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.51.16\u202fPM-768x79.png 768w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.51.16\u202fPM-600x62.png 600w, https:\/\/sites.imsa.edu\/hadron\/files\/2024\/09\/Screenshot-2024-09-23-at-7.51.16\u202fPM.png 794w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><span style=\"font-weight: 400\">If tested, this is also a stable matching. However, the men here get their 1st, 3rd, and 1st choices while the women get their 3rd, 2nd, and 2nd choices respectively. While this may not seem like too large of a problem, in practical application, it made a huge difference. When this algorithm was originally used to match medical students with potential schools, the different stable matchings were never acknowledged, often being favorable to schools rather than the students. This was eventually addressed by Alvin Roth in 1996, who made developments to the Gale-Shapley algorithm and proposed a solution while addressing the matching process as a labor market. Only then was the matching process fixed.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Yet, this only covers one discrepancy in the Gale-Shapley algorithm, and there are several more that exist. Alvin Roth has done the difficult work, though, and compiled various properties and their applications in his paper \u201cDeferred Acceptance Algorithms: History, Theory, Practice and Open Questions.\u201d While this article covers just the surface of stable matching and Nash equilibria, game theory is a vast field that goes far deeper into the analysis of player interactions, a field that still remains under-appreciated to this day.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Sources<\/span><\/p>\n<p><span style=\"font-weight: 400\">Gale, D., &amp; Shapley, L. S. (1962). College admissions and the stability of marriage. The American Mathematical Monthly, 69(1), 9\u201315. <\/span><a href=\"https:\/\/doi.org\/10.1080\/00029890.1962.11989827\"><span style=\"font-weight: 400\">https:\/\/doi.org\/10.1080\/00029890.1962.11989827<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400\">Osborne, M. (2004). An introduction to game theory. New York: Oxford University Press.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Rostom, M., Abd El-Malek, A., Abo-Zahhad, M., &amp; Elsabrouty, M. (2022). A two-stage matching game and repeated auctions for users admission and channels allocation in 5G HetNets. IEEE Access, P<\/span><\/p>\n<p><span style=\"font-weight: 400\">P, 1. <\/span><a href=\"https:\/\/doi.org\/10.1109\/ACCESS.2022.3180982\"><span style=\"font-weight: 400\">https:\/\/doi.org\/10.1109\/ACCESS.2022.3180982<\/span><\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n<\/article>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Stable Matching and its Discrepancies Written by: Aryan Mansingh There are many topics in game theory, but one of the most basic yet fundamental is the idea of a stable matching. This can be used in a variety of fields from economics to 5G networks,<\/p>\n","protected":false},"author":1018,"featured_media":2172,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[101,3,13],"tags":[102,87,103,83],"class_list":["post-2160","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-game-theory","category-imsa","category-technology","tag-game-theory","tag-math","tag-problem-solving","tag-technology"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/posts\/2160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/users\/1018"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/comments?post=2160"}],"version-history":[{"count":2,"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/posts\/2160\/revisions"}],"predecessor-version":[{"id":2174,"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/posts\/2160\/revisions\/2174"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/media\/2172"}],"wp:attachment":[{"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/media?parent=2160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/categories?post=2160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.imsa.edu\/hadron\/wp-json\/wp\/v2\/tags?post=2160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}