  A finite discrete graph is turned into a quantum (metric) graph once a finite
length is assigned to each edge and the one-dimensional Laplacian is taken to
be the operator. We study the dependence of the spectral gap (the first
positive Laplacian eigenvalue) on the choice of edge lengths. In particular,
starting from a certain discrete graph, we seek the quantum graph for which an
optimal (either maximal or minimal) spectral gap is obtained. We fully solve
the minimization problem for all graphs. We develop tools for investigating the
maximization problem and solve it for some families of graphs.
