About

This webapp calculates the result of an instant-runoff vote. It's programmed with javascript powered by jQuery and structured and styled with HTML and CSS on the basis of bootstrap. The Sourcecode is licensed under the MIT License and available on GitHub, contributions are welcome. The code is unit-tested with QUnit, but that doesn't guarantee it being bug free. It was written by Peter Grassberger aka. PeterTheOne, with victory threshold option added by Will Adler.


Input

Candidates List

Please enter the names of the candidates, one candidate per line. This list of candidates works like a template for the ballots. The order of candidates has significance, so be careful not to change the order of the candidates after entering the ballots.

Example

Barack Obama
François Hollande
Angela Merkel

Ballots

Please enter one ballot per line. A ballot consists of ranking numbers 1 2 3 4 ... in a row separated by a comma ,. A ballot has the same amount of ranking numbers as there are candidates. The numbers are in the same order as the candidates in the candidates list, the first number is the rank of the first candidate of the candidate list on this ballot, the second number is the rank of the second candidate and so on. Spaces are ignored. Incomplete ballots can be created by using 0 as a placeholder or leaving the position empty like this 1, 0, 2, , 3.

Example

3, 2, 1
3, 2, 1
1, 2, 3
3, 1, 2
2, 3, 1
1, 2, 3

Options


Result

Please submit your request.