# Detection of Transmission State of Multiple Wireless Sources: A Statistical Mechanics Approach
## 4 Connection With Statistical Mechanics  
It is now worth providing a connection between the above model and the statistical mechanics of random systems. The so-called random-bond Ising model [40] is the simplest such model, in which \(N\) variables \(s_{i}\), with discrete possible values \(s_{i}=\pm 1\), represent local spins or magnetic dipoles located on a graph. Each spin is allowed to interact with its neighbors with a random interacting matrix. Such models have been used extensively in statistical mechanics to study the behavior of random systems. Given the difficulty of tackling the random nature of the interaction, sophisticated techniques have been developed, such as the replica approach. Despite their considerable success in describing the behavior of the system, these methods are not mathematically rigorous. Although widely believed to be exact, in some cases, they have recently been proven to be correct [41]. Nevertheless, they have also recently been used with great success in problems in wireless communications [42, 43], error-correcting codes [44], communication networks [45], inference in graphical models [46], compressed sensing [47], and machine learning [48]. Given the above, the resemblance of our model to statistical mechanical models becomes apparent (see Table 3). Indeed, instead of having spins taking values of \(s_{i}=\pm 1\), we have transmission variables, which determine the state of the source. Additionally, the interactions between the neighboring spins represent the channel gain entries, \(\mathrm{G}_{iv}\), which are non-zero for the SUs that lie inside the communication range of a source. Before describing in detail the message-passing algorithm in the next section, we define the optimization problem in (9) as an energy function  
\[\mathcal{E}=\sum_{i=1}^{N}\varepsilon_{i}\Big{(}s_{\mathcal{N}(i)}\Big{)}= \sum_{i=1}^{N}\left(y_{i}-\sum_{v\in\mathcal{N}(i)}\mathrm{G}_{iv}s_{v}\right) ^{2} \tag{29}\]  
where \(\varepsilon_{i}\) is the energy (cost) corresponding to the \(i\)-th SU. The detection problem that corresponds to (10) is shown in Figure 2. To this end, we proceed with the multi-source detection problem by setting it up as a problem in the context of a statistical mechanics system, where the system energy is \(\mathcal{E}\) and the inverse temperature is \(\beta\), serving as the \"soft maximum\" parameter. The total probability \(P(\mathbf{y})\), which is the sum over all state vectors \(\mathbf{s}\), is called \"partition function\" \(\mathcal{Z}\), and it is expressed as  
\[\mathcal{Z}(y)=\sum_{s_{y}}\exp[-\beta\mathcal{E}] \tag{30}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Probability** & **Statistical Mechanics** &
\begin{tabular}{c} **Statistical Mechanics** \\ **Terminology** \\ \end{tabular} \\ \hline \(-\ln(\mathbb{P}(y|s)\mathbb{P}(s))\) & \(\beta\mathcal{E}(s|y)\) & Energy Functional \\ \hline \(\mathbb{P}(y)=\sum\limits_{s}\mathbb{P}(y|s)\mathbb{P}(s)\) & \(\mathcal{Z}=\sum\limits_{s}\exp[-\beta\mathcal{E}(s|y)]\) & Partition Function \\ \hline \(\mathbb{P}(s|y)\) & \(\mathcal{Z}^{-1}\exp[-\beta\mathcal{E}(s|y)]\) & Gibbs Probability of State \(s\) \\ \hline \(\underset{s}{\operatorname{argmax}}\,\mathbb{P}(s|y)\) & \(\underset{s}{\operatorname{argmin}}\,\mathcal{E}(s|y)=\) & Ground State \\ \(\underset{s}{\operatorname{lim}}\,\underset{\beta\rightarrow\infty}{\operatorname {lim}}\,\underset{\beta\rightarrow\infty}{\operatorname{lim}}\,(\mathcal{Z})\) & \\ \hline \(-\ln\mathbb{P}(y)\) & \(\mathcal{F}=-\frac{1}{\beta}\ln(\mathcal{Z})\) & Gibbs Free Energy \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Analogies of probability theory with statistical mechanics and the respective terms used in this paper. The corresponding Helmholtz free energy per spin is  
\[\mathcal{F}_{N}=-\frac{1}{N\beta}\ln(\mathcal{Z}_{N}) \tag{31}\]  
Then, the above-mentioned optimization problem becomes equivalent to finding the state vector \(\mathbf{s}\) that minimizes the above energy functional.