Something I was asked to solve and tried to come up with a formula or some method to solve it after I did and couldn't.
- Given is a graph G=(V,E) that is undirected and weighted. Say we want to find the lightest paths tree (assume using Dijkstra's algorithm), we will call it K, and the Minimal Spanning Tree (assume using Kruskal's or Prim's algorithm) that we will call T. How can we ensure that the total weight of K is 10 times that of T if we run the algorithm on the same source node 's'? Important note: we cannot use negative weights on the edges.
The only way I managed to do this is by drawing and testing a bunch of graphs until I found something that works. It seems if we build a "ferris wheel" graph, and make the inside edges heavy and the outer edges light, we can manage getting a 10 times heavier lightest paths tree.
This definition of a "ferris wheel" graph is not formal - a node that is surrounded by more nodes and each node has an edge to the 'middle' node, and each surrounding node has an edge to the node next to it, forming something that resembles a ferris wheel)