Graph Theory
Shortest Path - Tree Description: Directed edge \((u,v)\) in tree if \(u\) last relax \(v\) , the root is \(S\) or \(T\) . The classic problem : forall edge \(i\) in the Graph , query the shortest path \((S, T)\) without edge \(i\) . Solution : If edge \(i\) not in the shortest path, the answer is distance \((S, T)\) . Otherwise , build the shortest path-tree (the root is S). we can prove the shortest path must have only one non-tree-edge, assume edge \(i= (u,v)\) , we can find an optimal non-tree-edge \((x, y)\) that the Graph have least one path \((S, x)\) and path \((y, T)\) without