Any source to find distance between vertices in generalized Petersen graphs? I am trying to find the distance between vertices of generalized Petersen graphs
$P(n,k)$. For $n = 50$ and $k<\frac{n}{2}$ I did everything manually. I manually wrote down a shortest path between any two vertices. However, it is really cumbersome to find the same for higher values of $n$. Is there any site/software/link to find a shortest distance between vertices of generalized Petersen graphs?
I will be really grateful for the help. Thanks for the help. 
P.S. I tried Mathematica with the help of a friend and got to know that I can get radius and diameter using this. But I am interested in the shortest paths.
The generalized Petersen graphs $P(n,1)$ and generalized Petersen graphs
$P(n,2)$ are shown below.


 A: Use the fact that the vertices lie on a circle, so you can compute the coordinates easily. If the vertices on the inner polygon are on a circle of radius $r$, they are at $(r \cos \frac {2m\pi}n, r\sin \frac {2m\pi}n)$ for $m=0,1,2,\ldots n-1$.  The outer polygon has radius $R$, so make the substitution.  Now computing the distance is easy.  The distances between the two sets of vertices are just $R-r$.  The distance for the chords of the inner polygon are $r\sqrt {(1-\cos \frac {2k\pi}n)^2+\sin^2 \frac {2k\pi}n}$.  The distance for the chords on the outer polygon is $R\sqrt {(1-\cos \frac {2\pi}n)^2+\sin^2 \frac {2\pi}n}$ 
For your $P(n,2)$ example I was considering the inner edges, like from $u_1$ to $u_3,$ to be straight.  The edge between a $u$ and a $v$ has length $R-r$.  The edge between two $v$s has length $R\sqrt {(1-\cos \frac {2\pi}n)^2+\sin^2 \frac {2\pi}n}$ and the edge between two $u$s has length $r\sqrt {(1-\cos \frac {4\pi}n)^2+\sin^2 \frac {4\pi}n}$.  The $v$s are neighboring points on a circle divided into $n$ equal segments.  The $u$s are separated by $1$, which accounts for the extra factor $2$ in the angles.
