# Algorithm Based on Morphological Operators for Shortness Path Planning
## Appendix A Minimum Path Trajectory Step Demonstration  
This appendix demonstrates that Algorithm 1 and its generalized form, Algorithm 2, locate the minimum step-forward path trajectory. Previously, the following definitions were introduced. Consider a function \(\zeta:N\to\mathbb{N}\), where \(N\) represents a node, and the function returns the number of arcs that start in a given particular node, which is defined as  
\[\zeta(n)=|\{(n,a_{1}),\ldots\}| \tag{1}\]  
where \(|\cdot|\) is the cardinality of the set. Now, consider the function \(\zeta^{*}:G\to\mathbb{N}\) that is implemented as  
\[\zeta^{*}=\max\{\zeta(n)\text{ for all distinct }(n,e)\in G\} \tag{2}\]  
where \(G\) is a graph, \(n\) is a node, and \(e\) is an arc. The function becomes the maximum order connection of a given graph. Consider an isomorphic structural element \(\lambda\) of \(\zeta^{*}\) order, a graph \(G\), a \(x_{0}\subseteq G\) reference, and a destination \(D\subseteq G\). Now, let the demonstration be performed in the following two steps. * _Base case:_ Consider that \(D\) becomes reachable in one step forward by the dilation-induced lattice. Algorithm 2 reduces to the one-time application of the dilation operator. Let \(x_{1}\leftarrow\delta_{\lambda}(x_{0})\), and \(x_{1}\cap D\
eq\{\emptyset\}\); this is true. If the intersection is the empty set, \(D\) is not reachable in one step. Consequently, this is the minimum path step forward in the lattice. Considering that the solution might not be unique, one or more nodes in one step forward reach the destination. * _Generalized case:_ Consider the situation in which \(D\) becomes reachable in \(k\) step forward. Algorithm 2 reduces to the application of the dilation operator \(k\) times. Let \(x_{k}\gets\text{cover}_{k}^{\sim}(x_{0},\lambda)\), and \(x_{k}\cap D\
eq\{\emptyset\}\); this is true. Consider, by contradiction, that there is no optimal path. The algorithm reconstructs the path trajectory by the one-step-forward navigation of the natural order generated by the successive dilation operation. A better step trajectory must travel by another path that advances in the lattice, resulting in more than one step. Consequently, this becomes false because it does not follow the one-step-forward travel condition. Similarly, as in the base case, the path trajectory might not be unique; however, the steps to reach the destination are the minimum in all possible paths. The consequences of these demonstrations generate the two following cases as corollaries. 1. _Whenever \(G\) becomes a weighted graph._ In the case of a weighted graph, consider the same demonstration considering the weighted step forward as the coding of the weighted connection via the introduction of a function \(T:\mathbb{R}\to\mathbb{R}^{+}\), defined as follows: \[T(w)=w-\min(G_{w})\] (3) where \(\min(G_{w})\) denotes the minimum weight value of the connection of a node in the graph \(G\). This function translates the weighted values into a positive reference, maintaining the distance relations of the weights. Then, the cost step denotes the weighted magnitude for all steps forward in the lattice increments. All iterations now select the best weight choice under the function criterion \(C\) without affecting the number of steps performed. 2. _Whenever_\(\zeta(\lambda)<\zeta^{*}(G)\). The structural element represents an isomorphism with a connection order smaller than the maximum connection order of the graph. Then, for a given reference \(x_{0}\) as \(x_{1}^{*}\leftarrow\text{cover}_{k}^{\sim}(x_{0},\zeta^{*}(G))\), a successive \(x_{k}\leftarrow\text{cover}_{k}^{\sim}(x_{0},\zeta^{*}(G))\) is equivalent, i.e, \(x_{1}^{*}\cap x_{k}=x_{1}^{*}\) requires, in the worst case, \(\kappa=\big{\lfloor}\big{\lfloor}\frac{\lambda}{\zeta^{*}(G)}+0.5\big{\rfloor}\), where \(\big{\lfloor}\lfloor\cdot\rfloor\big{\rfloor}\) is the round operator.