## Appendix B Sort II Error Analysis  
In the following, we address sort II errors, i.e., when \(\mathbf{Y}(i)\in\mathbb{T}_{\mathsf{K}}\) while the transmitter sent \(\mathbf{c}_{i}\) with \(i\
otin\mathsf{K}\). Then, for each possible \(({}^{M}_{\mathsf{K}})\) cases of \(\mathsf{K}\), where \(i\
otin\mathsf{K}\), the sort II error probability is given by  
\[ \begin{split} P_{\varepsilon,2}(i,\mathsf{K})&=\Pr \bigl{(}\mathbf{Y}(i)\in\mathbb{T}_{\mathsf{K}}\bigr{)}=\Pr\left(\mathbf{Y}(i )\in\bigcup_{j\in\mathsf{K}}\mathbb{T}_{j}\right)\overset{(a)}{=}\Pr\Big{(} \bigcup_{j\in\mathsf{K}}\left\{T(\mathbf{Y}(i),c_{j})\leq\left\lfloor n \delta_{\beta}\right\rfloor\right\}\Big{)}\\ &\overset{(b)}{=}\Pr\Big{(}\bigcup_{j\in\mathsf{K}}\left\{d_{ \mathrm{H}}(\mathbf{Y}(i),\mathbf{c}_{j})\leq\left\lfloor n\delta_{\beta} \right\rfloor\right\}\Big{)}\overset{(c)}{\leq}\sum_{j\in\mathsf{K}}\Pr \left(d_{\mathrm{H}}(\mathbf{Y}(i),\mathbf{c}_{j})\leq\left\lfloor n\delta_{ \beta}\right\rfloor\right)\\ &\leq K\cdot\Pr\left(d_{\mathrm{H}}(\mathbf{Y}(i),\mathbf{c}_{j}) \leq\left\lfloor n\delta_{\beta}\right\rfloor\right),\end{split}  \tag{15}\]where \((a)\) follows by (51), \((b)\) holds by (52) and \((c)\) follows by the _union bound_, i.e., the sum of each individual event's probability sets an upper constraint on the probability of the union of events. Let us define the following events  
\[\mathcal{F}_{\delta_{\beta}}(i) \triangleq\bigg{\{}\mathbf{Y}\in\mathbf{H}^{n}\text{ ; }d_{\text{H}}(\mathbf{Y}(i),\mathbf{c}_{i})\leq\Big{\lfloor}n\delta_{\beta} \Big{\rfloor}\bigg{\}}, \tag{16}\] \[\mathcal{F}_{\delta_{\beta}}(i,j) \triangleq\bigg{\{}\mathbf{Y}\in\mathbf{H}^{n}\text{ ; }d_{\text{H}}(\mathbf{Y}(i),\mathbf{c}_{j})\leq\Big{\lfloor}n\delta_{\beta} \Big{\rfloor}\bigg{\}}. \tag{17}\]  
Next, employing the _law of total probability_ with respect to the event \(\Big{\{}d_{\text{H}}(\mathbf{Y}(i),\mathbf{c}_{i})\leq\Big{\lfloor}n\delta_{ \beta}\Big{\rfloor}\Big{\}}\), we establish an upper bound on \(\Pr\Big{(}d_{\text{H}}(\mathbf{Y}(i),\mathbf{c}_{j})\leq\Big{\lfloor}n\delta _{\beta}\Big{\rfloor}\Big{)}\) given in (15) as follows:  
\[\Pr\Big{(}d_{\text{H}}(\mathbf{Y}(i),\mathbf{c}_{j})\leq\Big{\lfloor}n\delta_{ \beta}\Big{\rfloor}\Big{)} \overset{(a)}{=}\Pr\Big{(}\mathcal{F}_{\delta_{\beta}}(i,j) \cap\mathcal{F}_{\delta_{\beta}}(i)\Big{)}+\Pr\Big{(}\mathcal{F}_{\delta_{ \beta}}(i,j)\cap\mathcal{F}_{\delta_{\beta}}^{c}(i)\Big{)}\] \[\overset{(b)}{\leq}\Pr\Big{(}\mathcal{F}_{\delta_{\beta}}(i,j) \cap\mathcal{F}_{\delta_{\beta}}(i)\Big{)}+\Pr\Big{(}\mathcal{F}_{\delta_{ \beta}}^{c}(i)\Big{)} \tag{18}\] \[\overset{(c)}{=}\Pr\Big{(}\mathcal{F}_{\delta_{\beta}}(i,j)\cap \mathcal{F}_{\delta_{\beta}}(i)\Big{)}+\Pr\Big{(}d_{\text{H}}(\mathbf{Y}(i), \mathbf{c}_{i})>\Big{\lfloor}n\delta_{\beta}\Big{\rfloor}\Big{)}\] \[\overset{(d)}{\leq}\Pr\Big{(}\mathcal{F}_{\delta_{\beta}}(i,j) \cap\mathcal{F}_{\delta_{\beta}}(i)\Big{)}+\zeta_{1,\text{H}},\]  
where \((a)\) holds by the _law of total probability_, \((b)\) follows since \(\mathcal{F}_{i}^{c}(\delta_{\beta})\supset\mathcal{F}_{\delta_{\beta}}(i,j) \cap\mathcal{F}_{i}^{c}(\delta_{\beta})\), \((c)\) holds by (16), and \((d)\) exploits (12). Now, we focus on the event \(\mathcal{F}_{\delta_{\beta}}(i,j)\cap\mathcal{F}_{\delta_{\beta}}(i)\). Let  
\[d\triangleq d_{\text{H}}(\mathbf{c}_{i},\mathbf{c}_{j})\overset{(a)}{\geq} \big{\lfloor}n\beta\big{\rfloor}+1, \tag{19}\]  
where \((a)\) follows by the assumption made in the code construction regarding the minimum Hamming distance; see Lemma 1 and (42). Now, without loss of generality, we may assume that the two sequence \(\mathbf{c}_{i}\) and \(\mathbf{c}_{j}\) differ in the first \(d\) symbols, i.e.,  
\[\mathbf{c}_{i} =\Big{(}c_{i_{1}},c_{i_{2}},\dots,c_{i_{d}},c_{i_{d+1}},\dots,c_{ i_{n}}\Big{)} \tag{20}\] \[\mathbf{c}_{j} =\Big{(}c_{i_{1}},c_{i_{2}},\dots,c_{i_{d}},c_{i_{d+1}},\dots,c_{ i_{n}}\Big{)}\] \[\mathbf{y} =\big{(}y_{1},y_{2},\dots,y_{d},y_{d+1},\dots,y_{n}\big{)},\]  
where \(\mathbf{y}\) is the realization of vector \(\mathbf{Y}(i)\).