# Algorithm Based on Morphological Operators for Shortness Path Planning
## 2 Morphological Search Framework
### Prior Definitions  
Any lattice \(L\) resulting from the graph space \(G\) represents an order relation with an initial reference subgraph \(x_{0}\subseteq G\), and the set of subsequent step-forward sorted subgraphs that need to cover the graph space \(G\) following a set of finite steps denotes the order \(\leq_{G}\). The subgraph \(x_{0}\) covers the entire space in the intermediate steps and is defined by the homomorphic structure defined in \(\lambda\). Any intermediate step \(i\) provides a subgraph \(x_{i}\) that denotes how the consecutive finite states cover the space \(G\). Initially, two subgraphs are considered as \(x_{0},x^{*}\in L\) such that \(x_{0}\subseteq x^{*}\subseteq G\). Here, \(x_{0}\) and \(x^{*}\) are defined as the start and goal nodes in \(G\), respectively. The subgraph \(x^{*}\) can be approximated starting from \(x_{0}\) by applying successive dilation operators, even if \(x^{*}\) does not belong to the order relation. This approximation is obtained via the definition of the covering dilation operator as follows:  
\[\text{cover}_{\lambda}(x_{0},x^{*})\leftarrow\delta_{\lambda}^{k}\cdot\ldots \cdot\delta_{\lambda}^{1}x_{0} \tag{3}\]  
such that \(k\) represents the number of times that the dilation operator \(\delta_{\lambda}\) is composed successively, and \(\cdot\) denotes the compositional operator. The \(k\)-th dilation represents the first step forward until the condition \((\delta_{\lambda}^{k}\cdot\ldots\cdot\delta_{\lambda}^{1}x_{0})\cap x^{*}=x^{*}\) holds. The successive dilation subgraphs \(x_{0},x_{1},\ldots\) to reach the condition represent a step-forward path to \(x^{*}\). For all particular nodes involved in reaching \(x^{*}\), the number of times that each node becomes dilated as a result of \(\text{cover}_{\lambda}(x_{0},x^{*})\) is denoted as a set of nodes as \(|\text{cover}_{\lambda}(x_{0},x^{*})|\). The function becomes \(|\cdot|:2^{G}\rightarrow\{G\times f\}\) such that, for all nodes \(n_{j}\in x_{i}\), the cumulative frequency \(f_{j}\) for a particular node is expressed as a \((n_{j},f_{j})\) tuple. Each \(f_{j}\) counter is computed for all nodes in a given graph. \[f_{j}=\sum_{l=1}^{k}b(n_{j},\delta_{\lambda}^{l}\cdot\ldots\cdot\delta_{ \lambda}^{1}x_{0}) \tag{4}\]  
where \(b\) is a function defined as follows  
\[b(n_{j},\delta_{\lambda}^{j}\cdot\ldots\cdot\delta_{\lambda}^{1}x_{0})= \begin{cases} +1&\text{if }n_{j}\in\delta_{\lambda}^{j}\cdot\ldots\cdot\delta_{\lambda}^{1}x_{0}\\ 0&\text{Other case}\end{cases}  \tag{5}\]  
where \(n_{j}\) is a node. By notation, the expression \(|\text{cover}_{\lambda}(x_{0},x^{*})_{n_{j}}|\) refers to the particular frequency \(f_{j}\) for the node \(n_{j}\). Figure 2 depicts the graph's node dilation frequency during the coverage process. The graph starts from an initial reference \(x_{0}\) (black node) and a destination \(x^{*}\) (double-circle node). The dilated nodes are shown in gray and the available nodes in white. Under successive dilations, the number of times that a node becomes dilated increases. The reference becomes the node with the maximum frequency, and the boundaries represent the lowest frequencies. The morphological coverage by dilation applies successive dilations until the destination is reached; the frequency counter has a zero or greater value. For weighted graphs, the definition extends as a three-tuple \(G=(N,E,\omega)\), adding the \(\omega\in\mathbb{R}\) parameter. The formalism remains similar, with the addition of a weighted covering dilation operator, which is denoted by \(||\text{cover}_{\lambda}(x_{0},x^{*})_{n_{j}}||\), and the \(\omega_{j}\) weight is defined as follows:  
\[\omega_{j}=\sum_{l=1}^{k}b_{\omega}(n_{j},\delta_{\lambda}^{l}\cdot\ldots\cdot \delta_{\lambda}^{1}x_{0}) \tag{6}\]  
where \(b_{\omega}\) is a function defined as follows:\[b_{\omega_{j}}(n_{j},\delta^{l}_{\lambda}\cdot\ldots\cdot\delta^{1}_{\lambda}x_{0})= \begin{cases}\omega&\text{if }n_{j}\in\delta^{l}_{\lambda}\cdot\ldots\cdot\delta^{1}_{\lambda}x_{0}\\ 0&\text{Other case}\end{cases}