GATE Overflow - Recent questions tagged shortest-path
https://gateoverflow.in/tag/shortest-path
Powered by Question2AnswerDijkstra's
https://gateoverflow.in/159433/dijkstras
I know that Dijkstra's Doesn't work for Negative weight cycle because it form a loop, Does it also true that it may or may not work for negative weight edge(without cycle) ?<br />
<br />
If it is not working for a negative weight edge(without cycle) give some example to prove it.Algorithmshttps://gateoverflow.in/159433/dijkstrasThu, 12 Oct 2017 09:20:10 +0000dijkstra
https://gateoverflow.in/152241/dijkstra
<p><img alt="" src="http://gateoverflow.in/?qa=blob&qa_blobid=18273984748153328244"></p>
<p> </p>
<p>If we run Dijkstra’s algorithm to find single source shortest path for the above edge weighted directed graph with ‘8’ as source. In what order do the nodes get included into the set of vertices for which the shortest path distances are finalized.</p>
<p> </p>Algorithmshttps://gateoverflow.in/152241/dijkstraThu, 14 Sep 2017 19:01:08 +0000How many simple path from u to v going through w?
https://gateoverflow.in/150924/how-many-simple-path-from-u-to-v-going-through-w
A complete graph on n vertices is an undirected graph in which every pair of distinct vertices is connected by an edge. A simple path in a graph is one in which no vertex is repeated. Let G be a complete graph on 10 vertices. Let u, v, w be three distinct vertices in G. How many simple paths are there from u to v going through w?<br />
<br />
Please explain in detail. Thank you.Graph Theoryhttps://gateoverflow.in/150924/how-many-simple-path-from-u-to-v-going-through-wSat, 09 Sep 2017 10:25:01 +0000Shortest Path Algorithms
https://gateoverflow.in/134856/shortest-path-algorithms
For a given undirected weighted graph G with V number of vertices, if you want to find all pair shortest paths then which one of the following is true ?<br />
<br />
a) run dijkstra's shortest path algorithm only once.<br />
<br />
b) run dijkstra's shortest path algorithm V times.<br />
<br />
What if the given graph is directed ?Algorithmshttps://gateoverflow.in/134856/shortest-path-algorithmsMon, 26 Jun 2017 16:35:24 +0000Shortest path
https://gateoverflow.in/128948/shortest-path
I have 2 doubts below, each can be True or False?<br />
a) Dijkstra's Algo will terminate even if there is a -ve edge or -ve cycle. <br />
b) At the termination of Bellman Ford, even if graph has -ve cycle, a correct shortest path is found for a vertex for which shortest path is well-defined.Algorithmshttps://gateoverflow.in/128948/shortest-pathMon, 08 May 2017 20:29:00 +0000Bellman Ford Shortest path
https://gateoverflow.in/124538/bellman-ford-shortest-path
Is the below statement correct:<br />
Bellman Ford finds all negative weight cycles in the graph.<br />
This is true or false?Algorithmshttps://gateoverflow.in/124538/bellman-ford-shortest-pathFri, 07 Apr 2017 04:46:52 +0000Bellman Ford
https://gateoverflow.in/124532/bellman-ford
If there is a negative edge cycle present in a graph, we all know that Bellman Ford has the capability to detect it. My doubt is that, even after the presence of a negative weighted cycle, will Bellman Ford Algorithm give the correct answer or it will simply say NO..shortest path cannot be computed!?Algorithmshttps://gateoverflow.in/124532/bellman-fordFri, 07 Apr 2017 03:12:02 +0000#Totally Confused# please tell Using Dijkstra Algorithm solve shortest path algorithm from A to D.
https://gateoverflow.in/124501/%23totally-confused%23-dijkstra-algorithm-shortest-algorithm
<p>Using DIjkstra algorithm solve shortest path algorithm from A to D <img alt="" src="http://gateoverflow.in/?qa=blob&qa_blobid=12187179665932342582"></p>Computer Networkshttps://gateoverflow.in/124501/%23totally-confused%23-dijkstra-algorithm-shortest-algorithmThu, 06 Apr 2017 21:51:09 +0000Calculate the shortest path using TSP Greedy Appraoch
https://gateoverflow.in/122626/calculate-the-shortest-path-using-tsp-greedy-appraoch
<p>Calculate the shortest path using TSP Greedy Appraoch</p>
<p><img alt="" src="http://gateoverflow.in/?qa=blob&qa_blobid=9182458824642466074"></p>Algorithmshttps://gateoverflow.in/122626/calculate-the-shortest-path-using-tsp-greedy-appraochSun, 26 Mar 2017 21:57:08 +0000Ace Test Series
https://gateoverflow.in/105342/ace-test-series
<p><img alt="" src="http://gateoverflow.in/?qa=blob&qa_blobid=558932567623179574"></p>Algorithmshttps://gateoverflow.in/105342/ace-test-seriesSat, 14 Jan 2017 11:48:16 +0000shortest path
https://gateoverflow.in/90275/shortest-path
<p>Let P be a shortest path from some vertex <span class="marker">s</span> to some other vertex<span class="marker"> t</span> in a directed graph. If the weight of each edge in the graph is increased by <span class="marker">one</span>, P will still be a shortest path from <span class="marker">s</span> to <span class="marker">t</span>. <span class="marker"><strong>T/F</strong></span></p>Algorithmshttps://gateoverflow.in/90275/shortest-pathTue, 06 Dec 2016 23:35:59 +0000Find shortest path
https://gateoverflow.in/86958/find-shortest-path
<p><img alt="" height="400" src="http://gateoverflow.in/?qa=blob&qa_blobid=12914640239353443282" width="1101"></p>Algorithmshttps://gateoverflow.in/86958/find-shortest-pathSun, 27 Nov 2016 11:53:14 +0000Bellman-ford
https://gateoverflow.in/79525/bellman-ford
<p><img alt="" src="http://gateoverflow.in/?qa=blob&qa_blobid=17695352499507862516"></p>Algorithmshttps://gateoverflow.in/79525/bellman-fordSun, 06 Nov 2016 19:16:55 +0000Dijkstra's algorithm
https://gateoverflow.in/79155/dijkstras-algorithm
What is the time complexity of Dijkstra’s algorithm if it is implemented using AVL Tree instead of Priority Queue over a graph G = (V, E)?Algorithmshttps://gateoverflow.in/79155/dijkstras-algorithmSat, 05 Nov 2016 15:43:36 +0000maximum distance
https://gateoverflow.in/79140/maximum-distance
<p><img alt="" src="http://gateoverflow.in/?qa=blob&qa_blobid=13008908500106657184"></p>
<p>Apply single source shortest path algorithm on the given graph using vertex ‘A’ as the source. What is the maximum possible distance between vertex A to vertex G. (Assume exclude infinity).</p>
<p>Ans is 28.</p>Algorithmshttps://gateoverflow.in/79140/maximum-distanceSat, 05 Nov 2016 14:57:56 +0000Dijkstra's Agorithm
https://gateoverflow.in/78819/dijkstras-agorithm
When the graph contain negetive weight edges but no negetive weight cycle, in this case can dijkstra leads to incorrect result?Algorithmshttps://gateoverflow.in/78819/dijkstras-agorithmFri, 04 Nov 2016 14:10:54 +0000shortest path
https://gateoverflow.in/76836/shortest-path
<p><img alt="" src="http://gateoverflow.in/?qa=blob&qa_blobid=11284675840787970841"></p>Algorithmshttps://gateoverflow.in/76836/shortest-pathWed, 26 Oct 2016 08:41:54 +0000Shortest path length
https://gateoverflow.in/76834/shortest-path-length
<p><img alt="" src="http://gateoverflow.in/?qa=blob&qa_blobid=15271821014043772007"></p>Algorithmshttps://gateoverflow.in/76834/shortest-path-lengthWed, 26 Oct 2016 08:39:37 +0000MADE EASY TEST
https://gateoverflow.in/69507/made-easy-test
<p>For the graph given below Dijkstra’s algorithm does not provide correct shortest path tree.</p>
<p><img alt="" src="http://onlinetestseriesmadeeasy.in/madeeasy/document/questionImages/images/s17(5).png"></p>
<p>Suppose a new graph that is different only in weight between Q to S is created. The number of values of edge [Q to S] that ensures that Dijkstra’s provide the correct shortest path tree where the values of edge (Q to S) ∈ [–20, 20] and ‘P’ is the source vertex are ______.</p>Algorithmshttps://gateoverflow.in/69507/made-easy-testSat, 24 Sep 2016 17:45:03 +0000Is Bellman Ford Dynamic Programming approach ?
https://gateoverflow.in/59487/is-bellman-ford-dynamic-programming-approach
Is bellman ford a dynamic programming approach? If yes, what is the reason behind it? How do we find an optimal substructure and overlapping sub problems in this ?Algorithmshttps://gateoverflow.in/59487/is-bellman-ford-dynamic-programming-approachFri, 22 Jul 2016 07:59:34 +0000Bellman Ford Variation in Data Structures, tricky test ?
https://gateoverflow.in/56823/bellman-ford-variation-in-data-structures-tricky-test
We have a Directed Graph with 100 vertexes. v1 --> v2 --> ... v100 and all edges weights is equal to 1. we want to used bellman-ford for finding all shortest paths from v1 to other vertexes. this algorithm in each step check all edges in arbitrary order. if in each step the shortest distance v1 to all others vertexes is not changed, this algorithm halt. the number of steps is related to checking order of edges. what is the minimum and maximum of steps in this problem?<br />
<br />
ُSolution says 2 and 100.<br />
<br />
anyone can say how the min and max steps is calculated?DShttps://gateoverflow.in/56823/bellman-ford-variation-in-data-structures-tricky-testSun, 10 Jul 2016 06:10:43 +0000ISRO2007-80
https://gateoverflow.in/49651/isro2007-80
<p>Djikstra’s algorithm is used to</p>
<ol style="list-style-type: upper-alpha;">
<li>Create LSAs</li>
<li>Flood an internet with information</li>
<li>Calculate the routing tables</li>
<li>Create a link state database</li>
</ol>
Algorithmshttps://gateoverflow.in/49651/isro2007-80Fri, 10 Jun 2016 11:47:01 +0000Do Prim’s and Kruskal’s algorithms still work if the edge weights are allowed to be negative?
https://gateoverflow.in/19537/prims-kruskals-algorithms-still-weights-allowed-negative
<p><img alt="" height="216" src="http://gateoverflow.in/?qa=blob&qa_blobid=8674054686674281952" width="233"></p>
Algorithmshttps://gateoverflow.in/19537/prims-kruskals-algorithms-still-weights-allowed-negativeTue, 13 Oct 2015 11:58:56 +0000dijkstra's algo
https://gateoverflow.in/19504/dijkstras-algo
<p><img alt="" height="216" src="http://gateoverflow.in/?qa=blob&qa_blobid=6657852275262850126" width="233"></p>
Algorithmshttps://gateoverflow.in/19504/dijkstras-algoMon, 12 Oct 2015 20:21:10 +0000