Use of primal-dual technique in the network algorithm for two-way contingency tables