retagged by
708 views
0 votes
0 votes
can anyone explain how dijkstras will behave as BFS whwn a graph is unweighted?

 

retagged by

2 Answers

0 votes
0 votes
In an unweighted graph,priority queue will behave like a simple queue (as all the connected edges is represented as 1) with FIFO policy.At first, the first frontier will be pushed into the queue & explored(nodes which are just a single edge away from the source node) and then the second frontier,and so on.This behavior resembles that of BFS.

Related questions