Key points are not available for this paper at this time.
Cyrus R. Mehta, Nitin R. Patel, A Network Algorithm for Performing Fisher's Exact Test in r × c Contingency Tables, Journal of the American Statistical Association, Vol. 78, No. 382 (Jun., 1983), pp. 427-434
Mehta et al. (Wed,) studied this question.