{"schemaVersion":1,"collection":"openai-math","source":{"repository":"https://github.com/openai/math","revision":"1581d4cbdd69a0faf34b2089614fe2a814316a6a","license":"Apache-2.0","licenseUrl":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/LICENSE","historyUrl":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/history.md","contentsUrl":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/CONTENTS.md","announcementUrl":"https://openai.com/index/sharing-ai-progress-in-mathematics/"},"environment":{"lean":"leanprover/lean4:v4.34.1","mathlib":"d13f23b723b8a846827a245b89c10fc7d3f11612","instructionsUrl":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/lean/ComparatorChallenges/README.md"},"indexedAt":"2026-10-13T03:50:29.412055+00:00","family":{"number":"115","title":"Sampling and counting contingency tables with arbitrary margins","subject":"Theoretical computer science","claim":"For nonnegative integer matrices with prescribed row and column sums, gives exact uniform sampling in expected polynomial bit time and almost-uniform sampling in worst-case polynomial bit time. The dimensions and binary-encoded margins are unrestricted. Also gives a fully polynomial randomized approximation scheme for counting such tables with arbitrary individual cell bounds, including structural zeros, with polynomial cost on every execution.","manuscripts":[{"id":"Exact-Uniform-Sampling-of-Contingency-Tables-with-Arbitrary-Margins-September-24-2026","title":"Exact Uniform Sampling of Contingency Tables with Arbitrary Margins","authors":["OpenAI"],"date":"2026-09-24","abstract":"We give an exact uniform sampler for nonnegative integer contingency tables with arbitrary prescribed margins. It terminates almost surely and has expected bit complexity polynomial in both dimensions and the binary length of the margins. No positivity, balance, sparsity, or fixed-dimension assumption is required.","pdfUrl":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/preprints/Exact-Uniform-Sampling-of-Contingency-Tables-with-Arbitrary-Margins-September-24-2026/main.pdf","downloadUrl":"https://raw.githubusercontent.com/openai/math/1581d4cbdd69a0faf34b2089614fe2a814316a6a/preprints/Exact-Uniform-Sampling-of-Contingency-Tables-with-Arbitrary-Margins-September-24-2026/main.pdf","readmeUrl":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/preprints/Exact-Uniform-Sampling-of-Contingency-Tables-with-Arbitrary-Margins-September-24-2026/README.md","readmeSha256":"9daa75b7b040bf2711186b3ea39cf8775970d78467a456c142928b273aa534e3","citation":"@misc{OAI:Exact-Uniform-Sampling-of-Contingency-Tables-with-Arbitrary-Margins-September-24-2026,\n  author = {{OpenAI}},\n  title = {{Exact Uniform Sampling of Contingency Tables with Arbitrary Margins}},\n  howpublished = {OpenAI Math Release preprint\n                  \\href{https://github.com/openai/math/blob/main/preprints/Exact-Uniform-Sampling-of-Contingency-Tables-with-Arbitrary-Margins-September-24-2026/main.pdf}{OAI:Exact-Uniform-Sampling-of-Contingency-Tables-with-Arbitrary-Margins-September-24-2026}},\n  year = {2026}\n}","versionNote":"","versionLinks":[],"listedInFormalizationIndex":false,"citedByScopeDocument":true,"proofweaveReplay":"not_run","statementReview":"not_started","receipt":null},{"id":"An-FPRAS-for-Cell-Bounded-Contingency-Tables-September-24-2026","title":"An FPRAS for Cell-Bounded Contingency Tables","authors":["OpenAI"],"date":"2026-09-24","abstract":"We give a fully polynomial randomized approximation scheme for counting nonnegative integer matrices with prescribed row sums, column sums, and individual entry bounds. Both dimensions vary, all numerical data are encoded in binary, and zero bounds are allowed. The algorithm uses only unbiased random bits and has a polynomial bound on its bit operations on every execution.","pdfUrl":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/preprints/An-FPRAS-for-Cell-Bounded-Contingency-Tables-September-24-2026/main.pdf","downloadUrl":"https://raw.githubusercontent.com/openai/math/1581d4cbdd69a0faf34b2089614fe2a814316a6a/preprints/An-FPRAS-for-Cell-Bounded-Contingency-Tables-September-24-2026/main.pdf","readmeUrl":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/preprints/An-FPRAS-for-Cell-Bounded-Contingency-Tables-September-24-2026/README.md","readmeSha256":"970cf453815ce28c9934d97567c885e18b15ee405b6369ee4b99790de91da114","citation":"@misc{OAI:An-FPRAS-for-Cell-Bounded-Contingency-Tables-September-24-2026,\n  author = {{OpenAI}},\n  title = {{An FPRAS for Cell-Bounded Contingency Tables}},\n  howpublished = {OpenAI Math Release preprint\n                  \\href{https://github.com/openai/math/blob/main/preprints/An-FPRAS-for-Cell-Bounded-Contingency-Tables-September-24-2026/main.pdf}{OAI:An-FPRAS-for-Cell-Bounded-Contingency-Tables-September-24-2026}},\n  year = {2026}\n}","versionNote":"","versionLinks":[],"listedInFormalizationIndex":false,"citedByScopeDocument":true,"proofweaveReplay":"not_run","statementReview":"not_started","receipt":null}],"scope":{"url":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/lean/docs/115.md","sha256":"7503f6655041af845dd16fb16746316e877356e75bcb3793ba68917585e02fb6","text":"The formalization gives an exact uniform sampler for nonnegative integer contingency tables with arbitrary prescribed row and column sums having equal totals. It terminates almost surely, every halted output is feasible, and each table has exactly the uniform limiting probability. Expected bit complexity is polynomial in the dimensions and the binary length of the margins.\n\nIt also gives a sampler with a fixed polynomial time bound on every execution whose total-variation error is at most $2^{-k}$ for requested precision $k\\ge1$. The same Comparator file includes the companion approximation scheme for counting tables with individual cell bounds.\n\nThe formalization gives a fully polynomial randomized approximation scheme for counting nonnegative integer matrices with prescribed row sums, column sums, and individual entry bounds. Both dimensions may vary, the margins and bounds are binary encoded, and zero entry bounds are allowed. For rational $0<\\varepsilon,\\delta<1$, the algorithm returns a nonnegative estimate with relative error at most $\\varepsilon$ with probability at least $1-\\delta$, and returns zero on every execution when no table exists.\n\nThe running time is polynomial in the encoded input size, $\\varepsilon^{-1}$, and $\\log(\\delta^{-1})$ on every random tape. The same Comparator file also contains the companion sampling results for tables without cell bounds.","paperLinks":[{"label":"Exact Uniform Sampling of Contingency Tables with Arbitrary Margins","url":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/preprints/Exact-Uniform-Sampling-of-Contingency-Tables-with-Arbitrary-Margins-September-24-2026/main.pdf"},{"label":"An FPRAS for Cell-Bounded Contingency Tables","url":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/preprints/An-FPRAS-for-Cell-Bounded-Contingency-Tables-September-24-2026/main.pdf"}],"comparatorLinks":[{"label":"ContingencyTables.lean","url":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/lean/ComparatorChallenges/ContingencyTables.lean"},{"label":"ContingencyTables.lean","url":"https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/lean/ComparatorChallenges/ContingencyTables.lean"}]},"readingGuide":null}}