SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Case (2) If  $\mathcal{M}(S)\in [\mathcal{Z}_L^U,\mathcal{Z}_L^U +1,\dots ,\mathcal{Z}_R^I ],\mathcal{M}(S')\in [\mathcal{Z}_L^I,\mathcal{Z}_L^I +1,\dots ,\mathcal{Z}_R^U ],$  and  $\frac{P(Y = k)}{P(X = k)}$  is an increasing function of  $k$  for  $k\in \mathbb{Z}_{\mathcal{M}}^{I}$ , the tradeoff function in Definition 2 is given by
$$
\beta_ {\phi} ^ {-} (\alpha) = \left\{ \begin{array}{c c} P (Y \leq k) + \frac {P (Y = k) P (X > k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha , & \\ i f \alpha \in \left(P (X > k), P (X \geq k) \right], k \in \left[ \mathcal {Z} _ {L} ^ {I}, \mathcal {Z} _ {R} ^ {I} \right]. & \\ 0, & i f \alpha \in \left(P (X > \mathcal {Z} _ {L} ^ {I} - 1), 1 \right]. \end{array} \right. \tag {17}
$$
Remark 6. It is assumed in Lemma 2 that  $\frac{P(Y=k)}{P(X=k)}$  is a decreasing function (for part (1)) or an increasing function (for part (2)) of  $k \in \mathbb{Z}_{\mathcal{M}}^I$ , without loss of generality. In practice, thanks to the post-processing property of DP [15], one can relabel the output of the mechanism to ensure that this condition holds and Lemma 2 can be adapted accordingly.
Remark 7. We note that in Lemma 2, both  $X$  and  $Y$  depend on both the randomized mechanism  $\mathcal{M}(\cdot)$  and the neighboring datasets  $S$  and  $S'$ . Therefore, the infimums of the tradeoff functions in (16) and (17) are mechanism-specific, which should be analyzed individually. After identifying the neighboring datasets  $S$  and  $S'$  that minimize  $\beta_{\phi}^{+}(\alpha)$  and  $\beta_{\phi}^{-}(\alpha)$  for a mechanism  $\mathcal{M}(\cdot)$  (which is highly non-trivial), we can obtain the distributions of  $X$  and  $Y$  in (16) and (17) and derive the corresponding  $f$ -DP guarantees.
Remark 8. Since  $\beta_{\phi}^{+}(\alpha)$  is a piecewise function with decreasing slopes w.r.t  $k$  (see, e.g., Fig. 1), it can be readily shown that  $\beta_{\phi}^{+}(\alpha) \geq \max \{P(Y \geq k) + \frac{P(Y = k)}{P(X = k)} P(X < k) - \frac{P(Y = k)}{P(X = k)} \alpha, 0\}, \forall k \in \mathbb{Z}_{\mathcal{M}}^I$ . As a result, utilizing Lemma 1, we may obtain different pairs of  $(\epsilon, \delta)$  given different  $k$ 's.
Remark 9. Although we assume a finite output space, a similar method can be applied to the mechanisms with an infinite range. Taking the discrete Gaussian noise [20] as an example,  $\mathcal{M}(x) = x + V$  with  $P(V = v) = \frac{e^{-v^2 / 2\sigma^2}}{\sum_{v\in\mathbb{Z}}e^{-v^2 / 2\sigma^2}}$ . One may easily verify that  $\frac{P(\mathcal{M}(x_i) = k)}{P(\mathcal{M}(x_i') = k)}$  is a decreasing function of  $k$  if  $x_i' > x_i$  (and increasing otherwise). Then we can find some threshold  $v$  for the rejection rule  $\phi$  such that  $\alpha_{\phi} = P(\mathcal{M}(x_i)\leq v) = \alpha$ , and the corresponding  $\beta_{\phi}(\alpha) = 1 - P(\mathcal{M}(x_i')\leq v)$ .
The key to proving Lemma 2 is finding the rejection rule  $\phi$  such that  $\beta_{\phi}(\alpha)$  is minimized for a pre-determined  $\alpha \in [0,1]$ . To this end, we utilize the Neyman-Pearson Lemma [41], which states that for a given  $\alpha$ , the most powerful rejection rule is threshold-based, i.e., if the likelihood ratio  $\frac{P(Y=k)}{P(X=k)}$  is larger than/equal to/smaller than a threshold  $h$ ,  $H_0$  is rejected with probability  $1/\gamma/0$ . More specifically, since  $X$  and  $Y$  may have different ranges, we divide the discussion into two cases (i.e., Case (1) and Case (2) in Lemma 2). The Neyman-Pearson Lemma [41] is given as follows.
Lemma 3. (Neyman-Pearson Lemma [41]) Let  $P$  and  $Q$  be probability distributions on  $\Omega$  with densities  $p$  and  $q$ , respectively. For the hypothesis testing problem  $H_0: P$  vs  $H_1: Q$ , a test  $\phi: \Omega \to [0,1]$  is the most powerful test at level  $\alpha$  if and only if there are two constants  $h \in [0, +\infty]$  and  $\gamma \in [0,1]$  such that  $\phi$  has the form
$$
\phi (x) = \left\{ \begin{array}{l} 1, i f \frac {q (x)}{p (x)} > h, \\ \gamma , i f \frac {q (x)}{p (x)} = h, \\ 0, i f \frac {q (x)}{p (x)} <   h, \end{array} \right. \tag {18}
$$
and  $\mathbb{E}_P[\phi] = \alpha$ . The rejection rule suggests that  $H_0$  is rejected with a probability of  $\phi(x)$  given the observation  $x$ .
Given Lemma 3, the problem is then reduced to finding the corresponding  $h$  and  $\gamma$  such that the type I error rate  $\alpha_{\phi} = \alpha$ . For part (1) (the results for part (2) can be shown similarly), we divide the range of  $\alpha$  (i.e., [0, 1]) into multiple segments, as shown in Fig. 5. To achieve  $\alpha = 0$ , we set  $h = \infty$  and  $\gamma = 1$ , which suggests that the hypothesis  $H_0$  is always rejected when  $k < \mathcal{Z}_L^I$  and accepted otherwise. To achieve  $\alpha \in (P(X < k), P(X \leq k)]$ , for  $k \in [\mathcal{Z}_L^I, \mathcal{Z}_R^I]$ , we set  $h = \frac{P(Y = k)}{P(X = k)}$  and  $\gamma = \frac{\alpha - P(X < k)}{P(X = k)}$ . In this case, it can be shown that  $\alpha_{\phi} = \alpha \in (P(X < k), P(X \leq k)]$ . To achieve  $\alpha \in (P(X < \mathcal{Z}_R^I + 1), 1]$ , we set  $h = 0$ , and  $\gamma = \frac{\alpha - P(X < \mathcal{Z}_R^I + 1)}{P(X > \mathcal{Z}_R^I)}$ . In this case, it can be shown that  $\alpha_{\phi} = \alpha \in (P(X < \mathcal{Z}_R^I + 1), 1]$ . The corresponding  $\beta_{\phi}$  can be derived accordingly, which is given by (16). The complete proof is given below.
Proof. Given Lemma 3, the problem is reduced to finding the parameters  $h$  and  $\gamma$  in (18) such that  $\mathbb{E}_P[\phi] = \alpha$ , which can be proved as follows.
Case (1) We divide  $\alpha \in [0,1]$  into  $\mathcal{Z}_R^U -\mathcal{Z}_L^I +1$  segments:  $[P(X <   \mathcal{Z}_L^U),P(X <   \mathcal{Z}_L^I)]\cup (P(X <   \mathcal{Z}_L^I),P(X\leq \mathcal{Z}_L^I)]\cup \dots \cup (P(X <   k),P(X\leq k)]\cup \dots \cup (P(X <   \mathcal{Z}_R^U),P(X\leq \mathcal{Z}_R^U)]$  , as shown in Fig. 5.
Figure 5: Dividing  $\alpha$  into multiple segments for part (1).
When  $\alpha = P(X < \mathcal{Z}_L^U) = P(X < \mathcal{Z}_L^I) = 0$ , we set  $h = +\infty$ . In this case, noticing that  $\frac{P(Y=k)}{P(X=k)} = h$  for  $k < \mathcal{Z}_L^I$ , and  $\frac{P(Y=k)}{P(X=k)} < h$  otherwise, we have
$$
\mathbb {E} _ {P} [ \phi ] = \gamma P (X <   \mathcal {Z} _ {L} ^ {I}) = 0 = \alpha , \tag {19}
$$
$$
\beta_ {\phi} ^ {+} (0) = 1 - \mathbb {E} _ {Q} [ \phi ] = 1 - \gamma P (Y <   \mathcal {Z} _ {L} ^ {I}). \tag {20}
$$
The infimum is attained when  $\gamma = 1$ , which yields  $\beta_{\phi}^{+}(0) = P(Y \geq \mathcal{Z}_L^I)$ .
When  $\alpha \in (P(X < k), P(X \leq k)]$  for  $k \in [\mathcal{Z}_L^I, \mathcal{Z}_R^I]$ , we set  $h = \frac{P(Y=k)}{P(X=k)}$ . In this case,  $\frac{P(Y=k')}{P(X=k')} = h$  for  $k' = k$ , and  $\frac{P(Y=k')}{P(X=k')} > h$  for  $k' < k$ , and therefore
$$
\mathbb {E} _ {P} [ \phi ] = P (X <   k) + \gamma P (X = k). \tag {21}
$$
We adjust  $\gamma$  such that  $\mathbb{E}_P[\phi ] = \alpha$ , which yields
$$
\gamma = \frac {\alpha - P (X <   k)}{P (X = k)}, \tag {22}
$$
$$
\begin{array}{l} \beta_ {\phi} ^ {+} (\alpha) = 1 - [ P (Y <   k) + \gamma P (Y = k) ] \\ = P (Y \geq k) - P (Y = k) \frac {\alpha - P (X <   k)}{P (X = k)} \tag {23} \\ = P (Y \geq k) + \frac {P (Y = k) P (X <   k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha \\ \end{array}
$$
When  $\alpha \in (P(X < k), P(X \leq k)]$  for  $k \in (\mathcal{Z}_R^I, \mathcal{Z}_R^U]$ , we set  $h = 0$ . In this case,  $\frac{P(Y=k')}{P(X=k')} = h$  for  $k' > \mathcal{Z}_R^I$ , and  $\frac{P(Y=k')}{P(X=k')} > h$  for  $k' \leq \mathcal{Z}_R^I$ . As a result,
$$
\mathbb {E} _ {P} [ \phi ] = P (X \leq \mathcal {Z} _ {R} ^ {I}) + \gamma P (X > \mathcal {Z} _ {R} ^ {I}), \tag {24}
$$
$$
\beta_ {\phi} ^ {+} (\alpha) = 1 - \left[ P (Y \leq \mathcal {Z} _ {R} ^ {I}) + \gamma P (Y > \mathcal {Z} _ {R} ^ {I}) \right] = 0 \tag {25}
$$
Similarly, we can prove the second part of Lemma 2 as follows.
Case (2) We also divide  $\alpha \in [0,1]$  into  $\mathcal{Z}_R^U -\mathcal{Z}_L^I +1$  segments:  $[P(X > \mathcal{Z}_L^U),P(X\geq \mathcal{Z}_L^U)]\cup$ $\dots \cup (P(X > k),P(X\geq k])\cup \dots \cup (P(X > \mathcal{Z}_R^I),P(X\geq \mathcal{Z}_R^I))]$  , as shown in Fig. 6.
Figure 6: Dividing  $\alpha$  in to multiple segments for part (2).
When  $\alpha \in (P(X > k), P(X \geq k)]$  for  $k \in [\mathcal{Z}_L^U, \mathcal{Z}_L^I)$ , we set  $h = 0$ . In this case,
$$
\mathbb {E} _ {P} [ \phi ] = P (X \geq \mathcal {Z} _ {L} ^ {I}) + \gamma P (X <   \mathcal {Z} _ {L} ^ {I}), \tag {26}
$$
$$
\beta_ {\phi} ^ {-} (\alpha) = 1 - \left[ P (Y \geq \mathcal {Z} _ {L} ^ {I}) + \gamma P (Y <   \mathcal {Z} _ {L} ^ {I}) \right] = 0 \tag {27}
$$
When  $\alpha \in (P(X > k), P(X \geq k)]$  for  $k \in [\mathcal{Z}_L^I, \mathcal{Z}_R^I]$ , we set  $h = \frac{P(Y = k)}{P(X = k)}$ . In this case,
$$
\mathbb {E} _ {P} [ \phi ] = P (X > k) + \gamma P (X = k). \tag {28}
$$
Setting  $\mathbb{E}_P[\phi ] = \alpha$  yields
$$
\gamma = \frac {\alpha - P (X > k)}{P (X = k)}, \tag {29}
$$
$$
\begin{array}{l} \beta_ {\phi} ^ {-} (\alpha) \\ = 1 - \left[ P (Y > k) + \gamma P (Y = k) \right] \\ = P (Y \leq k) - P (Y = k) \frac {\alpha - P (X > k)}{P (X = k)} \tag {30} \\ = P (Y \leq k) + \frac {P (Y = k) P (X > k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha \\ \end{array}
$$
When  $\alpha = P(X > \mathcal{Z}_R^I) = 0$ , we set  $h = +\infty$ . In this case,
$$
\mathbb {E} _ {P} [ \phi ] = \gamma P (X > \mathcal {Z} _ {R} ^ {I}) = 0 = \alpha , \tag {31}
$$
$$
\beta_ {\phi} ^ {+} (0) = 1 - \mathbb {E} _ {Q} [ \phi ] = 1 - \gamma P (Y > \mathcal {Z} _ {R} ^ {I}). \tag {32}
$$
The infimum is attained when  $\gamma = 1$ , which yields  $\beta_{\phi}^{-}(0) = P(Y \leq \mathcal{Z}_R^I)$ .
B Proofs of Theoretical Results
$$
f ^ {b n} (\alpha) = \min  \left\{\beta_ {\phi , \inf } ^ {+} (\alpha), \beta_ {\phi , \inf } ^ {-} (\alpha) \right\}, \tag {33}
$$
$$
\beta_ {\phi , \inf } ^ {+} (\alpha) = \left\{ \begin{array}{l l} P (\tilde {Z} \geq \tilde {k} + l) + \frac {P (Z = \tilde {k} + l) P (\tilde {Z} <   \tilde {k})}{P (\tilde {Z} = \tilde {k})} - \frac {P (\tilde {Z} = \tilde {k} + l)}{P (\tilde {Z} = \tilde {k})} \alpha , \\ \text {f o r} \alpha \in [ P (\tilde {Z} <   \tilde {k}), P (\tilde {Z} \leq \tilde {k}) ], \tilde {k} \in [ 0, M - l ], \\ 0, \quad \text {f o r} \alpha \in [ P (\tilde {Z} \leq M - l), 1 ]. \end{array} \right. \tag {34}
$$
$$
\beta_ {\phi , \inf } ^ {-} (\alpha) = \left\{ \begin{array}{l l} P (\tilde {Z} \leq \tilde {k} - l) + \frac {P (\tilde {Z} = \tilde {k} - l) P (\tilde {Z} > \tilde {k})}{P (\tilde {Z} = \tilde {k})} - \frac {P (\tilde {Z} = \tilde {k} - l)}{P (\tilde {Z} = \tilde {k})} \alpha , \\ \text {f o r} \alpha \in [ P (\tilde {Z} > \tilde {k}), P (\tilde {Z} \geq \tilde {k}) ], \tilde {k} \in [ l, M ], \\ 0, \quad \text {f o r} \alpha \in [ P (\tilde {Z} \geq l), 1 ]. \end{array} \right. \tag {35}
$$
Before proving Theorem 1, we first show the following lemma.
Lemma 4. Let  $X = x_{i} + \text{Binom}(M, p)$  and  $Y = x_{i}' + \text{Binom}(M, p)$ . Then, if  $x_{i} > x_{i}'$ ,
$$
\beta_ {\phi} ^ {+} (\alpha) = \left\{ \begin{array}{l l} P (Y \geq k) + \frac {P (Y = k) P (X <   k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha , \\ \text {i f} \alpha \in [ P (X <   k), P (X \leq k) ], k \in \left[ x _ {i}, x _ {i} ^ {\prime} + M \right]. \\ 0, \quad \text {i f} \alpha \in \left(P \left(X <   x _ {i} ^ {\prime} + M + 1\right), 1 \right]. \end{array} \right. \tag {36}
$$
$$
I f x _ {i} <   x _ {i} ^ {\prime},
$$
$$
\beta_ {\phi} ^ {-} (\alpha) = \left\{ \begin{array}{l l} P (Y \leq k) + \frac {P (Y = k) P (X > k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha , \\ \text {i f} \alpha \in [ P (X > k), P (X \geq k) ], k \in \left[ x _ {i} ^ {\prime}, x _ {i} + M \right]. \\ 0, \quad \text {i f} \alpha \in \left(P (X > x _ {i} ^ {\prime} - 1), 1 \right] \end{array} \right. \tag {37}
$$
Proof of Lemma 4. When  $x_{i} > x_{i}^{\prime}$ , it can be easily verified that  $P(X = k) > 0$  only for  $k \in [x_i, x_i + 1, \dots, x_i + M]$ ,  $P(Y = k) > 0$  only for  $k \in [x_i', x_i' + 1, \dots, x_i' + M]$ . For  $k \in [x_i, \dots, x_i' + M]$ , we have
$$
\begin{array}{l} \frac {P (Y = k)}{P (X = k)} = \frac {\binom {M} {k - x _ {i} ^ {\prime}} p ^ {k - x _ {i} ^ {\prime}} \left(1 - p\right) ^ {M - k + x _ {i} ^ {\prime}}}{\binom {M} {k - x _ {i}} p ^ {k - x _ {i}} \left(1 - p\right) ^ {M - k + x _ {i}}} \tag {38} \\ = \frac {(N - k + x _ {i} ^ {\prime} + 1) (N - k + x _ {i} ^ {\prime} + 2) \cdots (N - k + x _ {i})}{(k - x _ {i} + 1) (k - x _ {i} + 2) \cdots (k - x _ {i} ^ {\prime})} \left(\frac {1 - p}{p}\right) ^ {x _ {i} ^ {\prime} - x _ {i}}. \\ \end{array}
$$
It can be observed that  $\frac{P(Y = k)}{P(X = k)}$  is a decreasing function of  $k$ .
When  $x_{i} < x_{i}^{\prime}$ , it can be easily verified that  $P(X = k) > 0$  only for  $k \in [x_i, x_i + 1, \dots, x_i + M]$ ,  $P(Y = k) > 0$  only for  $k \in [x_i', x_i' + 1, \dots, x_i' + M]$ . For  $k \in [x_i', \dots, x_i + M]$ , we have
$$
\begin{array}{l} \frac {P (Y = k)}{P (X = k)} = \frac {\binom {M} {k - x _ {i} ^ {\prime}} p ^ {k - x _ {i} ^ {\prime}} (1 - p) ^ {M - k + x _ {i} ^ {\prime}}}{\binom {M} {k - x _ {i}} p ^ {k - x _ {i}} (1 - p) ^ {M - k + x _ {i}}} \tag {39} \\ = \frac {(k - x _ {i} ^ {\prime} + 1) (k - x _ {i} ^ {\prime} + 2) \cdots (k - x _ {i})}{(N - k + x _ {i} + 1) (N - k + x _ {i} + 2) \cdots (N - k + x _ {i} ^ {\prime})} \left(\frac {1 - p}{p}\right) ^ {x _ {i} ^ {\prime} - x _ {i}}. \\ \end{array}
$$
It can be observed that  $\frac{P(Y=k)}{P(X=k)}$  is an increasing function of  $k$ , and invoking Lemma 2 completes the proof.
Given Lemma 4, we are ready to prove Theorem 1.
Proof of Theorem 1. Let  $\tilde{Z} = \operatorname{Binom}(M, p)$ ,  $X = x_{i} + \tilde{Z}$  and  $Y = x_{i}' + \tilde{Z}$ . Two cases are considered:
Case 1:  $x_{i} > x_{i}^{\prime}$ .
In this case, according to Lemma 4, we have
$$
\beta_ {\phi} ^ {+} (\alpha) = \left\{ \begin{array}{l l} P (Y \geq k) + \frac {P (Y = k) P (X <   k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha , \\ \text {f o r} \alpha \in [ P (X <   k), P (X \leq k) ], k \in \left[ x _ {i}, x _ {i} ^ {\prime} + M \right], \\ 0, \quad \text {f o r} \alpha \in [ P (X \leq x _ {i} ^ {\prime} + M), 1 ], \end{array} \right. \tag {40}
$$
In the following, we show the infimum of  $\beta_{\phi}^{+}(\alpha)$ . For the ease of presentation, let  $\tilde{k} = k - x_{i}$  and  $x_{i} - x_{i}^{\prime} = \Delta$ . Then, we have
$$
P (Y \geq k) = P \left(x _ {i} ^ {\prime} + \tilde {Z} \geq k\right) = P (\tilde {Z} \geq \tilde {k} + \Delta),
$$
$$
P (Y = k) = P (\tilde {Z} = \tilde {k} + \Delta),
$$
$$
P (X <   k) = P \left(x _ {i} + \tilde {Z} <   k\right) = P (\tilde {Z} <   \tilde {k}), \tag {41}
$$
$$
P (X = k) = P \left(x _ {i} + \tilde {Z} = k\right) = P (\tilde {Z} = \tilde {k}).
$$
(40) can be rewritten as
$$
\beta_ {\phi} ^ {+} (\alpha) = \left\{ \begin{array}{l l} P (\tilde {Z} \geq \tilde {k} + \Delta) + \frac {P (\tilde {Z} = \tilde {k} + \Delta) P (\tilde {Z} <   \tilde {k})}{P (\tilde {Z} = \tilde {k})} - \frac {P (\tilde {Z} = \tilde {k} + \Delta)}{P (\tilde {Z} = \tilde {k})} \alpha , & \text {f o r} \alpha \in [ P (\tilde {Z} <   \tilde {k}), P (\tilde {Z} \leq \tilde {k}) ], \\ & \quad \tilde {k} \in [ 0, M - \Delta ], \\ 0, & \text {f o r} \alpha \in [ P (Z \leq M - \Delta), 1 ]. \end{array} \right. \tag {42}
$$
Let  $J(\Delta, \tilde{k}) = P(\tilde{Z} \geq \tilde{k} + \Delta) + \frac{P(\tilde{Z} = \tilde{k} + \Delta)P(\tilde{Z} < \tilde{k})}{P(\tilde{Z} = \tilde{k})} - \frac{P(\tilde{Z} = \tilde{k} + \Delta)}{P(\tilde{Z} = \tilde{k})}\alpha$ , we have
$$
\begin{array}{l} J (\Delta + 1, \tilde {k}) - J (\Delta , \tilde {k}) = - P (\tilde {Z} = \tilde {k} + \Delta) \\ + \frac {P (\tilde {Z} = \tilde {k} + \Delta + 1) - P (\tilde {Z} = \tilde {k} + \Delta)}{P (\tilde {Z} = \tilde {k})} [ P (\tilde {Z} <   \tilde {k}) - \alpha ]. \tag {43} \\ \end{array}
$$
Since  $\alpha \in [P(\tilde{Z} < \tilde{k}), P(\tilde{Z} \leq \tilde{k})]$ , we have  $P(\tilde{Z} < \tilde{k}) - \alpha \in [-P(\tilde{Z} = \tilde{k}), 0]$ . If  $P(\tilde{Z} = \tilde{k} + \Delta + 1) - P(\tilde{Z} = \tilde{k} + \Delta) > 0$ ,  $J(\Delta + 1, \tilde{k}) - J(\Delta, \tilde{k}) < -P(\tilde{Z} = \tilde{k} + \Delta) < 0$ . If  $P(\tilde{Z} = \tilde{k} + \Delta + 1) - P(\tilde{Z} = \tilde{k} + \Delta) < 0$ ,  $J(\Delta + 1, \tilde{k}) - J(\Delta, \tilde{k}) < -P(\tilde{Z} = \tilde{k} + \Delta + 1) < 0$ . As a result, the infimum of  $\beta_{\phi}^{+}(\alpha)$  is attained when  $\Delta = l$ , i.e.,  $x_{i} = l$  and  $x_{i}' = 0$ , which yields
$$
\beta_ {\phi , \inf } ^ {+} (\alpha) = \left\{ \begin{array}{l l} P (\tilde {Z} \geq \tilde {k} + l) + \frac {P (\tilde {Z} = \tilde {k} + l) P (\tilde {Z} <   \tilde {k})}{P (Z = \tilde {k})} - \frac {P (\tilde {Z} = \tilde {k} + l)}{P (\tilde {Z} = \tilde {k})} \alpha , \\ \text {f o r} \alpha \in [ P (\tilde {Z} <   \tilde {k}), P (\tilde {Z} \leq \tilde {k}) ], \tilde {k} \in [ 0, M - l ], \\ 0, \quad \text {f o r} \alpha \in [ P (\tilde {Z} \leq M - l), 1 ]. \end{array} \right. \tag {44}
$$
Case 2:  $x_{i} < x_{i}^{\prime}$ .
$$
\beta_ {\phi} ^ {-} (\alpha) = \left\{ \begin{array}{l l} P (Y \leq k) + \frac {P (Y = k) P (X > k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha , \\ \text {f o r} \alpha \in [ P (X > k), P (X \geq k) ], k \in \left[ x _ {i} ^ {\prime}, x _ {i} + M \right], \\ 0, \quad \text {f o r} \alpha \in [ P (X \geq x _ {i} ^ {\prime}), 1 ], \end{array} \right. \tag {45}
$$
In the following, we show the infimum of  $\beta (\alpha)$ . For the ease of presentation, let  $\tilde{k} = k - x_{i}$  and  $x_{i}^{\prime} - x_{i} = \Delta$ . Then, we have
$$
P (Y \leq k) = P \left(x _ {i} ^ {\prime} + \tilde {Z} \leq k\right) = P (\tilde {Z} \leq \tilde {k} - \Delta),
$$
$$
P (Y = k) = P (\tilde {Z} = \tilde {k} - \Delta),
$$
$$
P (X > k) = P \left(x _ {i} + \tilde {Z} > k\right) = P (\tilde {Z} > \tilde {k}), \tag {46}
$$
(45) can be rewritten as
$$
\beta_ {\phi} ^ {-} (\alpha) = \left\{ \begin{array}{l} P \left(\tilde {Z} \leq \tilde {k} - \Delta\right) + \frac {P \left(\tilde {Z} = \tilde {k} - \Delta\right) P \left(\tilde {Z} > \tilde {k}\right)}{P \left(\tilde {Z} = \tilde {k}\right)} - \frac {P \left(\tilde {Z} = \tilde {k} - \Delta\right)}{P \left(\tilde {Z} = \tilde {k}\right)} \alpha , \\ \text {f o r} \alpha \in \left[ P \left(\tilde {Z} > \tilde {k}\right), P \left(\tilde {Z} \geq \tilde {k}\right) \right], \tilde {k} \in [ \Delta , M ], \\ 0, \quad \text {f o r} \alpha \in \left[ P \left(\tilde {Z} \geq \Delta\right), 1 \right]. \end{array} \right. \tag {47}
$$
Let  $J(\Delta, \tilde{k}) = P(\tilde{Z} \leq \tilde{k} - \Delta) + \frac{P(\tilde{Z} = \tilde{k} - \Delta)P(\tilde{Z} > \tilde{k})}{P(\tilde{Z} = \tilde{k})} - \frac{P(\tilde{Z} = \tilde{k} - \Delta)}{P(\tilde{Z} = \tilde{k})}\alpha$ , we have
$$
\begin{array}{l} J (\Delta + 1, \tilde {k}) - J (\Delta , \tilde {k}) = - P (\tilde {Z} = \tilde {k} - \Delta) \\ + \frac {P (\tilde {Z} = \tilde {k} - \Delta - 1) - P (\tilde {Z} = \tilde {k} - \Delta)}{P (\tilde {Z} = \tilde {k})} [ P (\tilde {Z} > \tilde {k}) - \alpha ] \tag {48} \\ \end{array}
$$
Since  $\alpha \in [P(\tilde{Z} >\tilde{k}),P(\tilde{Z}\geq \tilde{k})]$ , we have  $P(\tilde{Z} >\tilde{k}) - \alpha \in [-P(\tilde{Z} = \tilde{k}),0]$ . If  $P(\tilde{Z} = \tilde{k} -\Delta -1) - P(\tilde{Z} = \tilde{k} -\Delta) > 0$ , then  $J(\Delta +1,\tilde{k}) - J(\Delta ,\tilde{k}) < - P(\tilde{Z} = \tilde{k} -\Delta) < 0$ . If  $P(\tilde{Z} = \tilde{k} -\Delta -1) - P(\tilde{Z} = \tilde{k} -\Delta) < 0$ , then  $J(\Delta +1,\tilde{k}) - J(\Delta ,\tilde{k}) < - P(\tilde{Z} = \tilde{k} -\Delta -1) < 0$ . As a result, the infimum of  $\beta_{\phi}^{-}(\alpha)$  is attained when  $\Delta = l$ , i.e.,  $x_{i} = 0$  and  $x_{i}^{\prime} = l$ , which yields
$$
\beta_ {\phi , \inf } ^ {-} (\alpha) = \left\{ \begin{array}{l l} P (\tilde {Z} \leq \tilde {k} - l) + \frac {P (\tilde {Z} = \tilde {k} - l) P (\tilde {Z} > \tilde {k})}{P (\tilde {Z} = \tilde {k})} - \frac {P (\tilde {Z} = \tilde {k} - l)}{P (\tilde {Z} = \tilde {k})} \alpha , \\ \text {f o r} \alpha \in [ P (\tilde {Z} > \tilde {k}), P (\tilde {Z} \geq \tilde {k}) ], \tilde {k} \in [ l, M ], \\ 0, \quad \text {f o r} \alpha \in [ P (\tilde {Z} \geq l), 1 ]. \end{array} \right. \tag {49}
$$
Combining (44) and (49) completes the first part of the proof. When  $p = 0.5$ , it can be found that both  $\beta_{\phi, \inf}^{+}(\alpha)$  and  $\beta_{\phi, \inf}^{-}(\alpha)$  are maximized, and  $f(\alpha) = \beta_{\phi, \inf}^{+}(\alpha) = \beta_{\phi, \inf}^{-}(\alpha)$ .
$$
f ^ {b m} (\alpha) = \min  \left\{\beta_ {\phi , \inf } ^ {+} (\alpha), \beta_ {\phi , \inf } ^ {-} (\alpha) \right\}, \tag {50}
$$
$$
\begin{array}{l} \beta_ {\phi , \inf } ^ {+} (\alpha) = 1 - [ P (Y <   k) + \gamma P (Y = k) ] = P (Y \geq k) + \frac {P (Y = k) P (X <   k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha , \\ f o r   \alpha \in [ P (X <   k), P (X \leq k) ] a n d k \in \{0, 1, 2, \dots , M \}, w h e r e X = B i n o m (M, p _ {m a x}) a n d \\ Y = B i n o m (M, p _ {m i n}), a n d \end{array}
$$
$$
\begin{array}{r l} & {\beta_ {\phi , \inf } ^ {-} (\alpha) = 1 - [ P (Y > k) + \gamma P (Y = k) ] = P (Y \leq k) + \frac {P (Y = k) P (X > k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha ,} \\ & {f o r \alpha \in [ P (X > k), P (X \geq k) ] a n d k \in \{0, 1, 2, \dots , M \}, w h e r e X = B i n o m (M, p _ {m i n}) a n d} \\ & {Y = B i n o m (M, p _ {m a x}). W h e n p _ {m a x} = 1 - p _ {m i n}, w e h a v e \beta_ {\phi , \inf } ^ {+} (\alpha) = \beta_ {\phi , \inf } ^ {-} (\alpha).} \end{array}
$$
Proof. Observing that the output space of the binomial mechanism remains the same for different data  $x_{i}$ , i.e.,  $\mathcal{Z}_L^I = \mathcal{Z}_L^U = 0$  and  $\mathcal{Z}_R^I = \mathcal{Z}_R^U = M$  in Lemma 2. Moreover, let  $X = \operatorname{Binom}(M,p)$  and  $Y = \operatorname{Binom}(M,q)$ , we have  $\frac{P(Y=k)}{P(X=k)} = \frac{\binom{M}{k}q^{k}(1-q)^{M-k}}{\binom{M}{k}p^{k}(1-p)^{M-k}} = (\frac{1-q}{1-p})^{M}(\frac{q(1-p)}{p(1-q)})^{k}$ . Similarly, we consider the following two cases.
Case 1:  $q < p$ .
In this case, we can find that  $\frac{P(Y=k)}{P(X=k)}$  is a decreasing function of  $k$ . Therefore, according to Lemma 2, we have
$$
\begin{array}{l} \beta_ {\phi} ^ {+} (\alpha) = 1 - \left[ P (Y <   k) + \gamma P (Y = k) \right] \\ = P (Y \geq k) - P (Y = k) \frac {\alpha - P (X <   k)}{P (X = k)} \tag {51} \\ = P (Y \geq k) + \frac {P (Y = k) P (X <   k)}{P (X = k)} - \frac {P (Y = k)}{P (X = k)} \alpha \\ \end{array}
$$
In the following, we show that the infimum is attained when  $p = p_{max}$  and  $q = p_{min}$ . For Binomial distribution  $Y$ , we have  $\frac{\partial P(Y < k)}{\partial q} \leq 0$  and  $\frac{\partial P(Y \leq k)}{\partial q} \leq 0$ ,  $\forall k$ .
$$
\begin{array}{l} \frac {\partial \beta_ {\phi} ^ {+} (\alpha)}{\partial q} = - \frac {\partial P (Y <   k)}{\partial q} - \gamma \frac {\partial P (Y = k)}{\partial q} \\ = - (1 - \gamma) \frac {\partial P (Y <   k)}{\partial q} - \gamma \frac {\partial P (Y \leq k)}{\partial q} \tag {52} \\ \geq 0. \\ \end{array}
$$
Therefore, the infimum is attained when  $q = p_{\min}$ .
Suppose \( X = \operatorname{Binom}(M, p) \) and \( \hat{X} = \operatorname{Binom}(M, \hat{p}) \). Without loss of generality, assume \( p > \hat{p} \). Suppose that \( \alpha \in [P(X < k), P(X \leq k)] \) and \( \alpha \in [P(\hat{X} < \hat{k}), P(\hat{X} \leq \hat{k})] \) for some \( k \) and \( \hat{k} \) are satisfied simultaneously, it can be readily shown that \( k \geq \hat{k} \). In addition, \( \alpha \in [\max\{P(X <
$k),P(\hat{X} <  \hat{k})\} ,\min \{P(X\leq k),P(\hat{X}\leq \hat{k})\} ]$  .Let
$$
\beta_ {\phi , p} ^ {+} (\alpha) = P (Y \geq k) + \frac {P (Y = k) [ P (X <   k) - \alpha ]}{P (X = k)}, \tag {53}
$$
$$
\beta_ {\phi , \hat {p}} ^ {+} (\alpha) = P (Y \geq \hat {k}) + \frac {P (Y = \hat {k}) [ P (\hat {X} <   \hat {k}) - \alpha ]}{P (\hat {X} = \hat {k})}, \tag {54}
$$