# What is the difference between shortest distance and shortest path?

I am studying graph currently. I found a question, which asks for

1. The List A[] which shows shortest distances between $V$ and every other vertex

2. The List B[] which shows shortest paths between $V$ and every other vertex

as subpoints. I don't think the question wants me to compute the same values twice, but I don't know what the difference between shortest distance and shortest path is. Can anyody explain?

• One guess is that edges are weighted, distance is measured according to the some of weights, and paths are measured according to length (number of edges). But if you're not sure, ask the professor. – Yuval Filmus Oct 17 '14 at 22:29
• i was guessing same answer looking others work but i was not sure. – gyanu Oct 17 '14 at 22:31
• Shortest distance is a number, shortest path is a list of vertices. Those two things are different, I am not sure what your confusion is. – InformedA Oct 17 '14 at 22:37
• yes shortest path is a list of vertices. But in array it has numbers which matches number of edges. – gyanu Oct 17 '14 at 22:49
• I can't understand your title and the body contains no actual question. It says that you came across a question but, unless you tell us what the question is, we can't possibly answer it! – David Richerby Oct 18 '14 at 0:21

As @randomA already indicated in a comment, a shortest path from $v$ to $w$ is a sequence of vertices (that describes a path from $v$ to $w$, which is shortest among such sequences).