I thought you were the one who did probability as part of your job (well I do very occasionally, though one of the first things I got paid to do was monte-carlo!)? Though that looks like set theory – you’re probably right, but it’s not something I’ve done for an awfully long time.
Though I’m currently sidetracked because I think I have a solution to what I thought the problem was – had already coded a brute force method (though that won’t solve the original problem this year, just ones with less voters) before the clarification, which has clarified my thoughts.
edit: actually brute force will work, and also I think for the actual problem as it’s working quicker than I expected (time was a fag packet calc and clearly out by an order of magnitude or two), though it might be an hour or two