Widest Path in Networks with Gains/Losses
Abstract
:1. Introduction
- for SP problems.
- for MRP problems.
- for WPP.
2. Preliminaries
3. Problem Formulation
- -
- , representing the flow entering arc .
- -
- , a binary variable that determines whether or not arc carries a positive flow ( if it does, otherwise).
- The variables and represent the flow leaving the source node and the flow entering the sink node , respectively.
- Constraints (1b) and (1d) correspond to the balanced flow constraint and the bound constraints commonly found in maximum flow problems [4].
- Constraint (1c) ensures that, at most, one outgoing arc from any node is capable of sending flow. This constraint guarantees that flow is sent only along a single -path.
- The formulation (1) of the GWPP closely resembles that of generalized maximum flow problems, with the added inclusion of zero-one variables and the constraint (1c) [4].
4. Algorithms for the Case of Losses on Arcs
Algorithm 1 (Alg1) |
Input: An instance of the generalized WPP Output: An optimal path if Set and else: Set and while True: Find a shortest path with respect to if The optimal path is else: Find the last arc of to be saturated. Remove . Add an artificial arc |
- -
- Constraint (1c): For each node , there exists, at most, one outgoing arc with positive flow. This condition ensures that the flow is sent only along a single -path.
- -
- Capacity Constraint: For each arc , the flow through the arc must not exceed its capacity. Mathematically, this can be written as , where represents the flow on arc and represents the capacity of arc (.
- -
- Flow Conservation: The flow conservation principle must be satisfied at every node (except the source and sink nodes). For any node and , the sum of incoming flows must equal the sum of outgoing flows. Mathematically, this can be expressed as .
- -
- Optimality Condition: For each node , the label represents the maximum flow sent from the source node to node . Therefore, we have where represents the flow on arc and represents the flow on arc .
Algorithm 2 (Alg. 2) |
Input: An instance of the generalized WPP Output: An optimal path Set Set Set while : Let be a node for which ; for each : if : Update Update; |
- Algorithm 2 iterations:
5. Gain/Loss Case of the GWPP
Algorithm 3 (Alg. 3) |
Input: An instance of the GWPP with gain/loss factors Output: An optimal path Set Set , while Q has elements: for : if : Update Set if : ; Restore the optimal path by the indices. |
- Algorithm 3 iterations:
No. itr. | Selected Edge | Structure | Structure Data |
0—init. | - | Q | [1] |
S | [true,false,false,false,false,false,false,false] | ||
d | [inf, 0, 0, 0, 0, 0, 0, 0] | ||
Pred. | [−1, −1, −1, −1, −1, −1, −1, −1] | ||
1 | (1,2) | Q | [2] |
S | [false,true,false,false,false,false,false,false] | ||
d | [inf, 6.02, 0, 0, 0, 0, 0, 0] | ||
Pred. | [−1, 1, −1, −1, −1, −1, −1, −1] | ||
2 | (1,3) | Q | [2, 3] |
S | [false,true,true,false,false,false,false,false] | ||
d | [inf, 6.02, 5.84, 0, 0, 0, 0, 0] | ||
Pred. | [−1, 1, 1, −1, −1, −1, −1, −1] | ||
3 | (1,4) | Q | [2, 3, 4] |
S | [false,true,true,true,false,false,false,false] | ||
d | [inf, 6.02, 5.84, 8.20, 0, 0, 0, 0] | ||
Pred. | [−1, 1, 1, 1, −1, −1, −1, −1] | ||
3 | (2,3) | Q | [3, 4] |
S | [false,false,true,true,false,false,false,false] | ||
d, Pred. | No change | ||
4 | (2,5) | Q | [3, 4, 5] |
S | [false,false,true,true,true,false,false,false] | ||
d | [inf, 6.02, 5.84, 8.20, 4.45, 0, 0, 0] | ||
Pred. | [−1, 1, 1, 1, 2, −1, −1, −1] | ||
5 | (3,2) | Q | [4, 5] |
S | [false,false,false,true,true,false,false,false] | ||
d, Pred. | No change | ||
5 | (3,4) | Q, S, d, Pred. | No change |
6 | (3,5) | Q, S, d, Pred. | No change |
7 | (4,3) | Q | [5] |
S | [false,false,false,false,true,false,false,false] | ||
d, Pred. | No change | ||
8 | (4,5) | Q, S | No change |
d | [inf, 6.02, 5.84, 8.20, 5.44, 0, 0, 0] | ||
Pred. | [−1, 1, 1, 1, 4, −1, −1, −1] | ||
9 | (5,6) | Q | [6] |
S | [false,false,false,false,false,true,false,false] | ||
d | [inf, 6.02, 5.84, 8.20, 5.44, 0.90, 0, 0] | ||
Pred. | [−1, 1, 1, 1, 4, 5, −1, −1] | ||
10 | (5,7) | Q | [6, 7] |
S | [false,false,false,false,false,true,true,false] | ||
d | [inf, 6.02, 5.84, 8.20, 5.44, 0.90, 1.0, 0] | ||
Pred. | [−1, 1, 1, 1, 4, 5, 5, −1] | ||
11 | (5,6) | Q | [6, 7, 8] |
S | [false,false,false,false,false,true,true,true] | ||
d | [inf, 6.02, 5.84, 8.20, 5.44, 0.90, 1.0, 2.0] | ||
Pred. | [−1, 1, 1, 1, 4, 5, 5, 5] | ||
12 | (6,8) | Q | [7, 8] |
S | [false,false,false,false,false,false,true,true] | ||
d, Pred. | No change | ||
13 | (7,8) | Q | [8] |
S | [false,false,false,false,false,false,false,true] | ||
d, Pred. | No change | ||
14 | (8,-) No neighbors | Q | [EMPTY] |
S | [false,false,false,false,false,false,false,false] | ||
d, Pred. | No change |
6. Experiments and Discussions
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Dijkstra, E.W. A note on two problems in connexion with graphs. Numer. Math. 1959, 1, 269–271. [Google Scholar] [CrossRef]
- Bellman, R. On a routing problem. Q. Appl. Math. 1958, 16, 87–90. [Google Scholar] [CrossRef]
- Ford, L.R., Jr.; Fulkerson, D.R. A Shortest Chain Algorithm: Flows in Networks; Princeton University Press: Princeton, NJ, USA, 1962; pp. 130–134. [Google Scholar]
- Ahuja, R.K.; Magnanti, T.L.; Orlin, J.B. Network Flows; Prentice Hall: Hoboken, NJ, USA, 1993. [Google Scholar]
- Punnen, A.P. A linear time algorithm for the maximum capacity path problem. Eur. J. Oper. Res. 1991, 53, 402–404. [Google Scholar] [CrossRef]
- Berman, O.; Handler, G.Y. Optimal Minimax Path of a Single Service Unit on a Network to Nonservice Destinations. Transp. Sci. 1987, 21, 115–122. [Google Scholar] [CrossRef]
- Kaibel, V.; Peinhardt, M.A.F. On the Bottleneck Shortest Path Problem; ZIB-Report 06-22; Konrad-Zuse-Zentrum für Informationstechnik Berlin: Berlin, Germany, 2006. [Google Scholar]
- Gabow, H.N.; Tarjan, R.E. Algorithms for two bottleneck optimization problems. J. Algorithms 1988, 9, 411–417. [Google Scholar] [CrossRef]
- Schulze, M. A new monotonic, clone-independent, reversal symmetric, and Condorcet-consistent single-winner election method. Soc. Choice Welf. 2011, 36, 267–303. [Google Scholar] [CrossRef]
- Fernandez, E.; Garfinkel, R.; Arbiol, R. Mosaicking of aerial photographic maps via seams defined by bottleneck shortest paths. Oper. Res. 1998, 46, 293–304. [Google Scholar] [CrossRef]
- Ullah, E.; Lee, K.; Hassoun, S. An algorithm for identifying dominant-edge metabolic pathways. In Proceedings of the 2009 IEEE/ACM International Conference on Computer-Aided Design-Digest of Technical Papers, San Jose, CA, USA, 2–5 November 2009; pp. 144–150. [Google Scholar]
- Deaconu, A.M.; Ciupala, L.; Spridon, D. Finding minimum loss path in big networks. In Proceedings of the 22nd International Symposium on Parallel and Distributed Computing (ISPDC), Bucharest, Romania, 10–12 July 2023; pp. 39–44. [Google Scholar]
- Ford, L.R.; Fulkerson, D.R. Maximal flow through a network. Can. J. Math. 1956, 8, 399–404. [Google Scholar] [CrossRef]
- Edmonds, J.; Karp, R.M. Theoretical improvements in algorithmic efficiency for network flow problems. JACM 1972, 19, 248–264. [Google Scholar] [CrossRef]
- Tayyebi, J.; Rîtan, M.-L.; Deaconu, A.M. Generalized Maximum Capacity Path Problem with Loss Factors. In Proceedings of the 13th International Conference on Operations Research and Enterprise Systems (ICORES 2024), Rome, Italy, 24–26 February 2024; pp. 302–308, ISBN 978-989-758-681-1. ISSN 2184-4372. [Google Scholar]
- Tayyebi, J.; Deaconu, A. Inverse generalized maximum flow problems. Mathematics 2019, 7, 899. [Google Scholar] [CrossRef]
- Moore, E.F. The shortest path through a maze. In Proceedings of the International Symposium on the Theory of Switching; Harvard University Press: Cambridge, MA, USA, 1959. [Google Scholar]
- Ortega-Arranz, H.; Torres, Y.; Llanos, D.R.; Gonzalez-Escribano, A. A new GPU-based approach to the Shortest Path problem. In Proceedings of the 2013 International Conference on High Performance Computing & Simulation (HPCS), Helsinki, Finland, 1–5 July 2013; pp. 505–511. [Google Scholar]
- Deaconu, A.M.; Spridon, D. Adaptation of Random Binomial Graphs for Testing Network Flow Problems Algorithms. Mathematics 2021, 9, 1716. [Google Scholar] [CrossRef]
- Erdős, P.; Rényi, A. On Random Graphs. I. Publ. Math. 1959, 6, 290–297. [Google Scholar] [CrossRef]
No. itr. | Structure | Structure Data |
---|---|---|
1 | D | [inf, 0, 0, 0, 0, 0, 0, 0] |
S | [1] | |
Pred. | [−1, −1, −1, −1, −1, −1, −1, −1] | |
2 | D | [inf, 6.02, 5.84, 8.2, 0, 0, 0, 0] |
S | [2, 3, 4] | |
Pred. | [−1, 1, 1, 1, −1, −1, −1, −1] | |
3 | D | [inf, 6.02, 5.84, 8.2, 5.44, 0, 0, 0] |
S | [2, 3, 5] | |
Pred. | [−1, 1, 1, 1, 4, −1, −1, −1] | |
4 | D | [inf, 6.02, 5.84, 8.2, 5.44, 0, 0, 0] |
S | [3, 5] | |
Pred. | [−1, 1, 1, 1, 4, −1, −1, −1] | |
5 | D | [inf, 6.02, 5.84, 8.2, 5.44, 0, 0, 0] |
S | [5] | |
Pred. | [−1, 1, 1, 1, 4, −1, −1, −1] | |
6 | d | [inf, 6.02, 5.84, 8.2, 5.44, 0.9, 1, 2] |
S | [6, 7, 8] | |
Pred. | [−1, 1, 1, 1, 4, 5, 5, 5] | |
7 | D | [inf, 6.02, 5.84, 8.2, 5.44, 0.9, 1, 2] |
S | [6, 7] | |
Pred. | [−1, 1, 1, 1, 4, 5, 5, 5] | |
8 | D | [inf, 6.02, 5.84, 8.2, 5.44, 0.9, 1, 2] |
S | [6] | |
Pred. | [−1, 1, 1, 1, 4, 5, 5, 5] | |
9 | D | [inf, 6.02, 5.84, 8.2, 5.44, 0.9, 1, 2] |
S | [EMPTY] | |
Pred. | [−1, 1, 1, 1, 4, 5, 5, 5] |
No. of Nodes | No. of Instances | No. of Paths | No. of Cycles | Erdős–Rényi Prob. | No. |
---|---|---|---|---|---|
1000 | 10,000 | 500 | 100 | 0.5 | 1 |
500 | 100 | 0.7 | 2 | ||
500 | 100 | 0.9 | 3 | ||
2000 | 1000 | 1000 | 100 | 0.1 | 4 |
1000 | 250 | 0.15 | 5 | ||
1000 | 500 | 0.6 | 6 | ||
5000 | 100 | 2500 | 1000 | 0.1 | 7 |
2500 | 1000 | 0.2 | 8 | ||
2500 | 1000 | 0.3 | 9 | ||
10,000 | 5 | 5000 | 2500 | 0.15 | 10 |
5000 | 2500 | 0.3 | 11 | ||
5000 | 2500 | 0.5 | 12 | ||
15,000 | 3 | 7500 | 1000 | 0.15 | 13 |
20,000 | 2 | 7500 | 1000 | 0.15 | 14 |
25,000 | 1 | 8000 | 1500 | 0.15 | 15 |
No. | Algorithm 1 CPU | Algorithm 1 GPU | Algorithm 2 | Algorithm 3 | Algorithm 1 GPU vs. Algorithm 2 (Times Faster) | Algorithm 2 vs. Algorithm 3 (Times Faster) |
---|---|---|---|---|---|---|
1 | 165.75 | 187.30 | 3.98 | 5.55 | 0.02 | 1.39 |
2 | 121.1 | 138.66 | 5.02 | 7.52 | 0.04 | 1.49 |
3 | 188.96 | 311.78 | 6.06 | 9.52 | 0.02 | 1.57 |
4 | 30.22 | 52.40 | 6.86 | 8.90 | 0.13 | 1.29 |
5 | 120.00 | 209.34 | 23.00 | 36.18 | 0.10 | 1.57 |
6 | 193.50 | 315.60 | 16.92 | 27.88 | 0.05 | 1.64 |
7 | 183.00 | 71.52 | 40.15 | 52.19 | 0.56 | 1.29 |
8 | 284.30 | 103.41 | 41.7 | 55.00 | 0.40 | 1.31 |
9 | 626.6 | 226.74 | 61.4 | 76.45 | 0.27 | 1.24 |
10 | 671.10 | 89.21 | 98.01 | 117.61 | 1.10 | 1.19 |
11 | 677.14 | 67.78 | 216.00 | 302.40 | 3.19 | 1.40 |
12 | 940.20 | 76.15 | 358.01 | 466.6 | 4.70 | 1.30 |
13 | 1306.07 | 49.41 | 265.33 | 424.52 | 4.82 | 1.59 |
14 | 2965.04 | 53.48 | 452.11 | 524.44 | 8.46 | 1.15 |
15 | 3549.10 | 32.11 | 826.04 | 966.46 | 25.72 | 1.16 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tayyebi, J.; Rîtan, M.-L.; Deaconu, A.M. Widest Path in Networks with Gains/Losses. Axioms 2024, 13, 127. https://doi.org/10.3390/axioms13020127
Tayyebi J, Rîtan M-L, Deaconu AM. Widest Path in Networks with Gains/Losses. Axioms. 2024; 13(2):127. https://doi.org/10.3390/axioms13020127
Chicago/Turabian StyleTayyebi, Javad, Mihai-Lucian Rîtan, and Adrian Marius Deaconu. 2024. "Widest Path in Networks with Gains/Losses" Axioms 13, no. 2: 127. https://doi.org/10.3390/axioms13020127
APA StyleTayyebi, J., Rîtan, M. -L., & Deaconu, A. M. (2024). Widest Path in Networks with Gains/Losses. Axioms, 13(2), 127. https://doi.org/10.3390/axioms13020127