I am given a graph, G = (V, E), that is positive weighted, directed, and acyclic. I am to design an algorithm that runs in O(k(m + n)) for reporting a k-edge shortest path from s to t. A k-edge shortest path is defined as a path from s to t with k edges and the total weight of the path must also be minimum for all paths from s to t.
Since BFS can't be used alone to find shortest paths (unless the weights are equal), I think that the running time implies using BFS to find paths with k edges. What's throwing me off is the k, as I think it implies performing BFS k times.
My possible idea would be to run a BFS from the source to find all possible k-link paths. By keeping track of the level along the way and storing the total path weight to each node when I add it to my queue, I can find all possible k-link paths and their weights. Obviously, if I encounter the destination at a lower level with lower path weight, there is no k-edge shortest path by definition. What about cases where there are paths with more than k edges that are less total weight? It also is not O(k(m + n)). Any helpful hints would be appreciated.