t basis $N_R$, keeping for simplicity the $N$ dependence implicit, and $q(N_R) = 2^{-N}\left( \begin{array}{c} N \\ N_R \end{array} \right)$ is the probability to have exactly $N_R$ states from the Reject basis. Note that $P_R(m;\alpha, N_R)$ is calculated under the assumption that the Accept observable is measured during the first $m$ steps, while after that the Reject observable is measured for the remaining $(N-m)$ steps.

For $m<(1-\alpha)N_R$ there is always a chance to reject the contract, thus $P_R(m;\alpha, N_R) = 1$. Otherwise, $$\label{reject}
P_R(m;\alpha, N_R) = \sum_{n=n^\prime}^{m^\prime} P(n \mbox{ in R};m, N_R)P_R(n \mbox{ in R};\alpha, N_R).$$ Here, the probability that exactly $n$ out of the first $m$ qubit states are from the Reject basis is given by[^3] $$P(n \mbox{ in R};m, N_R) = \left( \begin{array}{c} m \\ n \end{array} \right) \left( \begin{array}{c}N- m \\ N_R-n \end{array} \right) \left( \begin{array}{c} N \\ N_R \end{array} \right)^{-1},$$ while the probability of being able to reject the contract if $n$ qubits are from the Reject basis is given by[^4] $$P_R(n \mbox{ in R};\alpha, N_R) =  2^{-n} \sum_{i=0}^T \left( \begin{array}{c} n \\ i \end{array} \right),$$ where $T=(1-\alpha)N_R-1$ if $n\geq (1-\alpha)N_R$ and $T=n$ otherwise. Due to the constraint of having exactly $N_{A/R}$ qubits from the Accept/Reject basis, the range of the summation for $n$ in equation is given by $n^\prime=0$ for $m\leq N_A$ while $n^\prime=m-N_A$ otherwise, and $m^\prime=m$ for $m\leq N_R$ while $m^\prime=N_R$ otherwise.

Finally, the expected probability to cheat, with respect to a given probability distribution $p(\alpha)$ on the segment $I_{\alpha}$, is $$\bar{P}_{ch}(m) = \int_{I_{\alpha}}p(\alpha)P_{ch}(m;\alpha){\mathbf d\alpha}.$$

Using the simplest uniform probability $p(\alpha)=1/I_{\alpha}$ on the segment $I_{\alpha}=[0.9,0.99]$, we numerically evaluated the expected probability to cheat $\bar{P}_{ch}(m)$ for up to $N=600$, while for the “typical” case of $N_A=N_R$ we managed to evaluate it 