|
|
It is slow to learn new things when getting old. I finally understand Dijkstra Algorithm after going over a detailed demonstration (like one shot to kill all birds). So brute force backtracking approach for sudoku may do the same thing (as posted in new thread) for shortest path tree and probably for other related ones like traveler and shopping too.
But before forgetting following thought for current multiple traveler during Dijkstra algorithm learning process I would like to point out that sometimes even blind cat can catch dead rat. So for 2 people why not shorten all possible sharable direct connections by half and then run Dijkstra algorithm to find a shortest path tree. If lucky enough, one may find out both A and B are just on all the sharable paths (bingo!). If not, it is still interesting to figure out why not and go further from there.
By the way, after understanding Dijkstra algorithm I am wondering if it can be implemented in sql (have not gone deep thinking on it). |
|