A polynomial-time algorithm to approximately count contingency tables when the number of rows is constant

We consider the problem of counting the number of contingency tables with given row and column sums. This problem is known to be #P-complete, even when there are only two rows [7]. In this paper we present the first fully-polynomial randomized approximation scheme for counting contingency tables when the number of rows is constant. A novel feature of our algorithm is that it is a hybrid of an exact counting technique with an approximation algorithm, giving two distinct phases. In the first, the columns are partitioned into "small" and "large". We show that the number of contingency tables can be expressed as the weighted sum of a polynomial number of new instances of the problem, where each instance consists of some new row sums and the original large column sums. In the second phase, we show how to approximately count contingency tables when all the column sums are large. In this case, we show that the solution lies in approximating the volume of a single convex body, a problem which is known to be solvable in polynomial time [5].

[1]  Martin E. Dyer,et al.  A random polynomial-time algorithm for approximating the volume of convex bodies , 1991, JACM.

[2]  Diane Hernek Random generation of 2 × n contingency tables , 1998 .

[3]  Diane Hernek Random generation of 2×n contingency tables , 1998, Random Struct. Algorithms.

[4]  P. Diaconis,et al.  Rectangular Arrays with Fixed Margins , 1995 .

[5]  Martin E. Dyer,et al.  Polynomial-time counting and sampling of two-rowed contingency tables , 2000, Theor. Comput. Sci..

[6]  Richard M. Karp,et al.  Monte-Carlo algorithms for enumeration and reliability problems , 1983, 24th Annual Symposium on Foundations of Computer Science (sfcs 1983).

[7]  P. Flajolet On approximate counting , 1982 .

[8]  M. Simonovits,et al.  Random walks and an O * ( n 5 ) volume algorithm for convex bodies , 1997 .

[9]  Shing-Tung Yau,et al.  On sampling with Markov chains , 1996, Random Struct. Algorithms.

[10]  Martin E. Dyer,et al.  On Barvinok's Algorithm for Counting Lattice Points in Fixed Dimension , 1997, Math. Oper. Res..

[11]  Dorit S. Hochbaum,et al.  Approximation Algorithms for NP-Hard Problems , 1996 .

[12]  Miklós Simonovits,et al.  Random walks and an O*(n5) volume algorithm for convex bodies , 1997, Random Struct. Algorithms.

[13]  P. Diaconis,et al.  Testing for independence in a two-way table , 1985 .

[14]  Mark Jerrum,et al.  Approximate Counting, Uniform Generation and Rapidly Mixing Markov Chains , 1987, International Workshop on Graph-Theoretic Concepts in Computer Science.

[15]  Mark Jerrum,et al.  Approximate Counting, Uniform Generation and Rapidly Mixing Markov Chains , 1987, WG.

[16]  Mark Jerrum,et al.  The Markov chain Monte Carlo method: an approach to approximate counting and integration , 1996 .

[17]  J. Kelley,et al.  Measure and integral , 1988 .

[18]  Ben Morris Improved bounds for sampling contingency tables , 2002, Random Struct. Algorithms.

[19]  Martin E. Dyer,et al.  Rapidly mixing Markov chains for sampling contingency tables with a constant number of rows , 2002, The 43rd Annual IEEE Symposium on Foundations of Computer Science, 2002. Proceedings..

[20]  Colin Cooper,et al.  Randomization and Approximation Techniques in Computer Science , 1999, Lecture Notes in Computer Science.

[21]  Leslie G. Valiant,et al.  Random Generation of Combinatorial Structures from a Uniform Distribution , 1986, Theor. Comput. Sci..

[22]  Martin E. Dyer,et al.  Sampling contingency tables , 1997, Random Struct. Algorithms.

[23]  A. Barvinok A polynomial time algorithm for counting integral points in polyhedra when the dimension is fixed , 1994 .

[24]  David Applebaum,et al.  Measure and Integral: Volume 1 , 1987 .

[25]  J. Mount,et al.  Application of Convex Sampling to Optimization and Contingency Table Generation/Counting. , 1995 .

[26]  Catherine S. Greenhill,et al.  Surveys in Combinatorics, 1999: Random Walks on Combinatorial Objects , 1999 .