adplus-dvertising
frame-decoration

Question

Let G(V, E) be a directed graph where every edge has weight as either 1, 2 or 5, what is the algorithm used for the shortest path from a given source vertex to a given destination vertex to get the time complexity of O(V+E)?

a.

BFS

b.

DFS

c.

Binary search

d.

Radix sort

Posted under Discrete Mathematics

Answer: (a).BFS

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Let G(V, E) be a directed graph where every edge has weight as either 1, 2 or 5, what is the algorithm used for the shortest path from a given source vertex to a given destination...

Similar Questions

Discover Related MCQs

Q. The chromatic number of a graph is the property of ____________

Q. If a graph G is k-colorable and k<n, for any integer n then it is ___________

Q. If Cₙ is the nth cyclic graph, where n>3 and n is odd. Determine the value of X(Cₙ).

Q. Determine the density of a planar graph with 34 edges and 13 nodes.

Q. If the number of vertices of a chromatic polynomial PG is 56, what is the degree of PG?

Q. For a connected planar simple graph G=(V, E) with e=|E|=16 and v=|V|=9, then find the number of regions that are created when drawing a planar representation of the graph?

Q. Suppose G be a connected planar graph of order n≥5 and size m. If the length of the smallest cycle in G is 5, then which of the following is true?

Q. What is the number of edges of the greatest planar subgraph of K₃,₂ where m,n≤3?

Q. A non-planar graph can have ____________

Q. A direct product of a group G possess which of the following characteristics?

Q. In invariant algebra, some generators of group G1 that goes either into itself or zero under ______ with any other element of the algebra.

Q. Which of the following can be embedded in an algebraically closed group?

Q. Which of the following is the set of m×m invertible matrices?

Q. If any group is a manifold what is the dimension of that group?

Q. A Latin square graph is a representation of a _______

Q. There exists _______ between group homology and group cohomology of a finite group.

Q. In basic ring theory, any ring R1 may be embedded in its own ________

Q. In Modern particle physics there must exist ______________

Q. For any graph say G, Cayley graph is ______________