<?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-2024-2-4-10</article-id><article-id custom-type="elpub" pub-id-type="custom">sapi-669</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>Blocked algorithm of finding all-pairs shortest paths in graphs divided into weakly connected clusters</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>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 in Technical Science</p><p>Minsk</p></bio><email xlink:type="simple">karasik.oleg.nikolaevich@gmail.com</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>Prihozhy</surname><given-names>A. A.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Профессор кафедры «Программное обеспечение информационных систем и технологий», доктор технических наук</p><p>г. Минск</p></bio><bio xml:lang="en"><p>Anatoly Prihozhy is full professor at Computer and system software department, Doctor of Science</p><p>Minsk</p></bio><email xlink:type="simple">prihozhy@bntu.by</email><xref ref-type="aff" rid="aff-1"/></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><pub-date pub-type="collection"><year>2024</year></pub-date><pub-date pub-type="epub"><day>30</day><month>08</month><year>2024</year></pub-date><volume>0</volume><issue>2</issue><fpage>4</fpage><lpage>10</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">Karasik O.N., Prihozhy A.A.</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/669">https://sapi.bntu.by/jour/article/view/669</self-uri><abstract><p>Задача поиска кратчайших путей между всеми парами вершин в графе (APSP) имеет применяется в планировании, коммуникациях, экономике и многих других сферах. На сегодняшний день существует ряд алгоритмов решения APSP задач, начиная с алгоритма Флойда-Уоршелла (Floyd-Warshall) и заканчивая более продвинутыми и быстрыми блочными алгоритмами (например, неоднородным блочным алгоритмом поиска кратчайших путей Heterogeneous Blocked All-Pairs Shortest Paths), предназначенными для максимально эффективного использования вычислительных средств и зависимостей между данными, участвующими в вычислениях. В статье предлагается новый блочный алгоритм BSPCG поиска кратчайших путей в кластеризованных графах в однопоточном и многопоточном вариантах, который использует информацию о кластеризации для сокращения объема вычислений посредством поиска кратчайших путей, проходящих через граничные вершины кластеров. В статье проведена серия вычислительных экспериментов над стандартным блочным алгоритмом BFW и новым алгоритмом BSPCG с целью доказательства эффективности поиска кратчайших путей в случае использования граничных вершин кластеров. Эксперименты выполнялись с использованием графов размером 4800 и 9600 вершин с различными кластерными конфигурациями. Эксперименты проведены на компьютере с двумя процессорами Intel Xeon E5-2620v4 (каждый процессор включает 8 физических ядер и 16 аппаратных потоков, а также кэш L3 объемом 20 МБ). Во всех проведенных экспериментах новый алгоритм BSPCG превзошел стандартный алгоритм BFW в несколько раз. В однопоточных сценариях BSPCG продемонстрировал ускорение по сравнению с BFW до 4.6 раз на графах с 4800 вершинами и до 2.7 раз на графах с 9600 вершинами. В многопоточных сценариях BSPCG также продемонстрировал ускорение до 4 раз на графах с 4800 вершинами и до 2,7 раз на графах с 9600 вершинами. Предложенный в статье алгоритм может быть использован в сценариях, где информация о кластеризации остается неизменной или изменяется незначительно и может быть повторно использована для множественных нахождений всех кратчайших путей в графе.</p></abstract><trans-abstract xml:lang="en"><p>The problem of finding all shortest paths between vertices in a graph (APSP) has real-life applications in planning, communication, economics and many other areas. APSP problem can be solved using various algorithms, starting from Floyd-Warshall’s algorithm and ending with advanced, much faster blocked algorithms like Heterogeneous Blocked All-Pairs Shortest Path Algorithm designed to fully utilize underlying hardware resources and utilize inter-data relationships. In the paper, we propose a novel Blocked all-pairs Shortest Paths algorithm for Clustered Graphs (BSPCG) (in sequential and parallel forms) which utilizes the graph clustering information to significantly reduce the number of calculations by performing shortest paths search only though bridge vertices between clusters. We performed a set of comparing experiments for BSPCG and standard Blocked All-Pairs Shortest Path (BFW) algorithm on four randomly generated graphs of 4800 and 9600 vertices with different cluster configurations to determine the efficiency of calculation of paths passing through bridge vertices. All experiments were executed on a computer with two Intel Xeon E5-2620v4 processors (8 cores, 16 hardware threads and shared 20 MB L3 cache). In all the experiments the novel BSPCG algorithm outperformed the standard BFW algorithm. In single-threaded scenarios, BSPCG outperformed BFW up to 4.6 times on graphs of 4800 vertices and up to 2.7 times on graphs of 9600 vertices. In the multi-threaded scenarios, BSPCG also outperformed BFW up to times on graphs of 4800 vertices and up to 2.7 times on graphs of 9600 vertices. The proposed algorithm can be used in scenarios where clustering information stays intact or slightly modified based on the changes in graph and can be reused for future calculation of all-pairs shortest paths in the graph.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>поиск кратчайших путей на графе</kwd><kwd>блочный алгоритм</kwd><kwd>кластеризация графа</kwd><kwd>однопоточное приложение</kwd><kwd>многопоточное приложение</kwd><kwd>производительность</kwd></kwd-group><kwd-group xml:lang="en"><kwd>shortest paths algorithm</kwd><kwd>blocked algorithm</kwd><kwd>graph clustering</kwd><kwd>single-thread application</kwd><kwd>multi-threaded application</kwd><kwd>speedup</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">Schrijver A. On the history of the shortest path problem. Documenta Mathematica. 2012. Vol. 17, № 1. P. 155–167.</mixed-citation><mixed-citation xml:lang="en">Schrijver A. On the history of the shortest path problem. Documenta Mathematica. 2012. Vol. 17, № 1. P. 155–167.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Anu P., (Kumar) M.G. Finding All-Pairs Shortest Path for a Large-Scale Transportation Network Using Parallel FloydWarshall and Parallel Dijkstra Algorithms. Journal of Computing in Civil Engineering. 2013. Vol. 27, № 3. P. 263–273.</mixed-citation><mixed-citation xml:lang="en">Anu P., (Kumar) M.G. Finding All-Pairs Shortest Path for a Large-Scale Transportation Network Using Parallel FloydWarshall and Parallel Dijkstra Algorithms. Journal of Computing in Civil Engineering. 2013. Vol. 27, № 3. P. 263–273.</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Ridi L., Torrini J., Vicario E. Developing a Scheduler with Difference Matrices and the Floyd-Warshall Algorithm. IEEE Software. 2012. Vol. 29, № 1. P. 76–83.</mixed-citation><mixed-citation xml:lang="en">Ridi L., Torrini J., Vicario E. Developing a Scheduler with Difference Matrices and the Floyd-Warshall Algorithm. IEEE Software. 2012. Vol. 29, № 1. P. 76–83.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">E.W. Dijkstra. A note on two problems in connexion with graphs. Numerische Mathematik. 1959. Vol. 1, № 1. P. 269–271.</mixed-citation><mixed-citation xml:lang="en">E.W. Dijkstra. A note on two problems in connexion with graphs. Numerische Mathematik. 1959. Vol. 1, № 1. P. 269–271.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Floyd R.W. Algorithm 97: Shortest Path. Communications of the ACM. 1962. Vol. 5, № 6. P. 345-.</mixed-citation><mixed-citation xml:lang="en">Floyd R.W. Algorithm 97: Shortest Path. Communications of the ACM. 1962. Vol. 5, № 6. P. 345-.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</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. Proceedings VIII International conference “Big data and advanced analytics”, Minsk: Bestprint, 2022. P. 56-66.</mixed-citation><mixed-citation xml:lang="en">Prihozhy А., Karasik O. Inference of shortest path algorithms with spatial and temporal locality for Big Data processing. Proceedings VIII International conference “Big data and advanced analytics”, Minsk: Bestprint, 2022. P. 56-66.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Prihozhy A., Karasik O. Heterogenious blocked all-pairs shortest paths algorithm. System analysis and Applied Information Science. 2017. № 3. P. 68–75.</mixed-citation><mixed-citation xml:lang="en">Prihozhy A., Karasik O. Heterogenious blocked all-pairs shortest paths algorithm. System analysis and Applied Information Science. 2017. № 3. P. 68–75.</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</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. P. 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. P. 857–874.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Singh A., Mishra P.K. Performance Analysis of Floyd Warshall Algorithm vs Rectangular Algorithm. International Journal of Computer Applications. 2014. Vol. 107, № 16. P. 23–27.</mixed-citation><mixed-citation xml:lang="en">Singh A., Mishra P.K. Performance Analysis of Floyd Warshall Algorithm vs Rectangular Algorithm. International Journal of Computer Applications. 2014. Vol. 107, № 16. P. 23–27.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Karasik O., Prihozhy А. Requirements to methods of graph clustering at the aim of solving the shortest path problem. Proceedings X International conference “Big data and advanced analytics”, Minsk: BSUIR, 2024. P. 272–279.</mixed-citation><mixed-citation xml:lang="en">Karasik O., Prihozhy А. Requirements to methods of graph clustering at the aim of solving the shortest path problem. Proceedings X International conference “Big data and advanced analytics”, Minsk: BSUIR, 2024. P. 272–279.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Prihozhy A., Karasik O. New blocked all-pairs shortest paths algorithms operating on blocks of unequal sizes. System analysis and applied information science. BNTU, 2023. № 4. P. 4–13.</mixed-citation><mixed-citation xml:lang="en">Prihozhy A., Karasik O. New blocked all-pairs shortest paths algorithms operating on blocks of unequal sizes. System analysis and applied information science. BNTU, 2023. № 4. P. 4–13.</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Prihozhy А., Karasik O. Blocked algorithm of shortest paths search in sparse graphs partitioned into unequally sized clusters. Proceedings X International conference “Big data and advanced analytics”, Minsk: BSUIR, 2024. P. 262–271.</mixed-citation><mixed-citation xml:lang="en">Prihozhy А., Karasik O. Blocked algorithm of shortest paths search in sparse graphs partitioned into unequally sized clusters. Proceedings X International conference “Big data and advanced analytics”, Minsk: BSUIR, 2024. P. 262–271.</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">Karasik O., Prihozhy A. Tuning block-parallel all-pairs shortest path algorithm for efficient multi-core implementation. System analysis and applied information science. BNTU, 2022. № 3. P. 57–65.</mixed-citation><mixed-citation xml:lang="en">Karasik O., Prihozhy A. Tuning block-parallel all-pairs shortest path algorithm for efficient  multi-core implementation. System analysis and applied information science. BNTU, 2022. № 3. P. 57–65.</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">Karasik O., Prihozhy А. Parallel blocked all-pair shortest path algorithm: block size effect on cache operation in multicore system. Proceedings VIII International conference “Big data and advanced analytics”, Minsk: Bestprint, 2022. P. 28–38.</mixed-citation><mixed-citation xml:lang="en">Karasik O., Prihozhy А. Parallel blocked all-pair shortest path algorithm: block size effect on cache operation in multicore system. Proceedings VIII International conference “Big data and advanced analytics”, Minsk: Bestprint, 2022. P. 28–38.</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">Prihozhy A., Karasik O. Influence of shortest path algorithms on energy consumption of multi-core processors. System analysis and applied information science. BNTU, 2023. № 2. P. 4–12.</mixed-citation><mixed-citation xml:lang="en">Prihozhy A., Karasik O. Influence of shortest path algorithms on energy consumption of multi-core processors. System analysis and applied information science. BNTU, 2023. № 2. P. 4–12.</mixed-citation></citation-alternatives></ref><ref id="cit16"><label>16</label><citation-alternatives><mixed-citation xml:lang="ru">Karasik O., Prihozhy A. Profiling of energy consumption by algorithms of shortest paths search in large dense graphs. Proceedings IX International conference “Big data and advanced analytics”, Minsk: BSUIR, 2023. P. 44–50.</mixed-citation><mixed-citation xml:lang="en">Karasik O., Prihozhy A. Profiling of energy consumption by algorithms of shortest paths search in large dense graphs. Proceedings IX International conference “Big data and advanced analytics”, Minsk: BSUIR, 2023. P. 44–50.</mixed-citation></citation-alternatives></ref><ref id="cit17"><label>17</label><citation-alternatives><mixed-citation xml:lang="ru">Karasik O., Prihozhy A. Streaming block-parallel algorithm for finding shortest paths on a graph. Minsk: BSUIR 2018. № 2. P. 77–84.</mixed-citation><mixed-citation xml:lang="en">Karasik O., Prihozhy A. Streaming block-parallel algorithm for finding shortest paths on a graph. Minsk: BSUIR 2018. № 2. P. 77–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>
