Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please anyone explain it question by question,thank you (50pts) 1. Implement Gale-Shapley Algorithm for computing Stable Marriage Assignment in any language, such as Python, Java,

please anyone explain it question by question,thank you
image text in transcribed
(50pts) 1. Implement Gale-Shapley Algorithm for computing Stable Marriage Assignment in any language, such as Python, Java, C++ or MATLAB, using the approach and data structures described in the first two Chapters of the Kleinberg and Tardos text. The input file should include number of subjects, n, preference list for men and women one line for each. a) Write a function to create preference lists for men and women. Function should take number of men (women), say n, create preferences and output them. b) Write a function to check if there are any unstable pairs in a given match set and preference lists. Turn in sample inputs and corresponding outputs in separate files. c) Implement Gale-Shapley algorithm and run 5 times for n=10 with different input files and plot the variation in the running time. d) Run the algorithm implemented 5 times for n=10 with the same input file and plot the variation in the running time. e) Run the algorithm implemented 5 times for n=10,15,20,50,100, and plot the average running time as a function of the problem input size (n). f) Run the algorithm implemented 5 times for n=10 with the same preference lists, let a different man start proposing and output the matches created

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

5. Solve on a calculator, but show work. cot (-5).

Answered: 1 week ago

Question

b. Explain how you initially felt about the communication.

Answered: 1 week ago