SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
H _ {2} (\mu , \varepsilon_ {0}) \leq K \left(2 \frac {\Delta / \varepsilon_ {0} + 1}{\Lambda - \Delta} + 3 \varepsilon_ {0} ^ {- 1}\right) ^ {2} = \mathcal {O} \left(\frac {K}{\min  \{\Lambda - \Delta , \varepsilon_ {0} \} ^ {2}}\right).
$$
F.1 Proof of Theorem 6
In the following, we consider a sub-Gaussian bandit with distribution  $\nu \in \mathbb{R}^{K}$  having mean parameter  $\mu \in \mathbb{R}^{K}$ . In particular, our analysis holds when several arms have the largest mean  $\mu_{\star}$ .
Let  $\Delta_{\mathrm{max}} = \max_{i\in [K]}\mu_{\star} - \mu_{i}$ . Let  $\varepsilon_{1}$  be an analysis parameter (i.e. not the error parameter from the stopping rule (3)). When  $\varepsilon_{1}\geq \Delta_{\mathrm{max}}$ , we have  $\mathcal{I}_{\varepsilon_1}(\mu)^\complement = \emptyset$ , hence  $\mathbb{P}_{\nu}(\hat{i}_n\notin \mathcal{I}_{\varepsilon_1}(\mu)) = 0$ . In the following, we consider  $\varepsilon_{1}\in [0,\Delta_{\mathrm{max}})$ .
For all  $n > K$  and  $\delta \in (0,1)$ , let  $\tilde{\mathcal{E}}_{n,\delta} = \tilde{\mathcal{E}}_{n,\delta}^{1}\cap \tilde{\mathcal{E}}_{n,\delta}^{2}$  with  $(\tilde{\mathcal{E}}_{n,\delta}^{1})_{n > K}$  and  $(\tilde{\mathcal{E}}_{n,\delta}^{2})_{n > K}$  as in (27) and (29) for  $s = 0$ , i.e.
$$
\tilde {\mathcal {E}} _ {n, \delta} ^ {1} = \left\{\forall k \in [ K ], \forall t \leq n, | \mu_ {t, k} - \mu_ {k} | <   \sqrt {\frac {2 \tilde {f} _ {1} (n , \delta)}{N _ {t , k}}} \right\},
$$
$$
\tilde {\mathcal {E}} _ {n, \delta} ^ {2} = \left\{\forall (i, k) \in [ K ] ^ {2} \mathrm {s . t .} i \neq k, \forall t \leq n, \frac {| (\mu_ {t , i} - \mu_ {t , k}) - (\mu_ {i} - \mu_ {k}) |}{\sqrt {1 / N _ {t , i} + 1 / N _ {t , k}}} <   \sqrt {2 \tilde {f} _ {2} (n , \delta)} \right\},
$$
$$
\tilde {f} _ {1} (n, \delta) = \frac {1}{2} \bar {W} _ {- 1} (2 \log (1 / \delta) + 2 \log (2 + \log n) + 2),
$$
$$
\tilde {f} _ {2} (n, \delta) = \overline {{W}} _ {- 1} \left(\log \left(1 / \delta\right) + 2 \log \left(2 + \log n\right) + 2\right).
$$
Using Lemma 50, we know that  $\tilde{f}_1(n,\delta) \leq \tilde{f}_2(n,\delta)$ . Using Lemmas 42 and 44, we obtain that  $\mathbb{P}_{\nu}(\tilde{\mathcal{E}}_{n,\delta}^{\mathbb{C}}) \leq \frac{K(K + 1)}{2}\delta$ .
Suppose that we have constructed a time  $T_{\varepsilon_1}(\delta) > K$  such that  $\tilde{\mathcal{E}}_{n,\delta} \subseteq \{\hat{\imath}_n \in \mathcal{I}_{\varepsilon_1}(\mu)\}$  for  $n > T_{\varepsilon_1}(\delta)$ . Then, using Lemma 48, we obtain
$$
\mathbb {P} _ {\nu} \left(\hat {\iota} _ {n} \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu)\right) \leq \frac {K (K + 1)}{2} \inf  \left\{\delta \mid n > T _ {\varepsilon_ {1}} (\delta) \right\}.
$$
We will construct an infinite number of times  $\{T_{\varepsilon_1}(\delta, \varepsilon)\}_{\varepsilon \in [0, \varepsilon_1]}$  such that the above property holds, hence taking the infimum yields
$$
\mathbb {P} _ {\nu} (\hat {i} _ {n} \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu)) \leq \frac {K (K + 1)}{2} \inf  \{\delta \mid n > \inf  _ {\varepsilon \in [ 0, \varepsilon_ {1} ]} T _ {\varepsilon_ {1}} (\delta , \varepsilon) \}.
$$
This proof strategy is the one used to prove Theorem 6.
Let  $\varepsilon \in [0,\varepsilon_1]$ . Since  $\hat{\iota}_n = B_n^{\mathrm{EB}}$ , our goal is to construct a time  $T_{\varepsilon_1}(\delta ,\varepsilon)$  such that
$$
\forall n > T _ {\varepsilon_ {1}} (\delta , \varepsilon), \quad \tilde {\mathcal {E}} _ {n, \delta} \cap \left\{B _ {n} ^ {\mathrm {E B}} \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu) \right\} = \emptyset .
$$
Error due to undersampled arms Let us denote by  $U_{\varepsilon, \varepsilon_1, t}(n, \delta)$  the set of undersampled arms which are not  $\varepsilon_1$ -good, i.e.
$$
U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) := \mathcal {I} _ {\varepsilon_ {1}} (\mu) ^ {\complement} \cap \left\{i \mid N _ {t, i} \leq 4 C _ {\varepsilon , i} \tilde {f} _ {2} (n, \delta) \right\} \quad \mathrm {w i t h} \quad C _ {\varepsilon , i} := \frac {2}{\min _ {k \in \mathcal {I} _ {\varepsilon} (\mu)} (\Delta_ {i} - \Delta_ {k}) ^ {2}}.
$$
Lemma 35 shows that, for  $n$  large enough, a necessary condition for an error to occur is to have an undersampled leader.
Lemma 35. Let  $\varepsilon_1 > 0$  and  $\varepsilon \in [0, \varepsilon_1]$ . Let  $H_{\mu, \varepsilon_0}(\varepsilon)$  as in Lemma 5 and define
$$
\tilde {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) := H _ {\mu , \varepsilon_ {0}} (\varepsilon) + \frac {2 \left| \mathcal {I} _ {\varepsilon} (\mu) \right|}{\min  _ {(i , j) \in \mathcal {I} _ {\varepsilon} (\mu) \times \mathcal {I} _ {\varepsilon_ {1}} (\mu)} \mathfrak {c} \left(\Delta_ {j} - \Delta_ {i}\right) ^ {2}}. \tag {19}
$$
Let us define
$$
S _ {\varepsilon , \varepsilon_ {1}, \varepsilon_ {0}, \mu} (\delta) = \sup  \left\{n \mid n \leq \frac {4 \tilde {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0})}{\min  \{\beta , 1 - \beta \}} \tilde {f} _ {2} (n, \delta) + (3 / 2 + 1 / \beta) K ^ {2} \right\}.
$$
For all  $n > S_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$ , under the event  $\tilde{\mathcal{E}}_{n,\delta}$ , we have  $B_n^{EB} \notin \mathcal{I}_{\varepsilon_1}(\mu)$  implies that  $B_n^{EB} \in U_{\varepsilon, \varepsilon_1, n}(n,\delta)$ .
Proof. Let  $|\mathcal{I}_{\varepsilon}(\mu)| = I_{\varepsilon}$  and  $g_{\varepsilon, \varepsilon_0}(n, \delta) = \frac{4H_{\mu, \varepsilon_0}(\varepsilon)}{\min\{\beta, 1 - \beta\}}\tilde{f}_2(n, \delta) + 3K(K - 1)/2$ . Using Lemma 5 and the pigeonhole principle, there exists  $i_0 \in \mathcal{I}_{\varepsilon}(\mu)$  such that
$$
\sum_ {j} T _ {n} \left(i _ {0}, j\right) \geq \left(n - 1 - g _ {\varepsilon , \varepsilon_ {0}} (n, \delta)\right) / I _ {\varepsilon}.
$$
$$
N _ {n, i _ {0}} \geq \beta \sum_ {j} T _ {n} (i _ {0}, j) - (K - 1) \geq \beta \left(n - 1 - g _ {\varepsilon , \varepsilon_ {0}} (n, \delta)\right) / I _ {\varepsilon} - (K - 1).
$$
Let  $S_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$  defined as in the statement of Lemma 35. Direct manipulations show that
$$
S _ {\varepsilon , \varepsilon_ {1}, \varepsilon_ {0}, \mu} (\delta) \geq \sup  \left\{n \mid n - 1 \leq g _ {\varepsilon , \varepsilon_ {0}} (n, \delta) + \frac {I _ {\varepsilon}}{\beta} \left(4 \tilde {f} _ {2} (n, \delta) \max  _ {i \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu)} C _ {\varepsilon , i} + K - 1\right) \right\}.
$$
Therefore, we have  $N_{n,i_0} > 4\tilde{f}_2(n,\delta)\max_{i\notin \mathcal{I}_{\varepsilon_1}(\mu)}C_{\varepsilon ,i}$  for all  $n > S_{\varepsilon ,\varepsilon_1,\varepsilon_0,\mu}(\delta)$ .
Let  $n > S_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$ . Suppose that  $B_n^{\mathrm{EB}} = i \notin \mathcal{I}_{\varepsilon_1}(\mu)$ . Using Lemma 31, under the event  $\tilde{\mathcal{E}}_{n,\delta}$ , we obtain that
$$
\min \{N _ {n, i}, N _ {n, i _ {0}} \} \leq \frac {8 \tilde {f} _ {1} (n , \delta)}{(\mu_ {i _ {0}} - \mu_ {i}) ^ {2}} \leq 4 C _ {\varepsilon , i} \tilde {f} _ {2} (n, \delta).
$$
Suppose towards contradiction that  $\min \{N_{n,i}, N_{n,i_0}\} = N_{n,i_0}$ , then we have  $N_{n,i_0} \leq 4C_{\varepsilon,i} \tilde{f}_2(n,\delta)$ . This is a direct contradiction with  $N_{n,i_0} > 4\tilde{f}_2(n,\delta) \max_{i \notin \mathcal{I}_{\varepsilon_1}(\mu)} C_{\varepsilon,i}$  since  $n > S_{\varepsilon,\varepsilon_1,\varepsilon_0,\mu}(\delta)$ . Therefore, we have shown that  $\min \{N_{n,i}, N_{n,i_0}\} = N_{n,i}$ , hence  $i \in U_{\varepsilon,\varepsilon_1,n}(n,\delta)$ . This concludes the proof.
No remaining undersampled arms Lemma 36 shows that, if there are still undersampled arms which are not  $\varepsilon_{1}$ -good, then either the leader or the challenger was not often selected as leader or challenger.
Lemma 36. Let  $\varepsilon_1 \geq 0$  and  $\varepsilon \in [0, \varepsilon_1]$ . Let  $\Delta_{\mu}(\varepsilon) = \min_{k \notin \mathcal{I}_{\varepsilon}(\mu)} \Delta_k$ ,  $C_{\mu, \varepsilon_0}(\varepsilon, \varepsilon_1) = 2 \max_{j \notin \mathcal{I}_{\varepsilon_1}(\mu)} \frac{\Delta_j / \varepsilon_0 + 1}{\min_{k \in \mathcal{I}_{\varepsilon}(\mu)} (\Delta_j - \Delta_k)} + \varepsilon_0^{-1}$  and  $C_{\mu, \varepsilon_0}(\varepsilon) = 2 / \Delta_\mu(\varepsilon) - \varepsilon_0^{-1}$ . Let  $A_{\varepsilon, \varepsilon_1, \varepsilon_0, i} = \max \{2 / \Delta_\mu(\varepsilon)^2, C_{\mu, \varepsilon_0}(\varepsilon, \varepsilon_1)^2\}$  for all  $i \in i^\star(\mu)$ ,  $A_{\varepsilon, \varepsilon_1, \varepsilon_0, i} = \max \{C_{\mu, \varepsilon_0}(\varepsilon)^2, C_{\mu, \varepsilon_0}(\varepsilon, \varepsilon_1)^2\}$  for all  $i \in (\mathcal{I}_\varepsilon(\mu) \setminus i^\star(\mu)) \cup ([K] \setminus \mathcal{I}_{\varepsilon_1}(\mu))$ , and otherwise  $A_{\varepsilon, \varepsilon_1, \varepsilon_0, i} = \max \{C_{\mu, \varepsilon_0}(\varepsilon)^2, C_{\mu, \varepsilon_0}(\varepsilon, \varepsilon_1)^2, 2 / \Delta_i^2\}$  for all  $i \in \mathcal{I}_{\varepsilon_1}(\mu) \setminus \mathcal{I}_\varepsilon(\mu)$ . For all  $n > K$ , under event  $\tilde{\mathcal{E}}_{n,\delta}$ , for all  $t \in [n] \setminus [K]$  such that  $U_{\varepsilon, \varepsilon_1, t}(n,\delta) \neq \emptyset$ , there exists  $i_t \in [K]$  such that
$$
T _ {t} (i _ {t}) \leq \frac {4 \tilde {f} _ {2} (n , \delta)}{\min  \left\{\beta , 1 - \beta \right\}} A _ {\varepsilon , \varepsilon_ {1}, \varepsilon_ {0}, i _ {t}} + 3 (K - 1) / 2 \quad a n d \quad T _ {t + 1} (i _ {t}) = T _ {t} (i _ {t}) + 1.
$$
Proof. We will be interested in three distinct cases since
$$
\begin{array}{l} \left\{U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) \neq \emptyset \right\} = \left\{U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) \cap \left\{B _ {t} ^ {\mathrm {E B}}, C _ {t} ^ {\mathrm {T C}} \right\} \neq \emptyset \right\} \\ \cup \left\{U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) \neq \emptyset , U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) \cap \left\{B _ {t} ^ {\mathrm {E B}}, C _ {t} ^ {\mathrm {T C}} \right\} = \emptyset , B _ {t} ^ {\mathrm {E B}} \notin \mathcal {I} _ {\varepsilon} (\mu) \right\} \\ \cup \left\{U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) \neq \emptyset , U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) \cap \left\{B _ {t} ^ {\mathrm {E B}}, C _ {t} ^ {\mathrm {T C}} \right\} = \emptyset , B _ {t} ^ {\mathrm {E B}} \in \mathcal {I} _ {\varepsilon} (\mu) \right\}, \\ \end{array}
$$
Case 1. Let  $t \in [n] \setminus [K]$  such that  $\{B_t^{\mathrm{EB}}, C_t^{\mathrm{TC}}\} \cap U_{\varepsilon, \varepsilon_1, t}(n, \delta) \neq \emptyset$ . Let  $k_t \in \{B_t^{\mathrm{EB}}, C_t^{\mathrm{TC}}\} \cap U_{\varepsilon, \varepsilon_1, t}(n, \delta)$ . For this  $k_t \notin \mathcal{I}_{\varepsilon_1}(\mu)$ , we have  $T_{t+1}(k_t) = T_t(k_t) + 1$  and, by combining Lemma 31 and  $N_{t,k_t} \leq 4C_{\varepsilon,k_t}\tilde{f}_2(n,\delta)$ , we obtain that
$$
T _ {t} (k _ {t}) \leq \frac {N _ {t , k _ {t}}}{\min \{\beta , 1 - \beta \}} + \frac {3 (K - 1)}{2} \leq \frac {4 \tilde {f} _ {2} (n , \delta)}{\min \{\beta , 1 - \beta \}} C _ {\varepsilon , k _ {t}} + 3 (K - 1) / 2.
$$
Case 2. Let  $t \in [n] \setminus [K]$  such that  $U_{\varepsilon, \varepsilon_1, t}(n, \delta) \neq \emptyset$ ,  $U_{\varepsilon, \varepsilon_1, t}(n, \delta) \cap \{B_t^{\mathrm{EB}}, C_t^{\mathrm{TC}}\} = \emptyset$  and  $B_t^{\mathrm{EB}} \notin \mathcal{I}_{\varepsilon}(\mu)$ . Let  $\Delta_{\mu}(\varepsilon)$  and  $C_{\mu, \varepsilon_0}(\varepsilon)$  defined as in the statement of Lemma 36. Let  $D_{\varepsilon_0, \varepsilon, i} = 2 / \Delta_{\mu}(\varepsilon)^2$  for all  $i \in i^{\star}(\mu)$ ,  $D_{\varepsilon_0, \varepsilon, i} = C_{\mu, \varepsilon_0}(\varepsilon)$  for all  $i \in \mathcal{I}_{\varepsilon}(\mu) \setminus i^{\star}(\mu)$ , otherwise  $D_{\varepsilon_0, \varepsilon, i} = \max \{C_{\mu, \varepsilon_0}(\varepsilon), 2 / \Delta_i^2\}$ . Using Lemma 32, there exists  $k_t \in [K]$  such that
$$
T _ {t} \left(k _ {t}\right) \leq \frac {4 \tilde {f} _ {2} (n , \delta)}{\operatorname* {m i n} \left\{\beta , 1 - \beta \right\}} D _ {\varepsilon , \varepsilon_ {0}, k _ {t}} + 3 (K - 1) / 2 \quad \text {a n d} \quad T _ {t + 1} \left(k _ {t}\right) = T _ {t} \left(k _ {t}\right) + 1.
$$
Case 3. Let  $t \in [n] \setminus [K]$  such that  $U_{\varepsilon, \varepsilon_1, t}(n, \delta) \neq \emptyset$ ,  $U_{\varepsilon, \varepsilon_1, t}(n, \delta) \cap \{B_t^{\mathrm{EB}}, C_t^{\mathrm{TC}}\} = \emptyset$  and  $B_t^{\mathrm{EB}} \in \mathcal{I}_{\varepsilon}(\mu)$ . Let  $j_0 \in U_{\varepsilon, \varepsilon_1, t}(n, \delta) \setminus \{B_t^{\mathrm{EB}}, C_t^{\mathrm{TC}}\}$ , which is possible since  $U_{\varepsilon, \varepsilon_1, t}(n, \delta) \cap \{B_t^{\mathrm{EB}}, C_t^{\mathrm{TC}}\} = \emptyset$  and  $U_{\varepsilon, \varepsilon_1, t}(n, \delta) \neq \emptyset$ . Let us denote by  $(B_t^{\mathrm{EB}}, C_t^{\mathrm{TC}}) = (i, j)$  with  $i \in \mathcal{I}_{\varepsilon}(\mu)$  and  $j \neq j_0$ . Using the TC challenger, under the event  $\mathcal{E}_{n, \delta}$ , we obtain
$$
\begin{array}{l} \frac {\mu_ {i} - \mu_ {j _ {0}} + \varepsilon_ {0}}{\sqrt {1 / N _ {t , i} + 1 / N _ {t , j _ {0}}}} + \sqrt {2 \tilde {f} _ {2} (n , \delta)} \geq \frac {\mu_ {t , i} - \mu_ {t , j _ {0}} + \varepsilon_ {0}}{\sqrt {1 / N _ {t , i} + 1 / N _ {t , j _ {0}}}} \geq \frac {\mu_ {t , i} - \mu_ {t , j} + \varepsilon_ {0}}{\sqrt {1 / N _ {t , i} + 1 / N _ {t , j}}} \\ \geq \varepsilon_ {0} \sqrt {\min \{N _ {t , i} , N _ {t , j} \} / 2}. \\ \end{array}
$$
Since  $\mu_{i} - \mu_{j_{0}} + \varepsilon_{0}\geq \varepsilon_{0} > 0$  , we have
$$
\begin{array}{l} \frac {\mu_ {i} - \mu_ {j _ {0}} + \varepsilon_ {0}}{\sqrt {1 / N _ {t , i} + 1 / N _ {t , j _ {0}}}} \leq \sqrt {N _ {t , j _ {0}}} (\mu_ {i} - \mu_ {j _ {0}} + \varepsilon_ {0}) + \sqrt {2 \tilde {f} _ {2} (n , \delta)} \\ \leq \left(2 \frac {\mu_ {i} - \mu_ {j _ {0}} + \varepsilon_ {0}}{\min _ {k \in \mathcal {I} _ {\varepsilon} (\mu)} (\mu_ {k} - \mu_ {j _ {0}})} + 1\right) \sqrt {2 \tilde {f} _ {2} (n , \delta)}. \\ \end{array}
$$
Using Lemma 31 to lower bound  $\min \{N_{t,i}, N_{t,j}\}$  and  $\mu_i - \mu_{j_0} \leq \Delta_{j_0}$  for all  $i \in \mathcal{I}_{\varepsilon}(\mu)$ , direct manipulation yields that
$$
\min \{T _ {t} (i), T _ {t} (j) \} \leq \frac {4 \tilde {f} _ {2} (n , \delta)}{\min \{\beta , 1 - \beta \}} C _ {\mu , \varepsilon_ {0}} (\varepsilon , \varepsilon_ {1}) ^ {2} + 3 (K - 1) / 2.
$$
where  $C_{\mu, \varepsilon_0}(\varepsilon, \varepsilon_1)$  is defined as in the statement of Lemma 36. It is direct to see that  $C_{\mu, \varepsilon_0}(\varepsilon, \varepsilon_1)^2 \geq \max \{1 / \varepsilon_0^2, \max_{i \notin \mathcal{I}_{\varepsilon_1}(\mu)} C_{\varepsilon, i}\}$  and  $C_{\varepsilon, i} \geq 2 / \Delta_i^2$  for all  $i \notin \mathcal{I}_{\varepsilon_1}(\mu)$ . The above shows that there exists  $k_t \in [K]$  such that
$$
T _ {t} (k _ {t}) \leq \frac {4 \tilde {f} _ {2} (n , \delta)}{\min  \left\{\beta , 1 - \beta \right\}} C _ {\mu , \varepsilon_ {0}} (\varepsilon , \varepsilon_ {1}) ^ {2} + 3 (K - 1) / 2 \quad \text {a n d} \quad T _ {t + 1} (k _ {t}) = T _ {t} (k _ {t}) + 1.
$$
Summary. Let us define  $(A_{\varepsilon, \varepsilon_1, \varepsilon_0, i})_{i \in [K]}$  as in the statement of Lemma 36. Under  $\tilde{\mathcal{E}}_{n,\delta}$ , we have show that, when  $U_{\varepsilon, \varepsilon_1, t}(n, \delta) \neq \emptyset$ , there exists  $i_t \in [K]$  such that
$$
T _ {t} (i _ {t}) \leq \frac {4 \tilde {f} _ {2} (n , \delta)}{\min  \left\{\beta , 1 - \beta \right\}} A _ {\varepsilon , \varepsilon_ {1}, \varepsilon_ {0}, i _ {t}} + 3 (K - 1) / 2 \quad \text {a n d} \quad T _ {t + 1} (i _ {t}) = T _ {t} (i _ {t}) + 1.
$$
Lemma 37 shows that, for  $n$  large enough, there is no undersampled arms which are not  $\varepsilon_1$ -good.
Lemma 37. Let  $\varepsilon_1\geq 0$  and  $\varepsilon \in [0,\varepsilon_{1}]$  .Let  $\Delta_{\mu}(\varepsilon),C_{\mu ,\varepsilon_0}(\varepsilon ,\varepsilon_1)$  and  $C_{\mu ,\varepsilon_0}(\varepsilon)$  as in Lemma 36 and
$$
\begin{array}{l} \bar {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) := | i ^ {\star} (\mu) | \max  \{\sqrt {2} \Delta_ {\mu} (\varepsilon) ^ {- 1}, C _ {\mu , \varepsilon_ {0}} (\varepsilon , \varepsilon_ {1}) \} ^ {2} \\ + \left| \left(\mathcal {I} _ {\varepsilon} (\mu) \backslash i ^ {\star} (\mu)\right) \cup ([ K ] \backslash \mathcal {I} _ {\varepsilon_ {1}} (\mu)) \right| \max  \left\{C _ {\mu , \varepsilon_ {0}} (\varepsilon), C _ {\mu , \varepsilon_ {0}} (\varepsilon , \varepsilon_ {1}) \right\} ^ {2} \\ + \sum_ {i \in \mathcal {I} _ {\varepsilon_ {1}} (\mu) \backslash \mathcal {I} _ {\varepsilon} (\mu)} \max  \left\{C _ {\mu , \varepsilon_ {0}} (\varepsilon), C _ {\mu , \varepsilon_ {0}} (\varepsilon , \varepsilon_ {1}), \sqrt {2} \Delta_ {i} ^ {- 1} \right\} ^ {2}. \tag {20} \\ \end{array}
$$
$$
T _ {\varepsilon , \varepsilon_ {1}, \varepsilon_ {0}, \mu} (\delta) = \sup  \left\{n \mid n \leq \frac {4 \bar {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0})}{\min  \{\beta , 1 - \beta \}} \tilde {f} _ {2} (n, \delta) + 3 K ^ {2} / 2 \right\}.
$$
For all  $n > T_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$ , under the event  $\tilde{\mathcal{E}}_{n,\delta}$ , we have  $U_{\varepsilon, \varepsilon_1, n}(n, \delta) = \emptyset$ .
Proof. For all  $n > K$ , under event  $\tilde{\mathcal{E}}_{n,\delta}$ , combining Lemma 4 and 36 for  $A_{t}(n,\delta) = \{U_{\varepsilon, \varepsilon_{1}, t}(n,\delta) \neq \emptyset\}$  and  $D_{i}(n,\delta) = \frac{4\tilde{f}_{2}(n,\delta)}{\min\{\beta, 1 - \beta\}} A_{\varepsilon, \varepsilon_{1}, \varepsilon_{0}, i} + 3(K - 1)/2$  yields that
$$
\sum_ {t = K + 1} ^ {n} \mathbb {1} \left(U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) \neq \emptyset\right) \leq \frac {4 \tilde {f} _ {2} (n , \delta)}{\min  \left\{\beta , 1 - \beta \right\}} \bar {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) + 3 K (K - 1) / 2.
$$
where we used that  $\sum_{i\in [K]}A_{\varepsilon ,\varepsilon_1,\varepsilon_0,i} = \bar{H}_{\varepsilon ,\varepsilon_1}(\mu ,\varepsilon_0)$  where  $\bar{H}_{\varepsilon ,\varepsilon_1}(\mu ,\varepsilon_0)$  is defined in (20).
For all  $i \notin \mathcal{I}_{\varepsilon_1}(\mu)$ , let us define
$$
t _ {i} (n, \delta) = \max  \left\{t \in [ n ] \backslash [ K ] \mid i \in U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) \right\}.
$$
By definition, for all  $i \notin \mathcal{I}_{\varepsilon_1}(\mu)$ , we have  $i \in U_{\varepsilon, \varepsilon_1, t}(n, \delta)$  for all  $t \in (K, t_i(n, \delta)]$  and  $i \notin U_{\varepsilon, \varepsilon_1, t}(n, \delta)$  for all  $t \in (t_i(n, \delta), n]$ . Therefore, for all  $t \in (K, \max_{i \notin \mathcal{I}_{\varepsilon_1}(\mu)} t_i(n, \delta)]$ , we have  $U_{\varepsilon, \varepsilon_1, t}(n, \delta) \neq \emptyset$  and  $U_{\varepsilon, \varepsilon_1, t}(n, \delta) = \emptyset$  for all  $t > \max_{i \notin \mathcal{I}_{\varepsilon_1}(\mu)} t_i(n, \delta)$ , hence
$$
\begin{array}{l} \max  _ {i \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu)} (t _ {i} (n, \delta) - K) = \sum_ {t = K + 1} ^ {n} \mathbb {1} \left(U _ {\varepsilon , \varepsilon_ {1}, t} (n, \delta) \neq \emptyset\right) \\ \leq \frac {4 \tilde {f} _ {2} (n , \delta)}{\operatorname* {m i n} \left\{\beta , 1 - \beta \right\}} \bar {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) + 3 K (K - 1) / 2. \\ \end{array}
$$
Let  $T_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$  defined as in the statement of Lemma 37. Direct manipulations show that
$$
T _ {\varepsilon , \varepsilon_ {1}, \varepsilon_ {0}, \mu} (\delta) \geq \sup  \left\{n \mid n - K \leq \frac {4 \tilde {f} _ {2} (n , \delta)}{\min  \left\{\beta , 1 - \beta \right\}} \bar {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) + 3 K (K - 1) / 2 \right\}.
$$
Let  $n > T_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$ . Then, we have
$$
n - K > \frac {4 \tilde {f} _ {2} (n , \delta)}{\min  \left\{\beta , 1 - \beta \right\}} \bar {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) + 3 K (K - 1) / 2 \geq \max  _ {i \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu)} \left(t _ {i} (n, \delta) - K\right),
$$
hence  $n > \max_{i\notin \mathcal{I}_{\varepsilon_1}(\mu)}t_i(n,\delta)$ . This concludes the proof that  $U_{\varepsilon ,\varepsilon_1,n}(n,\delta) = \emptyset$
Upper bound probability of error Let  $S_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$  and  $T_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$  as in Lemmas 35 and 37. For  $\beta = 1/2$ , direct manipulations show that  $\max \{S_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta), T_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)\} \leq E_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$  with
$$
E _ {\varepsilon , \varepsilon_ {1}, \varepsilon_ {0}, \mu} (\delta) := \sup  \left\{n \mid n \leq 8 \max  \{\bar {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}), \tilde {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) \} \tilde {f} _ {2} (n, \delta) + 5 K ^ {2} / 2 \right\}
$$
Combining Lemmas 35 and 37, for all  $n > E_{\varepsilon, \varepsilon_1, \varepsilon_0, \mu}(\delta)$ , we proved that
$$
\tilde {\mathcal {E}} _ {n, \delta} \cap \left\{\hat {i} _ {n} \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu) \right\} = \tilde {\mathcal {E}} _ {n, \delta} \cap \left\{B _ {n} ^ {\mathrm {E B}} \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu) \right\} \subseteq \tilde {\mathcal {E}} _ {n, \delta} \cap \left\{U _ {\varepsilon , \varepsilon_ {1}, n} (n, \delta) \neq \emptyset \right\} = \emptyset ,
$$
hence  $\{\hat{t}_n\notin \mathcal{I}_{\varepsilon_1}(\mu)\} \subseteq \tilde{\mathcal{E}}_{n,\delta}^{\mathbb{C}}$
Using Lemma 48,  $\mathbb{P}_{\nu}(\tilde{\mathcal{E}}_{n,\delta}^{\mathsf{C}}) \leq K(K + 1)\delta / 2$  and taking the infimum over  $\varepsilon \in [0, \varepsilon_1]$ , yields
$$
\mathbb {P} _ {\nu} (\hat {\iota} _ {n} \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu)) \leq \frac {K (K + 1)}{2} \inf  \{\delta \mid n > E _ {\varepsilon_ {1}, \varepsilon_ {0}, \mu} (\delta) \}.
$$
where we used Lemma 52 and  $\inf_{\varepsilon \in [0,\varepsilon_1]}E_{\varepsilon ,\varepsilon_1,\varepsilon_0,\mu}(\delta) = E_{\varepsilon_1,\varepsilon_0,\mu}(\delta)$  with
$$
E _ {\varepsilon_ {1}, \varepsilon_ {0}, \mu} (\delta) := \sup \left\{n \mid n \leq 8 \inf _ {\varepsilon \in [ 0, \varepsilon_ {1} ]} \max \{\bar {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}), \tilde {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) \} \tilde {f} _ {2} (n, \delta) + 5 K ^ {2} / 2 \right\}.
$$
Using Lemma 52, we obtain that
$$
\begin{array}{l} \mathbb {P} _ {\nu} \left(\hat {i} _ {n} \notin \mathcal {I} _ {\varepsilon_ {1}} (\mu)\right) \leq \mathbb {1} \left(\varepsilon_ {1} <   \Delta_ {C _ {\mu}}\right) \frac {K (K + 1)}{2} e ^ {2} (2 + \log n) ^ {2} \\ p \left(\frac {n - 5 K ^ {2} / 2}{8 \inf _ {\varepsilon \in [ 0 , \varepsilon_ {1} ]} \max \{\tilde {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) , \tilde {H} _ {\varepsilon , \varepsilon_ {1}} (\mu , \varepsilon_ {0}) \}}\right), \\ \end{array}
$$
where  $p(x) = x\exp (-x)$
More explicit complexity In order to obtain a more interpretable result, we notice that the dependence in  $(\varepsilon, \varepsilon_1)$  of  $\tilde{H}_{\varepsilon, \varepsilon_1}(\mu, \varepsilon_0)$  and  $\tilde{H}_{\varepsilon, \varepsilon_1}(\mu, \varepsilon_0)$  is only with respect to its position in the ordered means. In the following, we will replace the dependency in  $(\varepsilon, \varepsilon_1)$  by a dependency in such indices.
Let  $\mu \in \mathbb{R}^K$ . Let us denote by  $C_\mu \coloneqq |\{\mu_i \mid i \in [K]\}|$  the number of different arm means in  $\mu$ . For all  $i \in [C_\mu]$ , we denote the set of arms having mean gap  $\Delta_i$  by  $\mathcal{C}_\mu(i) \coloneqq \{k \in [K] \mid \mu_\star - \mu_k = \Delta_i\}$  where the gaps are sorted by increasing order
$$
0 = \Delta_ {1} <   \Delta_ {2} <   \dots <   \Delta_ {C _ {\mu}}.
$$
In particular, we have  $\mathcal{C}_{\mu}(1) = i^{\star}(\mu)$  and  $\Delta_{C_{\mu}} = \Delta_{\max}$ . Let us denote by