# Algorithm Based on Morphological Operators for Shortness Path Planning
## 1 Introduction
A city's infrastructure requires several electronic, communication, storage, and data analysis resources. Various studies throughout history have adopted technological approaches to sense and monitor urban variables. These urban variables allow, through analysis, the selection of the best decision in an urban context regarding the different events involved. In this context, good communication balances the resources needed and the time response. This situation involves searching for the most reliable path to travel into the city to reach a destination. This task might refer to the transportation of people, traffic, electrical devices, or other goods from a source to a destination via a specific net. A city can be represented as a graph of interconnections. However, the computation of the best-planning path is considered a graph search or traveler's agent process and represents an NP-algorithm [33; 34; 35; 36]. On the other hand, in recent years, studies have considered the autonomy of electric vehicles, considering variables such as speed, charge, and distance, in the context of energy consumption and the possible carbon emissions associated with these technologies [37; 38]. Mathematical morphological operators induce, in a discrete space, an order criterion, which provides the basis for this work, proposing a generalized graph search framework based on morphological operators. The initial reference and the morphological operators induce a lattice such that it is possible locate possible path trajectories in the graph. The approach defines the morphological operators by starting from the minimum connected subgraph denoted for the infimum and by considering the supremum as the total space. The continuous covering of dilation in the graph space gives the order relation. Next, a bijective mapping is performed on the natural numbers from the covering order induced, which helps to locate the possible path trajectories. The weighted cost applies several morphological operators to generalize the morphological context and provide a general weighted approach to travel within the graph. This paper proposes a new framework to calculate the shortest path in a complex graph. The main contribution is the creation of a lattice that tracks the frequency of the mathematical operators used. This lattice provides a basis for the analysis of complex graphs and the development of algorithms using a theoretical discrete approach. The proposed morphological framework offers a novel way to navigate graphs and create schemes that can be used to solve problems. The proposal consists of two algorithms: (a) the first assumes that there is at least one solution (the entire space is connected), and (b) in the second, there is no guarantee of a solution (there are regions that are not connected). Finally, an experiment shows the capabilities of the algorithm. This experiment uses the framework to search for the most suitable path trajectories from the geographical image layer of a city in order to study the best trajectory planning. Finally, we discuss the use of the proposed framework as a general search framework based on morphological operators and compare it with another well-accepted approach. The content is organized into several sections. Section 2 explains the theoretical concepts of mathematical morphology and graph theory. Section 3 presents the experimental analysis and the results obtained from the experiments. Section 4 discusses the findings. Finally, Section 5 provides the conclusions, discusses the proposed framework's limitations, and outlines any future work that may be required.