Re: [EM] new revised ranked pair method in matrix form
Refinement: Don't determine winner until the end. C_i is the ith candidate. Initially M is the Identity matrix of size equal to the number of candidates. The pairs are ranked in order. Affirm each group of equally ranked pairs in order, from highest to lowest. To Affirm a group of equally ranked pairs create the matrix D where D_ij = 1 for each C_i C_j that is to be affirmed at this rank. D_ij=0 otherwise. Replace the old M matrix with the new one: M + MDM. After all groups have been affirmed, form the matrix W = M - M^T where M^T is the transpose of M. The winner is the C_b such that no W_ab is positive. Election-Methods mailing list - see http://electorama.com/em for list info
[EM] new revised ranked pair method in matrix form
Candidates are classed in two categories: Winners and Losers. Initially, all candidates are Winners. C_i is the ith candidate. A matrix M contains how many times candidates have defeated each other. The element M_ij equals the number of times that C_i defeats C_j. Initially M is the Identity matrix. The pairs are ranked in order. The winner is determined by affirming each group of equally ranked pairs in order, from highest to lowest. Affirming is composed of two steps: Matrix Multiplication and Reclassifying candidates. Affirming Step 1: Matrix Multiplication Create the matrix D where D_ij = 1 for each C_i C_j that is to be affirmed at this rank. D_ij=0 otherwise. Replace the old M matrix with the new one: M + MDM. Affirming Step 2: Reclassifying Each winner C_j is reclassified as a loser if M_ij M_ji and C_i is a winner. The count can be ended before affirming all pairs if one winner remains. Election-Methods mailing list - see http://electorama.com/em for list info