Monday, 1 April 2019

UGC NET Computer Science July 2018 - II Question 24

Question 24
24. Which of the following algorithms solves the single-source shortest paths ?

Options:
  1. (1) Prim’s algorithm
  2. (2) Floyd - Warshall algorithm
  3. (3) Johnson’s algorithm
  4. (4) Dijkstra’s algorithm
Answer : (4) Dijkstra’s algorithm

Explanation Question 24
  • Prim's algorithm = Min Cost spanning tree
  • Floys-Warshall algorithm = All pair shortest path
  • Johnson's algorithm = All pair shortest path
  • Dijkstra's algorithm = Single source shortest path
  • Bellman - Ford = Single source shortest path

The Floyd Warshall Algorithm is for solving the All Pairs Shortest Path problem. The problem is to find shortest distances between every pair of vertices in a given edge weighted directed Graph.

Dijkstra’s Algorithm allows you to calculate the shortest path between one node of your choosing and every other node in a graph. Dijkstra’s algorithm solves the single-source shortest paths.

So, Option (4) is correct answer.


PreviousNext
UGC NET CS 2018 July - II Question 23UGC NET CS 2018 July - II Question 25

No comments:

Post a Comment

UGC NET Computer Science December 2019 | Question 16

Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...

Popular Posts