Communicated by:

We show that rectilinear graph drawing, the core problem of bend-minimum orthogonal graph drawing, and uniform edge-length drawing, the core problem of force-directed placement, are N P-hard even for embedded paths if subjected to orthogonal-ordering constraints. We are grateful to two anonymous reviewers whose comments helped to improve the exposition.


Introduction
The problem of generating a highly symmetric graph embedded in some geometric space is not only of theoretical interest, but has applications to the computer generation of "skeleton graphs" of geometric complexes.If we modelled these embedded graphs as geometric complexes, we can use the algebraic machinery of graph theory, of discrete or computational geometry, or even of combinatorial or geometric group theory, to develop algorithms for computer generation of the complexes outlined by these embedded graphs.
These embedded graphs are often called nets.Our primary tools for manipulating these nets are their symmetries, i.e., their automorphisms that are induced by symmetries of the underlying geometric space.Our primary interest is in nets embedded in some metric space, and a symmetry of such a net would be an automorphism induced by an isometry of the underlying metric space.For any such net, the symmetries form a group, which we can call its symmetry group.
The specific goal is to generate an entire net, given its symmetry group and a (small) connected subnet -and we would like the vertices to have labels that would allow us to reconstruct the generation of this net for subsequent analysis.We use the symmetry group of the net to generate copies of the subnet that collectively cover the net; from the computer's point of view, starting with the original subnet, one generates the entire net.We would need the initial subnet to be a transversal in the sense that it intersects each orbit of the net's symmetry group exactly once.We then apply the symmetry group to the subnet to generate sufficiently many copies of that subnet to cover the original net.The procedure is a generalization of a process for generating "uninodal nets" as described in [10], and can be regarded as a generalization of the process of generating "objective structures" as described in [18].
We have under development a program (described in [23] and discussed in the last section of this article), which takes a possible transversal subnet and generates subsequent copies of fragments of that transversal, one vertex at a time.This program is based on a variant of the process employed in combinatorial and geometric group theory for traversing a vertex transitive graph using words encoding paths as in [29], [16], and [31]; see [12] and [24].The program assigns to each edge {x, y} a pair of symmetries Γ(x, y) and Γ(y, x) of the underlying space in which the net is embedded -and not necessarily (automorphisms) of the net itself, where Γ(x, y)(x) = y and Γ(y, x)(y) = x.In a sense, we treat these symmetries as trains, with vertices as stations, and we can imagine a traveler taking symmetries from vertex to vertex, thus traversing the net.Starting with a putative transversal, with associated symmetries, as an initial condition, we can use algebraic conjugacies to generate an entire net, together with the space symmetries Γ(x, y) for traversing that entire net.One eventually or at the end of time obtains the net and a "traversal function" Γ for the entire net.
As in group or semigroup theory, we obtain words encoding walks, and construct an "assignment function" Γ * so that if the word w encodes a walk from a vertex x to a vertex y, then Γ * (w) is a symmetry of the underlying space (but not necessarily of the net itself) so that Γ * (w)(x) = y.We will define the traversal function Γ in terms of this assignment function Γ * .Again, we hope to carry out subsequent computations on the net -or more precisely, on the (words encoding the) sequences of iterations used to generate the net -we would like the vertices to be labeled so that we can tell from the label how the vertex was generated.The primary issues in this article are: primarily for generating highly symmetric nets.The current implementation has been a series of Crystal Turtlebug programs intended to facilitate crystal design, and we will describe this implementation in the last section.
One of the major efforts in materials science is the development of synthetic crystals, most notably zeolites (porous silicon-oxygen crystals -imagine porous quartz -with impurities [3]) and metal organic materials (primarily metal ion molecular building blocks connected to each other by organic ligands [22]).One of the major goals is to design novel crystals (at the molecular or even atomic level) prior to synthesis [37].Now, the traditional (albeit not current1 ) definition of a crystal is of a material composed of molecular units that repeat in three linearly independent axial directions.Each of these units is a unit cell.A crystal can be represented -and increasingly, is represented -by a 3-periodic (in the sense of Theorem 2.2) net composed of unit cells, and such a graph may be precisely specified by a unit cell.So a typical crystal design program (usually called a "crystal prediction" or "crystal enumeration" program) will produce unit cells.
To our knowledge, in the growing crystal design and enumeration community, there are four groups working on crystal generating programs mathematically similar to ours in that they generate a small fragment of a net or a net-like object and somehow expand it into an entire net.Delgado-Friedrichs et al [13] describes an enumeration of three dimensional tilings and how to generate nets from these.Treacy et al [32] and [33] describes an enumeration starting with "fundamental regions" and uses Coxeter groups to generate unit cells.The Geometrically Restrained Inorganic Structure Prediction (GRINSP) program, described in [4], constructs fragments of the net and then uses various stochastic programs to massage them into a net.Recently, Wilmer et al [36] developed a program for generating metal-organic frameworks from a library of molecular building blocks.In addition, Klee [21] proposed a heuristic for enumerating nets based on the "vector method" as applied to the "quotient graphs" introduced in [9]; this vector method played a major part in inspiring our approach.This list does not include other quite different heuristics being employed; see [7].

Groundwork
In this article, we do not assume much specialized knowledge, but we do assume familiarity with graphs and groups.For an accessible introduction to group theory, see [17].In this section, after fixing the nomenclature, we will review some geometric group theory in order to set the main topic of this paper in context; for an accessible introduction to geometric group theory, see [24].We will then outline the nomenclature popular in the crystal design literature.This is a new field in between extant fields, and thus not only is there limited consensus over nomenclature, there are clashes of nomenclatures.(For a "Graph Theory"-vs.-"Chemical/CrystalNet" Dictionary, see [15].)So some standard nomenclature will have to be adapted from various sources to deal with novel circumstances.Because of these clashes and ambiguities, we will be unusually pedantic in defining our terms.Here is some extant nomenclature that we will use without comment: • Let [n] = {1, 2, . . ., n} for any positive integer n, let Z be the set of integers, and let Z n be the set (or group) of integers modulo n.Let Z ≥0 be the set of nonnegative integers.Let R be the set of real numbers.Given a (finite) set S, let |S| be the cardinality of S and let S (2) = {{x, y} ⊆ S: x = y}.
The identity of G is denoted id G , which we will often write as id if G is understood.
• If X is a set, and γ is a permutation of X, and V ⊆ X, then the restriction of • If G is a group of permutations of X, we denote composition by concatenation: (For example, for any integer z ∈ Z, if [−z, z] = {−z, −z + 1, . . ., z} and G is the group of bijections on Z, then for a(x) = −x and b(x where "−" is set difference.) • If G is a group of permutations of a set X, and x, y ∈ X, write x ∼ G y if there exists η ∈ G such that η(x) = y.Write "x ∼ y" if G is understood; the equivalence classes of ∼ are the orbits of G.If a set V ⊆ X is a single orbit of (a subgroup of) G, say that G acts transitively on V .(Thus if G is the set of automorphisms of a graph, and for any two vertices of that graph there is an automorphism that maps one of the vertices to the other, then the graph is vertex transitive.) • For any set S, let , where V is the set of vertices of G and E ⊆ V (2) the edges (we will identify edges as the unordered pair of their endpoints).If S ⊆ V , let G[S] = S, E ∩ S (2)  and ∂S = {y ∈ V − S: ∃x ∈ S s.t.{x, y} ∈ E}; thus for any x ∈ V , ∂{x} ∪ {x} is the neighborhood of x.

Some Geometric Group Theory
Geometric group theory, like its progenitor combinatorial group theory, appears motivated by a desire to develop graph-theoretic representations of groups.Our interest is in the opposite direction: to develop useful algebraic tools for building and analyzing graphs.However, in this subsection, we shall follow the mainstream of geometric group theory and put graphs at the service of groups.
One of the standard graphical representations of a group is the Cayley digraph, in which the vertices represent group elements and the arcs represent group generators.Definition 2.1 Given a group G and a set X ⊆ G of group elements, the subgroup generated by X is the intersection of all subgroups of G containing all elements of X.This is itself a subgroup and is denoted X .
Given a group G and a set X of group elements, X is a set of generators of

And then:
Definition 2.2 Given a group G and a set of generators X, the Cayley digraph of G with respect to X is the digraph G, G × (X ∪ X −1 ) , where: • The elements of G are the vertices.
) is the set of arcs, where (g, x) is the arc of initial vertex g and terminal vertex xg.
The corresponding Cayley graph is the graph whose set of vertices is G and whose edges are the unordered pairs {γ, ηγ}, γ ∈ G and η ∈ X.
For example, if the abelian group Z 2 ⊕ Z 3 is generated by an element a of characteristic2 2 and another element of b of characteristic 3, then its Cayley digraph is shown in Figure 1.
Notice that in Figure 1, we could imagine a traveler who could move from vertex to vertex along arcs, following an itinerary consisting of a word in {a, b} * , reading from left to right.For example, given the word bab −1 a from the vertex at upper right, the first b moves the traveler to upper center, the next a moves the traveler to lower center, the next b −1 moves the traveler to lower right, and the final a moves the traveler back to upper right.

Remark 2.1
The Cayley graph of a group might not be unique.For example, as Z 2 ⊕ Z 3 is isomorphic to Z 6 , which is generated by a single element of order six, another Cayley graph for this group is the 6-cycle.At right, the corresponding Cayley graph -with unlabeled unoriented edges replacing pairs of arcs -which could be traversed as shown a traveler using an itinerary consisting of a single word, e.g., from the upper right vertex using the word bab −1 a as shown.
But there are representations other than Cayley graphs.In Figure 2, we could start with a vertex transitive graph and look at a set of generators for a group of automorphisms.Here, the vertices are the integer vectors of Z 2 , and our generators are the rotation a by 90 • around the origin and the reflection b across the line x = 1/2.
In the case of Figure 2, the alphabet represents applications of graph automorphisms, so that a traveler given a word, say ab, employs the named automorphisms to move around.The idea is that the traveler would start at a vertex, take automorphism a to move to a second vertex, and then take automorphism b to move to a third vertex.However, the traversal is undertaken so that the itinerary can be followed in the same way as on the first vertex, so to speak, no matter what vertex the traveler is in.For example, if the traveler started at (1, 0), and if b represents moving from (1, 0) to the (0, 0) by reflecting across the line between the two vertices, then whenever the traveler encounters b in the itinerary, the traveler will want to use a reflection to move to vertex immediately to the traveler's left.Notice that this in this case, the traveler will A group of automorphisms is generated by a(i, j) = (−j, i) and b(i, j) = (−i + 1, j).
want to move to the traveler's left, not to the vertex an outside observer with a global view (such as the reader looking at Figure 2) sees as left of the traveler.Remark 2.2 This is actually how turtle geometry works [1]: a robot -called a "turtle" -moves around on the floor, following a list of instructions of the sort "rotate clockwise 30 • " or "move forward two feet."It carries out each instruction as is, regardless of its current location or orientation.This turtle point of view is accomplished by using conjugates; recall that the left conjugate of a bijection α under a bijection β is β α = βαβ −1 .When the traveler is given the word ab, starting at (1, 0), we imagine the traveler in some kind of "standard orientation" standing at a starting point (1,0).The traveler will always imagine himself to be in standard orientation on the starting point (1, 0), even when he's not, and act accordingly.Then as in the right hand figure of Figure 3, he will use automorphism a to move from (1, 0) to a(1, 0) = (0, 1), rotating 90 • so that now he imagines that (0, 0) is to his left.So as the next word letter is b, he employs the conjugate a b = aba −1 to reflect to his left to (0, 0) (the traveler's left; the reader looking at Figure 3 (Right) sees the traveler reflected down one vertex).The result is that the traveler has been moved by two successive automorphisms, a and then a b to go from (1, 0) to ( a b • a)(1, 0) = aba −1 a(1, 0) = ab(1, 0) = (0, 0).Notice that the composition actually employed to implement the itinerary ab winds up being the composition ab.
In general, if a traveler wishes to use an itinerary abcd to use the conjugates of a, b, c, and d in succession, each time acting as if the traveler was at the initial vertex v in the initial "orientation", the destination is computed as follows.Compute a b = aba −1 and a ba = aba −1 a = ab, ab c = abc(ab) −1 and ab cab = abc, and abc d = abcd(abc) −1 and abc dabc = abcd: Fact 2.1 Let a 1 , . . ., a n be bijections on a set X, and for each k, let w k be the string a 1 • • • a k as a string of k letters.For each k, let ϕ k be the automorphism corresponding to w k as follows: This machinery was developed largely to develop graphical representations of groups, e.g., given a group G, one desires a graph whose automorphism group contains a subgroup isomorphic to G. We will take the opposite approach, and use this algebraic machinery to analyze -and synthesize -graphs.

Traversing a Net Using its Symmetry Group
The precise definition of the word "net" seems to vary, but the broad, shallow stream spanning the distance from [11] to [26] seems to lead to something like the following: Definition 2.3 Let X be a set and let G be a group of permutations of X.A net over G is a graph N = V, E where V ⊆ X, and N 's symmetry group with This nomenclature is unconventional, as the symmetry group thus consists of permutations of the underlying space, not of the net itself.In this article, we will deal primarily with permutations of the underlying space, and then say that a symmetry of the net is a permutation of the underlying space that induces an automorphism of the net.And we will usually take G as given and write Sym(N ) = Sym G (N ).Let's look at two popular examples.Let's start with a Cayley graph.
Example 2.1 Let G be a group generated by a set H ⊆ G, where id ∈ H.We obtain a net by setting Returning to Figure 1, we had the commutative group Z 2 ⊕ Z 3 generated by a set H = {a, b}, and our net thus consisted of vertices But the work in this paper was motivated by a quite different source, and the following example of [35] (see also [14] on periodic nets and [38] Example 2.2 Suppose that X = R n for some n, and that G = I n , the group of isometries of R n .Let T n be the group of translations on R n .Suppose that N = V, E is a net in this space such that: • The set V is partitioned into finitely many orbits by Sym In (N ), and • There is a compact subset of R n that intersects every orbit of Sym In (N ), and Then by the Shoenflies-Bieberbach Theorem (see, e.g., [8], [30] or [34]), N is n-periodic in the sense that: • There is a basis v 1 , . . ., v n ∈ R n , whose associated translations τ 1 , . . ., τ n are symmetries of N , and hence For example, in Figure 4, there is an infinite net whose vertices consist of points on the plane, and whose edges consist of line segments joining those vertices.The group of automorphisms of the net that are induced by plane isometries has finitely many orbits of vertices; there is a compact subset of the plane (in light brown) that intersects each orbit of vertices, and there is a minimum distance between pairs of distinct vertices.By the Shoenflies-Bieberbach Theorem, there are two vectors associated with translations that are symmetries of the graph in the sense that they induce automorphisms of the net.

In Example 2.1, if we wanted to imagine a traveler traversing the Cayley graphs by taking automorphisms from vertex to vertex as a tourist takes trains
Figure 4: There are three orbits of vertices (brass circles, blue squares and green stars) and four orbits of edges (gray, orange, red, and purple).The compact set of light brown points intersects each orbit of vertices, and hence there is a basis of two black vectors whose associated translations preserve the net.from station to station, then we would imagine the traveler carrying an itinerary enumerating a schedule for traversing a path in the graph.In Example 2.2, vertices can be in different orbits of the symmetry group of the net, so our traveler has to take isometries of the underlying space from vertex to adjacent vertex even if some of these isometries are not in the symmetry group of the net.
Notice the local / global dichotomy.
• From the traveler's point of view, a permutation on X is merely a vehicle that may be available for traversing an edge.Or, for an entire journey, a permutation on X could be a composition of such traversing permutations.
• From a global perspective, each permutation on X permutes the entire space, and some of these permutations are symmetries of the net that the traveler is touring.

Traversals on Fundamental Transversals
As we use these permutations to direct a traveler to traverse the net, it would be helpful to have a function that would tell what permutation to use in traversing any given edge from a given incident vertex to the other incident vertex; viz., if there was an edge joining vertices v, w, then it would be nice to have a function Γ that would tell us which permutation the traveler is to use to move from v to w.
Definition 2.4 Let N be a net as described in Definition 2.3, and let

(think of these as trips the traveler could take along the edges). A traversal function for N is a function
It is not particularly difficult to verify that if G acts transitively on X then N admits a traversal function: just enumerate A N = {(x ξ , y ξ ): ξ ∈ Ξ} for some index set Ξ, and by a (possibly transfinite) induction assign to each arc (x ξ , y ξ ) a permutation γ ξ ∈ G such that γ ξ (x ξ ) = y ξ .But if we consider Γ to be a book of instructions, we would like Γ to be "small" enough for a computer to be able to readily handle it, even if N is "large" (or even infinite); that way, we would not need much information to move around in the net.
In other words, if the movement from x 1 to y 1 is symmetric (with respect to the net) to the movement from x 2 to y 2 , then the instruction that the traveler follows is also (in a sense) symmetric.
We present the notion of a "strict" traversal since it seems the more natural notion, but we have only been able to develop the theory for semi-strict traversals.We will describe how to construct a semi-strict traversal function where the permutations used are generated by some finitary algorithm.To do this, we will need to treat the net as if it was composed of many small identical pieces (which we will call "fundamental transversals") and setting up this treatment will require setting up a system for representing paths through the net.
Proposition 2.1 Given a connected net N = V, E with a group G of automorphisms, there exists a set S ⊆ V such that: • The set S intersects each orbit of G in V , with that intersection consisting of one vertex.
• The induced subgraph N [S] is connected.
Their proof was for graphs alone, but the proof in [24] is readily adapted. 4et us call such a set S a fundamental G-transversal, or just a fundamental transversal when G is clear or implied.Observe also that the number of orbits -and the fundamental G-transversal itself -depends on the original group G (see Figure 5).For different groups G, one obtains different fundamental Gtransversals.

A B C
Figure 5: Here is a net N on the plane.If G1 was the group of plane isometries, a fundamental G1-transversal would be a single vertex (A).If G2 was the group of plane isometries generated by the translations and the reflection across the vertical axisi.e., by the reflection (x, y) → (−x, y) -we would need two vertices for a fundamental G2-transversal, as in (B).If G3 was just the group of plane translations, we would need four vertices for a fundamental G3-transversal, as in (C).
Our plan is to start with a single fundamental transversal and cover the net with copies of it.More precisely, we will start with a single fundamental transversal and cover the net with copies of corresponding vertices from that fundamental transversal.In order to do this, we will encode paths through the net.Keeping the goal of semi-strictness in mind, we will use a fundamental transversal for this encoding.To get started from a given fundamental transversal, we need the function that can take any vertex from the net and produce the equivalent node in the fundamantal transversal.Definition 2.6 Given a fundamental G-transversal S for a net N (embedded in a space X on which a group G acts transitively), we define a function κ: V → S as follows.For any x ∈ V , let κ(x) be the unique y ∈ S such that x ∼ Sym G (N ) y.
For the rest of this paper, we will presume G and N and write "x ∼ y."

Traversing the Net
We outline a method for generating a traversal function given a fundamental transversal, and for generating words ("itineraries") defining paths through the net, employing appropriate traversal functions.

Itineraries
We develop a formal system for encoding paths using words.In order to get the alphabet, and to obtain a representation of the symmetry that moves the traveler from one vector to an adjacent vector, we employ a gadget built upon the notion of a fundamental transversal.We use the set Σ to generate words for traversing the net by starting at the appropriate vertex in the (given) fundamental transversal and follow the symbols of the word as if they enumerate a list of instructions.We need to characterize those words that the traveler may use for travelling, i.e., those words that the traveler can actually use as itineraries.A itinerary w will have an initial vertex init(w) ∈ S, a terminal vertex term(w) ∈ S, and be generated as follows.Notice that if G| V does not act transitively on the vertices of N , then this set of strings generated from Σ is not a semigroup as it is not closed under concatenation, but if G| V does act transitively on the vertices of N , it is a monoid.
Using itineraries as (lists of) instructions, if some nice railroad engineer has assigned appropriate permutations to each of the instructions, the traveler can move around the net using something like a state transition function of automata theory.The idea is that if a traveler started at some r ∈ S and followed an itinerary v (where init(v) = r), it would reach some z ∈ V .If provided with a next instruction (x, y), where κ(z) = x, the traveler would move to an adjacent vertex w where the appropriate symmetry maps {x, y} to {z, w}.These "appropriate symmetries" will be compositions of the symmetries of N .A local step instructs a traveler to move from a vertex within a fundamental transversal to another vertex within that same fundamental transversal, while a jump step instructs a traveler to move from one fundamental transversal to another.See Figure 6.

The Algorithm: Assigning Actions to Itineraries
The heart of the algorithm is the assignment of permutations to itineraries.
We first assign permutations to individual steps, and then to entire itineraries.We first need a convention to allow us to traverse itineraries of local steps in reverse order: this is not quite the usual string reversal operation, for we are also "reversing" the individual symbols -the individual local steps -in the string as well.
Notice that this makes sense as init(u R ) = term(u) = init(v) = term(v R ). (We will not attempt to reverse strings having jump steps.)We now return to making assignments.was at x.So it will move using a conjugate permutation (the conjugacy function being a symmetry of N ).In (A), the traveler moves within the fundamental transversal, while in (B) it jumps out to another fundamental transversal that is a copy of the first (copied by the net symmetry Γ * (v) βy).
Definition 3.5 Given a fundamental G-transversal S of a net N and a group G of permutations on X, an assignment function is a function Γ * : W → G such that for any w ∈ W, κ(Γ * (w)(init(w))) = term(w).
So we encode traversals across individual edges of the transversal diagram.But first, a piece of nomenclature.Definition 3.6 Suppose we are given a transversal diagram S, ∂S, Σ for a net N .In addition, suppose that we are given a spanning tree T of the graph S, {{x, y}: (x, y) ∈ Σ ∩ S 2 } (T exists as the fundamental G-transversal is connected).Then for each x, y ∈ S, let p x,y be the itinerary representing the unique path from x to y in T .In particular, for each x, let p x,x = ǫ x , the empty string of initial and terminal vertex x.
We construct Γ * by recursion on the itineraries w.We start by considering itineraries of local steps.Order the vertices of the transversal diagram as follows: choose z 1 ∈ S and order the vertices z 1 , . . ., z |S| of S so that for each j, if S j = {z 1 , z 2 , . . ., z j }, then the induced subgraph of T of vertices S j is connected.Thus each S j is the set of vertices of a subtree of T .
Next, order the local steps as follows: noting that a pair (x, y) is a local step (i.e., an orientation of an edge of N within the fundamental transversal) iff (y, x) is, so that the number of local steps is even.(Notice that each x i is some z j , just as each y l is some z l .)For this ordering, we require that if (z i , z j ) precedes (z k , z l ) in the ordering of local steps, then either max{i, j} < max{k, l}, or max{i, j} = max{k, l} and min{i, j} < min{k, l}, or i = l < j = k.Note that typically x 2i = y 2i−1 and y 2i = x 2i−1 for i ≤ c.
Remark 3.1 For each z j ∈ S, let j be the rank of z j .Observe that for any x, y ∈ S, p x,y represents a path in T , and by the ordering (1), either x or y must be the highest ranked vertex in p x,y .Observe also that for each j > 1, exactly one of z j 's neighbors in T is of rank lower than j.
Finally, for each j, let W j be the set of itineraries from S j , so that j W j is the set of all jump-free itineraries.Let W 0 = ∅.0. Γ * on jump-free sets.We define Γ * on the languages W j by recursion on j.As W 0 = ∅, Γ * is vacuously defined on W 0 .Now, suppose that we have defined Γ * on W j so that if x, y ∈ S j , then Γ * (p x,y )(x) = y.Define Γ * on W j+1 − W j as follows.
iii.Recursive step I. Let (x l , y l ) be the unique step in T from x l ∈ S j to y l = z j+1 : by Remark 3.1, p xi,x l ∈ W j .For each (x i , y i ) ∈ Σ such that x i ∈ S j and iv. Recursive step II.For any w, (x, y) Repeat until Γ * is defined on W j+1 .Repeat for all j ≤ |S|.
Proof.For the first claim, if u = (x s(1) , y s(1) ) • • • (x s(m) , y s(m) ) and v = (x t(1) , y t(1) ) • • • (x t(n) , y t(n) ) and y s(m) = x t(1) , then by (0)(iv) in the above recursion, Γ * (uv) is: To prove the second claim using the first, observe that if We prove the third and fourth claims by simultaneous induction.We observe that they hold vacuously for W 0 and as our Inductive Hypothesis, we assume that both claims hold for W j : we claim that they both hold for W j+1 .
We first prove the third claim for itineraries of the form u(x, z j+1 ), where u ∈ W j and term(u) = x.Using the first claim and the Induction Hypothesis, if x l is the unique vertex of rank at most j adjacent to z j+1 in T , then Recalling that our designated paths are in the tree T , let x ′ be the vertex on the path of p init(u),x l such that p x ′ ,x intersects p init(u),x l at x ′ : see Figure 7.
Note that p x,x ′ , p x ′ ,x ∈ W j , so by the Induction Hypothesis Γ The purple and gray paths p init(u),x l and p x ′ ,x lie in T , as does the step (x l , zj+1).As T is a tree, the leftover piece of u and the link (x, zj+1) do not lie in T .
The proof for itineraries of W j+1 in which z j+1 appears elsewhere or repeatedly follows by repeated application of the above, and the following observation: if init(w) = z j+1 = term(w) with w = (z j+1 , x)u(x ′ , z j+1 ) for some u ∈ W j , then using the Induction Hypothesis, Finally, the Fourth claim follows from the second.If init(w) = term(w) where w = uv, then But as init(u) = term(v) and term(u) = init(v), this becomes We now have assignments for all itineraries for movement within the fundamental transversal.If we desire to jump out, we need some additional assignments.But first, we need a bit of nomenclature.Definition 3.7 Suppose that we are given a transversal diagram S, ∂S, Σ for a net N .In addition, suppose that one is given, for each y ∈ ∂S, a symmetry β y ∈ Sym(N ) such that β y (κ(y)) = y.

Proving the Desiderata
Before we prove the three desiderata, we need a generalization of the first claim of Lemma 3.1.We now present a normal form for the permutations defined by itineraries.Recall that we fixed, for each y ∈ ∂S, a symmetry β y ∈ Sym(N ) such that β y (κ(y)) = y.16(2) 507-541 (2012) 527 is an itinerary with v i being jump-free for each i, and for (x i , y i ) being a jump step for each i, then  Proof.The proof is by induction on the number of jump steps w .
The first desideratum is the most basic: the algorithm actually generates the net it is supposed to generate.Theorem 3.3 Given the net N = V, E , the transversal diagram S, ∂S, Σ , the itineraries W, etc., let and let E * be the set of all unordered pairs {Γ * (w)(x), Γ * (w(y, z))(x)} such that Proof.We start by proving that V * = V .
Second: V ⊆ V * .If y ∈ V , there exists a path κ(y) = y 0 , y 1 , y 2 , . . ., y n = y from κ(y) ∈ S to y ∈ V ; we claim that y i ∈ V * for each i, and hence y ∈ V * .We prove this for each y i ∈ V * by induction on i, starting with for some v, and note that by Theorem 3.2, Γ * (p κ(yi),κ(y) v) ∈ Sym(N ).As y i+1 is adjacent to y i , y ′ = Γ * (p κ(yi),κ(y) v) −1 (y i+1 ) is adjacent to κ(y i ), and if y ′ ∈ S, then as Γ * (p κ(yi),κ(y) v) ∈ Sym(N ) and (κ(y i ), y ′ ) is a local step, Theorem 3.1 gives us: which is thus an element of V * .Similarly, if y ′ ∈ S, then y ′ ∈ ∂S, and it follows that Γ * (p κ(yi),κ(y) v) For the rest of the proof, we use the fact that V = V * without further comment, i.e., V consists of precisely those points y in X such that for some x ∈ S and some itinerary w with init(w) = x, Γ * (w)(x) = y.
We now prove that E * = E.
We define the (alleged) traversal function as follows: for each (x, y) ∈ V 2 with {x, y} ∈ E, choose an itinerary w such that Γ * (w)(κ(x)) = x, and that for some (κ(x), (Notice that we have a lot of discretion in choosing the itineraries w.) and repeating for all (x, y), Γ is a traversal function.

Implementation
Several programs implementing this algorithm or variants of this algorithm have been composed, primarily for application in crystal design.Of course, crystal design involves infinite nets embedded in Euclidean spaces, and this algorithm can be applied to finite and infinite nets in many kinds of spaces.In this last section, we consider computational complexity -or perhaps more precisely, computational resource -considerations in implementing this algorithm.In this brief account, we will consider finite nets generated in finite spaces, and (infinite) periodic nets generated in Euclidean spaces.

Finite Nets Generated in Finite Spaces
Suppose we wanted a single very large but finite graph, embedded in a very large but possibly finite space, whose given group of permutations would thus be large.We probably would not want to generate the entire space or the entire group; we would want to generate points in the space and elements of the group as needed.Then an implementation might work as follows.First, we set up the input.
• We assume a space X, on which a group G of permutations acts transitively, and we can generate elements of X and G as necessary.We are given S, ∂S ⊆ X such that S ∩ ∂S = ∅; these are intended as a fundamental transversal and its boundary in the net we are constructing.We are given Σ ⊆ S 2 ∪ (S × ∂S) such that for each y ∈ ∂S, there exists κ(y) ∈ S with (κ(y), y) ∈ Σ; this is intended as the set of (oriented) edges of the initial transversal diagram.This initial transversal diagram is S = S, ∂S, Σ .
• For simplicity, in this implementation, we are only concerned with the jumps in the itineraries, and not with local steps, so we can work with jump itineraries, i.e., itineraries that tell a farsighted traveler (one able to see an entire fundamental transversal) how to move from fundamental transversal to fundamental transversal.For each y ∈ ∂S, we are given β y ∈ G such that for some κ(y) ∈ S we have β(κ(y)) = y.Let W jump be the set of strings from the alphabet {β y : y ∈ ∂S}, and call W jump the set of jump itineraries.
Let ℓ: Z ≤0 → W jump enumerate jump itineraries; it will turn out that ℓ is the critical consideration for time complexity.Starting with the initial transversal diagram S 0 = S, we enumerate S 0 , S 1 , S 2 , . . .while maintaining their unions D n = i≤n (S i ∪ ∂S i ), i≤n Σ i , which can be regarded as cumulative digraphs from which the desired net will be derived; note in the following that these unions and cumulative digraphs are not graphs as they have "oriented edges", i.e., arcs.
Definition 4.1 Given a digraph (or directed graph) V, A , call it symmetric if, for every x, y ∈ V , either both or neither of (x, y) and (y, x) are elements of A. Given a symmetric digraph V, A , say the associated graph is the graph V, E , where E = {{x, y}: (x, y) ∈ A}.
In this implementation of the algorithm, we will also generate sets of "unused indices"; denote the first such set by U 0 = ∅.Again, we start with an initial transversal diagram S 0 = S 0 , ∂S 0 , Σ 0 and D 0 = S 0 ∪ ∂S 0 , Σ 0 .
1.For the nth step, where n > 0, let ℓ(n) = (β 1 , β 2 , . . ., β m ) and and and if Σ n ⊆ A n−1 , then n is an "unused index" and we set U n = U n−1 ∪{n} and D n = D n−1 .On the other hand, if A n is a symmetric digraph then halt, for the graph now consists of copies of the original fundamental transversal with no stray edges.Output D n 's associated graph N = V, E where V = V n and E = {{x, y}: (x, y) ∈ A n } (and denote U = U n ).Otherwise, return to (1) for the n + 1st step.
Notice that this program will halt iff the net it is generating is finite -provided that ℓ generates all of (or enough of) W jump .For the rest of this subsection, for any β 1 , . . ., β k ∈ G, denote the composition Observe that even if ℓ enumerates each word of W jump only once, [[ℓ]] could enumerate the same group element repeatedly.
Perhaps the most unambiguous time measure is the number of transversals generated before the program halts; more refined measures would involve the time to write a group element or point of X, or the time to copy the entire transversal diagram (which should be proportional to its size), but presuming that such refinements will only introduce relatively small factors, we overlook them here.Definition 4.2 Suppose we are given a net N = V, E on a space X, and a group G of permutations of X. Suppose we are given a transversal diagram S = S, ∂S, Σ of N (with respect to G and X).And suppose that for each y ∈ ∂S, we are given β y ∈ G such that β y | V is an automorphism of N and that that for some κ(y) ∈ S, β y (κ(y)) = y.Given ℓ: Z ≥0 → W jump , let time(N , S, ℓ; G, X) be the least t such that V = n≤t [[ℓ(n)]][S] and for each {x, y} ∈ E, (x, y), (y, x) But counting transversals generated means that the choice of the enumeration function ℓ is critical.For example ... Perhaps the most naive choice for ℓ is to fix an ordering of ∂S = {y 1 , y 2 , . .., y |∂S| }, and hence of {β yi : i = 1, . . ., |∂S|}, and enumerate W jump so that n < n ′ =⇒ |ℓ(n)| ≤ |ℓ(n ′ )|, and use the ordering of ∂S to order each subsequence ℓ(|∂S| m−1 ), . . ., ℓ(|∂S| m − 1) lexicographically.We will make use of this naive enumeration, although we will find that we can often greatly reduce time complexity by using an enumeration designed from properties the group elements {β y : y ∈ ∂S}.As an extreme example of the advantage of custom-made enumeation, suppose that all the elements of {β y : y ∈ ∂S} commute.Then for any k and any permutation π: Proof.First of all, observe that in the computation, for each {x, y} ∈ E, transversal diagrams containing both (x, y) and (y, x) will have to be generated, and thus transversal diagrams containing both x and y as interior vertices will have to be generated.Thus the number of transversal diagrams generated (in addition to the initial one) and used must be at • Generate an m-cycle in [n] as follows.For the transversal diagram, choose vertex {1}, boundary {2, m}, and oriented edges + for each k ≥ 0, then after m − 1 iterations, the algorithm has generated m transversals making up the entire m-cycle.By Proposition 4.1, this is optimal, as here U = 0, the number of vertices is m, the number of vertices in the transversal is 1, and the time is m, so -If ℓ 2 enumerates the words of {β + , β − } by length and then lexicographically -so that -then generating the entire cycle will take 2 ⌊m/2⌋ iterations.
Here the choice of the enumeration can make the difference between linear and exponential time.
Sometimes the optimal enumeration does not meet the inequalities of Proposition 4.1.Say that a d-tree is a tree (i.e., an acyclic graph from which we select a "root" vertex) whose root vertex is of degree d and whose non-root non-leaf vertices are all of degree d + 1. Recall that a tree is complete if each branch (path from the root to a leaf) is the same length, that length (counting edges) being the rank of the tree.
For definitiveness, suppose that G is the set of permutations of X generated by elements otherwise.
(In addition, to make G act transitively on X, add as a generator the permutation Notice that G is abelian.

JGAA, 16(2) 507-541 (2012) 535
To cover this tree with copies of the first transversal, it suffices to enumerate r m transversal diagrams, including the first one, each having its own leaf.This can be done by enumerating words ) ∈ W jump , for if we took S 0 as the first fundamental transversal, then the images cover the leaves, and hence the entire tree, with r m transversals: for the tree N , given the initial branch for the transversal diagram S, time(N , S, ℓ; G, X) = r m and U = 0. Since the tree consists of (1 + o(1))r m vertices, the time complexity for a complete r-tree -assuming an optimal enumeration of W jump -is proportional to the order of the tree.(Of course, as the the transversal diagram is of logarithmic size with respect to the size of the entire tree, we are overlooking a logarithmic factor in this rough estimate.)However, in this case the transversal diagrams generated are not disjoint, and in fact while the optimal ordering gave U = 0, so that the inequalities of Proposition 4.1 became and it is the right inequality that gives the better estimate, albeit off by a factor of 3.And that estimate cannot be improved upon as all automorphisms of the tree require fundamental transversals of m + 1 vertices.We conclude that for naive implementations of this algorithm, for generating very large graphs, the time complexity is highly dependent on the enumeration ℓ of W jump .The result is a tradeoff: the more ℓ is intelligently designed, the lower is U .Clearly, for any net N embedded in any space X with given fundamental transversal and group elements, there is an enumeration ℓ of W jump such that the corresponding sequence of transversal diagrams covers N with U = 0. On the other hand, the computational complexity of ℓ itself may become an issue.So we conclude this subsection with a question.5 The Crystal Turtlebug Programs The previous subsection involved generating nets we knew we would obtain from given transversals.Suppose that all we wanted was some net (with nice properties) that we do not know, which would be generated from putative transversal diagrams, given some space and group.Then the computational resources required depends not only on the complexity of the implemented algorithm (and the enumeration of group elements) but also on the geometry of the underlying space.We concentrate on the motivating application: a program that enumerates blueprints for crystal design.For details on crystallographic groups in the following discussion, see [38].
If all we wanted was a unit cell of a net we knew, then as a unit cell for a three dimensional crystal net requires at most 48 fundamental transversals, such a computation would not be onerous.But what a chemist desires is a not one net consisting of a single unit cell of a known crystal; this is, in fact, the sort of image readily available in such databases as the Reticular Chemistry Structure Resource (RCSR, [27]), TOPOS ( [5] and [6]), and the Euclidean Patterns in Non-Euclidean Tilings (EPINET, [28]) 5 .In fact, what a chemist, crystallographer, or chemical engineer desires is a catalogue of chemically plausible nets for novel crystals.We typically do not know fundamental transversals and space groups that generate chemically plausible nets, so the Crystal Turtlebug program described in [23] traverses a search space of fundamental transversals (with vertices at integer points, so there are countably many of these) and crystallographic space groups (which may be specified by selecting three vectors (also integer vectors) representing the unit cell, and then which of the 230 conjugacy classes of crystallographic space groups to employ).(Actually, the current version of The Crystal Turtlebug uses a less efficient but more modularly adjustable variant of this algorithm.)The cost of the catalogue arises from the size of the search space of transversal diagrams -and of vectors and parameters defining cyrstallographic groups.
For example, the first program, described in [10], generates uninodal (i.e., vertex transitive) nets.The fundamental transversal consists of a single node (at (0, 0, 0) ∈ R 3 ) and e orbits of edges; each orbit of edges can be fixed by a single edge (the rest generated by application of the group elements), which can be fixed by an integer vector.Then one chooses a crystallographic space group, which (in the most naive implementation) consists of selecting three vectors (also integer vectors) representing the unit cell, and then which of the 230 conjugacy classes of crystallographic space groups to employ.Thus one chooses e + 3 vectors in Z 3 , and an element of a set of 230.Assuming that the edge vectors were somewhat smaller than the unit cell vectors, one could imagine selecting the former from a m × m × m cube and the latter from an M × M × M cube, and the most naive implementation will run the algorithm on 230m 3e M 3 initial conditions.For three orbits of edges, with m = 3 and M = 10, that's 4.5 billion nets to generate.And that's just for uninodal nets.program, but were unknown to Systre and the RCSR database.The vertices of the net at left has (non-planar) tetrahedral and (planar) quadrilateral vertex figures, while the net at right has two orbits of vertices with (non-planar) tetrahedral vertex figures.Thus the two nets are not congruent, even though Systre confirmed that they are isomorphic.For more examples, and more extended discussion of them, see [23].
From the mathematician's point of view, the exponential explosion is a problem if one intends to use a program like the Crystal Turtlebug to do experimental mathematics.After all, these nets are geometric objects, and it would be interesting to explore their properties.They seem to resist analysis: after a century of being subjects of great scientific interest, the mathematical theory of these rather difficult objects is still a bit thin.Surveys and studies of these nets could prove helpful in suggesting directions for the theory to be developed, but the exponential explosion suggests that even highly restricted comprehensive surveys are out of the question.
But the demand for crystal designs is likely to grow substantially during the coming decades.And hence, the demand for a better theoretical understanding

Figure 1 :
Figure 1: At left, the Cayley digraph for the abelian group Z 2 ⊕ Z 3 as generated by two elements, a and b, where a 2 = b 3 = id.Each vertex represents an element of the group, and each arc represents one of the generators or an inverse of a generator.At right, the corresponding Cayley graph -with unlabeled unoriented edges replacing pairs of arcs -which could be traversed as shown a traveler using an itinerary consisting of a single word, e.g., from the upper right vertex using the word bab −1 a as shown.

Figure 3 :
Figure 3: The path at the left represents the composition ba.The path at the right represents the composition a ba = ab.

Definition 3 . 1 A
transversal diagram of a net N = V, E embedded in a space X on which a group G of permutations act transitively (and where G induce a corresponding group of automorphisms of N ) is a tuple S = S, ∂S, Σ where S is a fundamental G-transversal and Σ = {(u, v) ∈ S × (S ∪ ∂S): {u, v} ∈ E}.

Definition 3 . 2
Fix a transversal diagram S, ∂S, Σ .The itineraries of Σ are the strings from Σ defined by the following recursion.
(The word ǫ v means "you are on the vertex v, and you stay there.")• Σ consists of individual instructions (which we well call "steps"), so that for any (u, v) ∈ Σ, we have init((u, v)) = u and term((u, v)) = v.(The word (u, v) means that "you are on the vertex u and you move to the adjacent vertex v along the sole connecting edge using the scheduled permutation for (u, v).") • If v and w are itineraries, and if term(v) = init(w), then vw is an itinerary with init(vw) = init(v) and term(vw) = term(w).In particular, if v is an itinerary and (x, y) ∈ Σ, then v(x, y) is a itinerary if and only if term(v) = x.(The itinerary vw means "carry out the permutation encoded by v and then the permutation encoded by w.") Denote the set of itineraries by W = W N ,G .

Definition 3 . 3
Fix a transversal diagram S, ∂S, Σ .Call each pair (x, y) ∈ Σ ∩ S 2 a local step, and each pair (x, y) ∈ Σ ∩ (S × ∂S) a jump step.Given an itinerary v, let v be the number of jump steps in v.If v = 0, call v jump-free.

Definition 3 . 4
Given a transversal diagram S, ∂S, Σ and a local step (x, y), let (x, y) R = (y, x).Given two jump-free strings u and v, with term

Figure 6 :
Figure 6: If the traveler is at a vertex x ′ , its itinerary will tell it how to move as if it

Figure 8 :
Figure 8: A normal form representation of permutations associated with itineraries.

Figure 10 :
Figure 10: Embed a 2-tree of rank m = 3 into X = [3 + 1] × [2 3 ]; the blue points are those that are not vertices of the tree.The red vertices being a fundamental transversal, and the red edges the resulting alphabet of the transversal diagram, the green vertices being the boundary vertices, and the purple vertices the rest.

Question 4 . 1
Given a net N generated from a fundamental transversal S using words of W jump from a group G of permutations on a finite space X, what upper bounds on the time complexity hold for the enumeration function ℓ and the generation of N from copies of the initial transversal diagram?

Figure 11 :
Figure 11: Two isomorphic nets found by a early version of the Crystal Turtlebug