In this section, we delve into the analysis of the secondary network operation through an MRF formulation which can properly incorporate the inherent spatial dependencies of the examined system model. To improve the secondary network efficacy, the proposed cross-layer BPeMRF framework is introduced by explaining its components and analyzing its main properties.

### MRF formulation for secondary networks

Constrained by the underlying limitations posed by primary activity, SUs make adaptations and continuously take decisions which unavoidably influence neighboring SUs. In this manner, a knock-on effect is generated by which local decisions give rise to long-range adaptations and essentially can contribute to the overall secondary network performance. This behavior unveils spatial dependencies on SU operation along with a generalized Markov property that motivate our following MRF-centered analysis and formulation.

Based on the maximum transmission range of each SU *i*, {R}_{{T}_{i}}^{\left(\text{max}\right)}, which can be estimated by Equation (1), we define by the set of all possible directed secondary links, with cardinality *K*. Each link s=(i,j)\in \mathcal{K} is mapped to an MRF site *s* and represents a communication link with transmitter node *i* and receiver node *j*. MRFs describe a probabilistic measure in a family of spatially dependent random variables *X*_{
s
} which are associated with a finite number of MRF sites *s*∈*S*, where S\doteq \mathcal{K} in our case. Every random variable *X*_{
s
} takes values *x*_{
s
}, also referred to as states, from a finite space *Λ*, whereas the combination of states of all MRF sites describes a configuration *ω*=(*x*_{1},…,*x*_{
s
},…,*x*_{
n
})∈*Ω*={(*x*_{1},…,*x*_{
s
},…,*x*_{
n
}):*x*_{
s
}∈*Λ*,*s*∈*S*} that corresponds to one of all possible states of the whole system. In the same manner for our formulation, the state of a secondary link *s*=(*i*,*j*) is expressed by the 2-tuple 〈*m*,*a*_{
P
}〉_{
s
} with state space size equal to *M*×*L*. It represents the selected channel *m* and the real power (after power control) of the transmitter *i* as the percentage of the maximum permitted power *P*_{i,m}. Thus, for example, if site *s*=(*i*,*j*) has state 〈1,50*%*〉, it means that the corresponding link is active and node *i* transmits to node *j* at channel 1 (namely, at frequency carrier *f*_{1} and channel bandwidth *W*_{1}) with transmission power equal to 0.5×*P*_{i,1}.

The main property of MRFs is that the state of each site depends only on a local set of neighbors and is expressed by the following conditional probabilities (also called local characteristics),

\mathbb{P}\left({X}_{s}={x}_{s}\mid {X}_{r}={x}_{r},r\ne s\right)=\mathbb{P}\left({X}_{s}={x}_{s}\mid {X}_{r}={x}_{r},r\in {\mathcal{G}}_{s}\right)

(4)

where {\mathcal{G}}_{s} stands for the MRF neighborhood of each site *s* and satisfies the conditions: ∀*s*∈*S*, s\notin {\mathcal{G}}_{s} and r\in {\mathcal{G}}_{s} if and only if s\in {\mathcal{G}}_{r}. In our case, we define a neighborhood system \mathcal{G}={\left\{{\mathcal{G}}_{s}\right\}}_{s\in \mathcal{K}} such that two sites (secondary links) *s* and *s*^{′} are MRF neighbors if and only if their concurrent operation is possible to affect the network performance in terms of packet collisions. Thus, the MRF neighborhood of *s* is defined as:

{\mathcal{G}}_{s}=\left\{\begin{array}{c}{s}^{\prime}=\{{i}^{\prime},{j}^{\prime}\}:\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}{s}^{\prime}\ne s\phantom{\rule{2.77626pt}{0ex}}\text{and}\\ \begin{array}{c}\left(\begin{array}{c}i={i}^{\prime}\phantom{\rule{2.77626pt}{0ex}}\text{or}\phantom{\rule{2.77626pt}{0ex}}i={j}^{\prime}\phantom{\rule{2.77626pt}{0ex}}\text{or}\phantom{\rule{2.77626pt}{0ex}}{i}^{\prime}=j\phantom{\rule{2.77626pt}{0ex}}\text{or}\phantom{\rule{2.77626pt}{0ex}}j={j}^{\prime}\\ \text{or}\\ \underset{m\phantom{\rule{2.77626pt}{0ex}}:\phantom{\rule{2.77626pt}{0ex}}{P}_{i,\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{i,\phantom{\rule{0.3em}{0ex}}j}^{\left(m\right)}\ge {P}_{R}^{\mathit{\text{thr}}}}{min}\left(\frac{{P}_{i,\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{i,\phantom{\rule{0.3em}{0ex}}j}^{\left(m\right)}}{{P}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}j}^{\left(m\right)}}\right)<{C}_{p}^{\mathit{\text{thr}}}\\ \text{or}\\ \underset{m\phantom{\rule{2.77626pt}{0ex}}:\phantom{\rule{2.77626pt}{0ex}}{P}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}{j}^{\prime}}^{\left(m\right)}\ge {P}_{R}^{\mathit{\text{thr}}}}{min}\left(\frac{{P}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}{j}^{\prime}}^{\left(m\right)}}{{P}_{i,\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{i,\phantom{\rule{0.3em}{0ex}}{j}^{\prime}}^{\left(m\right)}}\right)<{C}_{p}^{\mathit{\text{thr}}}\end{array}\right)\end{array}\end{array}\right\}

(5)

Any random field with property (4) on a neighborhood system can be also represented as a Gibbs field of the form

\mathbb{P}\left(X=\omega \right)=\frac{1}{Z}{e}^{-\frac{U\left(\omega \right)}{T}}

(6)

with a suitable choice of energy function *U*(*ω*) that can be further decomposed into the contributions of smaller subsets of *S*, *V*_{
C
}(*ω*), also called potential functions. Z:=\sum _{\omega \in \Omega}{e}^{-\frac{U\left(\omega \right)}{T}} denotes the partition function and *T* a system parameter, also referred to as temperature. In this work, we leverage the class of pairwise, nearest-neighbor potentials and decompose the system energy into neighbor pair potentials, i.e., *V*_{
C
}=0 if *C* is not a clique or |*C*|>2, as follows:

U\left(\omega \right)=\sum _{s\in S}{V}_{\left\{s\right\}}^{\left(1\right)}\left({x}_{s}\right)+\sum _{\{s,\phantom{\rule{0.3em}{0ex}}{s}^{\prime}\}\in (S\times S),\phantom{\rule{0.3em}{0ex}}{s}^{\prime}\in {\mathcal{G}}_{s}}{V}_{\{s,{s}^{\prime}\}}^{\left(2\right)}({x}_{s},{x}_{{s}^{\prime}})

(7)

Aiming at uniquely specifying our MRF formulation, we design the corresponding singleton {V}_{\left\{s\right\}}^{\left(1\right)} and doubleton potentials {V}_{\{s,\phantom{\rule{0.3em}{0ex}}{s}^{\prime}\}}^{\left(2\right)} towards capturing via the energy function the different contributions of system configurations *ω* in the secondary network capacity, as well as the cost of potential packet collisions. Thus, the singleton potential for each link *s*=(*i*,*j*) with state {x}_{s}={\u3008m,{a}_{P}\u3009}_{s}=\left\{m,{a}_{P}^{\left(s\right)}\right\} is expressed by

{V}_{\left\{s\right\}}^{\left(1\right)}\left({x}_{s}\right)=\left\{\begin{array}{c}{\delta}_{1}>0,\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\text{if}\phantom{\rule{2.77626pt}{0ex}}0<{a}_{P}^{\left(s\right)}\xb7{P}_{i,m}\xb7{G}_{i,\phantom{\rule{0.3em}{0ex}}j}^{\left(m\right)}<{P}_{R}^{\mathit{\text{thr}}}\\ -{\lambda}_{1}\xb7\frac{{W}_{m}}{{C}_{\text{max}}}\xb7\underset{2}{log}\left(1+\frac{{a}_{P}^{\left(s\right)}\xb7{P}_{i,m}\xb7{G}_{i,\phantom{\rule{0.3em}{0ex}}j}^{\left(m\right)}}{{N}_{0}+{N}_{P}}\right),\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\text{otherwise}.\end{array}\right.

(8)

In the above formulation, each state of an MRF site (secondary link) contributes to the system energy according to the maximum possible link capacity that could offer, whereas *δ*_{1} represents a penalty for activating useless links, i.e., incapable of successfully delivering packets. *C*_{max} denotes the maximum link capacity in the secondary network and serves for normalization purposes. Similarly, the doubleton potential {V}_{\{s,\phantom{\rule{0.3em}{0ex}}{s}^{\prime}\}}^{\left(2\right)} is designed to capture the interaction between secondary communication links, e.g., link *s* with state {x}_{s}={\u3008m,{a}_{P}\u3009}_{s}=\{m,{a}_{P}^{\left(s\right)}\} and link *s*^{′} with {x}_{{s}^{\prime}}={\u3008m,{a}_{P}\u3009}_{{s}^{\prime}}=\left\{{m}^{\prime},{a}_{P}^{\left({s}^{\prime}\right)}\right\}, as follows

{V}_{\{s,\phantom{\rule{0.3em}{0ex}}{s}^{\prime}\}}^{\left(2\right)}\left({x}_{s},{x}_{{s}^{\prime}}\right)=\left\{\begin{array}{cc}{\lambda}_{2}\xb7{\delta}_{2}>0,& \phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\text{if \u2018collisionCondition\u2019}=1\\ 0,& \phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\text{otherwise}.\end{array}\right.

(9)

*δ*_{2} is a large positive constant value that penalizes collisions between two active secondary links by increasing the system energy. The ‘collisionCondition’ describes the possible scenarios/configurations between *s* and *s*^{′} that can lead to packet collision and is expressed by

\begin{array}{l}\left(\begin{array}{c}{a}_{P}^{\left(s\right)}\ne 0\phantom{\rule{0.3em}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\text{and}\phantom{\rule{2.77626pt}{0ex}}{a}_{P}^{\left({s}^{\prime}\right)}\ne 0\phantom{\rule{0.3em}{0ex}}\text{and}\\ \left(i={i}^{\prime}\phantom{\rule{2.77626pt}{0ex}}\text{or}\phantom{\rule{2.77626pt}{0ex}}i={j}^{\prime}\phantom{\rule{2.77626pt}{0ex}}\text{or}\phantom{\rule{2.77626pt}{0ex}}{i}^{\prime}=j\phantom{\rule{2.77626pt}{0ex}}\text{or}\phantom{\rule{2.77626pt}{0ex}}j={j}^{\prime}\right)\end{array}\right)\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\text{OR}\\ m={m}^{\prime}\phantom{\rule{2.77626pt}{0ex}}\text{and}\\ \left(\begin{array}{c}{P}_{R}^{\mathit{\text{thr}}}\le \left[{a}_{P}^{\left(s\right)}\xb7{P}_{i,\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{i,\phantom{\rule{0.3em}{0ex}}j}^{\left(m\right)}\right]<{C}_{p}^{\mathit{\text{thr}}}\xb7\left[{a}_{P}^{\left({s}^{\prime}\right)}\xb7{P}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}j}^{\left(m\right)}\right]\\ \text{or}\\ {P}_{R}^{\mathit{\text{thr}}}\le \left[{a}_{P}^{\left({s}^{\prime}\right)}\xb7{P}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{{i}^{\prime},\phantom{\rule{0.3em}{0ex}}{j}^{\prime}}^{\left(m\right)}\right]<{C}_{p}^{\mathit{\text{thr}}}\xb7\left[{a}_{P}^{\left(s\right)}\xb7{P}_{i,\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{i,\phantom{\rule{0.3em}{0ex}}{j}^{\prime}}^{\left(m\right)}\right]\end{array}\right)\end{array}

It is noted that *λ*_{1} and *λ*_{2} represent non-negative parameters to control the strength of potentials’ contributions.

The above MRF formulation of the secondary network facilitates the estimation of optimal solutions exploiting powerful MRF energy minimization techniques in an otherwise difficult to be solved problem. Given that the space of possible configurations can be very large, the MRF formulation can leverage algorithms for the computation of global optimum solutions relying on repeated computation of local characteristics (Equation 4). As a result, by finding configurations (i.e., specifying channel allocations and power control at each secondary link) with minimum MRF system energy, we are able to both maximize the offered capacity per link and provide to SUs an efficient scheduling scheme avoiding collisions and, hence, improve the overall secondary network performance.

In this work, we investigate optimal configurations with minimum MRF energy based on a stochastic relaxation methodology, namely Gibbs sampling [9]. The key idea behind Gibbs sampling is that following a visiting scheme, each currently visited MRF site, *s*, updates its own state according to the local conditional probability distribution

\begin{array}{c}\begin{array}{c}\mathbb{P}\left({X}_{s}={x}_{s}\mid {X}_{r}={x}_{r},r\ne s\right)=\frac{1}{{Z}_{s}}\xb7exp\left(-\frac{1}{T\left(\text{sweepID}\right)}\xb7\sum _{C:s\in C}{V}_{C}\left({\omega}^{{x}_{s}}\right)\right)\end{array}\end{array}

(10)

where {Z}_{s}=\sum _{{x}_{s}\in \Lambda}exp\left(-\frac{1}{T\left(\text{sweepID}\right)}\xb7\sum _{C:s\in C}{V}_{C}\left({\omega}^{{x}_{s}}\right)\right). *T*(sweepID) represents an annealing schedule with decreasing rate of temperature *T* for each sweep (indexed by sweepID) that denotes the time interval within which all sites have updated their states. {\omega}^{{x}_{s}} stands for the configuration which has value *x*_{
s
} at site *s* and agrees with *ω* everywhere else. It has been theoretically proven in [9] that by applying Gibbs sampling with a suitable logarithmic annealing, the system converges to minimum energy configurations.

### Potential function via back pressure

In this section, we delve into the design of the potential functions (section ‘MRF formulation for secondary networks’ section. Towards this direction, we adapt the main idea of the throughput optimal back pressure algorithm [10] which performs routing and link scheduling based on the congestion gradients (queue backlog differentials) computed on every communication link. Specifically, BP chooses for transmission at each time slot, a maximal independent set of links (non-interfering links) that achieves the maximum sum of queue backlog differentials multiplied with the corresponding link’s communication traffic. At each time slot *t*, after the computation of the communication traffic variables, {\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}^{c}\left(t\right),\phantom{\rule{1em}{0ex}}\forall \phantom{\rule{1em}{0ex}}s=(i,j),\phantom{\rule{1em}{0ex}}c (section ‘System model’), according to the chosen schedule, each SU *i* renews its queue for commodity *c* following the renewal relation:

{Q}_{i}^{c}(t+1)\le max\left\{\underset{i}{\overset{c}{Q}}\left(t\right)-\sum _{j}\underset{i,\phantom{\rule{0.3em}{0ex}}j}{\overset{c}{\mu}}\left(t\right),0\right\}+\sum _{j}\underset{j,\phantom{\rule{0.3em}{0ex}}i}{\overset{c}{\mu}}\left(t\right)+\underset{i}{\overset{c}{A}}\left(t\right).

(11)

Throughput optimality is tied with the strong stability of queues. A queue, {Q}_{i}^{c}, is strongly stable if {limsup}_{t->\infty}\frac{1}{t}\sum _{\tau =0}^{t-1}E\left({Q}_{i}^{c}\right(\tau \left)\right)<\infty [27]. If all the queues of the network are strongly stable, then the whole network is strongly stable. The capacity region, , of the network is defined as the set of source rates \{{\lambda}_{i}^{c},\forall \phantom{\rule{1em}{0ex}}i,c\}, for which there exists a control algorithm that can stabilize the network [20]. Any algorithm that can support every source rate inside while maintaining stability is called throughput optimal [20].

Aiming to leverage the throughput optimality of the BP algorithmic design, we modify the singleton and doubleton potential functions in Equations 8 and 9 by replacing the constant homogeneous parameters *λ*_{1}, *λ*_{2}, with the heterogeneous, time-varying queue backlogs defined on each corresponding site of the MRF graph. In this case, the following proposition holds.

#### Proposition 1.

Define the parameter *λ* _{1} in the MRF singleton potentials (Equation 8) separately for each site *s*=(*i*,*j*) and the parameter *λ* _{2} in the MRF doubleton potentials (Equation 9) separately for each pair of sites *s* = (*i*,*j*), *s* ^{′} =(*i* ^{′},*j* ^{′}), as {\lambda}_{1}=max\left\{\underset{c}{max}\left\{\underset{i}{\overset{\left(c\right)}{Q}}-\underset{j}{\overset{\left(c\right)}{Q}}\right\},0\right\} and {\lambda}_{2}=max\left\{\underset{c}{max}\left\{\underset{i}{\overset{\left(c\right)}{Q}}-\underset{j}{\overset{\left(c\right)}{Q}}\right\}\phantom{\rule{0.3em}{0ex}},\underset{c}{max}\left\{\underset{{i}^{\prime}}{\overset{\left(c\right)}{Q}}-\underset{{j}^{\prime}}{\overset{\left(c\right)}{Q}}\right\}\phantom{\rule{0.3em}{0ex}},1\right\}, while additionally {V}_{\left\{s\right\}}^{\left(1\right)}\left({x}_{s}\right)={\delta}_{1};\phantom{\rule{2.83795pt}{0ex}}\forall {x}_{s} if \underset{c}{max}\left\{{Q}_{i}^{\left(c\right)}-{Q}_{j}^{\left(c\right)}\right\}<0. Then, the proposed BPeMRF is throughput optimal, i.e., it stabilizes the queues, assuming that the arrival rates on the SUs lie inside the capacity region .

#### Proof.

The MRF energy minimization problem becomes

\underset{\omega \in \Omega}{min}\sum _{s\in S}\underset{\left\{s\right\}}{\overset{\left(1\right)}{V}}\left({x}_{s}\right)+\sum _{s\in S}\sum _{{s}^{\prime}\in {\mathcal{G}}_{s}}\underset{\{s,\phantom{\rule{0.3em}{0ex}}{s}^{\prime}\}}{\overset{\left(2\right)}{V}}\left({x}_{s},{x}_{{s}^{\prime}}\right)

Since *δ* _{1} and *δ* _{2} are large positive values, the corresponding configurations that activate such penalties cannot be part of the minimum energy solution. Note that *λ* _{2} is tuned by Proposition 1 such that it is always in the order of *λ* _{1} to avoid unbalance between the contributions of singleton and doubleton potentials. Let us denote with *Γ* the set of configurations adding cost equal to *δ* _{1} or *δ* _{2} in the total MRF energy based on Equations 8 and 9. Then, the search space of the optimal solution can be restricted by rewriting our initial minimization problem as

\begin{array}{l}\underset{\omega \in \Omega}{min}\sum _{\{i,\phantom{\rule{0.3em}{0ex}}j\}\in S}\left[-{\lambda}_{1}\xb7{W}_{m}\xb7\underset{2}{log}\left(1+\frac{\underset{P}{\overset{\left(s\right)}{a}}\xb7{P}_{i,\phantom{\rule{0.3em}{0ex}}m}\xb7\underset{i,\phantom{\rule{0.3em}{0ex}}j}{\overset{\left(m\right)}{G}}}{{N}_{0}+{N}_{P}}\right)\right]\phantom{\rule{2em}{0ex}}\\ \text{subject to}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\omega \notin \Gamma \phantom{\rule{2em}{0ex}}\end{array}

Since the constraints expressed by *Γ* guarantee interference avoidance between two active secondary links (based on capture threshold model), the experienced SNR of an active link *s* is equal to {\text{SNR}}_{s}=\frac{{a}_{P}^{\left(s\right)}\xb7{P}_{i,\phantom{\rule{0.3em}{0ex}}m}\xb7{G}_{i,\phantom{\rule{0.3em}{0ex}}j}^{\left(m\right)}}{{N}_{0}+{N}_{P}}. Since {\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}\left(t\right)=\frac{{W}_{m}}{\mathit{\text{Pk}}{t}_{s}}\xb7\underset{2}{log}\left(\right.1+{\text{SNR}}_{s}\left)\right. is the communication traffic over site *s*=(*i*,*j*) at *t* given the chosen channel *m* and the power level {a}_{P}^{\left(s\right)} (section ‘System model’) and by defining that *μ* _{i, j}(*t*)=0 for all {*i*,*j*} node pairs with distance greater than their maximum communication range \left(\text{i.e.},\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{0.3em}{0ex}}{d}_{i,\phantom{\rule{0.3em}{0ex}}j}>{R}_{{T}_{i}}^{\left(\text{max}\right)}\right), the minimization problem is rewritten as

\begin{array}{l}\underset{\omega \in \Omega}{min}\sum _{i}\sum _{j}\left[-{\lambda}_{1}\xb7{\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}\left(t\right)\right],\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\text{subject to}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\omega \notin \Gamma \end{array}

Following the assumption of the proposition, by tuning the parameter *λ* _{1} of each singleton as {\lambda}_{1}=max\left\{\underset{c}{max}\left\{\underset{i}{\overset{\left(c\right)}{Q}}-\underset{j}{\overset{\left(c\right)}{Q}}\right\},0\right\} for each site *s*=(*i*,*j*), the MRF minimization is transformed to the following maximization:

\begin{array}{l}\underset{\omega \in \Omega}{max}\sum _{i}\sum _{j}\left[{\mu}_{i,j}\left(t\right)\xb7max\left\{\underset{c}{max}\left\{\underset{i}{\overset{\left(c\right)}{Q}}\left(t\right)-\underset{j}{\overset{\left(c\right)}{Q}}\left(t\right)\right\},0\right\}\right]\phantom{\rule{2em}{0ex}}\\ \text{subject to}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}\omega \notin \Gamma \phantom{\rule{2em}{0ex}}\end{array}

The final equivalent maximization problem is identical to the back pressure routing/scheduling policy which is throughput optimal [10], thus concluding the proof.

It is important to mention that the proposed design of the potential functions allows for the routing component to be included in the BPeMRF cross-layer scheme, in an exactly similar way as in the BP algorithm, while also leading to throughput optimality regarding scheduling. More specifically, routing is introduced via the choice of the optimal commodity to be served by each site. Each link (site) *s*=(*i*,*j*) computes its queue backlog differential for all commodities, {R}_{\mathit{\text{ij}}}^{c}\left(t\right)={Q}_{i}^{c}\left(t\right)-{Q}_{j}^{c}\left(t\right),\forall \phantom{\rule{1em}{0ex}}c and the maximum one among all commodities {R}_{\mathit{\text{ij}}}\left(t\right)=max\left\{\underset{c}{max}\underset{\mathit{\text{ij}}}{\overset{c}{R}}\left(t\right),0\right\} is inserted in the parameters *λ*_{1},*λ*_{2} (Proposition 1) for the decisions regarding power and channel assignments to be made (scheduling is enclosed in the power control) via the MRF energy minimization. Finally, the commodity {c}^{\ast}(i,j)=\mathit{\text{arg}}\underset{c}{max}{R}_{\mathit{\text{ij}}}^{c}\left(t\right) will be chosen for service if the site *s*=(*i*,*j*) is scheduled to transmit (i.e., the optimization concludes to non-zero power assignment to node *i*). Therefore, {\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}^{c}\left(t\right)={\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}\left(t\right) if *c*=*c*^{∗}(*i*,*j*), else {\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}^{c}\left(t\right)=0.

On the other hand, our contribution is favorable for the back pressure algorithm itself and its practical implementation. This is due to the fact that the optimal realization of BP requires the solution of a MWM, the centralized implementation of which is NP-hard [19]. BPeMRF can be alternatively seen as the replacement of the MWM in the BP algorithm with the less complex Gibbs sampling technique which can be performed distributively on each node based on some globally provided information (spectrum database, section ‘System model’). This fact constitutes an important contribution of the BPeMRF scheme in the fields of CRNs and dynamic social networks where the dynamic network topology requires the repetitive NP-hard computation of the maximal independent sets of the underlying physical layer graph for the solution of the MWM. However, since the Gibbs sampler needs theoretically an infinite number of sweeps to converge, its finite application will provide an approximation of the optimal MWM solution.

Based on the previous observations, in the ‘Simulation results’ section, we compare the performance of the BPeMRF scheme (approximation of the MWM) with the back pressure routing and scheduling algorithm (optimal computation of the MWM). However, contrary to the BPeMRF scheme, BP in its canonical form does not perform channel selection. To tackle this issue and only for comparison reasons, we proceed with the redesign of the BP algorithm as follows.

Let us define a binary function *I*_{
s
}, where *I*_{
s
}(*m*,*t*)=1 if the site *s*=(*i*,*j*) uses the channel *m* at time slot *t*, else *I*_{
s
}(*m*,*t*) = 0. Also, \sum _{m}{I}_{s}(m,t)\phantom{\rule{0.3em}{0ex}}=\phantom{\rule{0.3em}{0ex}}1 (section ‘System model’). Let {\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}^{m}\left(t\right) be the maximum communication traffic of site *s* = (*i*,*j*) over channel *m* at time *t*. Then, scheduling is decided by solving the MWM: \underset{I}{max}\sum _{(i,\phantom{\rule{0.3em}{0ex}}j)}\left\{\sum _{m}{\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}^{m}\left(t\right){I}_{i,\phantom{\rule{0.3em}{0ex}}j}(m,t)\right\}{R}_{\mathit{\text{ij}}}\left(t\right), subject to interference constraints and \sum _{m}{I}_{s}(m,t)=1, *I*_{
s
}(*m*,*t*)∈{0,1}, ∀ *s*. In order to solve the MWM, we consider the graph of SUs where each link (*i*,*j*) is replaced by *M* links, each one corresponding to a channel *m*∈{1…*M*}, and denoted by (*i*,*j*,*m*). Then, we appropriately define the maximal independent sets (set *I* *D*(*t*)) over the interference constraints of the new graph, i.e., each site can use only one channel and half-duplex communication, and the constraints of the capture model (section ‘System model’) for the links transmitting at the same channel. Let us denote with {\mu}_{i,\phantom{\rule{0.3em}{0ex}}j,\phantom{\rule{0.3em}{0ex}}m}\left(t\right)={\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}^{m}\left(t\right) the communication traffic of link (*i*,*j*,*m*) and *R*_{
ijm
}(*t*)=*R*_{
ij
}(*t*),∀ *m*. Then according to the above, the initial MWM is equivalent to the MWM defined as \underset{\mu \in \mathbf{\text{ID}}\left(\mathbf{\text{t}}\right)}{max}\sum _{(i,\phantom{\rule{0.3em}{0ex}}j,\phantom{\rule{0.3em}{0ex}}m)}{\mu}_{i,\phantom{\rule{0.3em}{0ex}}j,\phantom{\rule{0.3em}{0ex}}m}{R}_{\mathit{\text{ijm}}}\left(t\right), and therefore the latter needs to be solved. Each site *s*=(*i*,*j*) for which *μ*_{i, j, m}(*t*)≠0 for a channel *m*, serves over channel *m*, the commodity *c*^{∗}(*i*,*j*) with rate {\mu}_{i,\phantom{\rule{0.3em}{0ex}}j}^{m}\left(t\right).