Minimum Distance Between Two Nodes