Order Reconfiguration under Width Constraints

. In this work, we consider the following order reconfiguration problem: Given a graph G together with linear orders ω and ω ′ of the vertices of G , can one transform ω into ω ′ by a sequence of swaps of adjacent elements in such a way that, at each time step, the resulting linear order has cutwidth (pathwidth) at most k ? We show that this problem always has an affirmative answer when the input linear orders ω and ω ′ have cutwidth (pathwidth) of at most k/ 2. This result also holds in a weighted setting. Using this result, we establish a connection between two apparently unrelated problems: the reachability problem for two-letter string rewriting systems and the graph isomorphism problem for graphs of bounded cutwidth. This opens an avenue for the study of the famous graph isomorphism problem using techniques from term rewriting theory.


Introduction
In the field of reconfiguration, one is interested in studying relationships among solutions of a problem instance [30,41,44].Here, by reconfiguration of one solution into another one, we mean a sequence of steps where each step transforms a feasible solution into another one.In this context, three fundamental questions are the following ones: 1. Is it the case that any two solutions can be reconfigured into each other?2. Can any two solutions be reconfigured into each other in a polynomial number of steps? 3. Given two feasible solutions X and Y , can one find in polynomial time a reconfiguration sequence from X to Y ?
In this paper, we study reconfiguration problems in the context of linear arrangements of the vertices of a given graph G.The space of feasible solutions is the set of all linear orders of width1 at most k for some given k ∈ N. We say that a linear order ω can be reconfigured into a linear order ω ′ in width k if there is a sequence ω 1 , . . ., ω m of linear orders of width at most k such that ω 1 = ω, ω m = ω ′ and for each i ∈ {2, . . ., m}, ω i is obtained from ω i−1 by swapping two adjacent vertices.Our main result (Theorem 1) states that if ω and ω ′ are linear orders of cutwidth at most k, then ω can be reconfigured into ω ′ in width at most 2k.Additionally, reconfiguration in width at most 2k can be done using at most O(n2 ) swaps.Finally, we show that a reconfiguration sequence can be found in polynomial time.We also show that these results transfer to pathwidth instead of cutwidth and to weighted version thereof.Notice that it is known that the mentioned (unweighted) parameters are quite related, see [8] also concerning fixed-parameter tractability results.
Our results on reconfiguration of linear arrangements can be used to establish an interesting connection between two apparently unrelated computational problems: reachability for two-letter string rewriting and graph isomorphism.
A two-letter rewriting rule over a given alphabet Σ is a rewriting rule of the form ab → cd for letters a, b, c, d ∈ Σ.A two-letter string rewriting system is a collection R of two-letter string rewriting rules.The reachability problem for such a rewriting system R is the problem of determining whether a given string x ∈ Σ n can be transformed into a given string y ∈ Σ n by the application of a sequence of two-letter rewriting rules of R. On the other hand, in the graph isomorphism problem, we are given two graphs, G and G ′ , and the goal is to determine whether there exists a bijection φ from the vertex set of G to the vertex set of G ′ in such a way that an edge {u, v} belongs to G if and only if the edge {φ(u), φ(v)} belongs to G ′ .
In order to describe more precisely the connections between two-letter term rewriting and graph isomorphism, we briefly discuss the notions of slices and unit decompositions.These notions were originally defined in the study of the partial order theory of concurrency [11] and, later, used to prove algorithmic results in the realm of directed width measures [12,13].In this work, we provide simplified definitions of slices and unit decompositions that are more adequate to our context.
A slice is a graph S where the vertices are partitioned into a center C and special in-frontier I and out-frontier O that can be used for composition.A slice S 1 can be glued to a slice S 2 if the out-frontier of S 1 can be coherently identified with the in-frontier of S 2 .In this case, the gluing gives rise to a bigger slice S 1 • S 2 which is obtained by identifying the out-frontier of S 1 with the in-frontier of S 2 .A unit slice is a slice with a unique vertex in the center.Any slice S can be decomposed into a sequence of unit slices.More specifically, a unit decomposition is a sequence U = S 1 S 2 . . .S n of unit slices with the property that for each i ∈ [n − 1], S i can be glued to the slice S i+1 .The result of gluing the unit slices in U is a slice U • with n center vertices.Conversely, any slice S with n center vertices can be written as a unit decomposition U = S 1 S 2 . . .S n with the property that U • is isomorphic to S. An important remark connecting unit decompositions and the notion of cutwidth is that if a slice S has cutwidth k, then S can be decomposed into a unit decomposition U = S 1 S 2 . . .S n where for each i ∈ [n], S i has at most k vertices in each frontier except for the in-frontier of S 1 and the out-frontier of S n .Therefore, if we let Σ(k) denote the set of all unit slices with frontiers of size at most k, then any graph G with n vertices of cutwidth at most k can be written as a word (unit decomposition) of length n over the alphabet Σ(k).In this work, for each k ∈ N, we introduce a suitable two-letter string rewriting system R(k) over the alphabet Σ(k) with the following property: if U and U ′ are two unit decompositions over Σ(k) and if U can be transformed into U ′ using the rewriting rules in R(k), then the graphs U • and U ′ • are isomorphic.Our second main result is a partial converse for this property.More precisely, we show that given two unit decompositions U and U ′ over Σ(k), if the graphs U • and U ′ • are isomorphic, then each of these unit decompositions can be transformed into one another by the application of rewriting rules from the string rewriting system R(2k) (Theorem 2).
The proof of Theorem 2 is heavily based on Theorem 1.An important feature of this proof is that, given an isomorphism from U , one can construct a sequence of rewriting steps transforming U into U ′ .Conversely, given any such a sequence, we are able to construct an isomorphism from U • to U ′ • .This result, together with the fact that unit decompositions of minimum cutwidth can be approximated in FPT time, implies that the graph isomorphism problem for graphs of cutwidth at most k is FPT-equivalent to the reachability problem for R(2k) (Theorem 4).

Related Work.
The reachability problem for a given string rewriting system R consists in determining if a given string x can be transformed into a given string y by applying rewriting rules from R. Reachability is a central problem in the field of string rewriting [9] and can also be studied under the light of term rewriting theory [36,7,3,9].The complexity of the reachability problem is highly dependent on the rewriting system R.For general rewriting systems, the problem becomes undecidable [9].In the case of two-letter rewriting, reachability is in PSPACE, since in this case, strings never grow in size.It is also not difficult to design two-letter rewriting systems for which the reachability problem is PSPACE-complete.Nevertheless, our results imply that for each k ∈ N, the R(2k)-reachability problem for unit decompositions of length n and width at most k is reducible to the graph isomorphism problem.Therefore, it can be solved in time n polylog(n) , independently of k, using Babai's quasi-polynomial time algorithm for graph isomorphism [4].For a nice historical account and a gentle introduction into the ideas behind this non-trivial algorithm, we refer to [28].Further progress in the area of graph isomorphism algorithms is nicely reported in [24].An interesting question we leave open is the complexity of R(α • k)-reachability for unit decompositions of width at most k if α is a rational number with 1 ≤ α < 2; we do not know if there is such an α for which the reachability problem becomes PSPACE-hard.
In the field of parameterized complexity theory [15,9], a computational problem is said to be fixed-parameter tractable (or FPT for short) with respect to a parameter k if it can be solved in time f (k) • n O (1) on inputs of size n.Here f : N → N is a computable function depending only on the parameter k, but not on the size n of the input.The Graph Isomorphism problem (GI for short) has been shown to be solvable in time f (k) • n O(1) (that is, FPT time) whenever the parameter k stands for eigenvalue multiplicity [5], treewidth [38], feedback vertex-set number [37], or the size of the largest color class [18,2] (for colored input graphs).On the other hand, GI can be solved in time f 1 (k) • n f2(k) (that is, in XP time), whenever the parameter k stands for genus [40], rankwidth [27], maximum degree [39], size of an excluded topological subgraph [22], size of an excluded minor [21], or Weisfeiler-Leman dimension [10], which is in fact related to the mentioned rankwidth parameterization [23].We note that, in particular, Babai's algorithm and techniques have been recently used to improve the fastest FPT algorithm for graphs of treewidth at most k [26], and for graphs of maximum degree d, the fastest XP-algorithm has been improved from n O(d/ log d) [6] to n polylog(d) [25].In particular, it is worth noting that graphs of cutwidth k have maximum degree at most 2k and treewidth O(k).Therefore, isomorphism of graphs of cutwidth k can be solved in time 2 O(k•polylog(k)) • n O (1)  [26].This implies that R(2k)-reachability can be solved in 2 O(k•polylog(k)) • n O (1) time when restricted to unit decompositions of width at most k.Showing that isomorphism for graphs of cutwidth k can be solved in time 2 O(k) • n O (1) is still an interesting open problem.
Another width parameter for linear orders that has been studied in the context of graph theory is the vertex separation number of a graph [16].This parameter may be seen as an order-theoretic interpretation of the notion of pathwidth.The techniques used to prove Theorem 1 can be generalized to prove that reconfiguration of linear orders of vertex separation number k can always be achieved in width at most 2k (Theorem 5).While we do not provide a string-rewriting interpretation of this result, we do state it formally in Section 5, since this result may be of independent interest in the field of reconfiguration.
A conference version of this work was presented at MFCS in 2021; see [1].

Preliminaries
Basics.We let N denote the set of natural numbers, including 0, and N + denote the set of positive natural numbers.For each n ∈ N + , we let [n] = {1, . . ., n} denote the discrete interval of the first n positive integers.As a degenerate case, we let [0] = ∅.Given a finite set S, we let P(S) denote the set of all subsets of S. For each k ∈ N, we let P(S, k) and P(S, ≤ k) denote the sets of subsets of S of size exactly k and at most k, respectively.
Graphs.In this work, graphs are simple and undirected.Given a graph G, we let V (G) denote the vertex set of G and E(G) denote the edge set of G. Given a subset S ⊆ V (G), we let G[S] be the subgraph of G induced by S.More precisely, V (G[S]) = S and E(G[S]) = E(G) ∩ P(S, 2).An isomorphism from a graph G to a graph G ′ is a bijection φ : V (G) → V (G ′ ) such that for each v, u ∈ V (G), {v, u} ∈ E(G) if and only if {φ(v), φ(u)} ∈ E(G ′ ).If such an isomorphism exists, we call G isomorphic to G ′ .
Order.Let V be a set with |V | = n.A linear order on V is a bijection ω : [n] → V .Intuitively, for each j ∈ [n] and v ∈ V , ω(j) = v indicates that v is the j-th element of ω.If S ⊆ [n], then we let ω(S) = {ω(j) : j ∈ S} be the image of S under ω.Given linear orders ω, ω ′ : [n] → V of V and a number i ∈ [n − 1], we write ω i − → ω ′ to indicate that ω ′ is obtained from ω by swapping the order of the vertices at positions i and i + 1.More precisely, ω ′ (j) = ω(j) for every j ∈ Let ω : [n] → V be a linear order on a set V .Let S ⊆ V .We let ω S : [|S|] → S be the linear order induced by ω on S.More precisely, if we write the elements of S in increasing order according to ω, then for each i ∈ [|S|], ω S (i) is the i-th element in this sequence.
Order Reconfiguration.We say that ω can be reconfigured into ω ′ in one swap, and denote this fact by ω → ω ′ , if there exists some i ∈ [n] such that ω i − → ω ′ .We say that ω can be reconfigured into ω ′ in at most r swaps, and denote this fact by ω → r ω ′ , if there are numbers r ′ ∈ [r], i 1 , . . ., i r ′ ∈ [n], and linear orders ω 0 , . . ., ω r ′ such that
We note that in particular, ω String Rewriting.A two-letter string rewriting system is a pair (Σ, R) where Σ is a finite, non-empty set of symbols (an alphabet), and R ⊆ Σ 2 × Σ 2 is a set of rewriting rules of the form ab → cd.Let x and y be strings in Σ n and i ∈ [n − 1].We say that x can be transformed into y by applying a rewriting rule ab → cd at position i if x i x i+1 = ab, y i y i+1 = cd and x j = y j for j / ∈ {i, i + 1}.We write x i − → y to denote that x can be transformed into y by the application of some rewriting rule at position i.We write x → y to denote that x can be transformed into y by the application of some rewriting rule at some position i ∈ We write x → * y to denote that y is reachable from x.We say that x and y are R-equivalent if x → * y and y → * x.

Linear Order Reconfiguration
Let G be an n-vertex graph with vertex set V (G) and edge set E(G).Given two disjoint sets S, S ′ ⊆ V (G), we let E(G, S, S ′ ) = {{u, v} ∈ E(G) : u ∈ S, v ∈ S ′ } be the set of edges with one endpoint in S and the other endpoint in S ′ .As a special case, we define E(G, S) = E(G, S, V (G) \ S).We will often make use of the following two properties without explicit mentioning.
• Monotonicity property: Let G be an n-vertex undirected graph with vertex set V (G) and edge set E(G).Let ω : [n] → V (G) be a linear order on the vertices of G.
be the number of edges that have one endpoint in the first p − 1 vertices of the linear order ω and the other endpoint in the remaining vertices.E(G, ω([p − 1])) is called the cut at position p and cw(G, ω, p) is the size of the cut at position p.
Definition 1 (Cutwidth) The cutwidth of the linear order ω on V (G) is defined as The cutwidth of the graph G is defined as cw(G) = min ω cw(G, ω), where ω ranges over all linear orders on the vertex set V (G).
Figure 1: Visual representation of the cutwidth of a graph.ω orders the vertices in the following way v 4 , v 2 , v 1 , v 3 , v 5 .The value at the top give the position of the cut and at the bottom, the value of this cut.In this example, the cutwidth is 4.
Given a graph G, the cutwidth of a given linear order ω can be intuitively understood by drawing G in a specific way on the plane.First, the vertices of G are placed on a horizontal line following the order given by ω.Then, edges are drawn as curves between the point representing their endpoints.Now, if we draw a vertical line between the (p − 1)-th and p-th vertices in ω, then the number of edges that intersect this vertical line corresponds to cw(G, ω, p). Figure 1 gives an example of such a visual representation of the cutwidth.
If G = (V, E) is a graph that comes with edge weights c : , where c(F ) = f ∈F c(f ) for an edge subset F .Now, we can define the weighted cutwidth of the linear order ω on V (G) as wcw(G, c, ω) = max p∈ [n] wcw(G, c, ω, p) .
The weighted cutwidth of the graph G is defined as wcw(G, c) = min ω wcw(G, c, ω), where ω ranges over all linear orders on the vertex set V (G).
For each k ∈ N, and each n-vertex graph G, we let be the set of linear orders of V (G) of cutwidth at most k.We say that ω can be reconfigured into ω ′ in cutwidth at most k if there is a reconfiguration sequence such that for each j ∈ {0, . . ., r}, ω j ∈ CW(G, k).We can again generalize these notions to the weighted setting by defining for any edge weight function c : E(G) → N + , so that we can also speak about reconfiguring ω into ω ′ in weighted cutwidth at most k (with respect to an arbitrary but fixed edge weight function c).
Given two linear orders ω and ω ′ of the vertices of an n-vertex graph, ω can always be reconfigured into ω ′ .To see this, notice that the bubble-sort algorithm performs only swaps.Therefore, running the bubble-sort algorithm to sort ω according to ω ′ gives a valid reconfiguration sequence from ω to ω ′ .This connection allows us to be more precise.
Lemma 1 A linear order ω can always be reconfigured into another ordering ω ′ using a reconfiguration sequence of length at most n 2 .
An interesting question is to ask if ω can be reconfigured into ω ′ in such a way that every linear order appearing in the reconfiguration sequence has bounded (weighted) cutwidth.
Problem 1 (Bounded (Weighted) Cutwidth Order Reconfiguration) Let G be an n-vertex graph, let c : E(G) → N + be a weight function, let ω, ω ′ : [n] → V (G) be linear orders on the vertex set of G, and let k ∈ N. Is it true that ω can be reconfigured into ω ′ in weighted cutwidth at most k (with respect to c)?
Given an instance (G, c, ω, ω ′ , k) of the Bounded Cutwidth Order Reconfiguration problem, it should be clear that if k is smaller than the cutwidth of the graph G, then the answer for Problem 1 is trivially no, since in this case neither ω nor ω ′ are in WCW(G, c, k).On the other hand, we will show in Theorem 1 below that the answer is always yes if k is at least twice the weighted cutwidth of the thickest input linear order.
Theorem 1 Let G be an n-vertex graph, let c : E(G) → N + be a weight function and let ω, ω ′ : [n] → V (G) be linear orders of V (G) of weighted cutwidth at most k.Then, ω can be reconfigured into ω ′ in weighted cutwidth (with respect to c) which is at most wcw(G, c, ω) + wcw(G, c, ω ′ ) ≤ 2k.
To prove this theorem, we need the following three lemmas.First, we will show that taking induced linear order does not increase the cutwidth (Lemma 2).Then, we will show that some specific intermediate linear orders have bounded cutwidth (Lemma 3).Finally, we will show that there is a reconfiguration sequence of bounded cutwidth between each consecutive pair of intermediate linear orders (Lemma 4).Extending on the conference version of this paper, we will see that all these results also hold in the more general setting of edge-weighted graphs.
We start by the monotonicity of the weighted cutwidth by taking induced linear orders.
Lemma 2 Let G be an n-vertex graph, S ⊆ V (G) and ω : [n] → V (G) be a linear order on V (G).Moreover, let c : E(G) → N + be a weight function.Then, ω S is a linear order on V (G[S]).
Proof: ) .The red part of the linear order follows the linear order ω for the first i elements, and the blue part of the linear order follows ω ′ for the remaining elements.Then, the set of edges crossing the cut at position p can be split in two, the set of edges that start from the red part and the set of edge that start from the blue part.The number of red edges is bounded by the cutwidth of ω and the number of blue edges is bounded by the cutwidth of ω ′ .
To prove Theorem 1, we will give a reconfiguration sequence that uses the composition of linear orders.At a high level, we will go from one linear order ω to the other ω ′ by using the composition of the two linear orders at each position ω ′ ⊕ i ω.Therefore, we show that the composition of two linear orders has bounded weighted cutwidth.
There are two cases to be analyzed.First, if p ≤ i, then, by definition of ω ⊕ i ω ′ we have For Equality (a), observe that given two disjoint subsets S and S ′ of V (G), and a partition S 1 , S 2 of S, we have c(E(S, S Figure 3: Illustration of the key part in Lemma 4, using the unweighted setting for simplicity.In this figure, ω ′′ = ω ′V \ω ([i+1]) .The red part of the linear order follows the linear order ω for the first i + 1 elements, and the blue part of the linear order follows ω ′ for the remaining elements.
Then, the set of edges crossing the cut at position p = j − t + 1 can be split in two, the set of edges that start from the red part and the set of edge that start from the blue part.The number of red edges is bounded by the cutwidth of ω and the number of blue edges is bounded by the cutwidth of ω ′ .therefore, (ω ). Figure 2 gives a visual representation of the equality.This proves Equality (a).
To understand Inequality (b), we need two arguments.As ω( which shows that the weight of the first set is upper-bounded by wcw(G, ω, i + 1).As the edges in E(G, (ω ))) only connect vertices with positions beyond i within ω ⊕ i ω ′ , after an index shift, we see that only the linear order ω ′ really matters, which explains the inequality For the last inequality, apply Lemma 2 to derive As p is arbitrary, we have that wcw(G, c, ω Finally, we show that we can reconfigure the composition of two linear orders at position i, ω ′ ⊕ i ω, to the composition at position i + 1, ω ′ ⊕ i+1 ω, in bounded weighted cutwidth. Lemma 4 Let G be an n-vertex graph, let c : E(G) → N + be an edge weight function and let ω, ω ′ : [n] → V (G) be linear orders on V (G) of weighted cutwidth at most k (with respect to c), and let i ∈ {0, . . ., n − 1} be an integer.Then, ω ⊕ i ω ′ can be reconfigured into ω ⊕ i+1 ω ′ in weighted cutwidth at most wcw(G, c, ω) + wcw(G, c, ω ′ ) ≤ 2k.
Let j ∈ [n] such that ω ⊕ i ω ′ (j) = ω(i + 1), i.e., j is the position of ω(i + 1) in ω ⊕ i ω ′ .As for each p ∈ [i], ω ⊕ i ω ′ (p) = ω ⊕ i+1 ω ′ (p) = ω(p), we have j > i.Let us consider the following sequence of swaps: If j = i + 1, this sequence is empty and ω ⊕ i ω ′ = ω ⊕ i+1 ω ′ .At each step of this sequence, we swap ω(i + 1) with its left neighbor.This brings ω(i + 1) from position j to position i + 1.By doing this, we transform ω ⊕ i ω ′ into ω ⊕ i+1 ω ′ .Observe that, at each step, ω(i + 1) is moved one position to the left, therefore, we have ω t (j − t) = ω(i + 1) for all t ∈ [j − i − 1].Consider Figure 3 for an illustration of the key part of the following proof by induction.We are going to inductively show that each element ω t in the sequence has weighted cutwidth upperbounded by wcw(G, c, ω) which proves the induction basis.Let t ∈ [j − i − 1] and p ∈ [n] be two integers.As induction hypothesis, we have by induction hypothesis.Otherwise, p = j − t + 1 ∈ {i, . . ., j} (Figure 3) and we have By definition of p, we have ω t (p − 1) = ω t (j − t) and by construction of ω t , we have ω t (j − t) = ω(i + 1).Therefore, we find As we are swapping ω(i + 1) leftwards, Again by definition of ω t and p, the elements in {ω t (l) : i < l < p − 1} are ordered according to ω ′ , which is also true for {ω t (r) : r ≥ p}.More formally,

JGAA, 27(6) 409-431 (2023) 419
To achieve the penultimate inequality, we again apply Lemma 2. □ Now, we are in the position to prove our first main theorem.
Proof: [Proof of Theorem 1] Consider the following sequence: By Lemma 4, one can realize each step in weighted cutwidth at most wcw(G, c, ω) + wcw(G, c, ω ′ ) ≤ 2k, which then also upper-bounds the whole reconfiguration sequence.□ We have proved, in Theorem 1, that one can always reconfigure a linear order ω, of weighted cutwidth at most k, into a linear order ω ′ , of weighted cutwidth at most k, in weighted cutwidth at most 2k.Now, we show that for every k ∈ N + , there exists a graph G and two linear orders ω and ω ′ of cutwidth k such that any reconfiguration sequence between ω and ω ′ needs linear orders of cutwidth at least 2k.In other words, the bound given in Theorem 1 is sharp.Here, clearly considering the unweighted variant (i.e., all weights equal one) suffices.
Proposition 1 For each k ∈ N, there exists a sequence of graphs (G n ) n∈N ≥3 where for n ∈ N ≥3 , G n has n • k vertices, and linear orders ω, ω but any reconfiguration sequence that transforms ω into ω ′ will have cutwidth of at least 2k.
Proof: For simplicity, we will start by giving a sequence of multigraphs with this property and we will see how to build simple graphs from them.Let k, n but applying a swap to ω at any position will result in a linear order of cutwidth 2k.Now, to prove this result in the case of simple graphs, we will turn each graph G n into a simple graph by replacing each edge in G with a path of length 2. In other words, we split each edge and add a new vertex in the middle.This is a simple edge subdivision.We call the vertices from G the main vertices and the added vertices the dummy vertices.To complete the construction, we have to extend ω and ω ′ .For this purpose, we put the dummy vertices on the path from i to i + 1 for each i ∈ [n] after (and before, respectively) i and before (and after, respectively) i + 1 in ω (and ω ′ , respectively).The order between the dummy vertices does not matter.Now it is easy to see that the cutwidth of ω and ω ′ is k.Any reconfiguration sequence that transforms ω into ω ′ needs to swap two main vertices at some point.Let i and i + 1 be the two first main vertices to be swapped.If i > 1, then there exist k paths from i to i + 1 and k paths from i to i − 1.Those 2k paths are disjoint, therefore, the cut between i and i + 1 has a size of at least 2k.If i = 1 then i + 1 < n and the same reasoning works for i + 1 instead of i. □ Our results on weighted cutwidth reconfiguration are in themselves interesting to the community working on reconfiguration problems, but in the following, we prove a connection of unweighted cutwidth reconfiguration to the famous Graph Isomorphism problem, which shows a completely different facet of this particular reconfiguration problem.

String Rewriting System and Graph Isomorphism
Now, we use our result on the Bounded Cutwidth Order Reconfiguration problem to make a connection between two apparently unrelated computational problems, namely, the Reachability problem for a two-letter rewriting system and the Graph Isomorphism problem.To do so, we introduce a notion of graph decomposition based on cutwidth named unit decomposition.
In a unit decomposition, the graph is split into small pieces called slices.If a graph has bounded cutwidth, it can be decomposed into a unit decomposition of bounded width.Using the slices as an alphabet, we can see a graph as a word.Then, we introduce a rewriting system over this alphabet that preserve isomorphism.Our main result (Theorem 2) of this section states that two graphs are isomorphic if and only if, their unit decompositions are reachable in this rewriting system.

Slice Rewriting System
We start by describing the notion of slices and unit decompositions.Intuitively, a slice is a piece of graphs.Given two compatible slices, we can combine them using an operation called the gluing operation to build a new bigger slice.After gluing enough slices, we end up with a graph.A unit decomposition is the representation of a graph as a sequence of compatible slices.Then, using slices as letters, we define an alphabet and a rewriting system over unit decompositions.We depict slices as in Figure 4. We define slices using multigraphs, as the gluing operation, defined below, can take slices which are simple graphs, and create a slice that is a multigraph (see Figure 5).

Slices
Figure 6: Gluing of two slices S 1 and S 2 .The gluing operation is a way to merge two slices into one.In this example, the edge from the center vertex 1 from S 1 to the out-frontier vertex (1, 2) is stitched to the edge from the in-frontier vertex (0, 2) to the center vertex 1 from S 2 to form the edge between the center vertices 1 and 2 in S 1 • S 2 .The stitching of edges is done following the order of the frontier vertices. formally Note that the gluing operation is associative.Therefore, we will not write parentheses for the gluing of more than two slices.Figure 6 illustrates the gluing of two slices.
Unit Slices and Unit Decompositions.We say that a slice is a unit slice if it has a unique vertex in its center.A unit decomposition is a sequence U = S 1 S 2 . . .S n , where S i are unit slices and S i • S i+1 is well defined for each i ∈ [n − 1].The slice associated with a unit decomposition U is defined as 7 for an example).Note that if the in-frontier of S 1 and the out-frontier of S n are empty, then U • is just a multigraph with vertex set [n] (see Figure 5).For each k ∈ N, we define the alphabet Σ(k) as the set of all unit slices of width at most k.We now prove that |Σ(k)| is upper-bounded by a function in k.Proof: In a unit slice of width at most k, the in-frontier and out-frontier can have between 0 and k vertices and there is only one center vertex.Therefore, there are (k + 1) 2 configurations for the vertices of a slice.By definition, vertices of the in-frontier and the out-frontier have degrees exactly 1, vertices in the in-frontier can be connected to the center vertex or an out-frontier vertex and there is no self-loop.Therefore, fixing the connectivity of the in-frontier vertices defines the full unit slice, because, if an out-frontier vertex is not connected to an in-frontier vertex, then it must be connected to the center vertex.Once the number of vertices in the frontiers is chosen, there can be between 0 and k vertices from the in-frontier connected to the center vertex.Let 0 ≤ i ≤ k be the number of such vertices.If i vertices are connected to the center vertex, then the rest of the vertices must be connected to the out-frontier; there are at most k! i! ways of doing this.There are at most k i subsets of size i in the in-frontier.Hence, there are at most i! ways to connect the vertices in the in-frontier.□ We let Σ(k) ⊛ denote the set of all unit decompositions over Σ(k).The order of the unit slices in a unit decomposition U = S 1 S 2 . . .S n induces a linear order ω U on the center vertices of the slice U • .We extend this linear order to all the vertices of U • by putting the vertices in the in-frontier first, then the center vertices and, finally, the vertices in the out-frontier.More formally, the linear order defined by U sets ω U (i) = (0, i) for each (0, i) ∈ I(S 1 ), ω U (|I(S 1 )| + i) = i for each i ∈ {1, . . ., n} and ω and there is an isomorphism ϕ from S 1 to S 2 such that the restriction of ϕ to I 1 and O 1 is the identity function.In other words, S 1 and S 2 are equivalent if they are equal up to the renaming of the center vertices.
We let R(k) ⊆ Σ(k) 2 ×Σ(k) 2 be the set of all rewriting rules of the form 8). In other words, U is locally R(k)-equivalent to U ′ if U can be rewritten in one step into U ′ using a rule from R(k).The proof of Theorem 5 below is analogous to the proof of Theorem 1.More precisely, this proof follows by restating Lemma 2, Lemma 3 and Lemma 4 in terms of the vertex separation number of a graph instead of cutwidth, and then by using this last restated lemma to conclude the proof, as done in Theorem 1.

We let
Theorem 5 Let G be an n-vertex graph and ω, ω ′ : [n] → V (G) be linear orders of V (G) of vertex separation number at most k.Then, ω can be reconfigured into ω ′ in vertex separation number at most vsn(G, ω) + vsn(G, ω ′ ) ≤ 2k.
As it has been shown by Kinnersley [32], the vertex separation number equals the possibly nowadays better-known graph parameter pathwidth.Therefore, the previous theorem also speaks about a reconfiguration problem for pathwidth.From an application point of view, more precisely, concerning possible applications in the area of VLSI design, the relation to the so-called Gate Matrix Layout Problem is possibly even more important.We abstain from giving a precise definition here, but rather refer to articles as [14,17,32,33,34].As the optimum value of the gate matrix layout parameter of a graph G equals the pathwidth of G plus one [32, Corollary 3.2], we also obtain reconfiguration results for this graph parameter motivated by VLSI.Due to results of [35], another graph parameter tightly linked to pathwidth is the node search number of a graph; putting the mentioned results together, it also equals the gate matrix layout parameter.In [35], the node search number was shown to be equal to the minimum progressive black pebble demand of a graph.This is interesting, as the black pebble demand of a directed acyclic graph is tightly related to a model of register allocation for the computation of arithmetic expressions.The black pebble demand corresponds to the number of registers needed to evaluate an arithmetic expression.Also more generally, such graphs can be used to model the storage requirements of a program.Turning to such problems under the umbrella of reconfiguration could be also an interesting avenue.Again related to register allocation problems are job scheduling problems.We are bringing this connection up in this context, because traditionally job scheduling problems are linked to graph coloring, and recoloring problems can be seen as one of the origins of the field of reconfiguration itself.We only like to draw the reader's attention to [44], where recoloring problems were studied for bounded width parameters, this way returning to one of the main topics of this paper.

Conclusion
In this work, we have studied the order reconfiguration problem under the framework of the theory of fixed-parameter tractability.In particular, in our main technical result, we have shown that the order reconfiguration problem for linear orders of cutwidth at most k can always be achieved in cutwidth at most 2k (Theorem 1), also in the weighted case.Using this result, we have established new connections between the graph isomorphism problem and the reachability problem for a special two-letter string rewriting system operating on unit slices.In particular, we have proven that unit decompositions U and U ′ of width k are R(2k)-equivalent if and only if the graphs U Theorem 2 opens up the possibility of studying the graph isomorphism problem under the perspective of term rewriting theory.The most immediate question in this direction is the complexity of deciding R(2k)-reachability for unit decompositions of width k.By a reduction to isomorphism of graphs of cutwidth k, this problem can be solved in time 2 O(k•polylogk) n O(1) using the results from [26].Can techniques that are intrinsic to string/term rewriting theory be used to improve this running time?Can such techniques be used to obtain algorithms running in time f (k) • n O (1)  for some computable function f : N → N? Note that a positive answer to this question would be conceptually relevant even if the function f (k) is substantially worse than the current 2 O(k•polylog(k)) , since techniques based on rewriting may carry over to contexts where group-theoretic techniques do not.One interesting line of attack for this question would be to study connections between R(2k) and techniques related to Knuth-Bendix completion and their generalizations [42,43,31,29].It is also interesting to recall that also Wrochna used some relations to string rewriting questions and graph problems of bounded width in [44].
A natural question that arises in the context of reconfiguration of linear orders is the following: given two linear orders ω and ω ′ , what is the minimum cutwidth of a linear order ω ′′ occurring in a reconfiguration sequence from ω to ω ′ ?Is this problem NP-hard, or hard to approximate?Is it solvable in FPT-time for certain parameters?We thank one of the reviewers of the conference version [1] for bringing these interesting questions to our attention.
We do hope that the avenue connecting graph isomorphism and term rewriting opens up new lines of research in both areas.For instance, could this approach help when considering graph similarity instead of graph isomorphism, as discussed, e.g., in [19]?

Figure 2 :
Figure 2: Illustration of Equality (a) in Lemma 3, using the unweighted setting for simplicity.In this figure, ω ′′ = ω ′V \ω([i]) .The red part of the linear order follows the linear order ω for the first i elements, and the blue part of the linear order follows ω ′ for the remaining elements.Then, the set of edges crossing the cut at position p can be split in two, the set of edges that start from the red part and the set of edge that start from the blue part.The number of red edges is bounded by the cutwidth of ω and the number of blue edges is bounded by the cutwidth of ω ′ .

Lemma 3
Let G be an n-vertex graph with edge weights c : E(G) → N + and let ω, ω ′ : [n] → V (G) be linear orders of V (G) with weighted cutwidth of at most k.Then, for each i ∈ [n], ω ⊕ i ω ′ has weighted cutwidth (with respect to c) that is at most wcw(G, c, ω) + wcw(G, c, ω ′ ) ≤ 2k.Proof: Let i, p ∈ [n].By definition of the cutwidth, we have that wcw(G, c, ω
. Let I = {[a] : a ∈ N} denote the set of intervals of the form [a] = {1, . . ., a} for a ∈ N (recall that [0] = ∅).We let I 0 = {{0} × [a] : [a] ∈ I}, and I 1 = {{1} × [a] : [a] ∈ I}.A slice S = (I, C, O, E) is a (multi-)graph where the vertex set V = I ∪ C ∪ O is partitioned into an in-frontier I ∈ I 0 , a center C ∈ I, and an out-frontier O ∈ I 1 , and E is a multiset of unordered pairs from I ∪ C ∪ O in such a way that vertices of I ∪ O have degree exactly 1, there is no edge between any two vertices in I, and no edge between any two vertices in O.

Figure 5 :
Figure 5: Slice associated with the unit decomposition U = S 1 S 2 S 3 .The resulting slice does not have any vertex in its frontier.It can therefore be seen as a multigraph on 3 vertices.

Figure 7 :
Figure 7: Slice associated with the unit decomposition U = S 1 S 2 S 3 .The gluing operation is associative, therefore parentheses are not needed.

k≡⊆
Σ(k) ⊛ × Σ(k) ⊛ be the equivalence relation defined on unit decompositions by taking the reflexive, symmetric and transitive closure of k ∼.If U k ≡ U ′ , then we say that U ′ Problem 2 (Bounded Vertex Separation Number Reconfiguration) Let G be an n-vertex graph, ω, ω ′ : [n] → V (G) be linear orders on the vertex set of G, and k ∈ N. Is it true that ω can be reconfigured into ω ′ in vertex separation number at most k?