(Latest Revision: Thu Sep 29, 2022)

CS 4440 Stable Matching Problem


Here is a sample of how the Gale-Shapley algorithm would solve 
a stable matching problem:

INPUT

Xavier  Amy     Bertha  Clare
Yancey  Bertha  Amy     Clare
Zeus    Amy     Bertha  Clare

Amy     Yancey  Xavier  Zeus
Bertha  Xavier  Yancey  Zeus
Clare   Xavier  Yancey  Zeus

Gale-Shapley ALGORITHM RUN script

1.	Xavier proposes to Amy.
2.	Amy pairs with Xavier because she is free.
3.	Yancey proposes to Bertha.
4.	Bertha pairs with Yancey because she is free.
5.	Zeus proposes to Amy.
6.	Amy rejects Zeus because she likes her current match, Xavier, more.
7.	Zeus remains free.
8.	Zeus proposes to Bertha.
9.	Bertha rejects Zeus because she likes her current match, Yancey, more.
10.	Zeus remains free.
11.	Zeus proposes to Clare.
12.	Clare pairs with Zeus because she is free.

Now everyone has a match.

Here Are The Matches: 

    WOMEN      MEN
    Amy       Xavier
    Bertha    Yancey
    Clare     Zeus

==============================

==============================
Your Assignment:

Process the following input in the same manner that the sample input was 
processed, as illustrated above.

Produce the same kind of script (step-by-step) of the actions taken by 
the Gale-Shapley algorithm, plus write what the final matching is, 
in the same format as above.

The men are Ash, Bob, Del, and Eli.

The women are Flo, Jae, Kia, and Luz.

The preference lists are 

Ash	Kia	Luz	Flo	Jae
Bob	Jae	Flo	Luz	Kia
Del	Kia	Luz	Jae	Flo
Eli	Luz	Kia	Jae	Flo
				
				
Flo	Bob	Ash	Eli	Del
Jae	Ash	Eli	Bob	Del
Kia	Eli	Del	Ash	Bob
Luz	Del	Ash	Eli	Bob


     Directions For Submitting Solution:

Prepare your solution to the problem.
COPY AND PASTE the text of your solution into an e-mail.
DO NOT ATTACH A FILE. 
COPY AND PASTE the text into the message window of the e-mail. 
Make this exact text the subject line of your e-mail: 
CS 4440 Stable Matching Problem
To make sure it is correctly entered, copy the exact text of the preceding line
and & paste it in as the subject line of your message.
Get it right, or get no credit. 
Send the E-mail to 
tester2@cs.csustan.edu