# Development of the Algorithmic Basis of the FCAZ Method for Earthquake-Prone Area Recognition
## 2 Materials and Methods: SDPS Algorithm
### First Stage  
Set the level \(\alpha\) of the density \(S\), let \(X^{0}(\alpha)=X\), and define the sequence of sets \(X^{i+1}(\alpha)=\{x\in X^{i}(\alpha):S_{X^{i}(\alpha)}(x)\geq\alpha\},i=0,1,\dots\). This does not increase \(X^{i}(\alpha)\supseteq X^{i+1}(\alpha)\), and therefore, due to the finite nature of \(X\), it will necessarily stabilize from some moment \(i^{*}\):  
\[X=X^{0}(\alpha)\supset X^{i}(\alpha)\supset\dots\supset X^{i^{*}}(\alpha)=X^ {i^{*}+1}(\alpha)=\dots\leftrightarrow X(\alpha). \tag{2}\]  
By replacing in the equality \(X^{i^{*}+1}(\alpha)=\{x\in X^{i*}(\alpha):P_{X^{i*}(\alpha)}(x)\geq\alpha\}\) the sets \(X^{i*}(\alpha)\) and \(X^{i*}+1(\alpha)\) on \(X(\alpha)\), we obtain the equality  
\[X(\alpha)=\{x\in X(\alpha):P_{X(\alpha)}(x)\geq\alpha\},\]  
which indicates the \(\alpha\) density of the set \(X(\alpha)\) in the space \(X\) even at its points. Such a set in \(X\) is called \(\alpha\) discretely perfect:  
**Definition 1**.: _A subset \(A\) in \(X\) is a discretely perfect if_  
\[A=\{x\in X:S_{A}(x)\geq\alpha\}. \tag{3}\]  
Figure 1: The concept of density relative to a set. Four points (\(a\), \(b\), \(c\), and \(d\)) are selected in the initial array \(X\). The density \(S\) in them relative to the subset \(A\) (red dots) is equal to the number of points from \(A\) that fall into the balls indicated in the figure. Point \(c\) will be densest with respect to \(A\), followed by points \(b\), \(d\), and \(a\).  
The first stage (SDPS\({}_{1}\)) of the SDPS algorithm is to build \(X(\alpha)\) (i.e., transition from the entire set \(X\) to a subset \(X(\alpha)\): \(\text{SDPS}_{1}:X\to X(\alpha)\)). The result (\(X(\alpha)\)) of the first stage of the SDPS algorithm will also be referred to as \(\text{SDPS}(X)\) or \(\text{SDPS}(\alpha,r,p)(X)\). The cutting process (Equation (2)) is shown in Figure 2, from which, in particular, it can be seen that the first stage of SDPS is a topological filtering of the space \(X\) (i.e., clearing it of noise).  
The examples below illustrate the general nature of the dependence of the SDPS algorithm on the parameters at the first stage: the smaller the radius \(r\), and the larger the parameters \(p\) and \(\alpha\), the more rigorous the SDPS was, and the denser and smaller its resulting \(\text{SDPS}_{1}(X)\) was:  
**Example 1**.: _The initial array \(X\) (Figure 3a) shows the inverse nature of the dependence of the SDPS algorithm on the density level \(\alpha\). By raising it, we went inside the condensations, finding dense nuclei already in them (Figure 3b,c)_  
Figure 3: The inverse character of the dependence of the first stage of SDPS on the density level, where (**a**) is the initial array \(X\) and (**b,c**) have sets shown in red, yellow, and green for \(\text{SDPS}(\alpha,r,p)(X)\) and \(\text{SDPS}(\alpha,r,p)(X)\) for \(\alpha<\alpha\).  
Figure 2: Application of the SDPS algorithm to the array \(X\) (**a**). Four iterations are shown in (**b–e**). The result is a local \(\alpha\)-perfect subset of \(X(\alpha)\) in \(X\) (**e**). The green points in figures (**b–d**) show the points that did not pass the next iteration in SDPS. SDPS further split \(X(\alpha)\) into connected components (yellow and black subsets (**f**)).  
**Example 2**.: _Under the conditions of Example 1, the direct nature of the dependence of the SDPS algorithm on the vision radius \(r\) is shown. By lowering it by passing from \(r\) to \(\bar{r}<r\), we made the SDPS algorithm more local with the aim of finding smaller condensations (Figure 4). All small condensations in Figure 4b are shown in black._  
**Example 3**.: _In the conditions in Example 1, the inverse nature of the dependence of the SDPS algorithm on the parameter \(p\) was shown. By increasing it by going from \(p\) to \(\bar{p}>p\), we made the SDPS algorithm more rigorous (Figure 5)._