The only way any ballots would be thrown out would be if the number of fraudulent ballots exceeds the total number of ballots that weren't voted for Democrats plus the number that were voted for Republicans.
If a precinct has 1,200 ballots cast of which 1,000 are votes for Democrats and 50 for Republicans, and it's discovered that 300 ballots were fraudulent, that would only reduce the Democrat's total by 50 (since it would be theoretically possible that 50 of the fraudulent ballots were cast for Republicans, 150 not cast for either major party, and 100 for Democrats, thus representing only a 50-vote swing).
Maybe one could mathematically prove that fraudulent votes provided the margin of victory, but the standards are generally impossibly high.
"Maybe one could mathematically prove that fraudulent votes provided the margin of victory, but the standards are generally impossibly high."
Damn, I hate logic. :-)