{"title":"A near-optimal approach to edge connectivity-based hierarchical graph decomposition","authors":"Lijun Chang, Zhiyi Wang","doi":"10.1007/s00778-023-00797-x","DOIUrl":null,"url":null,"abstract":"Abstract The problem of efficiently computing all $$k$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>k</mml:mi> </mml:math> -edge-connected components ( $$k$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>k</mml:mi> </mml:math> -ECCs) of a graph G for a user-given k has been extensively studied recently in view of its importance in many applications. The $$k$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>k</mml:mi> </mml:math> -ECCs of G for all possible values of k form a hierarchical structure; that is, any two different $$k$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>k</mml:mi> </mml:math> -ECCs for the same k value are disjoint and any $$k$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>k</mml:mi> </mml:math> -ECC is contained in a unique $$(k\\text {-}1)$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mo>(</mml:mo> <mml:mi>k</mml:mi> <mml:mtext>-</mml:mtext> <mml:mn>1</mml:mn> <mml:mo>)</mml:mo> </mml:mrow> </mml:math> -ECC. In this paper, we study the problem of efficiently constructing the hierarchy tree of the $$k$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>k</mml:mi> </mml:math> -ECCs for all possible k values, for a graph G . The existing approaches $$\\textsf{TD}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>TD</mml:mi> </mml:math> and $$\\textsf{BU}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>BU</mml:mi> </mml:math> construct the hierarchy tree in either a top-down manner or a bottom-up manner, with both having the time complexity of $${{\\mathcal {O}}}\\big (\\delta (G)\\times {\\mathsf {T_{KECC}}} (G)\\big )$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>O</mml:mi> <mml:mrow> <mml:mo>(</mml:mo> </mml:mrow> <mml:mi>δ</mml:mi> <mml:mrow> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> <mml:mo>×</mml:mo> <mml:msub> <mml:mi>T</mml:mi> <mml:mi>KECC</mml:mi> </mml:msub> <mml:mrow> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> <mml:mrow> <mml:mo>)</mml:mo> </mml:mrow> </mml:mrow> </mml:math> , where $$\\delta (G)$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>δ</mml:mi> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> </mml:math> is the degeneracy of G and $${\\mathsf {T_{KECC}}} (G)$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:msub> <mml:mi>T</mml:mi> <mml:mi>KECC</mml:mi> </mml:msub> <mml:mrow> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> </mml:mrow> </mml:math> is the time complexity of computing all $$k$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>k</mml:mi> </mml:math> -ECCs of G for a specific k value. Here, the degeneracy of G is defined as the maximum value among the minimum vertex degrees of all subgraphs of G and is at most $$\\sqrt{m}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:msqrt> <mml:mi>m</mml:mi> </mml:msqrt> </mml:math> where m is the number of edges in G . To improve the time complexity, we propose a divide-and-conquer approach $$\\textsf{DC}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>DC</mml:mi> </mml:math> running in $${{\\mathcal {O}}}\\big ( (\\log \\delta (G))\\times {\\mathsf {T_{KECC}}} (G)\\big )$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>O</mml:mi> <mml:mrow> <mml:mo>(</mml:mo> </mml:mrow> <mml:mrow> <mml:mo>(</mml:mo> <mml:mo>log</mml:mo> <mml:mi>δ</mml:mi> <mml:mrow> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> <mml:mo>)</mml:mo> </mml:mrow> <mml:mo>×</mml:mo> <mml:msub> <mml:mi>T</mml:mi> <mml:mi>KECC</mml:mi> </mml:msub> <mml:mrow> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> <mml:mrow> <mml:mo>)</mml:mo> </mml:mrow> </mml:mrow> </mml:math> time; this time complexity is optimal up to a logarithmic factor. However, a straightforward implementation of $$\\textsf{DC}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>DC</mml:mi> </mml:math> would take $${{\\mathcal {O}}}( (m + n) \\log \\delta (G))$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>O</mml:mi> <mml:mo>(</mml:mo> <mml:mo>(</mml:mo> <mml:mi>m</mml:mi> <mml:mo>+</mml:mo> <mml:mi>n</mml:mi> <mml:mo>)</mml:mo> <mml:mo>log</mml:mo> <mml:mi>δ</mml:mi> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> <mml:mo>)</mml:mo> </mml:mrow> </mml:math> main-memory space, which could easily run out-of-memory when processing large graphs; here, n is the number of vertices in G . To reduce the main-memory footprint of our algorithm, we propose adjacency array-based techniques to optimize the space complexity to $$2m+{{\\mathcal {O}}}(n\\log \\delta (G))$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mn>2</mml:mn> <mml:mi>m</mml:mi> <mml:mo>+</mml:mo> <mml:mi>O</mml:mi> <mml:mo>(</mml:mo> <mml:mi>n</mml:mi> <mml:mo>log</mml:mo> <mml:mi>δ</mml:mi> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> <mml:mo>)</mml:mo> </mml:mrow> </mml:math> and denote our resulting algorithm by $$\\mathsf {DC\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>DC</mml:mi> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> . As a by-product of $$\\mathsf {DC\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>DC</mml:mi> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> , we also improve the space complexity of the state-of-the-art algorithm for computing all $$k$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>k</mml:mi> </mml:math> -ECCs for a specific k to $$2m + {{\\mathcal {O}}}(n)$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mn>2</mml:mn> <mml:mi>m</mml:mi> <mml:mo>+</mml:mo> <mml:mi>O</mml:mi> <mml:mo>(</mml:mo> <mml:mi>n</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> </mml:math> , by using the same technique as used in $$\\mathsf {DC\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>DC</mml:mi> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> . Finally, we propose optimization techniques to improve the practical efficiency of the existing approach $$\\textsf{BU}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mi>BU</mml:mi> </mml:math> and denote the space-optimized version of it as $$\\mathsf {BU^*\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:msup> <mml:mi>BU</mml:mi> <mml:mo>∗</mml:mo> </mml:msup> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> which runs in $${{\\mathcal {O}}}\\big (\\delta (G)\\times {\\mathsf {T_{KECC}}} (G)\\big )$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>O</mml:mi> <mml:mrow> <mml:mo>(</mml:mo> </mml:mrow> <mml:mi>δ</mml:mi> <mml:mrow> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> <mml:mo>×</mml:mo> <mml:msub> <mml:mi>T</mml:mi> <mml:mi>KECC</mml:mi> </mml:msub> <mml:mrow> <mml:mo>(</mml:mo> <mml:mi>G</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> <mml:mrow> <mml:mo>)</mml:mo> </mml:mrow> </mml:mrow> </mml:math> time and $$2m+{{\\mathcal {O}}}(n)$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mn>2</mml:mn> <mml:mi>m</mml:mi> <mml:mo>+</mml:mo> <mml:mi>O</mml:mi> <mml:mo>(</mml:mo> <mml:mi>n</mml:mi> <mml:mo>)</mml:mo> </mml:mrow> </mml:math> space. Extensive experiments on large real graphs and synthetic graphs demonstrate that our algorithms $$\\mathsf {DC\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>DC</mml:mi> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> and $$\\mathsf {BU^*\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:msup> <mml:mi>BU</mml:mi> <mml:mo>∗</mml:mo> </mml:msup> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> outperform the state-of-the-art approaches by up to 28 times in terms of running time and by up to 8 times in terms of main memory usage. In particular, our approach $$\\mathsf {BU^*\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:msup> <mml:mi>BU</mml:mi> <mml:mo>∗</mml:mo> </mml:msup> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> processes the Twitter graph, which has more than 1 billion undirected edges, in 29 min with 13.5 GB memory, while the state-of-the-art approaches take more than 13 h after our space optimization; note that the state-of-the-art approaches run out-of-memory if without our space optimization. Our empirical study also shows that $$\\mathsf {BU^*\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:msup> <mml:mi>BU</mml:mi> <mml:mo>∗</mml:mo> </mml:msup> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> , despite having a higher time complexity, performs better than $$\\mathsf {DC\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>DC</mml:mi> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> in practice. We also remark that $$\\mathsf {BU^*\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:msup> <mml:mi>BU</mml:mi> <mml:mo>∗</mml:mo> </mml:msup> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> is much simpler and easier to implement than $$\\mathsf {DC\\text {-}AA}$$ <mml:math xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"> <mml:mrow> <mml:mi>DC</mml:mi> <mml:mtext>-</mml:mtext> <mml:mi>AA</mml:mi> </mml:mrow> </mml:math> .","PeriodicalId":338536,"journal":{"name":"The VLDB Journal","volume":"25 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-05-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"The VLDB Journal","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1007/s00778-023-00797-x","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Abstract The problem of efficiently computing all $$k$$ k -edge-connected components ( $$k$$ k -ECCs) of a graph G for a user-given k has been extensively studied recently in view of its importance in many applications. The $$k$$ k -ECCs of G for all possible values of k form a hierarchical structure; that is, any two different $$k$$ k -ECCs for the same k value are disjoint and any $$k$$ k -ECC is contained in a unique $$(k\text {-}1)$$ (k-1) -ECC. In this paper, we study the problem of efficiently constructing the hierarchy tree of the $$k$$ k -ECCs for all possible k values, for a graph G . The existing approaches $$\textsf{TD}$$ TD and $$\textsf{BU}$$ BU construct the hierarchy tree in either a top-down manner or a bottom-up manner, with both having the time complexity of $${{\mathcal {O}}}\big (\delta (G)\times {\mathsf {T_{KECC}}} (G)\big )$$ O(δ(G)×TKECC(G)) , where $$\delta (G)$$ δ(G) is the degeneracy of G and $${\mathsf {T_{KECC}}} (G)$$ TKECC(G) is the time complexity of computing all $$k$$ k -ECCs of G for a specific k value. Here, the degeneracy of G is defined as the maximum value among the minimum vertex degrees of all subgraphs of G and is at most $$\sqrt{m}$$ m where m is the number of edges in G . To improve the time complexity, we propose a divide-and-conquer approach $$\textsf{DC}$$ DC running in $${{\mathcal {O}}}\big ( (\log \delta (G))\times {\mathsf {T_{KECC}}} (G)\big )$$ O((logδ(G))×TKECC(G)) time; this time complexity is optimal up to a logarithmic factor. However, a straightforward implementation of $$\textsf{DC}$$ DC would take $${{\mathcal {O}}}( (m + n) \log \delta (G))$$ O((m+n)logδ(G)) main-memory space, which could easily run out-of-memory when processing large graphs; here, n is the number of vertices in G . To reduce the main-memory footprint of our algorithm, we propose adjacency array-based techniques to optimize the space complexity to $$2m+{{\mathcal {O}}}(n\log \delta (G))$$ 2m+O(nlogδ(G)) and denote our resulting algorithm by $$\mathsf {DC\text {-}AA}$$ DC-AA . As a by-product of $$\mathsf {DC\text {-}AA}$$ DC-AA , we also improve the space complexity of the state-of-the-art algorithm for computing all $$k$$ k -ECCs for a specific k to $$2m + {{\mathcal {O}}}(n)$$ 2m+O(n) , by using the same technique as used in $$\mathsf {DC\text {-}AA}$$ DC-AA . Finally, we propose optimization techniques to improve the practical efficiency of the existing approach $$\textsf{BU}$$ BU and denote the space-optimized version of it as $$\mathsf {BU^*\text {-}AA}$$ BU∗-AA which runs in $${{\mathcal {O}}}\big (\delta (G)\times {\mathsf {T_{KECC}}} (G)\big )$$ O(δ(G)×TKECC(G)) time and $$2m+{{\mathcal {O}}}(n)$$ 2m+O(n) space. Extensive experiments on large real graphs and synthetic graphs demonstrate that our algorithms $$\mathsf {DC\text {-}AA}$$ DC-AA and $$\mathsf {BU^*\text {-}AA}$$ BU∗-AA outperform the state-of-the-art approaches by up to 28 times in terms of running time and by up to 8 times in terms of main memory usage. In particular, our approach $$\mathsf {BU^*\text {-}AA}$$ BU∗-AA processes the Twitter graph, which has more than 1 billion undirected edges, in 29 min with 13.5 GB memory, while the state-of-the-art approaches take more than 13 h after our space optimization; note that the state-of-the-art approaches run out-of-memory if without our space optimization. Our empirical study also shows that $$\mathsf {BU^*\text {-}AA}$$ BU∗-AA , despite having a higher time complexity, performs better than $$\mathsf {DC\text {-}AA}$$ DC-AA in practice. We also remark that $$\mathsf {BU^*\text {-}AA}$$ BU∗-AA is much simpler and easier to implement than $$\mathsf {DC\text {-}AA}$$ DC-AA .