data (contains the example input/output files to run)
example.in
example.out
images (contains the graph and solution images for Task C)
Task_C_Graph.png
Task_C_Solution.png
data_helpers.py (helper functions to parse/pack the input/output and generate input/output files)
gale_shapley.py (the matcher)
verifier.py (the verifier)
scalability.py (creates the graphs for Task C)
README.md
- Run either command in the command line:
- cat data/example.in | python gale_shapley.py
- This will utilize our already made input file in the "data" folder and pass that into our matcher.
- Replace with any valid input file you wish.
- python gale_shapley.py
- This will allow the user to manually type in the inputs to the matcher.
- They will be given instructions prompted for the correct inputs.
- Example user input:
3
1 2 3
2 3 1
2 1 3
2 1 3
1 2 3
1 2 3
The pairings from the matcher should print in the command line. The pairings should match the "example.out" file in "data/example.out".
- Run command:
- python verifier.py
- It will prompt the user for input method (.in file or manual input).
- It will ask you to either provide pairings manually or use a .out file.
- It will then validate the pairings.
- Run command:
- python scalability.py
- Have "python" already installed.
- Have "matplotlib" already installed.
- To install this, do:
pip -m install matplotlib
- To install this, do:
Based on the graphs, the runtimes grow similarly at n^2 time complexity.
