sup
sup copied to clipboard
A web app to bring together a company's members
Here's a simple and effective approach: https://github.com/dblock/slack-sup/blob/master/slack-sup/models/round.rb#L64. Could use some improvement as described in https://github.com/jimwise/ambit/issues/1
Since this is an NP hard problem formulatable as [3-dimensional / tri-partite matching](http://en.wikipedia.org/wiki/3-dimensional_matching#CITEREFCrescenziKannHalld.C3.B3rssonKarpinski2000) (MAX 3DM) or partition into triangles (PIT), to be correct is to use brute force search.
Here is an algorithm that generates triplets in a better way: for simplicity, start with K=1, N=10, f(n)=n, g(q,w)=w/q. 1. construct an undirected graph - connect people who do not...
When phrased as the optimization problem [here](https://en.wikipedia.org/wiki/3-dimensional_matching#Optimization_problem) and [here](https://www.nada.kth.se/~viggo/wwwcompendium/node143.html), there are 2 well know approaches. The first gets a round of sups that is within 1/3 of the best possible...