Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In equal number of votes situation, who should win? #12

Open
Sjan1 opened this issue Jun 26, 2024 · 2 comments
Open

In equal number of votes situation, who should win? #12

Sjan1 opened this issue Jun 26, 2024 · 2 comments

Comments

@Sjan1
Copy link

Sjan1 commented Jun 26, 2024

In the following example, "APE" wins, while the number of votes equals. Is the winner determined alphabetically?

ballot_plurality_subset
GO APE
[1,] 1 0
[2,] 0 1
[3,] 1 0
[4,] 1 0
[5,] 0 1
[6,] 1 0
[7,] 0 1
[8,] 0 1
plurality(ballot_plurality_subset, nseats = 1)

Results of Plurality voting

Number of valid votes: 8
Number of invalid votes: 0
Number of candidates: 2
Number of seats: 1

Candidate Total Elected
1 GO 4
2 APE 4 x
Sum 8

Elected: APE

@hanase
Copy link
Owner

hanase commented Jun 26, 2024

It's not alphabetical. It's simply the last candidate, since it is using rev(sort(total))[1:nseats] to get the totals in a decreasing order.

@Sjan1
Copy link
Author

Sjan1 commented Jun 26, 2024

While the function works the way it should, which is reassuring, I find the behaviour misleading. When the two candidates reach the same number of votes, it would be fair to win for both of them. And print a message of why it happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants