## 3 The Method
### The Corresponding Discretised Model by Means of the Graph Theory  
After reviewing the continuous case, we now discuss how to translate the framework to the discrete setting of a graph. In contrast to the well-known numerical recalled earlier, it is proposed to apply the theory of weighted graphs applied to regularisation processing [13]. We introduce this section by recalling the main tools on graph theory. Let \(d\in\mathbb{N}\setminus\{0\}\). \(V=\{v_{1},\ldots,v_{d}\}\) designate a finite set of \(d\) vertices \(v_{i}\), \(i=1,\ldots,d\). Every vertex \(v\in V\) consists of a pixel for the image. The finite set \(V\) plays the same role as the domain \(\Omega\) of \(\mathbb{R}^{N}\) given previously in the general case  
Now, we designate by \(\mathcal{H}(V)\) the space of real-valued functions \(f\) defined on the vertices of a weighted graph \((V,E,\omega)\), i.e., each function \(f:V\to\mathbb{R}\) in \(\mathcal{H}(V)\) is assigned to be a real value \(f(u)\) to each vertex \(u\in V\). For a function \(f\in\mathcal{H}(V)\), the \(L^{p(x)}(V)\) norm of \(f\) is given by  
\[\|f\|_{p(u)}=\inf\Biggl{\{}\lambda>0;\ \sum\limits_{u\in V}\left|\frac{f(u)}{ \lambda}\right|^{p(u)}<+\infty\Biggr{\}}. \tag{25}\]  
The formulation in (25) must be understood as a discretised version of the definition in (9). Let us note that, for \(p(u)=p\) to be constant, \(\|f\|_{p(u)}\) simply becomes the classical \(L^{p}\)-norm. This means that  
\[\|f\|_{p}^{p}=\sum\limits_{u\in V}|f(u)|^{p}.\]  
The mapping \((f,g)\mapsto\langle f,g\rangle_{\mathcal{H}(V)}=\sum\limits_{u\in V}f(u)g(u)\) with \(f,g\in\mathcal{H}(V)\) is an inner product on \(\mathcal{H}(V)\). Moreover, the mapping  
\[f\mapsto\|f\|_{\mathcal{H}(V)}=\sqrt{\langle f.f\rangle_{\mathcal{H}(V)}}\]  
is a norm. The notation \(u\sim v\) always denotes two adjacent vertices. The local variation defined by  
\[|\
abla_{\omega}f(v)|=\sqrt{\sum\limits_{v\sim u}\omega(u,v)(f(v)-f(u))^{2}}\]  
is a semi-norm which measures the regularity of a function around a vertex of the graph. Translated from the usual notation applied to the classical differential operators in PDEs, the fundamental tools are the weighted partial differentials on graphs. For more detailed information on these operators, one is referred to [1; 13; 15]. Let \(G(V,E,\omega)\) be a weighted graph and \(f\in\mathcal{H}(V)\) be a function on the set of vertices \(V\) of \(G\). Then, one can define the weighted partial differentials of \(f\) at a \(u\in V\) vertex in the direction of a \(v\in V\) vertex as  
\[\partial_{\omega,i}f(u)=\sqrt{\omega(u,v_{i})}(f(v_{i})-f(u)),\ \forall i=1, \cdots,d.\]  
Based on this definition, one can straightforwardly introduce the weighted gradient operator on graphs \(\
abla_{\omega}:\mathcal{H}(V)\to\mathcal{H}(E)\), which is defined on a \(u\in V\) vertex, i.e.,  
\[\
abla_{\omega}f(u)=(\partial_{\omega,j}f(u))_{i=1,\ldots,d}^{T}=\left(\sqrt {\omega(u,v_{i})}(f(v_{i})-f(u))\right)_{i=1,\ldots,d}^{T},\forall u\in V.\]  
The weighted gradient at a \(u\in V\) vertex must be understood as a function of \(\mathcal{H}(V)\), and thus the \(L^{p(u)}(V)\) norm of this finite vector represents its local variation and is given as follows  
\[\sum\limits_{v\in V}\frac{1}{p(v)}\Biggl{(}\sum\limits_{b\sim u}\omega(u,v)(f (v)-f(u))^{2}\Biggr{)}^{\frac{p(v)}{2}}.\]  
We notice that the bounded domain \(\Omega\) presented previously is a subset of \(\mathbb{R}^{2}\). In the discretised formulation, the smoothing process is reduced to be an optimal problem as follows  
\[ \begin{array}{c}\underset{f\in\mathcal{H}(V)}{min}\\ \underset{f\in\mathcal{H}(V)}{min}\end{array} \Biggl{\{}\sum\limits_{v\in V} \frac{1}{p(v)}|\
abla_{w}f(v)|^{p(v)}+\frac{\lambda}{2}\sum\limits_{v\in V}|f( v)-f_{0}(v)|_{2}^{2}\Biggr{\}}. \tag{26}\]The use of this framework may be considered as a discrete analogue of the continuous regularisation on weighted graphs.