Code Monkey home page Code Monkey logo

successive-shortest-path-algorithm's Introduction

Problem Statement

Given:

  • Bipartite Graph G(V = X βˆͺ Y, E)
  • For every edge e 𝞊 E, Ce is the cost of the edge.
  • |X| = |Y| = n
  • There exist a perfect matching.
  • Ce β‰₯ 0 βˆ€ e 𝞊 E.

Goal: We need to find the minimum cost bipartite matching.

Algorithm

Start with M equal to the empty set
Define p(x) = 0 for x π›œ X, and p(y) = min(e) into y ce for y π›œ Y
While M is not a perfect matching..,
	Compute shortest path distances d
P ← shortest alternating path using reduced cost & Dijkstra’s Algo.
Augment along P to produce a new matching M’.
foreach v ∈ X βˆͺ Y: p(v) ← p(v) + d(v).
Endwhile;

Code Written By

successive-shortest-path-algorithm's People

Contributors

cynicphoenix avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.