https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Parallel_single-source_shortest_path_algorithm Parallel single-source shortest path algorithm - Revision history 2025-05-25T08:10:10Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.2 https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1250833868&oldid=prev JJMC89 bot III: Moving :Category:Algorithms in graph theory to :Category:Graph algorithms per Wikipedia:Categories for discussion/Log/2024 October 4 2024-10-12T19:57:34Z <p>Moving <a href="/w/index.php?title=Category:Algorithms_in_graph_theory&amp;action=edit&amp;redlink=1" class="new" title="Category:Algorithms in graph theory (page does not exist)">Category:Algorithms in graph theory</a> to <a href="/wiki/Category:Graph_algorithms" title="Category:Graph algorithms">Category:Graph algorithms</a> per <a href="/wiki/Wikipedia:Categories_for_discussion/Log/2024_October_4" title="Wikipedia:Categories for discussion/Log/2024 October 4">Wikipedia:Categories for discussion/Log/2024 October 4</a></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:57, 12 October 2024</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 223:</td> <td colspan="2" class="diff-lineno">Line 223:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<del style="font-weight: bold; text-decoration: none;">Algorithms</del> <del style="font-weight: bold; text-decoration: none;">in graph theory</del>]]</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<ins style="font-weight: bold; text-decoration: none;">Graph</ins> <ins style="font-weight: bold; text-decoration: none;">algorithms</ins>]]</div></td> </tr> </table> JJMC89 bot III https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1250714267&oldid=prev JJMC89 bot III: Moving :Category:Graph algorithms to :Category:Algorithms in graph theory per Wikipedia:Categories for discussion/Log/2024 October 4#Category:Graph algorithms 2024-10-12T02:24:46Z <p>Moving <a href="/wiki/Category:Graph_algorithms" title="Category:Graph algorithms">Category:Graph algorithms</a> to <a href="/w/index.php?title=Category:Algorithms_in_graph_theory&amp;action=edit&amp;redlink=1" class="new" title="Category:Algorithms in graph theory (page does not exist)">Category:Algorithms in graph theory</a> per <a href="/wiki/Wikipedia:Categories_for_discussion/Log/2024_October_4#Category:Graph_algorithms" title="Wikipedia:Categories for discussion/Log/2024 October 4">Wikipedia:Categories for discussion/Log/2024 October 4#Category:Graph algorithms</a></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 02:24, 12 October 2024</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 223:</td> <td colspan="2" class="diff-lineno">Line 223:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<del style="font-weight: bold; text-decoration: none;">Graph</del> <del style="font-weight: bold; text-decoration: none;">algorithms</del>]]</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<ins style="font-weight: bold; text-decoration: none;">Algorithms</ins> <ins style="font-weight: bold; text-decoration: none;">in graph theory</ins>]]</div></td> </tr> </table> JJMC89 bot III https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1177464238&oldid=prev Citation bot: Removed parameters. | Use this bot. Report bugs. | #UCB_CommandLine 2023-09-27T17:57:07Z <p>Removed parameters. | <a href="/wiki/Wikipedia:UCB" class="mw-redirect" title="Wikipedia:UCB">Use this bot</a>. <a href="/wiki/Wikipedia:DBUG" class="mw-redirect" title="Wikipedia:DBUG">Report bugs</a>. | #UCB_CommandLine</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:57, 27 September 2023</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 133:</td> <td colspan="2" class="diff-lineno">Line 133:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Graph 500 ===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Graph 500 ===</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The third computational kernel of the [[Graph500|Graph 500]] benchmark runs a single-source shortest path computation.&lt;ref&gt;{{Cite web|url=https://graph500.org/?page_id=12#sec-7|title=Graph 500|last=|first=|date=9 March 2017|website=<del style="font-weight: bold; text-decoration: none;">|url-status=live</del>|archive-url=|archive-date=|access-date=}}&lt;/ref&gt; The reference implementation of the Graph 500 benchmark uses the delta stepping algorithm for this computation.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The third computational kernel of the [[Graph500|Graph 500]] benchmark runs a single-source shortest path computation.&lt;ref&gt;{{Cite web|url=https://graph500.org/?page_id=12#sec-7|title=Graph 500|last=|first=|date=9 March 2017|website=|archive-url=|archive-date=|access-date=}}&lt;/ref&gt; The reference implementation of the Graph 500 benchmark uses the delta stepping algorithm for this computation.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Radius stepping algorithm ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Radius stepping algorithm ==</div></td> </tr> </table> Citation bot https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1169322911&oldid=prev Citation bot: Alter: date, title, template type. Add: chapter, authors 1-1. Removed parameters. Some additions/deletions were parameter name changes. | Use this bot. Report bugs. | Suggested by Headbomb | Linked from Wikipedia:WikiProject_Academic_Journals/Journals_cited_by_Wikipedia/Sandbox3 | #UCB_webform_linked 1490/2306 2023-08-08T11:11:33Z <p>Alter: date, title, template type. Add: chapter, authors 1-1. Removed parameters. Some additions/deletions were parameter name changes. | <a href="/wiki/Wikipedia:UCB" class="mw-redirect" title="Wikipedia:UCB">Use this bot</a>. <a href="/wiki/Wikipedia:DBUG" class="mw-redirect" title="Wikipedia:DBUG">Report bugs</a>. | Suggested by Headbomb | Linked from Wikipedia:WikiProject_Academic_Journals/Journals_cited_by_Wikipedia/Sandbox3 | #UCB_webform_linked 1490/2306</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:11, 8 August 2023</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 4:</td> <td colspan="2" class="diff-lineno">Line 4:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Problem definition ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Problem definition ==</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Let &lt;math&gt;G=(V,E)&lt;/math&gt; be a directed graph with &lt;math&gt;|V|=n&lt;/math&gt; nodes and &lt;math&gt;|E|=m&lt;/math&gt; edges. Let &lt;math&gt;s&lt;/math&gt; be a distinguished vertex (called "source") and &lt;math&gt;c&lt;/math&gt; be a function assigning a non-negative real-valued weight to each edge. The goal of the single-source-shortest-paths problem is to compute, for every vertex &lt;math&gt;v&lt;/math&gt; reachable from &lt;math&gt;s&lt;/math&gt;, the weight of a minimum-weight path from &lt;math&gt;s&lt;/math&gt; to &lt;math&gt;v&lt;/math&gt;, denoted by &lt;math&gt;\operatorname{dist}(s,v)&lt;/math&gt; and abbreviated &lt;math&gt;\operatorname{dist}(v)&lt;/math&gt;. The weight of a path is the sum of the weights of its edges. We set &lt;math&gt;\operatorname{dist}(u,v):=\infty&lt;/math&gt; if &lt;math&gt;v&lt;/math&gt; is unreachable from &lt;math&gt;u&lt;/math&gt;.&lt;ref name=":0"&gt;{{Cite journal|<del style="font-weight: bold; text-decoration: none;">last</del>=Meyer|<del style="font-weight: bold; text-decoration: none;">first</del>=U.|last2=Sanders|first2=P.|date=2003-10-01|title=Δ-stepping: a parallelizable shortest path algorithm|journal=Journal of Algorithms|series=1998 European Symposium on Algorithms|volume=49|issue=1|pages=114–152|doi=10.1016/S0196-6774(03)00076-2|issn=0196-6774|doi-access=free}}&lt;/ref&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Let &lt;math&gt;G=(V,E)&lt;/math&gt; be a directed graph with &lt;math&gt;|V|=n&lt;/math&gt; nodes and &lt;math&gt;|E|=m&lt;/math&gt; edges. Let &lt;math&gt;s&lt;/math&gt; be a distinguished vertex (called "source") and &lt;math&gt;c&lt;/math&gt; be a function assigning a non-negative real-valued weight to each edge. The goal of the single-source-shortest-paths problem is to compute, for every vertex &lt;math&gt;v&lt;/math&gt; reachable from &lt;math&gt;s&lt;/math&gt;, the weight of a minimum-weight path from &lt;math&gt;s&lt;/math&gt; to &lt;math&gt;v&lt;/math&gt;, denoted by &lt;math&gt;\operatorname{dist}(s,v)&lt;/math&gt; and abbreviated &lt;math&gt;\operatorname{dist}(v)&lt;/math&gt;. The weight of a path is the sum of the weights of its edges. We set &lt;math&gt;\operatorname{dist}(u,v):=\infty&lt;/math&gt; if &lt;math&gt;v&lt;/math&gt; is unreachable from &lt;math&gt;u&lt;/math&gt;.&lt;ref name=":0"&gt;{{Cite journal|<ins style="font-weight: bold; text-decoration: none;">last1</ins>=Meyer|<ins style="font-weight: bold; text-decoration: none;">first1</ins>=U.|last2=Sanders|first2=P.|date=2003-10-01|title=Δ-stepping: a parallelizable shortest path algorithm|journal=Journal of Algorithms|series=1998 European Symposium on Algorithms|volume=49|issue=1|pages=114–152|doi=10.1016/S0196-6774(03)00076-2|issn=0196-6774|doi-access=free}}&lt;/ref&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Sequential shortest path algorithms commonly apply iterative labeling methods based on maintaining a tentative distance for all nodes; &lt;math&gt;\operatorname{tent}(v)&lt;/math&gt; is always &lt;math&gt;\infty&lt;/math&gt; or the weight of some path from &lt;math&gt;s&lt;/math&gt; to &lt;math&gt;v&lt;/math&gt; and hence an upper bound on &lt;math&gt;\operatorname{dist}(v)&lt;/math&gt;. Tentative distances are improved by performing edge relaxations, i.e., for an edge &lt;math&gt;(v,w)\in E&lt;/math&gt; the algorithm sets &lt;math&gt;\operatorname{tent}(w):=\min\{\operatorname{tent}(w), \operatorname{tent}(v)+c(v,w)\}&lt;/math&gt;.&lt;ref name=":0" /&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Sequential shortest path algorithms commonly apply iterative labeling methods based on maintaining a tentative distance for all nodes; &lt;math&gt;\operatorname{tent}(v)&lt;/math&gt; is always &lt;math&gt;\infty&lt;/math&gt; or the weight of some path from &lt;math&gt;s&lt;/math&gt; to &lt;math&gt;v&lt;/math&gt; and hence an upper bound on &lt;math&gt;\operatorname{dist}(v)&lt;/math&gt;. Tentative distances are improved by performing edge relaxations, i.e., for an edge &lt;math&gt;(v,w)\in E&lt;/math&gt; the algorithm sets &lt;math&gt;\operatorname{tent}(w):=\min\{\operatorname{tent}(w), \operatorname{tent}(v)+c(v,w)\}&lt;/math&gt;.&lt;ref name=":0" /&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 133:</td> <td colspan="2" class="diff-lineno">Line 133:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Graph 500 ===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Graph 500 ===</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The third computational kernel of the [[Graph500|Graph 500]] benchmark runs a single-source shortest path computation.&lt;ref&gt;{{Cite web|url=https://graph500.org/?page_id=12#sec-7|title=Graph 500|last=|first=|date=|website=|url-status=live|archive-url=|archive-date=|access-date=}}&lt;/ref&gt; The reference implementation of the Graph 500 benchmark uses the delta stepping algorithm for this computation.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The third computational kernel of the [[Graph500|Graph 500]] benchmark runs a single-source shortest path computation.&lt;ref&gt;{{Cite web|url=https://graph500.org/?page_id=12#sec-7|title=Graph 500|last=|first=|date=<ins style="font-weight: bold; text-decoration: none;">9 March 2017</ins>|website=|url-status=live|archive-url=|archive-date=|access-date=}}&lt;/ref&gt; The reference implementation of the Graph 500 benchmark uses the delta stepping algorithm for this computation.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Radius stepping algorithm ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Radius stepping algorithm ==</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For the radius stepping algorithm, we must assume that our graph &lt;math&gt;G&lt;/math&gt; is undirected.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For the radius stepping algorithm, we must assume that our graph &lt;math&gt;G&lt;/math&gt; is undirected.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The input to the algorithm is a weighted, undirected graph, a source vertex, and a target radius value for every vertex, given as a function &lt;math&gt;r : V \rightarrow \mathbb{R}_+&lt;/math&gt;.&lt;ref name=":1"&gt;{{Cite <del style="font-weight: bold; text-decoration: none;">journal</del>|<del style="font-weight: bold; text-decoration: none;">last</del>=Blelloch|<del style="font-weight: bold; text-decoration: none;">first</del>=Guy E.|last2=Gu|first2=Yan|last3=Sun|first3=Yihan|last4=Tangwongsan|first4=Kanat<del style="font-weight: bold; text-decoration: none;">|date=2016</del>|title<del style="font-weight: bold; text-decoration: none;">=Parallel Shortest Paths Using Radius Stepping|journal</del>=Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures <del style="font-weight: bold; text-decoration: none;">-</del> <del style="font-weight: bold; text-decoration: none;">SPAA</del> <del style="font-weight: bold; text-decoration: none;">'16</del>|pages=443–454|location=New York, New York, USA|publisher=ACM Press|doi=10.1145/2935764.2935765|isbn=978-1-4503-4210-0|doi-access=free}}&lt;/ref&gt; The algorithm visits vertices in increasing distance from the source &lt;math&gt;s&lt;/math&gt;. On each step &lt;math&gt;i&lt;/math&gt;, the Radius-Stepping increments the radius centered at &lt;math&gt;s&lt;/math&gt; from &lt;math&gt;d_{i-1}&lt;/math&gt; to &lt;math&gt;d_i&lt;/math&gt; , and settles all vertices &lt;math&gt;v&lt;/math&gt; in the annulus &lt;math&gt;d_{i-1}&lt;d(s,v)\leq d_i&lt;/math&gt;.&lt;ref name=":1" /&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The input to the algorithm is a weighted, undirected graph, a source vertex, and a target radius value for every vertex, given as a function &lt;math&gt;r : V \rightarrow \mathbb{R}_+&lt;/math&gt;.&lt;ref name=":1"&gt;{{Cite <ins style="font-weight: bold; text-decoration: none;">book</ins>|<ins style="font-weight: bold; text-decoration: none;">last1</ins>=Blelloch|<ins style="font-weight: bold; text-decoration: none;">first1</ins>=Guy E.|last2=Gu|first2=Yan|last3=Sun|first3=Yihan|last4=Tangwongsan|first4=Kanat|title=Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures <ins style="font-weight: bold; text-decoration: none;">|chapter=Parallel</ins> <ins style="font-weight: bold; text-decoration: none;">Shortest</ins> <ins style="font-weight: bold; text-decoration: none;">Paths Using Radius Stepping |date=2016</ins>|pages=443–454|location=New York, New York, USA|publisher=ACM Press|doi=10.1145/2935764.2935765|isbn=978-1-4503-4210-0|doi-access=free}}&lt;/ref&gt; The algorithm visits vertices in increasing distance from the source &lt;math&gt;s&lt;/math&gt;. On each step &lt;math&gt;i&lt;/math&gt;, the Radius-Stepping increments the radius centered at &lt;math&gt;s&lt;/math&gt; from &lt;math&gt;d_{i-1}&lt;/math&gt; to &lt;math&gt;d_i&lt;/math&gt; , and settles all vertices &lt;math&gt;v&lt;/math&gt; in the annulus &lt;math&gt;d_{i-1}&lt;d(s,v)\leq d_i&lt;/math&gt;.&lt;ref name=":1" /&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Following is the radius stepping algorithm in pseudocode:</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Following is the radius stepping algorithm in pseudocode:</div></td> </tr> </table> Citation bot https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1150879822&oldid=prev Cadduk: correct definition of sssp 2023-04-20T15:50:38Z <p>correct definition of sssp</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 15:50, 20 April 2023</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>A central problem in algorithmic [[graph theory]] is the [[shortest path problem]]. One of the generalizations of the shortest path problem is known as the '''single-source-shortest-paths (SSSP)''' problem, which consists of finding the shortest <del style="font-weight: bold; text-decoration: none;">path</del> <del style="font-weight: bold; text-decoration: none;">between</del> <del style="font-weight: bold; text-decoration: none;">every</del> <del style="font-weight: bold; text-decoration: none;">pair</del> <del style="font-weight: bold; text-decoration: none;">of</del> vertices in <del style="font-weight: bold; text-decoration: none;">a</del> graph. There are classical [[sequential algorithm]]s which solve this problem, such as [[Dijkstra's algorithm]]. In this article, however, we present two [[parallel algorithm]]s solving this problem.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>A central problem in algorithmic [[graph theory]] is the [[shortest path problem]]. One of the generalizations of the shortest path problem is known as the '''single-source-shortest-paths (SSSP)''' problem, which consists of finding the shortest <ins style="font-weight: bold; text-decoration: none;">paths</ins> <ins style="font-weight: bold; text-decoration: none;">from</ins> <ins style="font-weight: bold; text-decoration: none;">a</ins> <ins style="font-weight: bold; text-decoration: none;">source</ins> <ins style="font-weight: bold; text-decoration: none;">vertex &lt;math&gt;s&lt;/math&gt; to all other</ins> vertices in <ins style="font-weight: bold; text-decoration: none;">the</ins> graph. There are classical [[sequential algorithm]]s which solve this problem, such as [[Dijkstra's algorithm]]. In this article, however, we present two [[parallel algorithm]]s solving this problem.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Another variation of the problem is the all-pairs-shortest-paths (APSP) problem, which also has parallel approaches: [[Parallel all-pairs shortest path algorithm]].</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Another variation of the problem is the all-pairs-shortest-paths (APSP) problem, which also has parallel approaches: [[Parallel all-pairs shortest path algorithm]].</div></td> </tr> </table> Cadduk https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1149658508&oldid=prev 145.90.101.204: /* Delta stepping algorithm */ 2023-04-13T16:22:00Z <p><span class="autocomment">Delta stepping algorithm</span></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:22, 13 April 2023</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 24:</td> <td colspan="2" class="diff-lineno">Line 24:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 1 '''foreach''' &lt;math&gt;v \in V&lt;/math&gt; '''do''' &lt;math&gt;\operatorname{tent}(v):=\infty&lt;/math&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 1 '''foreach''' &lt;math&gt;v \in V&lt;/math&gt; '''do''' &lt;math&gt;\operatorname{tent}(v):=\infty&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 2 &lt;math&gt;relax(s, 0)&lt;/math&gt;; (*Insert source node with distance 0*)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 2 &lt;math&gt;relax(s, 0)&lt;/math&gt;; (*Insert source node with distance 0*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 3 '''while''' &lt;math&gt;\lnot isEmpty(B)&lt;/math&gt; '''do'''<del style="font-weight: bold; text-decoration: none;"> </del> (*A phase: Some queued nodes left (a)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 3 '''while''' &lt;math&gt;\lnot isEmpty(B)&lt;/math&gt; '''do''' (*A phase: Some queued nodes left (a)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 4 &lt;math&gt;i:=\min\{j\geq 0: B[j]\neq \emptyset\}&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*Smallest nonempty bucket (b)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 4 &lt;math&gt;i:=\min\{j\geq 0: B[j]\neq \emptyset\}&lt;/math&gt; (*Smallest nonempty bucket (b)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 5 &lt;math&gt;R:=\emptyset&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*No nodes deleted for bucket B[i] yet*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 5 &lt;math&gt;R:=\emptyset&lt;/math&gt; (*No nodes deleted for bucket B[i] yet*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 6 '''while''' &lt;math&gt;B[i]\neq \emptyset&lt;/math&gt; '''do'''<del style="font-weight: bold; text-decoration: none;"> </del> (*New phase (c)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 6 '''while''' &lt;math&gt;B[i]\neq \emptyset&lt;/math&gt; '''do''' (*New phase (c)*)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 7 &lt;math&gt;Req:=findRequests(B[i],light)&lt;/math&gt; (*Create requests for light edges (d)*)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 7 &lt;math&gt;Req:=findRequests(B[i],light)&lt;/math&gt; (*Create requests for light edges (d)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 8 &lt;math&gt;R:=R\cup B[i]&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*Remember deleted nodes (e)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 8 &lt;math&gt;R:=R\cup B[i]&lt;/math&gt; (*Remember deleted nodes (e)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 9 &lt;math&gt;B[i]:=\emptyset&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*Current bucket empty*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 9 &lt;math&gt;B[i]:=\emptyset&lt;/math&gt; (*Current bucket empty*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 10 &lt;math&gt;relaxRequests(Req)&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*Do relaxations, nodes may (re)enter B[i] (f)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 10<ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;relaxRequests(Req)&lt;/math&gt; (*Do relaxations, nodes may (re)enter B[i] (f)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 11 &lt;math&gt;Req:=findRequests(R,heavy)&lt;/math&gt; (*Create requests for heavy edges (g)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 11 &lt;math&gt;Req:=findRequests(R,heavy)&lt;/math&gt;<ins style="font-weight: bold; text-decoration: none;"> </ins> (*Create requests for heavy edges (g)*)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 12 &lt;math&gt;relaxRequests(Req)&lt;/math&gt; (*Relaxations will not refill B[i] (h)*)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 12 &lt;math&gt;relaxRequests(Req)&lt;/math&gt; (*Relaxations will not refill B[i] (h)*)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 13</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 13</div></td> </tr> </table> 145.90.101.204 https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1134578239&oldid=prev Frap: Format code 2023-01-19T10:38:15Z <p>Format code</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 10:38, 19 January 2023</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 23:</td> <td colspan="2" class="diff-lineno">Line 23:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Following is the delta stepping algorithm in pseudocode:</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Following is the delta stepping algorithm in pseudocode:</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 1 '''foreach''' &lt;math&gt;v \in V&lt;/math&gt; '''do''' &lt;math&gt;\operatorname{tent}(v):=\infty&lt;/math&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 1 '''foreach''' &lt;math&gt;v \in V&lt;/math&gt; '''do''' &lt;math&gt;\operatorname{tent}(v):=\infty&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 2 &lt;math&gt;relax(s,0)&lt;/math&gt;; (*Insert source node with distance 0*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 2 &lt;math&gt;relax(s,<ins style="font-weight: bold; text-decoration: none;"> </ins>0)&lt;/math&gt;; (*Insert source node with distance 0*)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 3 '''while''' &lt;math&gt;\lnot isEmpty(B)&lt;/math&gt; '''do''' (*A phase: Some queued nodes left (a)*)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 3 '''while''' &lt;math&gt;\lnot isEmpty(B)&lt;/math&gt; '''do''' (*A phase: Some queued nodes left (a)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 4 <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;i:=\min\{j\geq 0: B[j]\neq \emptyset\}&lt;/math&gt; (*Smallest nonempty bucket (b)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 4 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;i:=\min\{j\geq 0: B[j]\neq \emptyset\}&lt;/math&gt; (*Smallest nonempty bucket (b)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 5 <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;R:=\emptyset&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*No nodes deleted for bucket B[i] yet*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 5 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;R:=\emptyset&lt;/math&gt; (*No nodes deleted for bucket B[i] yet*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 6 <del style="font-weight: bold; text-decoration: none;">|</del> '''while''' &lt;math&gt;B[i]\neq \emptyset&lt;/math&gt; '''do'''<del style="font-weight: bold; text-decoration: none;"> </del> (*New phase (c)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 6 <ins style="font-weight: bold; text-decoration: none;"> </ins> '''while''' &lt;math&gt;B[i]\neq \emptyset&lt;/math&gt; '''do''' (*New phase (c)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 7 <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;Req:=findRequests(B[i],light)&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*Create requests for light edges (d)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 7 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;Req:=findRequests(B[i],light)&lt;/math&gt; (*Create requests for light edges (d)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 8 <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;R:=R\cup B[i]&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*Remember deleted nodes (e)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 8 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;R:=R\cup B[i]&lt;/math&gt; (*Remember deleted nodes (e)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 9 <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;B[i]:=\emptyset&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*Current bucket empty*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 9 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;B[i]:=\emptyset&lt;/math&gt; (*Current bucket empty*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 10 <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;relaxRequests(Req)&lt;/math&gt; (*Do relaxations, nodes may (re)enter B[i] (f)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 10 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;relaxRequests(Req)&lt;/math&gt; (*Do relaxations, nodes may (re)enter B[i] (f)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 11 <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;Req:=findRequests(R,heavy)&lt;/math&gt; (*Create requests for heavy edges (g)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 11 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;Req:=findRequests(R,heavy)&lt;/math&gt; (*Create requests for heavy edges (g)*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 12 <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;relaxRequests(Req)&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*Relaxations will not refill B[i] (h)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 12 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;relaxRequests(Req)&lt;/math&gt; (*Relaxations will not refill B[i] (h)*)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 13</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 13</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 14 '''<del style="font-weight: bold; text-decoration: none;">Function</del>''' &lt;math&gt;findRequests(V',kind:\{\text{light}, \text{heavy}\})&lt;/math&gt;:set of Request</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 14 '''<ins style="font-weight: bold; text-decoration: none;">function</ins>''' &lt;math&gt;findRequests(V',kind:\{\text{light}, \text{heavy}\})&lt;/math&gt;:set of Request</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 15 '''return''' &lt;math&gt;\{(w, \operatorname{tent}(v)+c(v,w)): v\in V' \land (v,w) \in E_\text{kind}\}&lt;/math&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 15<ins style="font-weight: bold; text-decoration: none;"> </ins> '''return''' &lt;math&gt;\{(w, \operatorname{tent}(v)+c(v,w)): v\in V' \land (v,w) \in E_\text{kind}\}&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 16</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 16</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 17 '''<del style="font-weight: bold; text-decoration: none;">Procedure</del>''' &lt;math&gt;relaxRequests(Req)&lt;/math&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 17 '''<ins style="font-weight: bold; text-decoration: none;">procedure</ins>''' &lt;math&gt;relaxRequests(Req)&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 18 '''foreach''' &lt;math&gt;(w,x)\in Req&lt;/math&gt; '''do''' &lt;math&gt;relax(w,x)&lt;/math&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 18<ins style="font-weight: bold; text-decoration: none;"> </ins> '''foreach''' &lt;math&gt;(w,<ins style="font-weight: bold; text-decoration: none;"> </ins>x)\in Req&lt;/math&gt; '''do''' &lt;math&gt;relax(w,x)&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 19</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 19</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 20 '''<del style="font-weight: bold; text-decoration: none;">Procedure</del>''' &lt;math&gt;relax(w,x)&lt;/math&gt; (*Insert or move w in B if &lt;math&gt;x&lt;\operatorname{tent}(w)&lt;/math&gt;*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 20 '''<ins style="font-weight: bold; text-decoration: none;">procedure</ins>''' &lt;math&gt;relax(w,x)&lt;/math&gt; (*Insert or move w in B if &lt;math&gt;x&lt;\operatorname{tent}(w)&lt;/math&gt;*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 21 '''if''' &lt;math&gt;x &lt; \operatorname{tent}(w)&lt;/math&gt; '''then'''</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 21<ins style="font-weight: bold; text-decoration: none;"> </ins> '''if''' &lt;math&gt;x &lt; \operatorname{tent}(w)&lt;/math&gt; '''then'''</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 22 <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;B[\lfloor \operatorname{tent}(w)/\Delta\rfloor]:=B[\lfloor \operatorname{tent}(w)/\Delta\rfloor]\setminus \{w\} &lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*If in, remove from old bucket*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 22 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;B[\lfloor \operatorname{tent}(w)/\Delta\rfloor]:=B[\lfloor \operatorname{tent}(w)/\Delta\rfloor]\setminus \{w\} &lt;/math&gt; (*If in, remove from old bucket*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 23 <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;B[\lfloor x/\Delta\rfloor]:=B[\lfloor x/\Delta\rfloor]\cup \{w\} &lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del> (*Insert into new bucket*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 23 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;B[\lfloor x/\Delta\rfloor]:=B[\lfloor x/\Delta\rfloor]\cup \{w\} &lt;/math&gt; (*Insert into new bucket*)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 24 <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;\operatorname{tent}(w):=x &lt;/math&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 24 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;\operatorname{tent}(w):=x &lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Example ===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Example ===</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 146:</td> <td colspan="2" class="diff-lineno">Line 146:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 2 '''foreach''' &lt;math&gt;v \in N(s)&lt;/math&gt; '''do''' &lt;math&gt;\delta(v)\leftarrow w(s,v)&lt;/math&gt;, &lt;math&gt;S_0\leftarrow \{s\}&lt;/math&gt;, &lt;math&gt;i \leftarrow 1&lt;/math&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 2 '''foreach''' &lt;math&gt;v \in N(s)&lt;/math&gt; '''do''' &lt;math&gt;\delta(v)\leftarrow w(s,v)&lt;/math&gt;, &lt;math&gt;S_0\leftarrow \{s\}&lt;/math&gt;, &lt;math&gt;i \leftarrow 1&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 3 '''while''' &lt;math&gt;|S_{i-1}|&lt;|V|&lt;/math&gt; '''do'''</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 3 '''while''' &lt;math&gt;|S_{i-1}|&lt;|V|&lt;/math&gt; '''do'''</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 4 <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;d_i\leftarrow \min_{v\in V\setminus S_{i-1}}\{\delta(v) + r(v)\}&lt;/math&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 4 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;d_i\leftarrow \min_{v\in V\setminus S_{i-1}}\{\delta(v) + r(v)\}&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 5 <del style="font-weight: bold; text-decoration: none;">|</del> '''repeat''' </div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 5 <ins style="font-weight: bold; text-decoration: none;"> </ins> '''repeat''' </div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 6 <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> '''foreach''' &lt;math&gt;u \in V\setminus S_{i-1}&lt;/math&gt; s.t &lt;math&gt;\delta(u) \leq d_i&lt;/math&gt; '''do'''</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 6 <ins style="font-weight: bold; text-decoration: none;"> </ins> '''foreach''' &lt;math&gt;u \in V\setminus S_{i-1}&lt;/math&gt; s.t &lt;math&gt;\delta(u) \leq d_i&lt;/math&gt; '''do'''</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 7 <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> '''foreach''' &lt;math&gt;v \in N(u)\setminus S_{i-1}&lt;/math&gt; '''do'''</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 7 <ins style="font-weight: bold; text-decoration: none;"> </ins> '''foreach''' &lt;math&gt;v \in N(u)\setminus S_{i-1}&lt;/math&gt; '''do'''</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 8 <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;\delta(v) \leftarrow \min\{\delta(v), \delta(u)+w(u,v)\}&lt;/math&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 8 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;\delta(v) \leftarrow \min\{\delta(v), \delta(u)+w(u,v)\}&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 9 <del style="font-weight: bold; text-decoration: none;">|</del> '''until''' no &lt;math&gt;\delta(v)\leq d_i&lt;/math&gt; was updated</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 9 <ins style="font-weight: bold; text-decoration: none;"> </ins> '''until''' no &lt;math&gt;\delta(v)\leq d_i&lt;/math&gt; was updated</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 10 <del style="font-weight: bold; text-decoration: none;">|</del> ''&lt;math&gt;S_i=\{v\;|\;\delta(v)\leq d_i\}&lt;/math&gt;''</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 10 <ins style="font-weight: bold; text-decoration: none;"> </ins> ''&lt;math&gt;S_i=\{v\;|\;\delta(v)\leq d_i\}&lt;/math&gt;''</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 11 <del style="font-weight: bold; text-decoration: none;">|</del> &lt;math&gt;i=i+1&lt;/math&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 11 <ins style="font-weight: bold; text-decoration: none;"> </ins> &lt;math&gt;i=i+1&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 12 '''return''' &lt;math&gt;\delta(\cdot)&lt;/math&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 12 '''return''' &lt;math&gt;\delta(\cdot)&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For all &lt;math&gt;S\subseteq V&lt;/math&gt;, define &lt;math&gt;N(S)=\bigcup_{u\in S}\{v\in V\mid d(u,v)\in E\}&lt;/math&gt; to be the '''neighbor set''' of S. During the execution of standard [[breadth-first search]] or [[Dijkstra's algorithm]], the '''frontier''' is the neighbor set of all visited vertices.&lt;ref name=":1" /&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For all &lt;math&gt;S\subseteq V&lt;/math&gt;, define &lt;math&gt;N(S)=\bigcup_{u\in S}\{v\in V\mid d(u,v)\in E\}&lt;/math&gt; to be the '''neighbor set''' of S. During the execution of standard [[breadth-first search]] or [[Dijkstra's algorithm]], the '''frontier''' is the neighbor set of all visited vertices.&lt;ref name=":1" /&gt;</div></td> </tr> </table> Frap https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1120001785&oldid=prev C5fq2%%Z at 15:25, 4 November 2022 2022-11-04T15:25:42Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 15:25, 4 November 2022</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 41:</td> <td colspan="2" class="diff-lineno">Line 41:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 18 '''foreach''' &lt;math&gt;(w,x)\in Req&lt;/math&gt; '''do''' &lt;math&gt;relax(w,x)&lt;/math&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 18 '''foreach''' &lt;math&gt;(w,x)\in Req&lt;/math&gt; '''do''' &lt;math&gt;relax(w,x)&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 19</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 19</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 20 '''Procedure''' &lt;math&gt;relax(w,x)&lt;/math&gt; (*Insert or move w in B if x&lt;\operatorname{tent}(w)*)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 20 '''Procedure''' &lt;math&gt;relax(w,x)&lt;/math&gt; (*Insert or move w in B if <ins style="font-weight: bold; text-decoration: none;">&lt;math&gt;</ins>x&lt;\operatorname{tent}(w)<ins style="font-weight: bold; text-decoration: none;">&lt;/math&gt;</ins>*)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 21 '''if''' &lt;math&gt;x &lt; \operatorname{tent}(w)&lt;/math&gt; '''then'''</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 21 '''if''' &lt;math&gt;x &lt; \operatorname{tent}(w)&lt;/math&gt; '''then'''</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 22 | &lt;math&gt;B[\lfloor \operatorname{tent}(w)/\Delta\rfloor]:=B[\lfloor \operatorname{tent}(w)/\Delta\rfloor]\setminus \{w\} &lt;/math&gt; (*If in, remove from old bucket*)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 22 | &lt;math&gt;B[\lfloor \operatorname{tent}(w)/\Delta\rfloor]:=B[\lfloor \operatorname{tent}(w)/\Delta\rfloor]\setminus \{w\} &lt;/math&gt; (*If in, remove from old bucket*)</div></td> </tr> </table> C5fq2%%Z https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1114774882&oldid=prev David Eppstein: Category:Graph algorithms 2022-10-08T05:59:13Z <p><a href="/wiki/Category:Graph_algorithms" title="Category:Graph algorithms">Category:Graph algorithms</a></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 05:59, 8 October 2022</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 223:</td> <td colspan="2" class="diff-lineno">Line 223:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Graph <del style="font-weight: bold; text-decoration: none;">theory</del>]]</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Graph <ins style="font-weight: bold; text-decoration: none;">algorithms</ins>]]</div></td> </tr> </table> David Eppstein https://en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&diff=1025607280&oldid=prev Serols: Reverted edits by 39.50.105.233 (talk) (HG) (3.4.10) 2021-05-28T13:58:10Z <p>Reverted edits by <a href="/wiki/Special:Contributions/39.50.105.233" title="Special:Contributions/39.50.105.233">39.50.105.233</a> (<a href="/wiki/User_talk:39.50.105.233" title="User talk:39.50.105.233">talk</a>) (<a href="/wiki/Wikipedia:HG" class="mw-redirect" title="Wikipedia:HG">HG</a>) (3.4.10)</p> <a href="//en.wikipedia.org/w/index.php?title=Parallel_single-source_shortest_path_algorithm&amp;diff=1025607280&amp;oldid=1025593882">Show changes</a> Serols