# Development of the Algorithmic Basis of the FCAZ Method for Earthquake-Prone Area Recognition
## 3 Immersion of a Finite Set into a Domain of Euclidean Space under DMA Methods
### Ext and Int Algorithms  
Let us choose an orthonormal coordinate system \(xOy\) in \(\varSigma\) so that \(\varSigma=\mathbb{R}^{2}(x,y)\) and also a regular pixel cover \(\Pi\) of the plane \(\varSigma\), consistent with the \(xOy\) coordinates.  
The shell \(\text{Ext}(A)\) for \(A\) in \(B\) is obtained as the union of all pixels \(\pi\) from \(\Pi\) that intersect \(B\) and are close to \(A\):  
\[\text{Ext}(a)=\cup\{\pi\in\Pi:((\pi\cap B)\
eq\varnothing)\wedge(\pi\text{ close to }A)\}. \tag{7}\]  
Thus, it is necessary to determine the proximity \(\pi\) to \(A\). There are several ways to accomplish this in DMA, namely quantiles, fuzzy comparisons, and Kolmogorov averages. Let us present the last option.  
Let \(c(\pi)\) denote the center of the pixel \(\pi\), and define the distance \(\rho(A,\pi)\) from \(A\) to \(\pi\) as the Kolmogorov averaging \(M_{\
u}\) of the nontrivial distances between elements \(A\) and \(c(\pi)\) with a negative index \(\
u\):  
\[\rho(A,\pi)=M_{\
u}\{\rho(a,c(\pi)):a\in A\wedge\rho(a,c(\pi))\
eq 0\},\ \
u<0.\]  
The proximity threshold \(\rho(A|B)\) to \(A\) in \(B\) is also obtained using Kolmogorov averaging in the general case with another negative index \(\omega\):  
\[\rho(A|B)=M_{\omega}\{\rho(A,\pi):\pi\cap B\
eq\varnothing\},\ \omega<0.\]  
The shell \(\text{Ext}(A)\) is formed by all pixels close to \(A\) in \(B\):  
\[\text{Ext}(A)=\cup\{\pi:\rho(A,\pi)\leq\rho(A|B)\}.\]  
Figure 7: Comparison of the results of the algorithms. (**a**) Results of clustering with the k-means algorithm. (**b**) SDPS algorithm. (**c**) DBSCAN algorithm.  
Next, we turn to the Int. Let us fix any point \(b\) from \(B\) and, for any \(a\) from \(A\) other than \(b\), denote with \(\Theta_{b}(a)\) the angle in \([0,2\pi)\) corresponding to the direction of \(e_{b}(a)\) from \(b\) to \(a\):  
\[e_{b}(a)=\frac{b-a}{||b-a||}=(\cos\Theta_{b}(a),\sin\Theta_{b}(a)).\]  
Let us properly order the set of angles \(\Theta_{b}(A)=\{\Theta_{b}(a),a\in A\setminus b\}\) in \([0,2\pi)\):  
\[\Theta_{b}(A)\to\{\Theta_{1}<\Theta_{2}<\cdots<\Theta_{n}\},\ n=n(b,A)\]  
and assume \(\Theta_{n+1}=\Theta_{1}\).  
The extended set \(\Theta_{b}(A)=\{\Theta_{i}|_{1}^{n+1}\}\) is responsible for the environment of the point \(b\) by the set \(A\) and helps to express it formally. If, for the chosen environment threshold \(\Theta\in[0,\pi]\), all successive differences \(\Theta_{i+1}-\Theta_{i}\) are less than \(\Theta\ (i=1,\ldots,n)\), then the point \(b\) is considered to be environed by the set \(A\) (internal for \(A\)). Otherwise, the point \(b\) is considered external to \(A\):  
\[b\leftrightarrow\begin{array}{l}\text{internal}\\ \text{external}\end{array}\text{ for }A\text{, if }\max\{\Theta_{i+1}-\Theta_{i}|_{1}^{n}\} \overset{<}{\geq}\Theta. \tag{8}\]  
The connection (Equation (8)) with the locality threshold \(R\) makes the environing criterion more flexible by making it local, where \(b\) is locally internal (external) for \(A\) if \(b\) is internal (external) for the ball \(D_{A}(b,R)\) according to Equation (8).  
The shell \(\text{Int}(A)\) is formed by all pixels whose centers are internal to \(A\):  
\[\text{Int}(A)=\{\pi\in\Pi:c(\pi)\text{ locally internal }A\}.\]  
The shell \(H(A)\) for \(A\) in \(B\) with the ability to scan and connectivity conditions is obtained by the union of \(\text{Ext}(A)\) and \(\text{Int}(A)\):  
\[H(A)=(\text{Ext}+\text{Int})(A)=\text{Ext}(A)\cup\text{Int}(A).\]  
Its construction depends on four parameters: two negative indices \(\
u\), \(\omega\) for Ext, and the environing and locality thresholds \(\Theta\) and \(R\) for Int.  
Figure 8 shows the set A for which Figure 9 presents all the stages of constructing the shell H(A). The final result is shown in two ways: \(H(A)=\text{Ext}(A)\cup(\text{Int}(A)\setminus\text{Ext}(A))\) (Int against the background of Ext (Figure 9c)) and \(H(A)=\text{Int}(A)\cup(\text{Ext}(A)\setminus\text{Int}(A))\) (Ext against the background of Int (Figure 9d)).  
Figure 8: Initial array \(X\) for constructing the shell \(H(A)\).