## 3 Polar Codes for the Multi-Way Relaying System
### A Hard Threshold Technique at the Terminals  
In practice, it is not possible for a terminal to know whether a relay transmits. In ref. [12], a hard threshold method at the terminals is proposed to overcome this problem. A terminal will consider a relay as active if the magnitude of the received signal passes the threshold. This can be cast as a binary hypothesis testing problem on the received sample \(Y\) at the terminal:  
\[\begin{split} H_{1}:Y&\sim\mathcal{CN}(0,P_{i}+N_{0 }),\\ H_{0}:Y&\sim\mathcal{CN}(0,N_{0}).\end{split} \tag{46}\]  
The corresponding likelihood ratio test is as follows:  
\[\Lambda=\frac{p_{Y|H_{1}(y|H_{1})}}{p_{Y|H_{0}(y|H_{0})}}\underset{H_{0}}{ \overset{H_{1}}{\gtrless}}\mu \tag{47}\]  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Multiplication** & **Addition** & **Comparison** & **Table Look-Up** \\ \hline \hline Reverse permutation & - & - & - & N \\ \hline Channel LLRs & \(3N\) & \(2N\) & - & - \\ \hline (27) & \(N/2\text{log}_{2}N\) & - & \(3N/2\text{log}_{2}N\) & - \\ \hline (28) & - & \(N/2\text{log}_{2}N\) & \(N/2\text{log}_{2}N\) & - \\ \hline Bit decision & - & - & \(K\) & \(N\) \\ \hline Re-encoding & - & \(N/2\text{log}_{2}N\) & - & - \\ \hline \hline \end{tabular}
\end{table}
Table 5: Number of operations at each step of successive cancellation (SC) decoding for the multi-way relaying system.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Multiplication** & **Addition** & **Comparison** & **Table Look-Up** \\ \hline ML & \(2^{K+1}N\) & \(2^{K}(2N-1)\) & \(2^{K}\) & \(2^{K}\) \\ \hline SC & \(3N+N/2\text{log}_{2}N\) & \(N(2+\text{log}_{2}N)\) & \(2N\text{log}_{2}N+K\) & \(2N\) \\ \hline log-BP & \(N(3+d_{c}I_{max})\) & \(\begin{bmatrix}[L(2d_{c}d_{v}+17d_{c}-24)\\ +N(d_{c}-1)]I_{max}+2N\end{bmatrix}\) & \((2(3d_{c}-4)L+N)I_{max}\) & \((2(3d_{c}-4)+N)LI_{max}\) \\ \hline \hline \end{tabular}
\end{table}
Table 6: Number of operations for different decoding techniques in the multi-way relaying system.  
The probability of correct detection is denoted by \(P_{d}=\{\Lambda>\mu|H_{1}\}\), and the probability of a false alarm is denoted by \(P_{f}=\{\Lambda>\mu|H_{0}\}\). In [58], it is shown that the threshold \(\mu\) that maximizes \((P_{d}-P_{f})\) is \(\mu=1\). Ref. [12] shows that this test becomes the following when simplified:  
\[|Y|\mathop{\gtrless}\limits_{H_{0}}^{H_{1}}\sqrt{(N_{0}+\frac{N_{0}^{2}}{P_{ i}})\text{ln}(\frac{P_{i}}{N_{0}}+1)}\triangleq\zeta \tag{48}\]  
We consider a similar technique adapted for our MWRN with polar codes. In our system, if the received signal from a relay does not pass the threshold \(\zeta\), then the channel output most likely consists only of noise, indicating that the corresponding relay is silent. Hence, in this case, the signal at the terminal is interpreted as an erasure for decoding purposes, and the corresponding LLR \(L(y^{\prime}_{ij}[k])\) is taken as in (45). The receiver algorithm with the hard threshold for our system is presented in Figure 4.  
At each terminal, comparing the received signals from all the relays with the hard threshold requires a complexity of \(O(L)\). Hence, adding the threshold does not affect the decoding process complexity. Therefore, when employing the threshold method, the complexity is still \(O(N\text{log}N)\) for SC decoding and \(O(L_{max}N\text{log}N)\) for SCL decoding at each terminal.