A method of finding an optimal match between clients and servers under
given matching constraints utilizes a bipartite diagram in which the
clients are presented as vertices on one side, the servers as vertices on
the other side, and each possible client-server pairing allowed under the
matching constraints as an edge connecting the vertices representing the
client and the server. After an initial round of assignments is
performed, the assignments are optimized by an optimization operation
that iteratively applies a reassignment process. The reassignment process
searches for a chain of servers starting with a server having a highest
number of clients and ends with another server with a client number less
than that of the first server by at least two, with each server in the
chain except the end server having a client reassignable to the next
server in the chain. Those reassignable clients are then reassigned along
the chain such that the first server's client number is reduced by one
and the end server's client number is reduced by one. The reassignment
process is repeated until an optimal match is reached.