<p>The computation of the all-pairs shortest paths is an important graph algorithmic problem. When the graph changes, such as edge deletions/insertions, recalculating the shortest distance of a graph from scratch is costly. In this paper, we investigate how to quickly maintain the shortest distance of the dynamic graph in the distributed memory system. For a distributed system with <InlineEquation ID="IEq1"> <EquationSource Format="TEX">\(p\)</EquationSource> <EquationSource Format="MATHML"><math> <mi>p</mi> </math></EquationSource> </InlineEquation> processors, the state-of-art algorithm to recompute the shortest distance of a graph with <InlineEquation ID="IEq2"> <EquationSource Format="TEX">\(n\)</EquationSource> <EquationSource Format="MATHML"><math> <mi>n</mi> </math></EquationSource> </InlineEquation> vertices from scratch requires <InlineEquation ID="IEq3"> <EquationSource Format="TEX">\(O\left({n}^{2}/\sqrt{p}\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <msup> <mrow> <mi>n</mi> </mrow> <mn>2</mn> </msup> <mo stretchy="false">/</mo> <msqrt> <mi>p</mi> </msqrt> </mfenced> </mrow> </math></EquationSource> </InlineEquation> bandwidth cost and <InlineEquation ID="IEq4"> <EquationSource Format="TEX">\(O\left(\sqrt{p}{\text{log}}^{2}p\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <msqrt> <mi>p</mi> </msqrt> <msup> <mrow> <mtext>log</mtext> </mrow> <mn>2</mn> </msup> <mi>p</mi> </mfenced> </mrow> </math></EquationSource> </InlineEquation> latency cost. For the insertion of <InlineEquation ID="IEq5"> <EquationSource Format="TEX">\(k\)</EquationSource> <EquationSource Format="MATHML"><math> <mi>k</mi> </math></EquationSource> </InlineEquation> edges, we give an incremental algorithm with a bandwidth cost of <InlineEquation ID="IEq6"> <EquationSource Format="TEX">\(O\left(\frac{nk}{\sqrt{p}}+{k}^{2}\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <mfrac> <mrow> <mi mathvariant="italic">nk</mi> </mrow> <msqrt> <mi>p</mi> </msqrt> </mfrac> <mo>+</mo> <msup> <mrow> <mi>k</mi> </mrow> <mn>2</mn> </msup> </mfenced> </mrow> </math></EquationSource> </InlineEquation> and a latency cost of <InlineEquation ID="IEq7"> <EquationSource Format="TEX">\(O\left(\text{log}p\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <mtext>log</mtext> <mi>p</mi> </mfenced> </mrow> </math></EquationSource> </InlineEquation>. For typical scenarios where <InlineEquation ID="IEq8"> <EquationSource Format="TEX">\(k=O\left(\frac{n}{\sqrt{p}}\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>k</mi> <mo>=</mo> <mi>O</mi> <mfenced close=")" open="("> <mfrac> <mi>n</mi> <msqrt> <mi>p</mi> </msqrt> </mfrac> </mfenced> </mrow> </math></EquationSource> </InlineEquation>, the bandwidth and latency costs are reduced by a factor of <InlineEquation ID="IEq9"> <EquationSource Format="TEX">\(O\left(\sqrt{p}\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <msqrt> <mi>p</mi> </msqrt> </mfenced> </mrow> </math></EquationSource> </InlineEquation> and <InlineEquation ID="IEq10"> <EquationSource Format="TEX">\(O\left(\sqrt{p}\text{log}p\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <msqrt> <mi>p</mi> </msqrt> <mtext>log</mtext> <mi>p</mi> </mfenced> </mrow> </math></EquationSource> </InlineEquation>, respectively. For the deletion of <InlineEquation ID="IEq11"> <EquationSource Format="TEX">\(k\)</EquationSource> <EquationSource Format="MATHML"><math> <mi>k</mi> </math></EquationSource> </InlineEquation> edges, we give a decremental algorithm with a bandwidth cost of <InlineEquation ID="IEq12"> <EquationSource Format="TEX">\(O\left(\frac{nk}{\sqrt{p}}+{k}^{2}+\frac{{n}^{2}}{p}{\text{log}}^{3}p+{\left|S\right|}^{2}\text{log}p\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <mfrac> <mrow> <mi mathvariant="italic">nk</mi> </mrow> <msqrt> <mi>p</mi> </msqrt> </mfrac> <mo>+</mo> <msup> <mrow> <mi>k</mi> </mrow> <mn>2</mn> </msup> <mo>+</mo> <mfrac> <msup> <mrow> <mi>n</mi> </mrow> <mn>2</mn> </msup> <mi>p</mi> </mfrac> <msup> <mrow> <mtext>log</mtext> </mrow> <mn>3</mn> </msup> <mi>p</mi> <mo>+</mo> <msup> <mrow> <mfenced close="|" open="|"> <mi>S</mi> </mfenced> </mrow> <mn>2</mn> </msup> <mtext>log</mtext> <mi>p</mi> </mfenced> </mrow> </math></EquationSource> </InlineEquation> and a latency cost of <InlineEquation ID="IEq13"> <EquationSource Format="TEX">\(O\left({\text{log}}^{3}p\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <msup> <mrow> <mtext>log</mtext> </mrow> <mn>3</mn> </msup> <mi>p</mi> </mfenced> </mrow> </math></EquationSource> </InlineEquation>, where <InlineEquation ID="IEq14"> <EquationSource Format="TEX">\(\left|S\right|\)</EquationSource> <EquationSource Format="MATHML"><math> <mfenced close="|" open="|"> <mi>S</mi> </mfenced> </math></EquationSource> </InlineEquation> is the separator size of a constructed graph and is related to the alteration degree of the shortest path of the dynamic graph. When <InlineEquation ID="IEq15"> <EquationSource Format="TEX">\(k=O\left(\frac{n}{\sqrt{p}}\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>k</mi> <mo>=</mo> <mi>O</mi> <mfenced close=")" open="("> <mfrac> <mi>n</mi> <msqrt> <mi>p</mi> </msqrt> </mfrac> </mfenced> </mrow> </math></EquationSource> </InlineEquation> and <InlineEquation ID="IEq16"> <EquationSource Format="TEX">\(\left|S\right|=O\left(\frac{n}{\sqrt{p}}\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mfenced close="|" open="|"> <mi>S</mi> </mfenced> <mo>=</mo> <mi>O</mi> <mfenced close=")" open="("> <mfrac> <mi>n</mi> <msqrt> <mi>p</mi> </msqrt> </mfrac> </mfenced> </mrow> </math></EquationSource> </InlineEquation>, the bandwidth and latency costs are reduced by a factor of <InlineEquation ID="IEq17"> <EquationSource Format="TEX">\(O\left(\sqrt{p}/{\text{log}}^{3}p\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <msqrt> <mi>p</mi> </msqrt> <mo stretchy="false">/</mo> <msup> <mrow> <mtext>log</mtext> </mrow> <mn>3</mn> </msup> <mi>p</mi> </mfenced> </mrow> </math></EquationSource> </InlineEquation> and <InlineEquation ID="IEq18"> <EquationSource Format="TEX">\(O\left(\sqrt{p}/\text{log}p\right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <msqrt> <mi>p</mi> </msqrt> <mo stretchy="false">/</mo> <mtext>log</mtext> <mi>p</mi> </mfenced> </mrow> </math></EquationSource> </InlineEquation>, respectively.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A parallel all-pairs shortest paths algorithm for dynamic graphs

  • Lin Zhu,
  • Qiang-sheng Hua,
  • Hai Jin

摘要

The computation of the all-pairs shortest paths is an important graph algorithmic problem. When the graph changes, such as edge deletions/insertions, recalculating the shortest distance of a graph from scratch is costly. In this paper, we investigate how to quickly maintain the shortest distance of the dynamic graph in the distributed memory system. For a distributed system with \(p\) p processors, the state-of-art algorithm to recompute the shortest distance of a graph with \(n\) n vertices from scratch requires \(O\left({n}^{2}/\sqrt{p}\right)\) O n 2 / p bandwidth cost and \(O\left(\sqrt{p}{\text{log}}^{2}p\right)\) O p log 2 p latency cost. For the insertion of \(k\) k edges, we give an incremental algorithm with a bandwidth cost of \(O\left(\frac{nk}{\sqrt{p}}+{k}^{2}\right)\) O nk p + k 2 and a latency cost of \(O\left(\text{log}p\right)\) O log p . For typical scenarios where \(k=O\left(\frac{n}{\sqrt{p}}\right)\) k = O n p , the bandwidth and latency costs are reduced by a factor of \(O\left(\sqrt{p}\right)\) O p and \(O\left(\sqrt{p}\text{log}p\right)\) O p log p , respectively. For the deletion of \(k\) k edges, we give a decremental algorithm with a bandwidth cost of \(O\left(\frac{nk}{\sqrt{p}}+{k}^{2}+\frac{{n}^{2}}{p}{\text{log}}^{3}p+{\left|S\right|}^{2}\text{log}p\right)\) O nk p + k 2 + n 2 p log 3 p + S 2 log p and a latency cost of \(O\left({\text{log}}^{3}p\right)\) O log 3 p , where \(\left|S\right|\) S is the separator size of a constructed graph and is related to the alteration degree of the shortest path of the dynamic graph. When \(k=O\left(\frac{n}{\sqrt{p}}\right)\) k = O n p and \(\left|S\right|=O\left(\frac{n}{\sqrt{p}}\right)\) S = O n p , the bandwidth and latency costs are reduced by a factor of \(O\left(\sqrt{p}/{\text{log}}^{3}p\right)\) O p / log 3 p and \(O\left(\sqrt{p}/\text{log}p\right)\) O p / log p , respectively.