<?
/*
DemoChoice: Ranked Choice Web Polls
Copyright (C) 2001 Dave Robinson
See DemoChoice-Readme.txt for license information
Context-sensitive help file
*/

 function mixnum($num,$denom,$reduce=false)
 {
  $whole=floor($num/$denom);
  $num%=$denom;
  if ($reduce)
  {
   for ($i=2; $i<=$num; $i++)
    while ($num%$i==0 && $denom%$i==0)
    { $num/=$i; $denom/=$i; }
  }
  if ($whole>0) $out=$whole;
  else 
  {
   if ($tabletab) $out="&nbsp;";
   else $out="";
  }
  if ($tabletab) $out.="</td><td>";
  else if ($num>0 && $whole>0) $out.=" ";
  if ($num>0) $out.="<font size=-1><sup>".$num."</sup>/<sub>".$denom."</sub></font>";
  else if ($tabletab) $out.="&nbsp;";
  if ($whole==0 && $num==0) $out="0";
  return $out;
 }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>DemoChoice Web Poll Info</title></head>
<body bgcolor=white text=black style="margin-left: 5%; margin-right: 5%; font-family: arial, sans-serif; line-height: 140%;">

<H3>About the DemoChoice Web Poll</H3>
<dl>
<?

if (array_key_exists("bt",$HTTP_GET_VARS))
{ $BType=$HTTP_GET_VARS["bt"]; }
else { $BType="0"; }

if ($BType!="0") { ?> 
<dt><b>How should I vote?</b>
<dd>Rank the candidates you support (first is best).
<?
switch ($BType) {
case "ts":
?>
For each of them, click on the box next to the candidate, and then click
on your rank for that candidate.
<? break;
case "tsn":
?>
For each of them, click on the box next to the candidate, and then click
on your rank for that candidate. You can also click on a name to add that
candidate to the end of your rankings.  In most browsers, you can also
press the &quot;+&quot; button to add a candidate to the end of your
rankings.
<? break;
case "tsb":
?>
For each of them, click on the ranking box next to a candidate, and then
click on your rank for that candidate.  You can also press the button to
the left of the ranking box to add that candidate to the end of your
rankings.
<? break;
case "op":
?>
For each of them, click on the grid point in the row of the candidate and 
the column of the ranking you want to assign. 
<? break; } ?>
<p>
Note that:<br>
<ul>
<li>Your lower choices won't hurt the chances of your higher choices.
<li>If you don't rank a candidate, it means you'd rather not have your vote 
count than have it count toward that candidate.
<li>Only the order of your ranked candidates matters, and not the actual numbers.
<li>You can't give two or more candidates the same rank.
</ul><p>
<?
} // Btype if

if (array_key_exists("nw",$HTTP_GET_VARS))
{ $NumWin=$HTTP_GET_VARS["nw"]; }
else { $NumWin="2"; }

if ($NumWin!="1") {
?>
<dt><b>What's the basic idea?</b>
<dd>
DemoChoice web polls are designed to produce satisfactory representation
for everyone, with majority rule.<p>

If your favorite candidate has too
few votes to win, your vote will be transferred to your next
favorite, if possible.<p>
If your favorite candidate has more than enough votes, some ballots
may be partially transferred so that all winners represent roughly
equal numbers of voters.
<p>

<dt><b>What is DemoChoice for?</b>
<dd>In a democracy worthy of the name, everyone's voice is heard (or 
represented with their explicit consent), and decisions require at least majority 
support: more 
people should support an idea than oppose it.<p>

If you elect your representatives by majority vote, and <i>they</i> make
decisions by majority vote, a small group can overrule the will of almost
75% of voters - and up to half of all voters don't even have
representatives who will express their protest.<p>

  Usually we
(Americans) elect people by "most votes wins" instead of majority, so it
can be even worse.  And worse than that, the people in power can group you
with others who will vote against your favorite - they can decide
<i>which</i> voters gain representation.  No wonder so many people have
lost faith and don't bother to vote: this approach miserably fails to meet
our goals.<p>

But it can be done! DemoChoice gives you the freedom to express your
preferences in detail among many viable choices, and then counts your
votes in a way that pursues the democratic goals noted above.  It can
usually accommodate almost everyone. As a result, voting actually becomes
a fun, positive, and rewarding experience! <p>

<dt><b>How does DemoChoice pursue its goals?</b>

<dd>DemoChoice attempts to assign everybody to their favorite
representative.  To make this work, a few adjustments need to be made.

<ul>
<li>Not all candidates can win.<br>

There are usually (and hopefully) more candidates than offices, so voters
for candidates with the fewest votes must choose their next favorite.<p>

<li>Representatives should have equal support.<br>

(This doesn't apply to single-winner elections.)<br>
Because representatives have equal voting power, they should each represent
an equal number of voters, in order to satisfy the first goal listed
above.  In pursuit of this, if a candidate receives more than enough votes
to get elected, the extra votes will be counted toward their next
favorite candidate instead.<p>
</ul>
<p>

<dt><b>How are the results tallied?</b>
<dd>It's easiest to understand this by just watching how the votes move on 
the results pages, but here are the detailed rules for the count.
First, some numbers with some special properties:

<dl>
<dt><b>Voton:</b> 1/Seats*(Seats+1)
<dd> Each ballot corresponds to one vote, but each vote can be subdivided into multiples of a fundamental unit, called a voton.  The number of votons in a vote is equal to the number of seats multiplied by one more than the number of seats.  Votons are the largest units with an important mathematical property: a winner with too many votes can let each voter transfer a whole number of votons, and always end up between Enough and the Ideal Number of votes (which are also whole numbers of votons).  If there is only one winner, no such transfers occur, so votes are not subdivided (one voton per ballot). 
  
<dt><b>Enough</b> votes to win: Ballots/(Seats+1) + 1 Voton
<dd>A number of votes equal to the number of ballots (excluding those counting for "none of these") divided by one more than the number of seats, plus one voton. If all winners have at least Enough votes to win, it is impossible for too many candidates to win. 
  
<dt><b>Ideal Number</b> of votes: Ballots/Seats
<dd> A number of votes equal to the total number of ballots (excluding those counting for "none of these") divided by the number of seats being elected.  If all winners must have more than the Ideal Number of votes, it is impossible for enough candidates to win.  If each winner has exactly the Ideal Number, the voting power of members of the legislature is exactly proportional to their number of supportive constituents. 
</dl>
</dl>
<p style="margin-left: 5%; margin-right: 5%;">So if 100 votes were cast:<br>
<table border cellspacing=0 cellpadding=3>
<tr><th>Seats</th><th>Votons Per Ballot</th><th>Enough</th><th>Ideal</th></tr>
<tr><td>1</td><td>2</td><td><?=mixnum(101,2); ?></td><td><?=mixnum(200,2); ?></td></tr>
<tr><td>2</td><td>6</td><td><?=mixnum(201,6); ?></td><td><?=mixnum(300,6); ?></td></tr>
<tr><td>3</td><td>12</td><td><?=mixnum(301,12); ?></td><td><?=mixnum(400,12); ?></td></tr>
<tr><td>4</td><td>20</td><td><?=mixnum(401,20); ?></td><td><?=mixnum(500,20); ?></td></tr>
<tr><td>5</td><td>30</td><td><?=mixnum(501,30); ?></td><td><?=mixnum(600,30); ?></td></tr>
<tr><td>6</td><td>42</td><td><?=mixnum(601,42); ?></td><td><?=mixnum(700,42); ?></td></tr>
<tr><td>7</td><td>56</td><td><?=mixnum(701,56); ?></td><td><?=mixnum(800,56); ?></td></tr>
<tr><td>8</td><td>72</td><td><?=mixnum(801,72); ?></td><td><?=mixnum(900,72); ?></td></tr>
<tr><td>9</td><td>90</td><td><?=mixnum(901,90); ?></td><td><?=mixnum(1000,90); ?></td></tr>
</table><br>
Votes for "none of these" are removed from the totals after every elimination round.</p>

<ol>
<li>Counting votes<br>
  
Votes from each ballot are assigned to its highest-ranked candidate, constrained as follows: 
<ol type="A">
<li>Each candidate can accept no more than a prescribed maximum fraction of each ballot (initially equal to 1). 
<li>An elected candidate may accept a full or partial ballot only if elected in a later round than any higher-ranked winners. 
<li>Maxima are waived for votons that cannot otherwise count for a candidate. (They count toward the highest-ranked elected candidate.) 
<li>A ballot that cannot be counted for a candidate is counted for "none of these".  
</ol>  
For each candidate, a record (histogram) is kept of how many ballots contribute a given fraction, sorted in decreasing order of those fractions (each pair of numbers is a "bin"). Ballots that exceed the candidate's maximum and bins containing zero ballots are not part of the histogram.<br>
  
<li>Adjustment of maxima 
<ol type="A">  
<li> If any candidate was eliminated in the previous round, the thresholds (Enough and the Ideal Number) are recomputed. 
<li> If any candidates have Enough votes to win, they are declared elected.  All are declared elected if there are exactly enough remaining to fill all seats. 
<li> Maximum reduction - open seats<br>
This step is invoked if:
<ol type="i">
<li> There are fewer elected candidates than seats, and either 
<li> In this round, any candidate could perform this maximum reduction for the first time, or 
<li> In the previous round, any candidate was eliminated. 
</ol>  
The maximum fraction of a vote that can count for each elected candidate is reduced as far as possible while ensuring that the candidate has Enough votes.<br>
  
Procedure (easier done than said): The maximum is adjusted to the ballot fraction in successive histogram bins, and the number of votes and ballots above that maximum are each summed until removing those votes would put the candidate at or below Enough.  If below, the maximum is increased by the difference between Enough and the number of votes that would remain given this adjusted maximum, divided by the number of ballots summed, rounded up. The maximum is set to zero if transfer of all votes in the histogram would not put the candidate below Enough.
  
<li> Maximum reduction - filled seats<br>
This step is invoked if:
<ol type="i"> 
<li> There are no unelected candidates not yet eliminated, and 
<li> No candidate with more than the Ideal Number of votes has a maximum of zero. 
</ol>  
The maximum number of votes that can count for each elected candidate is reduced as far as possible while ensuring that the candidate has at least the Ideal Number of votes.  The procedure follows that of 2.C, substituting "the Ideal Number" for "Enough".
  
<li> Elimination<br>
This step is invoked if:
<ol type="i"> 
<li> There are unelected candidates with nonzero maxima, and 
<li> No other maximum reduction occurred in this round. 
</ol>
  
The number of votes for all candidates is sorted from least to most.  Candidates' votes are summed in increasing order, omitting from the sum a number of top candidates equal to the number of seats.  The highest point at which the sum is less than the votes for the next candidate is identified.  Candidates below that point are eliminated, and the maxima for those candidates are set to zero. 
  
If the candidates with the fewest nonzero votes are tied and the tie must be resolved to choose a candidate to eliminate, a candidate is chosen randomly.
</ol>
<li> Repeat steps 1 through 3 until no further changes can be made.
</ol>
If the election is an "instant runoff" for a single winner, many rules (1B, 1C, 2C, 2D)
have no effect.  Traditionally, the process stops immediately if any candidate obtains Enough, and results are shown in terms of ballots and not votons.
<p>
<dl>
<dt><b>Hey!  This is too complicated!</b>
<dd>
The rules behind DemoChoice appear complex, but only because they put
nearly all of the electoral controls within reach of the voter.  With
currently used methods, the outcome of most elections is determined
primarily by political consultants who use sophisticated computer
algorithms and large databases to manipulate district boundaries and
reduce competition.  Casting a DemoChoice vote is straightforward, but
with current methods, voters must fret over strategy to avoid wasting
their vote on a loser or on someone who would win anyway.  Don't give up!
<p>

<dt><b>In a multi-winner election, how do you choose which votes stay 
with a winner?</b>
<dd>
Transferring votes from winners ensures that all winners represent constituencies of similar size,
and that people don't avoid voting for popular candidates, thinking that
they will get elected anyway.<p>

<dd>There are several ways to do this, depending on the situation.  They 
can be randomly chosen, taken as a fraction from each ballot, 
or chosen based on the distance between the 
winner's home precinct and the voters' precincts.<p>

If we minimize the number of times ballots are split into portions that count for different candidates, we establish a clearer connection between voters and legislators.  DemoChoice accomplishes this by giving transfer priority to ballots that count larger fractions toward the winner.  A maximum fraction of a ballot is determined that transfers a maximum number of votes without putting the winner below the Enough or Ideal threshold, as appropriate.  This makes it likely that most ballots will be sliced, but few will be sliced more than once.<p>

<dt><b>What happens if there is a tie?</b>

<dd>Ties are not a very significant issue in public elections, because the
number of ballots is large and ties are statistically rare.  However, in a
demonstration poll like this, they can happen frequently, especially among unpopular candidates.  Ties are only an issue during eliminations, and it is often possible to eliminate all tied candidates simultaneously.
They are broken by choosing a candidate in a reproducibly random way.<p>

<dt><b>Is this the same as Instant Runoff Voting?</b>
<dd>Yes, if there is one winner.  This method works well for electing 
mayors, governors, or presidents.  IRV usually stops when two candidates remain, but IRSA eliminates the last losing candidate as a clearer measure of depth of support for the winner.<p>
The multi-winner version should be used for boards, councils, and
legislatures.  This gives more people representation than the 
usual method of dividing voters into districts and using 
single-winner elections in each.<p>

<dt><b>How well does it work?</b>

<dd>DemoChoice can routinely assign more than 90 percent of voters to
representatives they support.  This usually means that a decision by a
majority of representatives reflects the will of a majority of voters.  
Winners receive nearly equal shares of votes, so that each vote
corresponds to a nearly equal amount of legislative power.  Each
representative has the unanimous support of his/her voters.  Voters have a
large number of options because there is no appreciable 'spoiler' or
'vote-splitting' effect to scare away candidates.  See for yourself by
looking at the results pages on the DemoChoice site!

<p>

<dt><b>Where did you get this newfangled idea?</b>
<dd>
The basic concepts of this method of voting were first proposed in 1821, within a generation of
adoption of the US Constitution.  Similar methods were proposed
independently in the US, Britain, and Denmark, and were used in a few
public and private elections in that century.  John Stuart Mill, the most
well-known scholar on the theory of representative government, tried
unsuccessfully to enact it when he served in the House of Commons.
Australia and Ireland have used this method since the early 20th
century.  The closest relative of IRSA is the method proposed by Hugh Warren in 1983,
which combined the concept of maxima with the iterative surplus transfers of Brian Meek's 1969 version.<p>

About two dozen US cities including New York and Cincinnati elected their 
city councils this way in the first half of the 20th century.  It was very 
effective, but the principle of an equal voice for all was ahead of its 
time - women had only just been allowed to vote, and this was well before 
the civil rights movement - so it was repealed in almost all cases.  The 
only remaining case is Cambridge, MA.  In 2002, San Francisco adopted 
instant runoffs to determine a majority winner for mayor and other 
offices.

<p>
<?
} // NumWin if
else {
?>
<dt><b>How are votes counted?</b>
<dd>
<OL style="margin-left: 15%; margin-right: 10%;">
<LI>Each ballot is counted toward its highest-ranked remaining candidate.
<LI>Does a candidate have a majority of counted votes?
<BR><i>No:</i> The last-place candidate is eliminated; go to step 1.
<BR><i>Yes:</i> The majority winner wins the election.
</OL>
<p>

<dt><b>Why vote this way?</b>
<dd>
This is an &quot;instant runoff&quot; poll, allowing voters to
conveniently find a strongly supported winner from among many candidates,  
with minimal worries about &quot;wasting&quot; votes on weak candidates or
&quot;splitting&quot; votes between similar candidates.<p>

It improves upon the "most votes wins" method, where:
<ul>
<li> if there are more 
than two candidates, someone can win even though most voters don't like 
that candidate
<li> voting for your favorite 
candidate often helps your least favorite candidate win
<li> If there are 
two similar candidates, even if one is much less popular than the 
other, they can "split" the vote so that neither can win.
</ul>  With instant 
runoffs, these problems practically never occur.<p>

It improves upon the two-round runoff election, where everyone has to go
in and vote twice - often, the inconvenience of the second election
results in very low participation.  Two-round runoffs can have the same 
problems as "most votes wins" when there are more than three 
candidates, but instant runoffs work well for any number of candidates.  
<p>

<dt><b>Which candidate received my vote?</b>
<dd>
Follow the <u>results</u> link for your poll and look at the final round.
At that point, your vote counted toward the remaining candidate who ranked
highest on your ballot, or toward &quot;none of these&quot;.<p>

<dt><b>What happens if there is a tie?</b>

<dd>Ties are not a very significant issue in public elections, because the
number of ballots is large and ties are statistically rare.  However, in a
demonstration poll like this, they can happen frequently.  Here, they are
broken by comparing votes in successively previous rounds, or by random
lot if that fails.<p>
<?
} // NumWin else
?>

<dt><b>Let's do this in our local, state, and federal governments!</b>
<dd>If you are interested in promoting this method of voting, the
<a href="http://www.fairvote.org">Center for Voting and Democracy</a> can 
provide more information and help you find like-minded people.
Also, browse the DemoChoice <a href="http://www.demochoice.org/library.html">library</a>.
<p>

<dt><b>How can I print (or save) the results?</b>

<dd>To print the bar charts, you may need to change your browser settings to 
enable printing of background colors.  For example, in Microsoft Internet 
Explorer, choose "internet options" from the "tools" menu, go to the "advanced" 
tab, and check the "print background colors and images" box.  If the dotted 
threshold line doesn't print, add "&amp;thickdot=on" (without the quotes) to 
the page's web address.<p>

If the poll has a large number of candidates, the results may be broken into 
pages.  To disable this in order to save or print results, use "&amp;page=0" (no 
quotes) in the page's web address.<p>

<dt><b>Why didn't the totals change after I voted?</b>
<dd>They did - try pressing your browser's 'Refresh' button.<p>

<dt><b>I still don't get it!</b>
<dd>We want
to make sure that everyone who uses this site leaves with a comfortable
understanding of how it works.  Please feel free to 
<a href="fbkf.php">ask a question</a>.  Our <a href=http://www.demochoice.org/library.html>library</a> has
many links to other explanations and discussions where you can learn more.
<p>

<dt><b>What do you do with my email address in a private poll?</b>
<dd>Your email address will be used to send a confirmation of your vote.
In the rare event that your vote is not properly recorded, you may be contacted.
Voter address information is not used for any other purpose.<p>

<dt><b>Send us your feedback!</b>
<dd>DemoChoice is an ongoing project, and user feedback is an essential 
part of it.  Everybody has a slightly different experience and it helps 
to hear what parts you found illuminating and what parts you found 
confusing or cumbersome.  Please <a href="fbkf.php">share your thoughts</a>! 
<p>
</dl>

<H3>Acknowledgements</h3>

<a href="http://www.initcomp.com">Steve Willett</a> created the first
web-based instant runoff poll in 2000, as an interface to
<a href="http://www.votingsolutions.com">ChoicePlus Pro</a>.  DemoChoice
evolved from this into its own project.  Steve and the 
<a href="http://www.fairvote.org">Center for Voting and Democracy</a> helped 
provide web space for the first two years.  Many others have provided helpful
advice and encouragement.  Further comments would be appreciated.<p>

DemoChoice Web Polls &copy;2001
<a 
href="http://www.laweekly.com/news/features/what-democracy-votes-like/3237/">Dave 
Robinson</a>
</body>
</html>
