background preloader

Algos

Facebook Twitter

Algorithm Tutorials. Learn Algorithms. Skiena's Audio Lectures. KT - Lecture Slides for Algorithm Design By Jon Kleinberg And &#201va Tardos. Electrical Engineering and Computer Science. The Stony Brook Algorithm Repository. This WWW page is intended to serve as a comprehensive collection of algorithm implementations for over seventy of the most fundamental problems in combinatorial algorithms.

The Stony Brook Algorithm Repository

The problem taxonomy, implementations, and supporting material are all drawn from my book The Algorithm Design Manual. Since the practical person is more often looking for a program than an algorithm, we provide pointers to solid implementations of useful algorithms, when they are available. Because of the volatility of the WWW, we provide local copies for many of the implementations. We encourage you to get them from the original sites instead of Stony Brook, because the version on the original site is more likely to be maintained. Further, there are often supporting files and documentation which we did not copy, and which may be of interest to you. Many of these codes have been made available for research or educational use, although commercial use requires a licensing arrangement with the author. How Game Theory Solved a Religious Mystery. The Bankruptcy Problem A man owes debts of 100, 200, and 300, but dies with insufficient funds to pay everyone.

How Game Theory Solved a Religious Mystery

How should his estate be divided? As we all know, there might not be one correct answer. Fair division is a concept that depends as much on logic as it does on social custom. To see why, consider the following three situations that afford very different solutions: A parent promises gifts to his children, but has to back off when a bonus is smaller than expectedA publicly traded company issues stock and bonds, but soon goes bankrupt in an accounting scandalPartygoers order items at a restaurant, with promises to pay, and then end up arguing over the best way to split the bill There isn’t a single right way to approach any of these problems.

Some people prefer proportional division that depends on debt size. Others prefer splitting things up equally. What gets accepted depends on social custom. The Talmud answer The Talmud offers answers through three examples. Why stop there? Hungarian algorithm. The Hungarian method is a combinatorial optimization algorithm that solves the assignment problem in polynomial time and which anticipated later primal-dual methods.

Hungarian algorithm

It was developed and published in 1955 by Harold Kuhn, who gave the name "Hungarian method" because the algorithm was largely based on the earlier works of two Hungarian mathematicians: Dénes Kőnig and Jenő Egerváry.[1][2] James Munkres reviewed the algorithm in 1957 and observed that it is (strongly) polynomial.[3] Since then the algorithm has been known also as the Kuhn–Munkres algorithm or Munkres assignment algorithm.

The time complexity of the original algorithm was , however Edmonds and Karp, and independently Tomizawa noticed that it can be modified to achieve an running time. Simple explanation of the assignment problem[edit] The Hungarian method, when applied to the above table, would give the minimum cost: this is $6, achieved by having Jim clean the bathroom, Steve sweep the floors, and Alan wash the windows. The Maximal Rectangle Problem.

Classic problems