Given two n -vertex plane graphs G 1 = ( V 1 , E 1 ) and G 2 = ( V 2 , E 2 ) with | E 1 | = | E 2 | embedded in the n × n grid, with straight-line segments as edges, we show that with a sequence of O ( n ) point moves (all point moves stay within a 5 n × 5 n grid) and O ( n 2 ) edge moves, we can transform the embedding of G 1 into the embedding of G 2 . In the case of n -vertex trees, we can perform the transformation with O ( n ) point and edge moves with all moves staying in the n × n grid. We prove that this is optimal in the worst case as there exist pairs of trees that require Ω ( n ) point and edge moves. We also study the equivalent problems in the labeled setting.
Read full abstract