## 3 Theoretical Analysis
### Integration of Polar Codes and Direct Network Coding in Relay-Assisted VLC Systems
\begin{split} P\Big{(}x_{A}^{i}+x_{B}^{i}=0\mid y_{R}^{i}\Big{)}& =\frac{P\big{(}x_{A}^{i}+x_{B}^{i}=0\big{)}P\big{(}y_{R}^{i}\mid x_{A}^{i}+x_{B }^{i}=0\big{)}}{P\big{(}y_{R}^{i}\big{)}}\\ &=\frac{1}{4\sqrt{2\pi}\sigma P\big{(}y_{R}^{i}\big{)}}\exp \left(-\frac{\big{(}y_{R}^{i}\big{)}^{2}}{2\sigma^{2}}\right),\\ P\Big{(}x_{A}^{i}+x_{B}^{i}=1\mid y_{R}^{i}\Big{)}& =\frac{P\big{(}x_{A}^{i}+x_{B}^{i}=1\big{)}P\big{(}y_{R}^{i}\mid x _{A}^{i}+x_{B}^{i}=1\big{)}}{P\big{(}y_{R}^{i}\big{)}}\\ &=\frac{1}{2\sqrt{2\pi}\sigma P\big{(}y_{R}^{i}\big{)}}\exp \left(-\frac{\big{(}y_{R}^{i}-h\big{)}^{2}}{2\sigma^{2}}\right),\\ P\Big{(}x_{A}^{i}+x_{B}^{i}=2\mid y_{R}^{i}\Big{)}& =\frac{P\big{(}x_{A}^{i}+x_{B}^{i}=2\big{)}P\big{(}y_{R}^{i}\mid x _{A}^{i}+x_{B}^{i}=2\big{)}}{P\big{(}y_{R}^{i}\big{)}}\\ &=\frac{1}{4\sqrt{2\pi}\sigma P\big{(}y_{R}^{i}\big{)}}\exp \left(-\frac{\big{(}y_{R}^{i}-2h\big{)}^{2}}{2\sigma^{2}}\right).\end{split}  \tag{26}\]  
The LLR of \(y_{R}\) can be further simplified as  
\[ \begin{split} L\Big{(}y_{R}^{i}\Big{)}&=\ln\frac{ P\big{(}x_{A}^{i}+x_{B}^{i}=0\mid y_{R}^{i}\big{)}+P\big{(}x_{A}^{i}+x_{B}^{i}=2 \mid y_{R}^{i}\big{)}}{P\big{(}x_{A}^{i}+x_{B}^{i}=1\mid y_{R}^{i}\big{)}}\\ &=\ln\frac{\exp\left(-\frac{\big{(}y_{R}^{i}\big{)}^{2}}{2\sigma ^{2}}\right)+\exp\left(-\frac{\big{(}y_{R}^{i}-2h\big{)}^{2}}{2\sigma^{2}} \right)}{2\exp\left(-\frac{\big{(}y_{R}^{i}-h\big{)}^{2}}{2\sigma^{2}}\right) }.\end{split}  \tag{29}\]  
Based on the computed results, the relay node performs a specific mapping operation to obtain \(u_{R}\). This \(u_{R}\) is then encoded using a polar encoder to produce \(c_{R}\). After modulation, the resulting signal \(x_{R}\) is transmitted to both A and B;  
(3). Nodes A and B receive and decode the signal sent by the relay individually. For node A, the received signal can be expressed as \(y_{A}=hx_{R}+n_{A}\), where \(n_{A}\) represents the noise introduced during transmission. The LLR for \(y_{A}\) is calculated as  
\[ \begin{split} L\Big{(}y_{A}^{i}\Big{)}&=\ln\frac{ P\big{(}c_{R}^{i}=0\mid y_{R}^{i}\big{)}}{P\big{(}c_{R}^{i}=1\mid y_{R}^{i} \big{)}}\\ &=\ln\frac{\exp\left(-\frac{\big{(}y_{A}^{i}\big{)}^{2}}{2\sigma ^{2}}\right)}{\exp\left(-\frac{\big{(}y_{A}^{i}-h\big{)}^{2}}{2\sigma^{2}} \right)}\\ &=\frac{\big{(}y_{A}^{i}-h\big{)}^{2}-\big{(}y_{A}^{i}\big{)}^{2} }{2\sigma^{2}},\end{split}  \tag{30}\]  
where \(y_{A}^{i}\in y_{A}\). The calculation method at node B is similar. \(\widetilde{u}_{R}\) can be decoded using the LLR of \(y_{A}\). Node A can recover the information from node B by XORing its original information with \(\widetilde{u}_{R}\), resulting in \(\widetilde{u}_{B}=\widetilde{u}_{R}\oplus u_{A}\). Similarly, node B can retrieve the information sent by node A, thereby completing the information exchange between the two nodes. Compared to the previous scheme, our approach requires just one decoding operation at the relay node, reducing computational complexity by almost 50%. Furthermore, with only one set of equipment needed for information exchange, device costs are also reduced by 50%.