find the shortest path between two nodes where the number of edges is minimal Say you are given an undirected unweighted graph, where s and t are nodes from the graph.
d(s,t) means the distance between s and t which outputs the number of edges. 

How do I find the the maximum distance between s and t , 
max{d(s,t)}, where the edges between s and t are minimal?
Also, how can this problem can be related/reduced to the hamiltonian problem?

Any advice would be really helpful.
Hint: Given a graph $G$, add two new vertices $s,t$, each connected to all vertices in the original graph. When does there exist a path from $s$ to $t$ of length $n+1$?