Look at solved exercise 1 on page 104 as an example. Do Problem 1 in Chapter 3 on page 107 of the Kleinberg and Tardos text. Provide a “clear” explanation in each case.Ĥ. Do Problem 3 in Chapter 2 on page 67 of the Kleinberg and Tardos text. Are there any unstable pairs in the final match?ģ. Run Gale-Shapley Algorithm using the preference lists tables below. ![]() Function should take number of men (women), say n, create preferences and output them.Ĭ) Run the algorithm on several instances of the problem for n = 10 with different input files and plot the variation in the running time.ĭ) Run the algorithm on several instances of the problem for n = 10 with the same input file and plot the variation in the running time.Į) Run the algorithm on problem instances with n = 10, 15, 20, 50, 100, and plot the average running time as a function of the problem input size (n).Ģ. Turn in sample inputs and corresponding outputs in separate files.ī) Write a function to create preference lists for men and women. nĪ) Write the output, explicitly checking to see that it is a stable match (It requires a separate function to check). The input file should include number of subjects, n, preference list for men and women one line for each. 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.
0 Comments
Leave a Reply. |