algorithmsearch-engineranking

Algorithm to meta ranking of ranked results


Imagine you ask your team mates to do a election on who should organize the next barbecue. Your team is about 120 Persons and you want to select 3 persons out of a pool of 6 persons to do that job. Each of the 120 persons can vote for up to 3 persons by ranking them: 1st best person is X, 2nd best person Y, 3rd best person is Z.

At the end all votes should be aggregated in a ranked result listing.

| Candidate | Voter 1 | Voter 2 | Voter 3 |
-------------------------------------------
| A         | 1. Pos  |         | 2. Pos  |
| B         | 3. Pos  | 1. Pos  | 3. Pos  | 
| C         | 2. Pos  | 2. Pos  |         |
| D         |         | 3. Pos  |         |
| E         |         |         |         |
| F         |         |         | 1. Pos  |
-------------------------------------------

If there where no ranking done by the voters and each vote is equal it would be nice to aggregate the result. B got 3 votes, A and C got 2 votes. All other got less votes. The winner are: A,B and C.

I do not know what algorithms exist to aggregate ranked data and i do not know what the result should look like. F got a vote for pos.1, that is good, but A and B got such a vote too. From my point of view A and B are better, because they got more votes. But is A better than B? A got a pos.2 but B got 2 times pos.3, what should be ranked higher? Is 2 times pos.2 better than 1 time pos.1 and 2 times pos.3?

Sounds like implementing a meta search engine ranking algo. What algorithms exists? What algo should I use?


Solution

  • As you asked "What should i use?" i can recommend that group of methods called "Condorcet methods", as Terje D. mentioned. If you do not want to learn more about the complex theory of election methods i can recommend one of the condorcet methods: "Schulze method" (also known as: path winner or beatpath winner). This is e.g. used by Debian, KDE and Pirates Party of Germany.

    You can use this online ballot to get a ad hoc solution to your problem: https://modernballots.com/elections/qm65cnts/vote/

    If you want to implement it into your company website (intranet, or whatever) i recommend you contribute to an existing project. If you are a PHP developer check this out: https://bitbucket.org/robla/electowidget/src/14581ac7a5f2/lib/methods/SchulzeMethod.php Electowidget was initially a plugin for MediaWiki. Maybe it is a good point to start and maybe you want to contribute some changes to make it a library.