Research Article | Open Access
Jiuyun Sun, Huanhe Dong, Yuan Kong, Yong Fang, "Solution to Shortest Path Problem Using a Connective Probe Machine", Mathematical Problems in Engineering, vol. 2019, Article ID 8709042, 8 pages, 2019. https://doi.org/10.1155/2019/8709042
Solution to Shortest Path Problem Using a Connective Probe Machine
With the continuous urban scale expansion, traffic networks have become extremely complex. Finding an optimal route in the shortest time has become a difficult and important issue in traffic engineering study. In this study, a novel computing model, namely, probe machine, is used to solve this problem. Similar to previous studies, urban transport networks can be abstracted into maps, in which points representing places of origin, destinations, and other buildings constitute the data library and edges representing the road make up the probe library. The true solution can be obtained after one probe operation on the computing platform. And by comparing the solving process with Dijkstra’s and Floyd’s algorithms, the computing efficiency of the probe machine is clearly superior, although all three methods can solve the shortest path problem and obtain the same solution.
Traffic engineering is the basic theory of the research and development of traffic engineering discipline. Its main purpose is to seek the transportation system planning, construction and management scheme with the largest travel efficiency, the least traffic accidents, the fastest traffic speed, the least transportation cost, and the lowest energy consumption. The rapid development of urban traffic and increase in the number of vehicles has made travelling more convenient for people in recent years. However, urban traffic is not smooth due to the numerous traffic network nodes and complex sections; some cities suffer from traffic congestion [1, 2]. Finding a suitable path for drivers is not only one of the solutions to promote the development of urban transportation [3–5], but also one of the main purposes in traffic engineering research. Therefore, we must address this issue by determining the shortest path. In traffic engineering, “shortest path” does not necessarily mean the shortest distance, but also the shortest time or the lowest cost.
The shortest path problem is a classical problem in graph theory, which has been applied in many fields . Finding the path with the shortest distance is the most basic application of the shortest path problem, which is also a very practical problem. The basic objective of the shortest path problem is to find the path, with the lowest weight, between two points where every edge in the graph has its own weight value. Many algorithms to solve the shortest path problem have been proposed in previous studies, such as Dijkstra’s algorithm , Bellman–Ford algorithm , and Floyd’s algorithm . The most classical algorithm for solving such a problem is Dijkstra’s algorithm. It can solve the shortest path problem from a given point to any point; however, it fails to solve the shortest path problem with a negative weight. Therefore, Floyd’s algorithm and other algorithms were proposed to solve the above problem.
In 2016, Xu proposed a new computing model, i.e., the probe machine . Probe machine is a completely parallel computing model that can simultaneously process multiple pairs of data. Parallel computing can speed up operations, expand the scale of processing problems, and facilitate the ability of algorithms to handle problems [11, 12]. Compared with turing machines, probe machines can solve NP-complete problems after a probe operation, such as the Hamiltonian cycle problem , vertex problem , travelling salesman problem , working operation problem , and so on. The probes of a probe machine can be divided into connective probes and transitive probes. A connective probe can connect data fibers from different data, while a transitive probe can transmit information between data fibers from different data. The probe machine is a form of bionic computing. It achieves complete parallelism by imitating the process of information transmission of neurons and reduces computation complexity. Bionic computing refers to the use of biological models to deal with practical problems, and it can often yield unexpected results in some fields [15, 16]. In recent studies, more computational models are used to solve all kinds of NP problems, such as SAT problem [17–21], vehicle routing problem [22–24], graph coloring problem [10, 25, 26], partner selection problem , and the other problems [28–33].
In this study, we first introduce a probe machine. Then, a shortest path problem, which is a problem of finding the path with the minimum distance, is solved by using Dijkstra’s algorithm, Floyd’s algorithm, and probe machine; the process using the three methods is then compared.
2. Probe Machine
The probe machine was first proposed by Professor Xu in 2016. It consists of nine parts including data library (), probe library (), data controller (), probe controller (), probe operation (), computing platform (), detector (), true solution storage (), and residue collector ().
The data placement mode of the data library is nonlinear. The data library is divided into n data pools . Data pool includes one type of data , and data comprises a body and data fibers, as shown in Figure 1.
There are two types of probes in a probe machine, namely, connective probe and transitive probe. A connective probe can connect different data fibers from different data, and a transitive probe can transfer information from the source fiber to a destination fiber. In this study, the connective probe is used to solve the shortest path problem. The set of all probes between two data pools constitutes the probe pool; the probe library is a set of all probe pools, as shown in Figure 2. The data controller and probe controller add the corresponding data and probes into the computing platform, respectively. After the probe operation, the resulting aggregation is detected by a detector. The resulting true solution is put into the true solution storage. The residue is put into the residue collection, which decomposes it into basic data and returns it to the data pool, as shown in Figure 2.
3. Solving the Shortest Path Problem
In this study, an example of a directed graph is considered, as shown in Figure 3. The points on the graph are represented by ; the distance from to is represented by . The shortest path from to is obtained. We will use Dijkstra’s algorithm, Floyd’s algorithm, and probe machine to solve the shortest path problem.
3.1. Solving the Shortest Path Problem Using Dijkstra’s Algorithm
P represents the distance from the starting point to point , and T refers to the previous point in the shortest path. represents the set of points that have p mark in step .(1), , , , , , () Because , , let , ; Similarly, , ; , . , so, let , .(2), let , ; , so, let , , .(3), let , ; , so, let , , .(4), let , ; , so, let , , .(5), let , , , , , , , , so, let , , .(6), let , ; , so, let , , .(7), , so, let , , .(8), let , , .
So, the shortest path from to is , as shown in Figure 4.
3.2. Solving the Shortest Path Problem Using Floyd’s Algorithm
According to the graph, the adjacency matrix of the graph is as follows: Step 1: taking as the intermediary point and updating the matrix, Step 2: taking as the intermediary point and updating the matrix, Step 3: taking as the intermediary point and updating the matrix, Step 4: taking as the intermediary point and updating the matrix, Step 5: taking as the intermediary point and updating the matrix, Step 6: taking as the intermediary point and updating the matrix, Step 7: taking as the intermediary point and updating the matrix,
Thus, the shortest path from to is .
3.3. Solving the Shortest Path Problem Using the Probe Machine
The probe machine solves the shortest path problem as follows.
3.3.1. Data Library Construction
is the data pool of , and is a set of two long paths centered around . The two long paths are denoted as , and are different from each other. At the same time, because this problem is a directed graph, each path has one data fiber. The data library is as follows:
The data fibers are as follows:
3.3.2. Probe Library Construction
In order to avoid arbitrary data aggregation, if there is a probe between data and , one of the following two conditions need to be met:
At the same time, without loss of generality, because this is a directed graph, the direction of the probe needs to be same as the direction of the edge. The probe library established is as follows:
3.3.3. Probe Operation
The data controller and probe controller are used to extract the corresponding amount of data and probes from the data library and probe library and add them to the computing platform. After the probe operation, all possible solutions to the problem are obtained. Through the detector, the optimal solution is output as follows:
4. Results and Discussion
Although all three methods can solve the shortest path problem and obtain the same solution, there are some obvious differences in the solving process and computing efficiency. Dijkstra’s algorithm is based on the breadth-first search algorithm, which calculates the shortest path from the starting point to all other points. The calculation step of Dijkstra’s algorithm is to expand from the starting point to the layer by layer. Floyd’s algorithm is based on dynamic programming algorithm to find the shortest path between any two points in the graph. The first step of Floyd’s algorithm is to find the adjacency matrix of the graph, and the second step is to update the adjacency matrix by taking each point as the intermediate point. And, the solution process of the probe machine is mainly divided into two steps: the first step is to build the data library and the probe library, and the second step is to get all possible solutions through the probe operation. It can be seen from the solution process that each step of Dijkstra’s algorithm and the Floyd algorithm is part of solving the shortest path problem, but the real solution process of the probe machine is only probe operation. The purpose of the remaining steps of the probe machine is to prepare for the probe operation or to screen the solution calculated by the probe operation. This phenomenon should be attributed to the way of storing data. When the Dijkstra algorithm and the Floyd algorithm are used, the linear data placement mode and the sequential data processing mode are taken, so the solution process needs to be performed step by step; however, in the probe machine, a nonlinear data storage method is adopted, so the probe machine can simultaneously process multiple pairs of data. In other words, the probe machine is a completely parallel computational model, which is the biggest difference between the probe machine and other computing models.
Moreover, Dijkstra’s and Floyd’s algorithms are only used to deal with problems in graph theory. The probe machine is a completely parallel computing model, which can also get the true solution after one probe operation when solving NP-complete problems. Although we only use the probe machine to deal with the shortest path problem in this paper, we can see the powerful computing power of the probe machine through the solving process.
In urban traffic planning, the shortest path problem is a very basic problem. In this study, a probe machine was used to solve this problem. It can solve complex traffic problems after a single probe operation, which improves the efficiency and shortens the time required for solving traffic planning problems. When dealing with actual traffic problems, the speed at which a probe machine solves them is much higher than the speed of other models. A probe machine has high computing power; however, it is still a new concept. It has several shortcomings and needs to be improved further to handle specific problems. For example, when dealing with complex traffic problems, complex data and probe libraries need to be constructed. The process of constructing these libraries cannot be completely replaced by a probe machine or computer. The more complex the problem to be solved is, the more difficult it becomes to construct data library and probe library. In the future, we will continue to study the probe machine and attempt to improve it.
The data used to support the findings of this study are included within the article.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
This work was supported by the National Natural Science Foundation of China (grant nos. 61602188 and 11975143), Shandong Provincial Natural Science Foundation (grant no. ZR2019QD018), and Scientific Research Foundation of Shandong University of Science and Technology for Recruited Talents (grant nos. 2017RCJJ068 and 2017RCJJ069).
- A. Lozano and G. Storchi, “Shortest viable path algorithm in multimodal networks,” Transportation Research Part A: Policy and Practice, vol. 35, no. 3, pp. 225–241, 2001.
- B. Bullnheimer, R. F. Hartl, and C. Strauss, “An improved ant system algorithm for the vehicle routing problem,” Annals of Operations Research, vol. 89, pp. 319–328, 1999.
- L. Feng, Z. Chenghu, and W. Qing, “An optimum vehicular path algorithm for traffic network based on hierarchical spatial reasoning,” Geo-spatial Information Science, vol. 3, no. 4, pp. 36–42, 2000.
- K. Zhou, S.-W. He, R. Song, and L.-Y. Cheng, “Multiobjective optimization method of public transit networks based on travel behavior,” Journal of Highway and Transportation Research and Development (English Edition), vol. 9, no. 4, pp. 71–77, 2015.
- L. Adacher, G. Oliva, and F. Pascucci, “Decentralized route guidance architectures with user preferences in urban transportation networks,” Procedia-Social and Behavioral Sciences, vol. 111, pp. 1054–1062, 2014.
- S. Pallottino, “Shortest-path methods: complexity, interrelations and new propositions,” Networks, vol. 14, no. 2, pp. 257–267, 1984.
- E. W. Dijkstra, “A note on two problems in connexion with graphs,” Numerische Mathematik, vol. 1, no. 1, pp. 269–271, 1959.
- R. Bellman, “On a routing problem,” Quarterly of Applied Mathematics, vol. 16, no. 1, pp. 87–90, 1958.
- R. W. Floyd, “Algorithm 97: shortest path,” Communications of the ACM, vol. 5, no. 6, p. 345, 1962.
- J. Xu, “Probe machine,” IEEE Transactions on Neural Networks and Learning Systems, vol. 27, no. 7, pp. 1405–1416, 2016.
- C.-Y. Han, F.-Y. Zheng, T.-D. Guo, and G.-P. He, “Parallel algorithms for large-scale linearly constrained minimization problem,” Acta Mathematicae Applicatae Sinica, English Series, vol. 30, no. 3, pp. 707–720, 2014.
- B. Y. Guo, H. H. Dong, and Y. Fang, “Lump solutions and interaction solutions for the dimensionally reduced nonlinear evolution equation,” Complexity, vol. 2019, Article ID 5765061, 9 pages, 2019.
- S. Sha and Y. Chen, “Probe model for solving travelling salesman problem,” Journal of Huaibei Normal University (Natural Science), vol. 37, pp. 36–39, 2016.
- J. Yang and Z. Yin, “The working operation problem based on probe machine model,” in Bio-Inspired Computing: Theories and Applications, pp. 47–53, Springer, Singapore, 2016.
- Y. Fang, H. Dong, Y. Hou, and Y. Kong, “Frobenius integrable decompositions of nonlinear evolution equations with modified term,” Applied Mathematics and Computation, vol. 226, pp. 435–440, 2014.
- Y. Lin, H. Dong, and Y. Fang, “N-soliton solutions for the NLS-like equation and perturbation theory based on the riemann-Hilbert problem,” Symmetry, vol. 11, no. 6, p. 826, 2019.
- T.-O. Ishdorj, A. Leporati, L. Pan, X. Zeng, and X. Zhang, “Deterministic solutions to QSAT and Q3SAT by spiking neural P systems with pre-computed resources,” Theoretical Computer Science, vol. 411, no. 25, pp. 2345–2358, 2010.
- B. Song, T. Song, and L. Pan, “Time-free solution to SAT problem by P systems with active membranes and standard cell division rules,” Natural Computing, vol. 14, no. 4, pp. 673–681, 2015.
- B. Song, M. J. Pérez-Jiménez, and L. Pan, “An efficient time-free solution to SAT problem by P systems with proteins on membranes,” Journal of Computer and System Sciences, vol. 82, no. 6, pp. 1090–1099, 2016.
- Y. Kong and Y. Fang, “On behavior of the correction equations in Jacobi-Davidson method,” Mathematical Problems in Engineering, vol. 2019, Article ID 5169362, 4 pages, 2019.
- B. Song and Y. Kong, “Solution to PSPACE-complete problem using P systems with active membranes with time-freeness,” Mathematical Problems in Engineering, vol. 2019, Article ID 5793234, 8 pages, 2019.
- W. Y. Szeto, Y. Wu, and S. C. Ho, “An artificial bee colony algorithm for the capacitated vehicle routing problem,” European Journal of Operational Research, vol. 215, no. 1, pp. 126–135, 2011.
- T. Vidal, T. G. Crainic, M. Gendreau, N. Lahrichi, and W. Rei, “A hybrid genetic algorithm for multidepot and periodic vehicle routing problems,” Operations Research, vol. 60, no. 3, pp. 611–624, 2012.
- K. Dorling, J. Heinrichs, G. G. Messier, and S. Magierowski, “Vehicle routing problems for drone delivery,” IEEE Transactions on Systems, Man, and Cybernetics: Systems, vol. 47, no. 1, pp. 70–85, 2017.
- Z. Shao and A. Vesel, “Modeling the packing coloring problem of graphs,” Applied Mathematical Modelling, vol. 39, no. 13, pp. 3588–3595, 2015.
- L. A. Levin and R. Venkatesan, “An average case NP-complete graph colouring problem,” Combinatorics, Probability and Computing, vol. 27, no. 5, pp. 808–828, 2018.
- J.-Y. Chen, D. M.-H. Chiang, and R.-S. Guo, “Partner selection model for design chain collaboration,” International Journal of Production Research, vol. 51, no. 4, pp. 1131–1145, 2013.
- D. Bienstock and G. Mun͂oz, “LP formulations for polynomial optimization problems,” SIAM Journal on Optimization, vol. 28, no. 2, pp. 1121–1150, 2018.
- T. Song, S. Pang, S. Hao, A. Rodríguez-Patón, and P. Zheng, “A parallel image skeletonizing method using spiking neural P systems with weights,” Neural Processing Letters, vol. 50, no. 2, pp. 1485–1502, 2018.
- T. Song, X. Zeng, P. Zheng, M. Jiang, and A. Rodriguez-Paton, “A parallel workflow pattern modeling using spiking neural P systems with colored spikes,” IEEE Transactions on NanoBioscience, vol. 17, no. 4, pp. 474–484, 2018.
- T. Song, X. Wang, X. Li, and P. Zheng, “A programming triangular DNA origami for doxorubicin loading and delivering to target ovarian cancer cells,” Oncotarget, 2018.
- G. K. Wu, Y. Q. Liang, and S. H. Xu, “Numerical computational modeling of random rough sea surface based on JONSWAP spectrum and Donelan directional function,” Concurrency and Computation: Practice and Experience, p. e5514, 2019.
- D. Ghosh, A. Singh, K. K. Shukla, and K. Manchanda, “Extended Karush-Kuhn-Tucker condition for constrained interval optimization problems and its application in support vector machines,” Information Sciences, vol. 504, pp. 276–292, 2019.
Copyright © 2019 Jiuyun Sun et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.