  We consider the problem of geometric optimization for the lowest eigenvalue
of the two-dimensional Schr\"odinger operator with an attractive
$\delta$-interaction supported on an open arc with two free endpoints. Under a
constraint of fixed length of the arc, we prove that the maximizer is a line
segment, the respective spectral isoperimetric inequality being strict. We also
show that in the optimization problem for the same spectral quantity, but with
the constraint of fixed endpoints, the optimizer is the line segment connecting
them. As a consequence of the result for $\delta$-interaction, we obtain that a
line segment is also the maximizer in the optimization problem for the lowest
eigenvalue of the Robin Laplacian on a plane with a slit along an open arc of
fixed length.
