  The diameter of a graph is the maximum distance among all pairs of vertices.
Thus a graph $G$ has diameter $d$ if any two vertices are at distance at most
$d$ and there are two vertices at distance $d$. We are interested in studying
the diameter of circulant graphs $C_n(1,s)$, i.e., graphs with the set
$\{0,1,\ldots, n-1\}$ of integers as vertex set and in which two distinct
vertices $i,j \in \{0,1,\ldots, n-1\}$ are adjacent if and only if $|i-j|_n\in
\{1,s\}$, where $2\leq s\leq \lfloor \frac{n-1}{2} \rfloor$ and
$|x|_n=\min(|x|, n-|x|)$. Despite the regularity of circulant graphs, it is
difficult to evaluate several parameters, in particular the distance and the
diameter. To the best of our knowledge, there is no formulas providing exact
values for the distance and the diameter of $C_n(1,s)$ for all $n$ and $s$. In
this context, we present in this paper a new approach, based on a simple
algorithm, that gives exact values for the distance and the diameter of
circulant graphs.
