• No results found

Deciding atomicity in the contiguous subpath ordering

In document Orderings on words and permutations (Page 62-68)

2.2 The factor ordering

2.2.2 Deciding atomicity in the contiguous subpath ordering

In this subsection we show that atomicity is decidable for the contiguous subpath or- dering onP(G). In the next subsection we will show that this implies the decidability of atomicity for the factor ordering on words.

Notation 2.2.18. If G is a directed graph and u, v∈V(G) are such that there is a path inG fromu to v, then we denote this by u→∗v.

Definition 2.2.19. A directed graph G is connected if for all u, v ∈V(G) we have

u→∗v orv →∗u, and strongly connected if for all u, v∈V(G) we have both u→∗v

and v→∗u.

Sometimes the word ‘connected’ is used to mean thatGis connected when considered as an undirected graph, so that for instance the graph ●Ð→●←Ð● would be called connected. We will have no need to single out graphs with this property, and so will exclusively use the word ‘connected’ as in Definition 2.2.19.

Definition 2.2.20. Let P and Q be paths such that the last vertex of P is the first vertex of Q, and write P = (u1, . . . , un) and Q= (un, v1, . . . , vm). We define the concatenation of P and Qto be the path

P Q= (u1, . . . , un, v1, . . . , vm).

We then note the following elementary facts relating the atomicity of P(G) to the (strong) connectedness ofG:

Lemma 2.2.21. Let G be a directed graph. Then:

(i)If P(G) is atomic under ≤then G is connected.

(ii) If G is strongly connected then P(G) is atomic.

Proof. (i) Suppose P(G) is atomic and let u, v ∈V(G). Let P = (u1, . . . , un) be a

join for the trivial paths (u) and (v), so that (u) ≤P and (v) ≤P. Let i, j be such that u=ui and v =uj. If i<j then u→∗v, and if i>j then v →∗u.

paths in G. Since G is strongly connected we can find a path R fromun to v1. Let

S=P RQ. Then P ≤S and Q≤S, so S is a join for P and Q.

The remainder of this subsection will focus on conditions under whichP(G)is atomic when Gis connected but not strongly connected.

Definition 2.2.22. Let G be a directed graph. We define an equivalence relation

∼ on V(G) by u ∼v if u→∗ v and v →∗ u. The equivalence classes of ∼ are called the strongly connected components of G. A component C is trivial if ∣C∣ = 1 and

non-trivial otherwise.

We will refer to the strongly connected components ofGsimply ascomponents since we will not need to distinguish from any other meaning of this word.

Example 2.2.23. LetG be the graph shown below.

p q

r

s

t

x y

The components ofGare{p, q, r},{s},{t}and {x, y}. The components{s}and{t}

are trivial, and the components{p, q, r} and {x, y}are non-trivial.

Definition 2.2.24. We define a relation → on the components of G by C1 →C2 if

C1 ≠C2 and if there are vertices p1∈C1 and p2∈C2 such thatp1→∗p2.

IfG is connected then any two distinct components of G are comparable under the relation→, so we can list the components ofG as

C1 → ⋅ ⋅ ⋅ →CN.

Definition 2.2.25. LetG be a directed graph and let C be a component of G. An

entrance of C is an edge (q, p) where q /∈C and p∈C, and an exit of C is an edge

If G is connected and its components are given by C1 → ⋅ ⋅ ⋅ → CN, then the com-

ponents with entrances are exactly C2, . . . , CN and the components with exits are

exactlyC1, . . . , Cn−1.

Our aim is to prove that if G is connected but not strongly connected and P(G)

is atomic then G must have a very specific form. This will involve a sequence of lemmas which, when taken together, will dictate the form thatGmust have ifP(G)

is to be atomic. We first prove the following:

Lemma 2.2.26. Let G be a directed graph which is connected but not strongly con- nected and suppose P(G) is atomic. If C is a non-trivial component of G then C does not have both an entrance and an exit.

Proof. Suppose thatC has both an entrance E= (q, p1)and an exit F = (p2, r). Let

P be a path from p1 to p2 and let Qbe a non-trivial path from p2 to itself. We note

that all the vertices in P and Q belong to the component C. Let S = EP F and

T =EP QF, noting that each of these paths contain precisely one occurrence of each of q and r. Furthermore note that S is strictly shorter than T since the path Q is non-trivial. Suppose, aiming for a contradiction, that R = (u1, . . . , un) is a join for

S and T, so that S ≤ R and T ≤ R. Let i, j, k, l be such that S = (ui, . . . , uj) and

T = (uk, . . . , ul). We note that that i<j and k <l, so at least one of the following

comparisons must be true: (i) i=k; (ii) j=l; (iii) j<k; (iv) l<i; (v) i<k<j; (vi) k<i<l.

If i=k or j =l then S is a proper subpath of T, but this cannot be the case since

T contains the vertices q and r only once each. If j <k then R has the contiguous subpath (uj, . . . , uk), but this cannot be the case since uj = r, uk = q and r /→∗ q.

Similarly if l<i then R has the contiguous subpath (ul, . . . , ui), but this cannot be

cannot be the case since uk =q and q /∈C. Finally if k <i<l then ui is a vertex of

Q, but this cannot be the case since ui =q and q /∈C. Hence there is no join for S

and T and so the set P(G)is not atomic.

From this we can immediately deduce the following result:

Lemma 2.2.27. Let G be a directed graph which is connected but not strongly con- nected and let C1 → ⋅ ⋅ ⋅ → CN be the components of G. If P(G) is atomic then the components C2, . . . , CN−1 are trivial.

Next we show that the components of G must be arranged linearly.

Lemma 2.2.28. Let G be a directed graph which is connected but not strongly con- nected, and suppose P(G) is atomic. If C is a component of G then C has at most one exit and at most one entrance.

Proof. We show only that the C has at most one exit, as that the proof that C has at most one entrance will be analogous. Suppose thatE = (p1, q)and F = (p2, r)are

exits ofC and that S= (u1, . . . , un) is a join forE and F, so that E ≤S and F ≤S.

Let i, j be such that E = (ui, ui+1) and F = (uj, uj+1). If i< j then q →∗ p2 and if

i>j then r→∗ p1. Neither of these are true, so i=j and hence E=F.

The remaining lemmas in this subsection will show that the non-trivial components of Gmust be cyclic. We first define this formally:

Definition 2.2.29. Let Gbe a directed graph and let C be a component of G. We say C iscyclic either if C is trivial, or if for each p∈C there is a unique vertexq∈C

such that(q, p) ∈E(G)and a unique vertex r∈C such that(p, r) ∈E(G).

If a non-trivial componentCis not cyclic then it either has a vertex with two outgoing edges in C or it has a vertex with two incoming edges in C. In fact we can use the pigeonhole principle to show that each of these implies the other, since the number of outgoing edges and incoming edges withinC must be equal. Hence we have:

Lemma 2.2.30. Let G be a directed graph and let C be a non-trivial component of G which is not cyclic. Then there are vertices p, q, r ∈C with q, r distinct such that

To show that the non-trivial components ofGmust be cyclic ifP(G)is to be atomic, we first characterise cyclic components in terms of cycles at a single vertex.

Definition 2.2.31. A cycle (p, p1. . . , pn, p) is calledp-simple if p/∈ {p1, . . . , pn}.

We then have:

Lemma 2.2.32. Let G be a directed graph, letC be a component ofG and letp∈C. Suppose C contains a unique p-simple cycle P. Then P contains every vertex of C. Proof. We prove the contrapositive. WriteP = (p, p1, . . . , pn, p)and suppose there is

some vertexq∈C which is not inP. LetS= (p, s1, . . . , sm, q)andT = (q, t1, . . . , tk, p)

be paths such that p /∈ {s1, . . . , sm, t1, . . . , tk}. Then ST is a p-simple cycle which

contains q and is therefore different from P.

The following lemma characterises cyclic components in terms ofp-simple cycles:

Lemma 2.2.33. Let G be a directed graph and let C be a component of G. Suppose there is some p ∈ C such that C contains a unique p-simple cycle P. Then C is cyclic.

Proof. WriteP = (p, p1, . . . , pn, p)and note thatC= {p, p1, . . . , pn}by Lemma 2.2.32.

For notational convenience we write p0 =pn+1 =p. If C is not cyclic then it is non-

trivial, and one of its vertices has two outgoing edges inC by Lemma 2.2.30. Hence there is some i ∈ {0, . . . , n} such that (pi, pk) ∈ E(G) for some k ≠i+1. Then the

cycle

(p, p1, . . . , pi, pk, . . . , pn, p)

is a p-simple cycle which is different fromP.

We now present our lemma on the cyclic nature of non-trivial components.

Lemma 2.2.34. Let G be a directed graph which is connected but not strongly con- nected, and supposeP(G) is atomic. If C is a non-trivial component of Gthen C is cyclic.

Proof. Suppose the components of G are C1 → ⋅ ⋅ ⋅ → CN. By Lemma 2.2.26 the

it cyclic, as the argument forCN will be analogous. By Lemma 2.2.28 the component

C1 has only one exitE = (p, r). We show that C1 contains a unique p-simple cycle,

and it will follow from Lemma 2.2.33 that it is cyclic. Suppose C contains two

p-simple cycles P = (p, s1, . . . , sn, p) and Q = (p, t1, . . . , tm, p), and let S = P E and

T =QE. Let R= (u1, . . . , uM) be a join for S and T, so that S≤R and T ≤R. Let

i, j, k, lbe such thatS = (ui, . . . , uj)and T = (uk, . . . , ul). Ifj <l thenR contains the

contiguous subpath (uj, . . . , ul−1), but this cannot be the case since uj =r, ul−1 =p

and r /→∗p. An analogous argument discredits the case that j>l, so we can assume thatj =l. If i<k then uk∈ {s1, . . . , sn}, but this cannot be the case sinceuk=pand

P is p-simple. Similarly if i> k then ui ∈ {t1, . . . , tm}, but this cannot be the case

since ui=p and Q isp-simple. Hence we have bothi=k and j =l, so S=T.

By combining Lemmas 2.2.26 to 2.2.34 we can make significant deductions about the form whichGmust have is P(G)is atomic. In particular if the components ofGare

C1 → ⋅ ⋅ ⋅ →CN then we must have the following:

(i) The component C1 is cyclic and has exactly one exit.

(ii) The components C2, . . . , CN−1 are trivial and have exactly one entrance and

one exit.

(iii) The component CN is cyclic and has exactly one entrance.

Hence the graph G must be a bicycle, which we define below.

Definition 2.2.35. A bicycle is a directed graph B consisting of two simple cycles

S= (sn, s1, . . . , sn) and E= (e1, . . . , em, e1), and a path P = (sn, p1, . . . , pl, e1)fromS

toE. We will describe B as an ordered triple B = (S, P, E). We illustrate a bicycle below.

sn s1 ⋮ sn−1 p1 ⋯ pl e1 e2 ⋮ em

instance, one can check that there are at most two vertices with out-degree 2 Our main theorem on atomicity in P(G) is as follows:

Theorem 2.2.36. Let G be a directed graph which is connected but not strongly connected. Then P(G) is atomic under the contiguous subpath ordering if and only if G is a bicycle.

Proof. (⇒)This implication is a combination of Lemmas 2.2.26 to 2.2.34.

(⇐) Suppose G is a bicycle and write G = (S, P, E) where S = (sn, s1, . . . , sn),

P = (sn, p1, . . . , pl, e1) and E = (e1, . . . , em, e1). Then every path in G a contiguous

subpath of a path of the formSiP Ei. Hence the sequence

SP E≤S2P E2 ≤S3P E3 ≤. . .

is an atomic sequence for P(G), and soP(G) is atomic.

Corollary 2.2.37. Let G be a directed graph. Then it is decidable whether P(G) is atomic under the contiguous subpath ordering.

In document Orderings on words and permutations (Page 62-68)