  The metric dimension (MD) of a graph is a combinatorial notion capturing the
minimum number of landmark nodes needed to distinguish every pair of nodes in
the graph based on graph distance. We study how much the MD can increase if we
add a single edge to the graph. The extra edge can either be selected
adversarially, in which case we are interested in the largest possible value
that the MD can take, or uniformly at random, in which case we are interested
in the distribution of the MD. The adversarial setting has already been studied
by [Eroh et. al., 2015] for general graphs, who found an example where the MD
doubles on adding a single edge. By constructing a different example, we show
that this increase can be as large as exponential. However, we believe that
such a large increase can occur only in specially constructed graphs, and that
in most interesting graph families, the MD at most doubles on adding a single
edge. We prove this for $d$-dimensional grid graphs, by showing that $2d$
appropriately chosen corners and the endpoints of the extra edge can
distinguish every pair of nodes, no matter where the edge is added. For the
special case of $d=2$, we show that it suffices to choose the four corners as
landmarks. Finally, when the extra edge is sampled uniformly at random, we
conjecture that the MD of 2-dimensional grids converges in probability to
$3+\mathrm{Ber}(8/27)$, and we give an almost complete proof.
