Source: https://politics.stackexchange.com/questions/25482/formula-for-efficiency-gap-calculation-when-there-are-more-than-two-candidates/25614