"Relatives" of the shortest path problem Consider a connected undirected graph with non-negative edge weights, and two distinguished vertices $s,t$. Below are some path problems that are all of the following form: find an $s-t$ path, such that some function of the edge weights on the path is minimum. In this sense they are all &quot;relatives&quot; of the shortest path problem; in the latter the function is simply the sum.
Note: We are looking for simple paths, that is, without any repeated vertices. Since I did not find standard names for these problems in the literature, I named them myself.

Path with minimum weight gap: find an $s-t$ path, such that the difference between the largest  and smallest edge weights on the path is minimum.
Smoothest path: find an $s-t$ path, such that the largest step size on the path is minimum, where a step size is the absolute value of the weight difference between two consecutive edges.
Path with minimum altitude: Let us define the altitude of a path by the sum of the step sizes along the path (see the definition of step size above). Find an $s-t$ path with minimum altitude.
Path with minimum prime weight: assuming that all edge weights are positive integers, find an $s-t$ path, such that its weight is a prime number. If there is such a path, find one with the smallest possible prime weight.

Question: what is known about these path problems? (And others that could be conceived in a similar spirit, applying a different function of the weights.) In general, is there any guidance that which functions of the edge weights can be minimized in polynomial time, and which are NP-hard?
Note: it is interesting, for example, that while the sum of the weights is easy to minimize (it is the classical shortest path problem), but minimizing the closely related average of the weights on the path is NP-hard. (Assign weight 2 to all edges incident to $s$ and $t$, and weight 1 to all others. Then a min average weight path will be a longest $s-t$ path).
Here is an answer to the first problem:


  Path with minimum weight gap: find an $s-t$ path, such that the difference between the largest  and smallest edge weights on the path is minimum.


A paper from 1984 shows that whenever we can decide 
feasibility (does there exist a solution in the unweighted
case) for some combinatorial optimization problem in 
polynomial time, then we can also find in polynomial 
time a solution that minimizes the differenc between the 
largest and smallest cost coefficient (in the weighted case):


  S. Martello, W.R. Pulleyblank, P. Toth, D. de Werra
  Balanced optimization problems
  Operations Research Letters 3, 1984, Pages 275-278


This implies a polynomial time algorithm to your question.