I've been doing an extensive math assignment but i'm no where near complete. There's a question where we need to develop an algorithm (which isn't even for marks), the analysis and discussion of it are only relevant and worth marks. It's backtracking to find an optimal solution. I'm also under the assumption that this isn't too difficult, or else I wouldn't be asking, i'm just realling pressed for time. Thanks if anybody knows how to write it, or has
already done somehting like this.
A undirected graph with non-negatively weighted edges. Solve the shortest path from a starting node, to a finishing node. Use backtracking to solve the shortest path (and arrive at an optimal solution).
1 (stating node = 0, ending = 5)
/ | \
/ | \
| \ /
Note: any numbers can be used on the above graph, but one example is as good as the next.