<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">sapi</journal-id><journal-title-group><journal-title xml:lang="ru">Системный анализ и прикладная информатика</journal-title><trans-title-group xml:lang="en"><trans-title>«System analysis and applied information science»</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">2309-4923</issn><issn pub-type="epub">2414-0481</issn><publisher><publisher-name>Belarusian National Technical University</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.21122/2309-4923-2023-4-4-13</article-id><article-id custom-type="elpub" pub-id-type="custom">sapi-640</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>Системный анализ</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="en"><subject>System analysis</subject></subj-group></article-categories><title-group><article-title>Новые блочные алгоритмы поиска кратчайших путей между всеми парами вершин графа, работающие на блоках неравных размеров</article-title><trans-title-group xml:lang="en"><trans-title>New blocked all-pairs shortest paths algorithms operating on blocks of unequal sizes</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Прихожий</surname><given-names>А. А.</given-names></name><name name-style="western" xml:lang="en"><surname>Prihozhy</surname><given-names>A. A.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Профессор кафедры «Программное обеспечение информационных систем и технологий»</p><p>г. Минск</p><p> </p></bio><bio xml:lang="en"><p>Anatoly Prihozhy is full professor at Computer and system software department of Belarus national technical university, D. Sc. (Eng) and Full Professor </p><p>Minsk</p></bio><email xlink:type="simple">prihozhy@bntu.by</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Карасик</surname><given-names>О. Н.</given-names></name><name name-style="western" xml:lang="en"><surname>Karasik</surname><given-names>O. N.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Ведущий инженер иностранного производственного унитарного предприятия «ИССОФТ СОЛЮШЕНЗ», кандидат технических наук</p><p>г. Минск</p></bio><bio xml:lang="en"><p>Karasik Oleg is a Technology Lead at ISsoft Solutions (part of Coherent Solutions) in Minsk, Belarus, and PhD (Eng)</p><p>Minsk</p></bio><email xlink:type="simple">karasik.oleg.nikolaevich@gmail.com</email><xref ref-type="aff" rid="aff-2"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Белорусский национальный технический университет</institution><country>Беларусь</country></aff><aff xml:lang="en"><institution>Belarusian National Technical University</institution><country>Belarus</country></aff></aff-alternatives><aff-alternatives id="aff-2"><aff xml:lang="ru"><institution>ИССОФТ СОЛЮШЕНЗ</institution><country>Беларусь</country></aff><aff xml:lang="en"><institution>ISsoft Solutions</institution><country>Belarus</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2023</year></pub-date><pub-date pub-type="epub"><day>11</day><month>01</month><year>2024</year></pub-date><volume>0</volume><issue>4</issue><fpage>4</fpage><lpage>13</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Прихожий А.А., Карасик О.Н., 2024</copyright-statement><copyright-year>2024</copyright-year><copyright-holder xml:lang="ru">Прихожий А.А., Карасик О.Н.</copyright-holder><copyright-holder xml:lang="en">Prihozhy A.A., Karasik O.N.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://sapi.bntu.by/jour/article/view/640">https://sapi.bntu.by/jour/article/view/640</self-uri><abstract/><trans-abstract xml:lang="en"><p>In real-world networks, many problems imply finding the All-Pairs Shortest Paths (APSP) and their distances in a graph. Solving the large-scale APSP problem on modern multi-processor (multi-core) systems is the key for various application domains. The computational cost of solving the problem is high, therefore in many cases approximate solutions are considered as acceptable. The blocked APSP algorithms are a promising approach which can exploit many processors (cores) and their caches in parallel mode efficiently. At the same time, to our best knowledge, all blocked algorithms of the Floyd-Warshall family use blocks of equal sizes. This property limits application of the algorithms. In this paper we propose new blocked algorithms which divide the input graph into unequal subgraphs and divide the matrix of distances between pairs of vertices into blocks of unequal sizes. The algorithms describe the dense subgraphs by the adjacency matrix and describe sparse subgraphs and connections between them by the adjacency list. This approach allows the Floyd-Warshall family algorithms to be used together with Dijkstra family algorithms. It can be applied to large graphs decomposed into dense (clusters) and sparse subgraphs. A new heterogeneous algorithm can significantly reduce the computation time of blocks depending on the block type and size. The contribution of the paper is the development of a new family of blocked APSP algorithms which can handle blocks of unequal sizes, save and extend the advantages of the state-of-the-art algorithms operating on blocks of equal sizes. The proposed algorithms are implemented as single- and multiple-threaded parallel applications for multi-core systems.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>задача APSP</kwd><kwd>блочный алгоритм</kwd><kwd>неравные размеры блоков</kwd><kwd>разнородный алгоритм</kwd><kwd>многопоточная реализация</kwd><kwd>многоядерный процессор</kwd></kwd-group><kwd-group xml:lang="en"><kwd>APSP problem</kwd><kwd>blocked algorithm</kwd><kwd>unequal sizes of blocks</kwd><kwd>heterogeneous algorithm</kwd><kwd>multi-core processor</kwd><kwd>multi-threaded implementation</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">Dijkstra E.W. A note on two problems in connexion with graphs. Numerische Mathematik, 1959, vol. 1(1), pp. 269–271.</mixed-citation><mixed-citation xml:lang="en">Dijkstra E.W. A note on two problems in connexion with graphs. Numerische Mathematik, 1959, vol. 1(1), pp. 269–271.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Floyd R.W. Algorithm 97: Shortest path. Communications of the ACM, 1962, no. 5(6), p. 345.</mixed-citation><mixed-citation xml:lang="en">Floyd R.W. Algorithm 97: Shortest path. Communications of the ACM, 1962, no. 5(6), p. 345.</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Glabowski M., Musznicki B., Nowak P. and Zwierzykowski P. Review and Performance Analysis of Shortest Path Problem Solving Algorithms. International Journal on Advances in Software, 2014, vol. 7, no. 1&amp;2, pp. 20–30.</mixed-citation><mixed-citation xml:lang="en">Glabowski M., Musznicki B., Nowak P. and Zwierzykowski P. Review and Performance Analysis of Shortest Path Problem Solving Algorithms. International Journal on Advances in Software, 2014, vol. 7, no. 1&amp;2, pp. 20–30.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Madkour A., Aref W.G., Rehman F.U., Rahman M.A., Basalamah S. A Survey of Shortest-Path Algorithms. ArXiv: 1705.02044v1 [cs.DS], 4 May 2017, 26 p.</mixed-citation><mixed-citation xml:lang="en">Madkour A., Aref W.G., Rehman F.U., Rahman M.A., Basalamah S. A Survey of Shortest-Path Algorithms. ArXiv: 1705.02044v1 [cs.DS], 4 May 2017, 26 p.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Prihozhy А., Mlynek D. Design of parallel implementations by means of abstract dynamic critical path based profiling of complex sequential algorithms. Integrated Circuit and System Design. Power and Timing Modeling, Optimization and Simulation: 16th International Workshop, PATMOS 2006, Montpellier, France, September 13-15, 2006, pp. 1–11.</mixed-citation><mixed-citation xml:lang="en">Prihozhy А., Mlynek D. Design of parallel implementations by means of abstract dynamic critical path based profiling of complex sequential algorithms. Integrated Circuit and System Design. Power and Timing Modeling, Optimization and Simulation: 16th International Workshop, PATMOS 2006, Montpellier, France, September 13-15, 2006, pp. 1–11.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Prihozhy A.A., Casale-Brunet S., Bezati E., Mattavelli M. Pipeline Synthesis and Optimization from Branched Feedback Dataflow Programs. Journal of Signal Processing Systems, Springer Nature, 2020, vol. 92, pp. 1091–1099. doi: 10.1007/s11265-020-01568-5</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A., Casale-Brunet S., Bezati E., Mattavelli M. Pipeline Synthesis and Optimization from Branched Feedback Dataflow Programs. Journal of Signal Processing Systems, Springer Nature, 2020, vol. 92, pp. 1091–1099. doi: 10.1007/s11265-020-01568-5</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Katz G.J., Kider J.T. All-pairs shortest-paths for large graphs on the GPU. GH’08: Proceedings of the 23rd ACM SIGGRAPH/EUROGRAPHICS symposium on Graphics hardware. ACM, 2008, pp. 47–55.</mixed-citation><mixed-citation xml:lang="en">Katz G.J., Kider J.T. All-pairs shortest-paths for large graphs on the GPU. GH’08: Proceedings of the 23rd ACM SIGGRAPH/EUROGRAPHICS symposium on Graphics hardware. ACM, 2008, pp. 47–55.</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Ortega-Arranz H., Torres Y., Llanos D.R. and Escribano A.G. The all-pair shortest-path problem in shared-memory heterogeneous systems. High-Performance Computing on Complex Environments, 2013, pp. 283–299.</mixed-citation><mixed-citation xml:lang="en">Ortega-Arranz H., Torres Y., Llanos D.R, and Escribano A.G. The all-pair shortest-path problem in shared-memory heterogeneous systems. High-Performance Computing on Complex Environments, 2013, pp. 283–299.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Djidjev H., Thulasidasan S., Chapuis G., Andonov R. and Lavenier D. Efficient multi-GPU computation of all-pairs shortest paths. IEEE 28th International Parallel and Distributed Processing Symposium. IEEE, 2014, pp. 360–369.</mixed-citation><mixed-citation xml:lang="en">Djidjev H., Thulasidasan S., Chapuis G., Andonov R. and Lavenier D. Efficient multi-GPU computation of all-pairs shortest paths. IEEE 28th International Parallel and Distributed Processing Symposium. IEEE, 2014, pp. 360–369.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Venkataraman G., Sahni S., Mukhopadhyaya S. A Blocked All-Pairs Shortest Paths Algorithm. Journal of Experimental Algorithmics (JEA), 2003, vol. 8, pp. 857–874.</mixed-citation><mixed-citation xml:lang="en">Venkataraman G., Sahni S., Mukhopadhyaya S. A Blocked All-Pairs Shortest Paths Algorithm. Journal of Experimental Algorithmics (JEA), 2003, vol. 8, pp. 857–874.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Park J.S., Penner M. and Prasanna V.K. Optimizing graph algorithms for improved cache performance. IEEE Trans. on Parallel and Distributed Systems, 2004, no. 15(9), pp.769–782.</mixed-citation><mixed-citation xml:lang="en">Park J.S., Penner M., and Prasanna V.K. Optimizing graph algorithms for improved cache performance. IEEE Trans. on Parallel and Distributed Systems, 2004, no. 15(9), pp.769–782.</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Bellman R.E. On a routing problem. Quarterly of Applied Mathematics, 1958, vol. 16, no. 1, pp. 87–90.</mixed-citation><mixed-citation xml:lang="en">Bellman R.E. On a routing problem. Quarterly of Applied Mathematics, 1958, vol. 16, no. 1, pp. 87–90.</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">Johnson D.B. Efficient Algorithms for Shortest Paths in Sparse Networks. J. ACM, 1977, vol. 24, no. 1, pp. 1–13.</mixed-citation><mixed-citation xml:lang="en">Johnson D.B. Efficient Algorithms for Shortest Paths in Sparse Networks. J. ACM, 1977, vol. 24 no. 1, pp. 1 – 13.</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">Harish P., Narayanan P.J. Accelerating large graph algorithms on the GPU using CUDA. International conference on high-performance computing. Springer, 2007, pp. 197–208.</mixed-citation><mixed-citation xml:lang="en">Harish P., Narayanan P.J. Accelerating large graph algorithms on the GPU using CUDA. International conference on high-performance computing. Springer, 2007, pp. 197–208.</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">Meyer U., Sanders P. Δ-stepping: a parallelizable shortest path algorithm. Journal of Algorithms, vol. 49, no. 1, 2003, pp. 114–152.</mixed-citation><mixed-citation xml:lang="en">Meyer U. and Sanders P. Δ-stepping: a parallelizable shortest path algorithm. Journal of Algorithms, vol. 49, no. 1, 2003, pp. 114–152.</mixed-citation></citation-alternatives></ref><ref id="cit16"><label>16</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Разнородный блочный алгоритм поиска кратчайших путей между всеми парами вершин графа / А.А. Прихожий, О.Н. Карасик // Системный анализ и прикладная информатика. – 2017. – № 3. – С. 68–75.</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A., Karasik O.N. Heterogeneous blocked all-pairs shortest paths algorithm. System analysis and applied information science, 2017, no. 3, pp. 68–75. (In Russian).</mixed-citation></citation-alternatives></ref><ref id="cit17"><label>17</label><citation-alternatives><mixed-citation xml:lang="ru">Prihozhy А., Karasik O. Inference of shortest path algorithms with spatial and temporal locality for Big Data processing // Сборник материалов VIII Международной научно-практической конференции. – Минск: Беспринт, 2022. – С. 56–66.</mixed-citation><mixed-citation xml:lang="en">Prihozhy А.A., Karasik O.N. Inference of shortest path algorithms with spatial and temporal locality for big data processing. [Big Data and Advanced Analytics: proceedings of VIII international conference]. Minsk, Bestprint Publ., 2022, pp. 56–66.</mixed-citation></citation-alternatives></ref><ref id="cit18"><label>18</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Усовершенствованный разнородный блочно-параллельный алгоритм поиска кратчайших путей на графе / А.А. Прихожий, О.Н. Карасик // Труды БГТУ. Сер. 3, Физико-математические науки и информатика. – 2023. – № 1(266). – С. 77–83. doi: 10.52065/2520-6141-20</mixed-citation><mixed-citation xml:lang="en">Prihozhy А.А., Karasik O.N. Advanced heterogeneous block-parallel all-pairs shortest path algorithm. Proceedings of BSTU, issue 3, Physics and Mathematics. Informatics, 2023, no. 1(266), pp. 77–83. doi: 10.52065/2520-6141-2023-266-1-13</mixed-citation></citation-alternatives></ref><ref id="cit19"><label>19</label><citation-alternatives><mixed-citation xml:lang="ru">Albalawi E., Thulasiraman P., Thulasiram R. Task Level Parallelization of All Pair Shortest Path Algorithm in OpenMP 3.0. 2nd International Conference on Advances in Computer Science and Engineering (CSE 2013). Los Angeles, CA, July 1–2, 2013, pp. 109–112.</mixed-citation><mixed-citation xml:lang="en">Albalawi E., Thulasiraman P., Thulasiram R. Task Level Parallelization of All Pair Shortest Path Algorithm in OpenMP 3.0. 2nd International Conference on Advances in Computer Science and Engineering (CSE 2013). Los Angeles, CA, July 1–2, 2013, pp. 109–112.</mixed-citation></citation-alternatives></ref><ref id="cit20"><label>20</label><citation-alternatives><mixed-citation xml:lang="ru">Yang S., Liu X., Wang Y., He X., Tan G. Fast All-Pairs Shortest Paths Algorithm in Large Sparse Graph. ICS '23: Proceedings of the 37th International Conference on Supercomputing, 2023, pp. 277–288.</mixed-citation><mixed-citation xml:lang="en">Yang S., Liu X., Wang Y., He X., Tan G. Fast All-Pairs Shortest Paths Algorithm in Large Sparse Graph. ICS '23: Proceedings of the 37th International Conference on Supercomputing, 2023, pp. 277–288.</mixed-citation></citation-alternatives></ref><ref id="cit21"><label>21</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Моделирование кэш прямого отображения и ассоциативных кэш на алгоритмах поиска кратчайших путей на графе / А.А. Прихожий // Системный анализ и прикладная информатика. – 2019. – № 4. – С. 10–18.</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A. Simulation of direct mapped, k-way and fully associative cache on all-pairs shortest paths algorithms. System analysis and applied information science, 2019, no. 4, pp. 10–18.</mixed-citation></citation-alternatives></ref><ref id="cit22"><label>22</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Оптимизация размещения данных в иерархической памяти для блочных алгоритмов поиска кратчайших путей / А.А. Прихожий // Системный анализ и прикладная информатика. – 2021. – № 3. – С. 40–50. doi: 10.21122/2309-4923-2021-3-40-50</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A. Optimization of data allocation in hierarchical memory for blocked shortest paths algorithms. System analysis and applied information science, 2021, no. 3, pp. 40–50. doi: 10.21122/2309-4923-2021-3-40-50</mixed-citation></citation-alternatives></ref><ref id="cit23"><label>23</label><citation-alternatives><mixed-citation xml:lang="ru">Прыхожы, А.А. Кааператыўныя блочна-паралельныя алгарытмы рашэння задач на шмат'ядравых сістэмах / А.А. Прыхожы, А.М. Карасiк // Системный анализ и прикладная информатика. – 2015. – № 2. – С. 10–18.</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A., Karasik O.N. Cooperative block-parallel algorithms for task execution on multi-core system. System analysis and applied information science, 2015, no. 2, pp. 10–18.</mixed-citation></citation-alternatives></ref><ref id="cit24"><label>24</label><citation-alternatives><mixed-citation xml:lang="ru">Карасик, О.Н. Потоковый блочно-параллельный алгоритм поиска кратчайших путей на графе / О.Н. Карасик, А.А. Прихожий // Доклады БГУИР. – 2018. – № 2. – С. 77–84.</mixed-citation><mixed-citation xml:lang="en">Karasik O.N., Prihozhy A.A. Threaded block-parallel algorithm for finding the shortest paths on graph. Doklady BGUIR, 2018, no. 2, pp. 77–84. (In Russian).</mixed-citation></citation-alternatives></ref><ref id="cit25"><label>25</label><citation-alternatives><mixed-citation xml:lang="ru">Карасик, О.Н. Настройка блочно-параллельного алгоритма поиска кратких путей на эффективную много-ядерную реализацию / О.Н. Карасик, А.А. Прихожий // Системный анализ и прикладная информатика. – 2022. – № 3. – С. 57–65. doi: 10.21122/2309-4923-2022-3-57-65</mixed-citation><mixed-citation xml:lang="en">Karasik O.N., Prihozhy A.A. Tuning block-parallel all-pairs shortest path algorithm for efficient multi-core implementation. System analysis and applied information science, 2022, no. 3, pp. 57–65. doi: 10.21122/2309-4923-2022-3-57-65</mixed-citation></citation-alternatives></ref><ref id="cit26"><label>26</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Влияние алгоритмов поиска кратчайших путей на энергопотребление многоядерных процессоров / А.А. Прихожий, О.Н. Карасик // Системный анализ и прикладная информатика. – 2023. – № 2. – С. 4–12. doi: 10.21122/2309-4923-2023-2-4-12</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A., Karasik O.N. Influence of shortest path algorithms on energy consumption of multi-core processors. System analysis and applied information science, 2023, no. 2, pp. 4–12. doi: 10.21122/2309-4923-2023-2-4-12</mixed-citation></citation-alternatives></ref><ref id="cit27"><label>27</label><citation-alternatives><mixed-citation xml:lang="ru">Прихожий, А.А. Генерация потоковых сетей акторов поиска кратчайших путей для параллельной многоядерной реализации / А.А. Прихожий // Информатика. – 2023. – Т. 20. – № 2. – С. 65–84. doi: 10.37661/1816-0301-2023-20-2-65-84</mixed-citation><mixed-citation xml:lang="en">Prihozhy A.A. Generation of shortest path search dataflow networks of actors for parallel multicore implementation. Informatics, 2023, vol. 20, no. 2, pp. 65–84. doi: 10.37661/1816-0301-2023-20-2-65-84</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
