*3.1. Problem Formulation*

In this subsection, we describe the preimage problem in terms of a mapping between two linear vector spaces.

**Definition 11** (Preimage Problem)**.** *Let* (*<sup>X</sup>*, *w*) *be a closeness space with a closeness matrix W* ∈ R*l*×*<sup>L</sup> given by* ∀*t* ∈ *Y*, *x* ∈ *X* : *<sup>w</sup>*(*<sup>t</sup>*, *x*) = *<sup>W</sup>*(*<sup>t</sup>*, *<sup>x</sup>*)*, where Y is a non-empty subset of X and* 0 < *l* ≤ *L* < +<sup>∞</sup>*. Let A* = R*L, B* = range *W* ⊆ R*<sup>l</sup> and let an element b* ∈ *B be given. Let the direct mapping W* : *A* → *B be given by the closeness matrix W, i.e.,* ∀*v* ∈ *A*: *<sup>W</sup>*(*v*) = *Wv. Then the* preimage problem *is to find the set* {*v* ∈ *A* | *Wv* = *b*}*. This set is the* preimage *of b.*

Although the solution to the preimage problem is a set, we will call any of its elements a *solution to the preimage problem*. By choosing the element *b* ∈ *B*, we want to utilize the closeness on *X* to induce an equivalence relation on *A* to describe the similarity between vectors.

The closeness matrix *W* generally exists for any closeness (based on (1) and (2)) on a finite set. It can be also defined for the special case that originates in a certain fuzzy partition (based on (8) and (9)). Hence, the preimage problem described in Definition 11 is a general formulation of the problem. By solving the general one (described by the closeness matrix), we simultaneously solve the problem specified by F-transform.

Assume that we found an SVD (see [21] to recall this technique) of the closeness matrix *W* in the form of the product of three matrices *PSZ*, where *P* ∈ R*l*×*<sup>l</sup>* and *Z* ∈ R*L*×*<sup>L</sup>* are orthogonal (these matrices are not determined uniquely) and *S* ∈ R*l*×*<sup>L</sup>* is diagonal (∀*i*, *j*: *i* = *j* ⇒ *sij* = 0) with so-called singular values ∀*i* = 1, ... , *l* : *σi* = *sii* on its diagonal, s.t. *σ*1 ≥ *σ*2 ≥ ··· ≥ *σk* > *<sup>σ</sup>k*+<sup>1</sup> = ··· = *σl* = 0 where *k* = dim(range *W*) = rank *W* is the number of linearly independent rows of *W* (0 < *k* ≤ *l*). Any complex-valued matrix can be represented in an SVD form where the singular values are invariant under different choices of *P* and *Z*.

**Lemma 4.** *Let W* ∈ R*l*×*<sup>L</sup> be a closeness matrix and PSZ be its SVD as above, then*

$$\text{range}\,W = \text{range}\,PSZ^{\top} = \left\{ \sum\_{i=1}^{k} c\_i p\_i \, \middle| \, c\_i \in \mathbb{R} \right\},$$

*where pi is the i-th column of the matrix P.*

Lemma 4 states that range *W* is spanned by the left singular vectors (*pi*, *i* = 1, ... , *k*) corresponding to positive singular values of *W*.

**Proof of Lemma 4.** Let *y* ∈ range *W*, i.e.,

$$y = \sum\_{j=1}^{L} d\_j W\_j$$

where for *j* = 1, ... , *L*, *dj* ∈ R and *Wj* is the *j*-th column of *W*. For any *r* = 1, ... , *l*, we have

,

$$y\_r = \sum\_{j=1}^{L} d\_j w\_{rj} = \sum\_{j=1}^{L} d\_j (PSZ^\top)\_{rj} = \sum\_{j=1}^{L} d\_j \sum\_{i=1}^{k} p\_{ri} \sigma\_i z\_{ji} = \sum\_{i=1}^{k} p\_{ri} \sum\_{j=1}^{L} d\_j \sigma\_i z\_{ji} \dots$$

Let

$$\mathcal{S} = \left\{ \sum\_{i=1}^{k} c\_i p\_i \, \middle| \, c\_i \in \mathbb{R} \right\}.$$

If for each *r* = 1, . . . , *k*, we set

$$c\_i = \sum\_{j=1}^{L} d\_j \sigma\_i z\_{ji} \,\prime$$

this proves that *y* ∈ S because the value *ci* does not depend on *r*. Hence, range *W* ⊆ S. As both of these sets are *k*-dimensional subspaces of <sup>R</sup>*l*, they must coincide.

### *3.2. Problem Solution*

Firstly, we discuss conditions when the preimage problem has a solution and when this solution is unique.

As *Y* = ∅, the matrix *W* has a positive number of rows and, hence, a positive number of columns, so range *W* = ∅ and a vector *b* can be always selected. Following Definition 11, we were given a vector *b* ∈ *B*. This means that the solution always exists. The solution is always unique—it is the set of all vectors *v* ∈ *A* that are mapped on *b*.

Let us now discuss when the solution to the preimage problem is formed by a set with exactly one element. Following the well-known Fredholm alternative, if the homogeneous system *Wv*0 = 0 has a nontrivial solution *v*0 ∈ *A*, then the set has more than one element. If *Wv*0 = 0 has only the trivial solution *v*0 = 0, then there is only one vector *v* solving the problem. Details can be found in Section 3.2.3.

Secondly, we characterize the solution from three perspectives: the first one is a useful characterization (Lemmas 5 and 6), the latter two (Theorem 1 together with Corollary 1, and Lemma 9) describe what the solution looks like.

#### 3.2.1. Weighted Arithmetic Mean

**Definition 12** (Weighted Arithmetic Mean of a Vector)**.** *With respect to the real weights* (*wi*)*Li*=<sup>1</sup> *that satisfy* ∑*Li*=<sup>1</sup> *wi* = 0*, the* weighted arithmetic mean of a vector *<sup>v</sup>*1,..., *vL* ∈ R*<sup>L</sup> is a real number*

$$\frac{\sum\_{i=1}^{L} w\_i w\_i}{\sum\_{i=1}^{L} w\_i} \cdot$$

.

The equation of the preimage problem, *Wv* = *b*, is a set of linear equations *Wtv* = *bt* where *W<sup>t</sup>* is a row of the matrix *W* corresponding to the index *t* ∈ *Y*, and we solve

$$b\_t = \sum\_{i=1}^{L} v\_i w\_{ti} \quad \text{where } t \in \mathcal{Y}. \tag{16}$$

We have *l* = |*Y*| equations in the form (16) of *L* ≥ *l* variables *v*1, ... , *vL* ∈ R, from which stems the following lemma.

**Lemma 5.** *Any vector v* ∈ *A is a solution to the preimage problem Wv* = *b if and only if for every index t* ∈ *Y, its weighted arithmetic mean with respect to closeness-defining weights* (*wti*)*Li*=<sup>1</sup> *is equal to bt dtt, where bt is the t-th component of the vector b and dtt is the node degree given by* (11)*.* **Proof.** Dividing both sides of (16) by *dtt* = *L* ∑ *i*=1 *wti*, the claim is obvious.

Lemma 5 states that with respect to every row of *W*, the weighted arithmetic means of the solutions to the preimage problem are equal. By that, Lemma 5 characterizes the set of all solutions to the preimage problem *Wv* = *b* for a given vector *b* ∈ *B*. Hence, the similarity we are looking for is determined by the weighted mean of vectors. Moreover, it demarcates the solution as the equivalence class of vectors (discrete functions):

**Lemma 6.** *Let us have the equivalence relation on A given by: for all <sup>v</sup>*, *v* ∈ *A, we have*

$$\upsilon' \equiv \overline{\upsilon} \Leftrightarrow \forall t \in Y \colon \frac{\sum\_{i=1}^{L} \upsilon\_i' w\_{ti}}{\sum\_{i=1}^{L} w\_{ti}} = \frac{\sum\_{i=1}^{L} \overline{\upsilon}\_i w\_{ti}}{\sum\_{i=1}^{L} w\_{ti}} \cdot 1$$

*Let b* = *Wu for some u* ∈ *A (i.e., b* ∈ *B), then the solution to the preimage problem Wv* = *b is the set* {*v* ∈ *A* | *v* ≡ *<sup>u</sup>*}*.*

**Proof.** This lemma is a direct consequence of Lemma 5 where for any *v* ≡ *u*, we have

$$\forall t \in \mathcal{Y} \colon \frac{\sum\_{i=1}^{L} w\_i w\_{ti}}{\sum\_{i=1}^{L} w\_{ti}} = \frac{\sum\_{i=1}^{L} w\_i w\_{ti}}{\sum\_{i=1}^{L} w\_{ti}} = \frac{b\_t}{d\_{tt}} \; \mathcal{Y}$$

and because *u* is a solution to the preimage problem, any *v* ≡ *u* is a solution.

Conversely, consider a vector *v*<sup>∗</sup> ≡ *u*, s.t. *Wv*∗ = *b*. Then

$$\exists t^\* \in \mathcal{Y} \colon \frac{\sum\_{i=1}^L w\_i^\* w\_{ti}}{\sum\_{i=1}^L w\_{ti}} \neq \frac{\sum\_{i=1}^L u\_i w\_{ti}}{\sum\_{i=1}^L w\_{ti}} = \frac{b\_t}{d\_{tt}} \; \prime$$

which, based on (16), contradicts *Wv*∗ = *b*. This contradiction proves that the equivalence class contains exactly all solutions to the preimage problem.
