### Short Encodings of Evolving Structures

Daniel D. Sleator, Robert E. Trajan, William P. Thurston
1992 SIAM Journal on Discrete Mathematics
A derivation in a transformational system such as a graph grammar may be redundant in the sense that the exact order of the transformations may not &ed the final outcome; all that matters is that each transformation, when applied, is applied to the correct substructure. By taking advantage of this redundancy, we can develop an efficient encoding scheme for such derivations. This encoding scheme has a number of diverse applications. It can be used in efficient enumeration of combinatorial objeds
more » ... or for compact representation of program and data structure transformations. It can also be used to derive lower bounds on lengths of derivations. It is shown, for example, that n(n1ogn) applications of the associative and commutative laws are required in the worst case to transform an n-variable expression over a binary associative, commutative operation into some other equivalent expression. Similarly, it is shown that n(n1ogn) "diagonal flips" are required in the worst case to transform one n-vertex numbered triangulated planar graph into some other one. Both of these lower bounds have matching upper bounds. An O(n log n) upper bound for associative, commutative operations was known previously, whereas here an O(n log n) upper bound for diagonal flips is obtained. 1. Introduction. The object of this paper is to study succinct representations of derivations in transformational systems. To model transformational systems, we use graph grammars . Rmghly speaking, a graph grammar consists of a finite set of productions {L, --+ R,}. (Section 2 gives a precise definition of the form of graph grammar that we use.) Each production Li --+ R, consists of a connected graph L" called the left side of the production, and a graph R" called the right side of the production. A production Li + R, is applicable to a graph G if G contains a subgraph isomorphic to L,. The production is applied to G by replacing an occurrence of Li in G by a copy of R,. (There may be more than one way of applying a production to G, since G may contain more than one copy of the left side.) A derivation is a sequence of graphs G = Go, GI, Gz, ---, G, = GI such that each Gi is obtained from Gi-1 by applying one production once. The derivation trawfonns graph G into graph GI. A particular application of a production during a derivation is called an action. Let r be a fixed graph grammar, and let G be a fixed starting graph of size n. Consider the collection R(G,I',m) of all graphs obtainable from G by derivations *