Bellman Ford Relaxation order

In bellman ford algorithm source has weight 0 in beginning . Is it necessary to begin relaxation from edge containing source ??
Or can we begin relaxation from edge which has both vertices weight to be infinity ??

And also is relaxation of edges is done in any order? Means selecting randomly any edge any time for relaxing?
Or Do we need to go to neighbours first??

@Nimish-Malhotra-2431984440178391,

  • No, it is not necessary to begin relaxation from sources, but you have to make sure while relaxation, the parent node of edge has to have a non-infinite distance, else you may do INF+INF in relaxation, which may overflow your data type, and cause error in result.

  • Yes, we can do relaxation in any order.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.