## 2 System Model and Complexity Analysis
### A Linear Block Coding Framework for Multi-Way Relaying  
Consider a wireless system with \(K\) user terminals denoted by \(T_{1},T_{2},\ldots,T_{K}\) and \(L\) relays denoted by \(R_{1},R_{2},\ldots R_{L}\) as in ref. [12]. The transmission protocol of the system is based on time division multiple access, and it is presented in Table 2. Each node in the system operates in half-duplex mode and consumes one phase to transmit one symbol in one transmission time slot. Each relay is associated with a relevant group of user terminals whose information symbols are used to form the symbol forwarded by the relay. The relays utilize the selective DetF protocol, which means that a relay will forward the combined signal from its relevant group of terminals only if it correctly detects all the signals received from the terminals in its relevant group. Otherwise, the relay will remain silent. The set of all nodes is denoted by \(\mathcal{S}=\{T_{1},T_{2},\ldots,T_{K},R_{1},R_{2},\ldots,R_{L}\}\). When \(1\leq i\leq K\), the \(i\)th node of \(\mathcal{S}\) is \(T_{i}\). When \(K+1\leq i\leq K+L\), the \(i\)th node of \(\mathcal{S}\) is \(R_{i-K}\). One transmission time slot is composed of \(N=K+L\) phases. The relation between the transmission time slots and phases is presented in Figure 1. During the first \(K\) phases in a time slot, each terminal \(T_{i}\) broadcasts its own information symbol to all \(L\) relays \(R_{1},R_{2},\ldots R_{L}\) and \(K-1\) terminals \(T_{1},\ldots T_{i-1},T_{i+1}\ldots,T_{K}\). During the subsequent \(L\) phases, every relay utilizes the selective DetF protocol to transmit a combined signal from its relevant group to the other \(K-1\) terminals. Hence, complete exchange of one information symbol from all terminals including relay forwardings is achieved during a single time slot. All nodes employ DBPSK; hence, channel state information (CSI) is not required for decoding. The information symbol vector is denoted by \(\mathbf{m}=(m_{1},m_{2},\ldots,m_{K+L})\), where \(m_{i}\in\{0,1\}\) is the information symbol transmitted by node \(i\). The BPSK symbol at node \(i\) at time slot \(k\) is denoted by \(a_{i}[k]\), which can be represented as follows:  
\[a_{i}[k]=1-2m_{i}[k],k\in\mathbb{Z} \tag{1}\] \begin{table}
\begin{tabular}{l l l} \hline \hline
**Symbol** & **Definition** \\ \hline \(\mathbf{G}_{N}\) & Encoding matrix of a length \(N\) polar code \\ \hline \(\mathbf{F}\) & Basic submatrix of a polar code encoding matrix \\ \hline \(\mathbf{G}_{A}\) & Submatrix of \(\mathbf{G}_{N}\) that contains all the rows with indices in \(\mathcal{A}\) \\ \hline \(L_{N}^{(i)}(\cdot,\cdot)\) & Log likelihood ratio (LLR) for bit channel \(i\) \\ \hline \(\mathrm{PM}_{i}^{(i)}\) & Path metric of the \(l\)-th candidate at bit \(i\) \\ \hline \(\mathbf{G}_{A}p\) & Resulting matrix from permuting the columns of \(\mathbf{G}_{A}\) \\ \hline \(\mathbf{G}_{AA}\) & Submatrix of \(\mathbf{G}_{A}p\) of elements \(G_{i,j}\) of \(\mathbf{G}_{N}\) with \(i\in\mathcal{A},j\in\mathcal{A}\) \\ \hline \(\mathcal{CN}(\cdot,\cdot)\) & Complex normal (Gaussian) distribution \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **Transmitter** & **Receiver** \\ \hline Phase 1 & \(T_{1}\) & \(T_{2},\ldots,T_{K},R_{1},R_{2},\ldots,R_{L}\) \\ \hline Phase 2 & \(T_{2}\) & \(T_{1},T_{3},\ldots,T_{K},R_{1},R_{2},\ldots,R_{L}\) \\ \hline... &... &... \\ \hline Phase \(K\) & \(T_{K}\) & \(T_{1},\ldots,T_{K-1},R_{1},R_{2},\ldots,R_{L}\)Hence, \(a_{i}[k]\in\{1,-1\}\). After differential encoding, the corresponding DBPSK symbol is as follows:  
\[b_{i}[k]=a_{i}[k]b_{i}[k-1] \tag{2}\]  
In this paper, we denote the channel coefficient from node \(i\) to node \(j\) by \(f_{ij}\). Furthermore, we assume that all channels are reciprocal quasi-static [48] and hence \(f_{ij}=f_{ji}\) following the Rayleigh model. This represents slow rate fading, where the channels remain constant over a time slot. However, they change independently between different time slots.