This is an algorithm for voting that is supposed to be totally fair to both voters and candidates.
This is an implementation of Kvalitetsmetoden, a method of voting made by Per Almgren. More info can be found here (in Swedish) http://www.nordspar.se/kvalmet.html