Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In our discussion of the Gale - Shapley algorithm, we used the number of offers as a measure of progress and showed that each iteration
In our discussion of the GaleShapley algorithm, we used the number of offers as a measure of
progress and showed that each iteration of the while loop makes one new offer of a position to an
applicant. Since there are n applicants and n positions, and an applicant can never be offered a
position more than once, the while loop can be executed at most n
times.
Consider a simple instance of GaleShapley, where n there are open positions, A B and
C and applicants X Y and Z Provide an example execution of GaleShapley that results in
the maximum possible number of offers made ie executions of the while loop You will need
to provide the complete preference list of all three positions and all three applicants as well as the
order in which positions are offered to applicants. Also state whether your free list is a LIFO queue
or a FIFO queue that is is a position that becomes open because an applicant took a better offer
immediately offered their next favored applicant or do they go to the back of the line?
Finally, summarize at least three generic observations this exercise helps you make about the
GaleShapley algorithms execution. Weve done the first one for you.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started