Skip to content
m·amathatlas
ExploreAboutOpen problemsCited authorsMy libraryFeedback
Sign in
FRENES
Loading views…Recent views only, across all languages. Vercel history is unavailable for this page. Repeat visits in the same tab are grouped for 30 minutes.
ShareLinkedInXFacebookWhatsApp
Explore

Theoretical computer science / 115

Sampling and counting contingency tables with arbitrary margins

Read the paperDiscuss this problemCommentLean sources
Claimed result·2 papers·Independent verification not performed

Understand this problem at your own pace

Generate an explanation from the papers: intuition, example, claimed result, approach, and limits. Choose your level and model.

Discover

Uses your OpenAI key and may incur charges. This personal AI-assisted reading does not replace proof verification.

Sign in with a verified email to use the companion and generate an explanation. Reading is freely accessible.

Sign in

Your OpenAI key.

By default, your key stays in this tab’s memory. You can choose to save it encrypted in your account. The server sends your questions and relevant excerpts to OpenAI. Calls are billed to your API account.

Your first API key? Start here
  1. OpenAI Platform ↗ — Sign in to OpenAI Platform or create an account.
  2. In your project, open “API keys”, then “Create new secret key”. Give it a name, such as Math Atlas.
  3. Copy the key when it is created and paste it below. Never post it in a comment.

API usage is billed separately from ChatGPT. Check billing and spending limits on OpenAI Platform before generating a response.

Model access depends on your OpenAI account permissions and quota. Compare OpenAI models ↗

Create an API key ↗Billing and usage ↗

Data and privacy ↗

Original text · English

The claimed result

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.

Papers and sources

Exact Uniform Sampling of Contingency Tables with Arbitrary Margins

EN · Original text · English

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.

View in the paper

An FPRAS for Cell-Bounded Contingency Tables

EN · Original text · English

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.

View in the paper

Formalization scope

Lean sources

Browse the proof files associated with this problem. Imports and dependencies are available in the source repository.

Loading…

Sources from the catalogue revision. Math Atlas has not compiled or verified these proofs.

Read the formalization scope note (English)

Sampling and counting contingency tables with arbitrary margins

The following describes the scope of the Lean formalization related to the following accompanying paper(s):

  • Exact Uniform Sampling of Contingency Tables with Arbitrary Margins
  • An FPRAS for Cell-Bounded Contingency Tables

Scope

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.

It also gives a sampler with a fixed polynomial time bound on every execution whose total-variation error is at most 2−k2^{-k}2−k for requested precision k≥1k\ge1k≥1. The same Comparator file includes the companion approximation scheme for counting tables with individual cell bounds.

The 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<ε,δ<10<\varepsilon,\delta<10<ε,δ<1, the algorithm returns a nonnegative estimate with relative error at most ε\varepsilonε with probability at least 1−δ1-\delta1−δ, and returns zero on every execution when no table exists.

The running time is polynomial in the encoded input size, ε−1\varepsilon^{-1}ε−1, and log⁡(δ−1)\log(\delta^{-1})log(δ−1) on every random tape. The same Comparator file also contains the companion sampling results for tables without cell bounds.

Comparator links

| Result | Comparator statement | | --- | --- | | Exact and bounded-time sampling of contingency tables | ContingencyTables.lean | | Randomized approximate counting of cell-bounded contingency tables | ContingencyTables.lean |

Independent verification not performed

03 / Source

Papers and sources

Exact Uniform Sampling of Contingency Tables with Arbitrary Margins31 pages · PDF · September 24, 2026Download
An FPRAS for Cell-Bounded Contingency Tables47 pages · PDF · September 24, 2026Download

Reader discussion

A question, an observation, or another way to understand this problem?

Loading…

Where to go next

102Unique Games and approximation limits103Exact derandomization of logarithmic space: L=RL=BPL\mathsf L=\mathsf{RL}=\mathsf{BPL}L=RL=BPL104Quasipolynomial algorithms for mean-payoff, stochastic and parity games105Perfect completeness for 2-to-1 games
The claimed resultThe solution approachLean sourcesPapers and sourcesWhere to go next

Your reading companion

A question, a difficult passage, an idea to clarify. Answers draw on your selected documents.

Discuss
mathatlas

An independent atlas to understand, read, and question research.

The papers present claimed results at different stages of verification.
NewsletterShare feedbackAbout Data and privacy
Created by Sonny Mupfuni