Skip to content

Parity counts for exact bit-by-bit PDC sampling of contingency tables

Stephen DeSalvo

stat.CO

Abstract

DeSalvo and Zhao sample a uniform m×nm\times n contingency table with margins (r,c)(\mathbf{r},\mathbf{c}) one binary digit at a time, and decide each bit from numbers of tables with prescribed entry parities. We give a recurrence over the binary layers of a table that computes these numbers exactly. It has at most nmmn−1n^{m}m^{n-1} arguments at each of its 1+⌊log⁡2M⌋1+\lfloor\log_2 M\rfloor depths, MM the largest margin, and each argument has at most (⌊n/2⌋+1)m(⌊m/2⌋+1)n−1(\lfloor n/2\rfloor+1)^{m}(\lfloor m/2\rfloor+1)^{n-1} terms. With it the sampler returns SS exactly uniform tables in O(mn2mn+((n+22)m(m+22)n−1+S mn(n/2+1)m(m/2+1)n−1)log⁡M)O\bigl(mn2^{mn}+(\binom{n+2}{2}^{m}\binom{m+2}{2}^{n-1}+S\,mn(n/2+1)^{m}(m/2+1)^{n-1})\log M\bigr) operations on integers of O(mnlog⁡M)O(mn\log M) bits, and uses at most log⁡2∣T(r,c)∣+3\log_2|\mathcal{T}(\mathbf{r},\mathbf{c})|+3 random bits per table in expectation.

Create a lesson

Metadata

Categories
stat.CO, cs.DS
Comments
12 pages. Ancillary files: Python verification scripts (standard library only), one per result, run with python3 run_all.py