oai-math-revised beta

Browse › Theoretical computer science › 115 Sampling and counting contingency tables with arbitrary margins

Exact Uniform Sampling of Contingency Tables with Arbitrary Margins

OpenAI · September 24, 2026

Lean

Open PDFCite Report a problem Add a reference or comment Interested in working on this Start a discussion

Edit NOTES.md · Existing issues · Source on GitHub

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.

If the PDF does not display here, open it directly: Open PDF.

Notes

No notes yet. Add a reference, a comment or your name with the buttons above, or edit NOTES.md on GitHub.

Automatically collected notes (unreviewed)

work in progress

Collected automatically by AI tools (Claude Opus 5.5 and GPT-6 Astra, 2026-10-21) and not checked by a person. May be wrong or incomplete. Report an error.

Follow-up works

  • EcoDataLab, contingency-tables: Open research on bounded contingency tables (GitHub repository, October 2026). Describes itself as auditing and improving OpenAI result #115, including a separate Lean development (1511 named declarations) with a bounded sampler of total variation at most $2^{-h}$; it notes that "the source claim of exact expected-polynomial sampling concerns ordinary tables" and does not transfer it to the cell-bounded setting. [AI-generated per source] [family-level]

Formalization

Possibly relevant literature (found by the agent, not checked)

Digests and expositions

News and blogs

Elsewhere

Independent sites; their content is not reviewed here.

Cite

@misc{OAI:Exact-Uniform-Sampling-of-Contingency-Tables-with-Arbitrary-Margins-September-24-2026,
  author = {{OpenAI}},
  title = {{Exact Uniform Sampling of Contingency Tables with Arbitrary Margins}},
  howpublished = {OpenAI Math Release preprint
                  \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}},
  year = {2026}
}

Lean formalization

OpenAI provides Lean files for this family: lean/docs/115.md. The Lean statements have not been checked by people against the paper's claims.

Family 115: Sampling and counting contingency tables with arbitrary margins

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.

Other papers in this family: