algorithm - How to know the number of voters where the number of candidates is larger than the number of slots -


our country held election , became interested in finding number of voters voted given position. solving problem 1 slot positions (mayor, governor, etc.) trivial. obviously, need sum votes each candidates total number of voters.

number of voters = candidate 1 votes + candidate 2 votes + ... + candidate n votes 

however, getting number of voters positions having many slots seems not equally easy. example, senatorial position has 12 slots 33 candidates. want achieve know number of voters based on current votes on 33 candidates.

is there algorithm or method solve problem? note it's okay have range of possible number of voters, or other approximations of it.

additional 1: we'll assume each voter has voted 12 candidates (for senators, example) (no more, no less). (thanks @slebetman)

the requirement each voter has voted 12 times makes easy.

  1. sum votes candidates. gives total number of votes cast in election.
  2. divide total number of votes 12 number of voters.

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -