Question: Given an undirected weighted connected graph having n nodes and m edges. At time t = 0 , all nodes are having a orange diamond.

Given an undirected weighted connected graph having n nodes and m edges. At time t =0, all nodes are having a orange diamond. The diamond in the nodes change their appearance by switching from green to orange and vice-versa after every 'b' seconds for all the nodes simultaneously. Payal is initially at node 1. She wants to reach at node n in the minimum time possible. The weight of an edge denotes the time taken to travel through the edge. But Payal has to follow the constraint: At any node, if the diamond in that node is orange when Payal reaches there, she can pass through that node immediately, else she has to wait at that node till it becomes orange. Note: If Payal reaches a node at an instance when the node is switching its appearance, she follows the above-menti

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!