enter image description here

I want to ask how to solve this problem.. in this graph we have vertex and edge with two value the quality and distance.. there are 3 path in this graph 1->2->6 distance is 10.. 1->4->6 distance is 9.. 1->3->5->-6 distance is 18..

my concern here is the quality of road,, 1 is the best road quality 2 is for average 3 is the worst..

the source is the 1 and to destination will be the 6..

1->2->6 the quality from 1 to 2 vertex is 1 but 2 to 6 is 2 so the quality of path will be 2..

1->4->6 the quality are 1 and 3 so it will be road quality 3..

1->3->5->6 all got 1 so it will be quality 1..

1->3->5->6 even if the distance is is 18 but it has 1 quality or the best quality of road then this will be the best path.. if they have the same quality then the dijktras algorithm will compute the shortest path because thEY have the same quality.. i already have code for dijkstra in php because i will be using php my problem is how to code or modify this algorithm.. thank you for the answer.. GOd bless.

  • $\begingroup$ It was already here, here, here, is it some kind of school project? $\endgroup$ – Evil Jan 12 '17 at 1:03
  • $\begingroup$ How to code or modify the algorithm? That's hardly to be taught about. If you can explain what path you want to find it will help a lot. So far this is a mix with shortest path and bottleneck path problems. $\endgroup$ – Eugene Jan 12 '17 at 2:28
  • $\begingroup$ no its not a school project.. its a research for a wheelchair users optimal path because i am also a wheelchair user.. $\endgroup$ – Bennimert Jan 12 '17 at 3:42

Browse other questions tagged or ask your own question.