added match-me
This commit is contained in:
parent
0cc7dc39f6
commit
14a50746ac
5 changed files with 2024 additions and 0 deletions
10
match-me/description.md
Normal file
10
match-me/description.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
When making pairings between two sets of objects based on their preferences (in this case people), there can be multiple stable solutions, stable meaning that no two elements would prefer to be matched with each other over their current matching.
|
||||
A side-effect of having multiple solutions is that there are solutions favor one group over the other.
|
||||
|
||||
We received two files, one listing men and the other women. Each line contains a name, followed by a series of numbers. Each number N corresponds to their preference to be matched with the Nth member of the opposite list, with 1 being the highest.
|
||||
|
||||
For example, the entry "Joe 4, 5, 3, 1, 2" means that Joe would most prefer the 4th entry on the opposite list, and least prefer the 2nd.
|
||||
|
||||
We have heard that there is one pairing which will be together in all possible stable matchings, please discover who this couple is and provide their names as "<male_name>,<female_name>"
|
||||
|
||||
Here are the lists of preferences:[male preferences](${male_prefs_txt}), [female preferences](${female_prefs_txt}).
|
1000
match-me/female_prefs.txt
Normal file
1000
match-me/female_prefs.txt
Normal file
File diff suppressed because it is too large
Load diff
4
match-me/grader.py
Normal file
4
match-me/grader.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
def grade(autogen, key):
|
||||
if key.find("Paris,Blair") != -1:
|
||||
return True, "Correct!"
|
||||
return False, "Nope!"
|
1000
match-me/male_prefs.txt
Normal file
1000
match-me/male_prefs.txt
Normal file
File diff suppressed because it is too large
Load diff
10
match-me/problem.yml
Normal file
10
match-me/problem.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
author: GenericNickname
|
||||
title: Match Me
|
||||
hint: This is a fairly well-known graph problem, there's probably some sort of internet source on it.
|
||||
category: Algorithms
|
||||
autogen: false
|
||||
programming: false
|
||||
value: 50
|
||||
files:
|
||||
- female_prefs.txt
|
||||
- male_prefs.txt
|
Loading…
Reference in a new issue