mateusluizfb / graph-Gale-Shapley

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instruções:

  1. Tenha o Python 3 instalado
  2. Execute make ou python3 main.js

Implementação so seguinte algoritmo Gale-Shapley:

algorithm stable_matching is
    Initialize m ∈ M and w ∈ W to free
    while ∃ free man m who has a woman w to propose to do
        w := first woman on m's list to whom m has not yet proposed
        if ∃ some pair (m', w) then
            if w prefers m to m' then
                m' becomes free
                (m, w) become engaged
            end if
        else
            (m, w) become engaged
        end if
    repeat

About


Languages

Language:Python 99.6%Language:Makefile 0.4%