Skip to content

Calculate the voting power of voters who have different voting weights

Notifications You must be signed in to change notification settings

alex-miao/voting-power-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Voting Power Calculator

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.

About

Calculate the voting power of voters who have different voting weights

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages