# Smithy - RCV Ballot Counter

# Smithy: RCV Ballot Counter - CGI Application Upload

Upload a ballot-box spreadsheet (.xlsx, .xls, .csv):

## About

This is an upload form for the smithy RCV Ballot counter for identifying the Smith set (majority winners) in small elections, mainly to help with UO Physics Grad student elections of various flavors. This form uses the UO pages.uoregon.edu CGI Capability, so the implementation of smithy being invoked can be inspected here and you may also inspect the source of this page to verify that this script is called to invoke it - though you have to trust it to quine itself faithfully.

The Smith set is the minimal set of candidates which can beat all others pairwise (by majority ranking) - if there is a single winner in the set they are guaranteed the standard Condorcet i.e. Majority winner (they beat all others pairwise).

### Input: Expected Spreadsheet Format

A ballot-box spreadsheet should be organized by columns as candidates and rows as numerical rankings of the candidates - i.e. each row is the ranking provided by the ballot of a voter, e.g.:

test_ballot.csv

Alice | Bob | Charlie
--- | --- | ---
1 | 2 | 3
2 | 1 | 3
1 | 3 | 2
3 | 1 | 2

where this reads that the first voter had preferences "Alice" over "Bob" over "Charlie", the second voter "Bob" over "Alice" over "Charlie", etc. (This example is constructed to demonstrate a situation without a singular majority winner - its Smith set a tie between "Alice" and "Bob")

### Output: Smith Set Format

The form will return a list of the Smith-set winners sorted lexicographically (they are all equally good majority winners). It might be helpful for clarity to provide the input sheet's columns already in lexicographic order, but this is not required.