On 12/14/05, <b class="gmail_sendername">Paul Kislanko</b> <<a href="mailto:kislanko@airmail.net">kislanko@airmail.net</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
James Gilmour: wrote<br>><br>> Maybe there are 4 million possibilities with 10 candidates,<br>> but you won't have 4 million actual combinations unless you<br>> have many more voters than 4 million.<br><br>I was going to mention this as well. From a practical standpoint, one only
<br>need record the "forms" of ballots actually cast, then for each new ballot<br>see if it's "form" is already stored, and if so just add 1 to the number of<br>voters who used that "form".<br>
</blockquote></div><br>Sure. I was just hoping for a reasonable top-end cap.<br><br>In javascript, this is pretty easy to do due to its associative array functionality. For instance, to add a new ballot I could say:<br>
<br>var newBallotString = "A>B>C";<br><br>if (ballots[newBallotString] == null)<br> ballots[newBallotString] = 1;<br>else<br> ballots[newBallotString]++;<br><br><br>