Careful! This problem turned out to be NP-hard. No rule forbade setting an NP-hard problem, so it was left as it is.
You are given an undirected graph with n vertices and m edges. The vertices are numbered 1 to n, the edges are numbered 1 to m, and edge i has weight wi.
Given a natural number k, find the length of the shortest simple path that starts at vertex 1, ends at vertex n, and uses exactly k edges.
A simple path is a path that never visits the same vertex twice, and the length of a path is the sum of the weights of the edges on it.