###### Abstract  
This study examines the problem of minimizing the amount and distribution of time delays or latencies experienced by data as they travel from one point to another within a software-defined network (SDN). For this purpose, a model is proposed that seeks to represent the minimization of the distances between network switches in proportion to the total nodes in a network. The highlights of this study are the proposal of two mixed-integer quadratic models from a fractional initial version. The first is obtained by transforming (from the original fractional model) the objective function into equivalent constraints. The second one is obtained by splitting each term of the fraction with an additional variable. The two developed models have a relationship between switches and controllers with quadratic terms. For this reason, an algorithm is proposed that can solve these problems in a shorter CPU time than the proposed models. In the development of this research work, we used real benchmarks and randomly generated networks, which were to be solved by all the proposed models. In addition, a few additional random networks that are larger in size were considered to better evaluate the performance of the proposed algorithm. All these instances are evaluated for different density scenarios. More precisely, we impose a constraint on the number of controllers for each network. All tests were performed using our models and the computational power of the Gurobi solver to find the optimal solutions for most of the instances. To the best of our knowledge, this work represents a novel mathematical representation of the latency density management problem in an SDN to measure the efficiency of the network. A detailed analysis of the test results shows that the effectiveness of the proposed models is closely related to the size of the studied networks. Furthermore, it can be noticed that the performance of the second model compared to the first one presents better behavior in terms of CPU times, the optimal solutions obtained, and the reduced Mipgaps obtained using the solver. These findings provide a deep understanding of how the models operate and how the optimization dynamics contribute to improving the efficiency and performance of SDNs. l pacs: 25 July 2024 19 August 2024 25 September 2024 19 August 2024 25 July 202  
to address diverse circumstances. Within this environment, latency density is an important factor in ensuring the minimum latency levels required by specific users, allowing service operators to guarantee the viability of technologies such as telemedicine and autonomous driving. In the case of telemedicine, where communication between doctors and patients depends on the instantaneous transmission of critical medical data, a low latency density ensures that consultations are carried out smoothly and effectively, without delays that could compromise medical care [2]. On the other hand, in the field of autonomous driving, low latency density is critical for instantaneous communication between vehicles and centralized control systems. This enables autonomous vehicles to make fast and accurate decisions based on real-time data, improving road safety and transportation efficiency. In short, optimized latency density provides service operators with the confidence that advanced technologies such as telemedicine and autonomous driving can be deployed effectively and safely, meeting the demanding response time requirements for these critical applications [3]. The following is a summary of related work supporting these approaches. One known problem in software-defined networks is referred to as the controller placement problem. This problem involves figuring out the best locations for controllers to ensure the network runs smoothly, scales well, and stays reliable. The goal is to reduce delays between controllers and switches, balance the workload, and ensure that the network remains available even if some controllers fail. It also needs to consider costs and network policies.