Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #27334
| From | Richard Damon <Richard@Damon-Family.org> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Javascript classes, Please take a look at my question below |
| References | <886ff158-ecdf-4913-8cc2-7ac2ba88b971@googlegroups.com> <mg6krd$fq0$1@news.albasani.net> |
| Message-ID | <%xkWw.252000$2f6.172530@fx12.iad> (permalink) |
| Organization | Forte - www.forteinc.com |
| Date | 2015-04-11 22:14 -0400 |
On 4/9/15 3:44 PM, Stefan Weiss wrote: > On 2015-04-08 19:46, Rahul Reddy wrote: >> In the second step the result is split into the integer portion and >> the rest. The integer parts are attributed to the respective party as >> seats. The remaining seats are allocated to parties in the order of the >> size of the fractional portions. > > I would reject this algorithm as incomplete. > > Example input: 10 seats, votes: 50 A, 35 B, 15 C > > Does C get one or two seats? > What should the program do if it can't find an unambiguous distribution? > > (Amusingly, Denis's solution would solve this specific example by simply > adding a seat.) > > - stefan > There is a fundamental problem with ANY vote system of how to handle ties. The simplest case would be 1 seat, two parties, equal votes. The next level would be 2 seats, 3 parties, or 3 seat, 2 parties with equal votes. Fundamentally, such a case (due to the symmetry) can't (from what I see) have a solution other than going to chance or a new vote, or maybe have some other body "vote" to break the tie. With typical number of votes in a real election, the odds of having a true tie gets small, and if the number of seat is large having a lottery choose might not be unreasonable (perhaps add a extra tie breaking rule biasing cases like the above one way or the other, but these couldn't handle the 50/25/25 case due to symmetry, that would need to go to another stage (lottery or re-vote, etc). Sometimes adding a seat is a viable solution, but properly if you add (or remove) a seat, you should redo the whole calculation and I suspect it may be possible that there are cases when you do this the extra seat goes elsewhere. You also run into the issue that normally the number of seats is set by a more fundamental law (and may be constrained by the actually number of physical seats).
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
Javascript classes, Please take a look at my question below Rahul Reddy <rahulreddy160@gmail.com> - 2015-04-08 10:46 -0700
Re: Javascript classes, Please take a look at my question below Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-04-09 11:14 +0200
Re: Javascript classes, Please take a look at my question below JJ <jj4public@vfemail.net> - 2015-04-09 19:50 +0700
Re: Javascript classes, Please take a look at my question below Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-09 16:17 +0200
Re: Javascript classes, Please take a look at my question below JJ <jj4public@vfemail.net> - 2015-04-10 10:57 +0700
Re: Javascript classes, Please take a look at my question below "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-04-09 16:37 +0200
Re: Javascript classes, Please take a look at my question below Stefan Weiss <krewecherl@gmail.com> - 2015-04-09 21:44 +0200
Re: Javascript classes, Please take a look at my question below Denis McMahon <denismfmcmahon@gmail.com> - 2015-04-10 14:22 +0000
Re: Javascript classes, Please take a look at my question below Richard Damon <Richard@Damon-Family.org> - 2015-04-11 22:14 -0400
csiph-web