Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amahanna/stablemarriage
using different paradigms to solve the stable marriage problem
https://github.com/amahanna/stablemarriage
golang java lisp prolog
Last synced: 14 days ago
JSON representation
using different paradigms to solve the stable marriage problem
- Host: GitHub
- URL: https://github.com/amahanna/stablemarriage
- Owner: aMahanna
- Created: 2020-12-24T16:53:30.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-24T16:56:31.000Z (about 4 years ago)
- Last Synced: 2023-03-05T23:24:55.402Z (almost 2 years ago)
- Topics: golang, java, lisp, prolog
- Language: Go
- Homepage:
- Size: 296 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stable Marriage Problem
This repository contains multi-paradigm solutions to the SMP.
Languages in this repo:
* Go
* Java
* Prolog
* Scheme (Lisp)Given a list of 10 employers and 10 students, and given their list of preferences of each other, the SMP solutions attempt to find an optimal match for all students & employers.
## Example
Given the following students & their preferences:
* Olivia: Thales,Canada Post,Cisco
* Jackson: Thales,Canada Post,Cisco
* Sophia: Cisco,Thales,Canada PostGiven the following employers & their preferences:
* Thales: Olivia,Jackson,Sophia
* Canada Post: Sophia,Jackson,Olivia
* Cisco: Olivia,Sophia,JacksonAn optimal stable match would be:
* Pair: Canada Post - Jackson
* Pair: Thales - Olivia
* Pair: Cisco - Sophia[SMP Wikipedia](https://en.wikipedia.org/wiki/Stable_marriage_problem)
## Implementations
This repo has SMP implementations in Go, Java, Prolog & Scheme (Lisp), where each solution follows one of the two algorithms below:
### Gale-Shapley:
![gs](imgs/gs.png)### McVitie-Wilson:
![mw](imgs/mw.png)