elections mathematics