摘要 |
A method for pairing elements of a first set of elements {x(i with elements from a second set of elements {y(j subject to a plurality of pairing restrictions. In accordance with one embodiment of the method, for each of a plurality of iterations of the method, or until a set of pairings is found that satisfies the plurality of pairing restrictions, a random set of pairings between elements of the second set of elements and elements of the second set of elements is selected. The set of mismatched pairings is identified and, if the number of pairings in the set of mismatched pairings is not greater than a maximum number, pairings in the set of mismatched pairings are interchanged. If the number of pairings in the set of mismatched pairings is greater than one, each mismatched pairing is swapped with another pairing if the resulting pairings satisfy the plurality of pairing restrictions.
|