You are viewing an obsolete version of the DU website which is no longer supported by the Administrators. Visit The New DU.
Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

Reply #6: That's essentially it, but you need to get a little fancier [View All]

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » Archives » General Discussion: Presidential (Through Nov 2009) Donate to DU
jmowreader Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Nov-14-04 09:40 AM
Response to Original message
6. That's essentially it, but you need to get a little fancier
Simply swapping the totals is likely to be noticed--you could only do it in cases where the election was within a percent or two. Better to shift one-percent increments to Bush until you've got a randomly-selected margin of victory.

c = a (Kerry vote count)
d = a (Bush vote count)
v = random integer between 4 and 11

subroutine Votemove
if c > d
e = c / 100
f = c - e
g = d + e
c = f
d = g
//Votemove steals one percent of Kerry's vote and gives it to Bush//


subroutine Compare
if c > d
do Votemove

j = d - c
if j > v
do Votemove
else Finalize
//Compare decides whether the vote has been stolen by enough; with an insufficient theft, it goes back and moves another percentage of Kerry's vote to Bush's column//

subroutine Finalize
a = c
b = d

Printer Friendly | Permalink |  | Top
 

Home » Discuss » Archives » General Discussion: Presidential (Through Nov 2009) Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC