(Latest Revision: Sat Jan 30, 2021)

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 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 Abe, Ben, Cal, and Dan.  
The women are Eve, Fey, Gem, and Hil.

The preference lists are 

Abe  Fey  Eve  Hil  Gem
Ben  Hil  Fey  Eve  Gem
Cal  Fey  Gem  Hil  Eve
Dan  Eve  Hil  Gem  Fey

Eve  Abe  Ben  Dan  Cal
Fey  Cal  Ben  Dan  Abe  
Gem  Ben  Cal  Dan  Abe
Hil  Abe  Dan  Cal  Ben


     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
Copy the exact text above and & paste it in as the subject line 
to make sure it is correct.
Get it right, or get no credit. 
Send the E-mail to 
tester2@cs.csustan.edu