Given an array of positive integers representing voting weights (for example, like the US Electoral College where states have different number of votes), calculates the voting power of a given voter. The voting power of a voter is defined to be the number of voting combinations in which that voter is able to swing the vote by voting divided by the total number of possible voting combinations. This algorithm uses dynamic programming to obtain a polynomial runtime for this problem.
-
Notifications
You must be signed in to change notification settings - Fork 0
alex-miao/voting-power-calculator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Calculate the voting power of voters who have different voting weights
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published