Encoding Orientation of Graphs by Vertex Labels Eric Sopena Laboratoire Bordelais de Recherche en Informatique Unite associee C.N.R.S. 1304 351, cours de la Liberation 33405 TALENCE - FRANCE E-mail:
[email protected] Resume. Soit E = (V ; A) un graphe oriente antisymetrique, les elements de V
etant appeles etiquettes. Nous disons que l'orientation d'un graphe (simple, sans boucle) peut ^etre encodee par E s'il existe une fonction : V ?! V telle que : 8 (x; y) 2 A; ((x); (y)) 2 A. Il a ete prouve que l'orientation de tout graphe planaire (resp. cactus, graphe de degre maximal 3) peut ^etre encodee a l'aide de 80 (resp. 12, 32) etiquettes. Nous considerons tout d'abord le cas des graphes k-reductibles et montrons en particulier que toute orientation d'un cactus ou d'un graphe serie-parallele peut ^etre encodee a l'aide de 7 etiquettes, ce resultat s'averant optimal. Nous considerons ensuite le cas des graphes de degre maximal 3 et montrons que leur orientation peut ^etre encodee en n'utilisant que 16 etiquettes. Finalement, nous montrons comment l'orientation naturelle (i.e. de gauche a droite) des graphes-chaines peut ^etre encodee a l'aide de 7 etiquettes de facon telle que toute transformation locale du graphe puisse ^etre realisee par une modi cation locale des etiquettes des sommets.
With the support of the PRC Mathematiques et Informatique, the European Basic Research Action ESPRIT No 3166 ASMICS and the ESPRIT-Basic Research Working Group \COMPUGRAPH II".
1
Abstract. Let E = (V ; A) be an antisymmetric directed graph, the elements of V
being called labels. We say that the orientation of a directed (simple, loopless) graph H = (V; A) can be encoded by E if there exists a mapping : V ?! V satisfying : 8 (x; y) 2 A; ((x); (y)) 2 A. It has been proved that the orientation of any directed planar (resp. outerplanar, with maximal degree 3) graph can be encoded by using at most 80 (resp. 12, 32) labels. We consider the orientation encoding problem for k-reducible graphs and show in particular that any orientation of an outerplanar or serie-parallel graph can be encoded by using 7 labels and that these results are optimal. Then we consider the case of directed graphs with maximal degree 3 and show that their orientation can be encoded by using at most 16 labels. Finally, we show how the natural (from left to right) orientation of string-graphs can be encoded by using 7 labels in such a way that any local transformation of the graph can be handled by a local relabeling of its vertices.
2
1 Introduction Let L be a nite set of labels. A L-labeled undirected (simple, loopless) graph is given as a triple G = (V; E; ) where V is the set of vertices, E the set of edges and : V ?! L the labeling function. If L has cardinality k and if is such that any two adjacent vertices have distinct labels, is said to be a k-coloring of G [10]. An encoder is a directed (simple, loopless) graph E = (V ; A) which is antisymmetric : 8 a; b 2 V ; (a; b) 2 A =) (b; a) 2= A. If an undirected labeled graph G = (V; E; ) is labeled over V , in such a way that 8 fx; yg 2 E; ((x); (y)) 2 A or ((y); (x)) 2 A then the labeling function induces an orientation on G given by : 8 fx; yg 2 E; x ?! y () ((x); (y)) 2 A. Let H = (V; A) be a directed (simple, loopless) graph. We say that the orientation of H can be encoded by E if there exists a mapping : V ?! V satisfying : 8 (x; y) 2 A; ((x); (y)) 2 A. Intuitively speaking, we can guess the orientation of H by only considering the (underlying) undirected V -labeled graph G = (V; E; ). Encoding the orientation of planar graphs was a problem considered by Courcelle [3] who introduced the notion of semi-strong encoding of directed graphs orientation, that is labelings satisfying : 8 x; y; z 2 V; (y; x) 2 A; (z; x) 2 A =) (y) 6= (z) (any two predecessors of a given vertex have distinct labels). Courcelle showed that for any planar directed graph whose vertices have incoming-degree at most 3, there exists a semi-strong encoding of its orientation using at most 43:363 labels. With Raspaud [11] we have shown that this upper bound can be decreased to 4:5:24 (320) and that the orientation of any planar (resp. outerplanar, with maximal degree 3) graph can be encoded by using at most 80 (resp. 12, 32) labels. In this paper, we consider the problem of orientation encoding for dierent families of graphs. In section 2 we recall the results obtained in [11]. In section 3 we introduce the notion of k-reducible graphs and obtain optimal results for outerplanar and serie-parallel graphs. We consider in section 4 the case of directed graphs with maximal degree 3 and prove that their orientation can be encoded by using at most 16 labels. Finally, in section 5 we consider the special case of string-graphs (generally used for representing strings as graphs) and prove that their natural (from left to right) orientation can be encoded by using 7 labels in such a way that any local modi cation (think of the application of a string production) can be handled by a local relabeling of the involved vertices. This result is useful within the theory of graph grammars (which deal with undirected graphs) since it allows to simulate usual string grammars [5] by graph grammars in a natural, that is local, way (see e.g. [12]).
3
2 Encoding the orientation of planar graphs Let G = (V; E; ) be an undirected labeled graph such that is a k-coloring of G. The k-coloring is said to be acyclic if for any two labels i and j , the subgraph induced by the vertices which have label i or j is a forest (that is has no cycle). In this section, we recall the results obtained with Raspaud, namely :
Theorem 2.1 [11] If H = (V; A) is a directed graph whose underlying undirected
graph has an acyclic k-coloring, then its orientation can be encoded by using at most k:2k?1 labels.
The general form of the encoder uses by Theorem 2.1 will be discussed in the last section. In [4] Grunbaum has proved that any outerplanar graph has an acyclic 3coloring and that any graph with maximal degree 3 has an acyclic 4-coloring. He also conjectured that any planar graph has an acyclic 5-coloring and this result was proved by Borodin in [1]. Hence, we obtain :
Corollary 2.2 [11] The orientation of any planar directed graph can be encoded by using at most 80 labels. The orientation of any outerplanar directed graph can be encoded by using at most 12 labels. The orientation of any directed graph with maximal degree 3 can be encoded by using at most 32 labels.
These two last results will be improved in the next sections. Theorem 2.1 also leads to the following result which improves the initial result of Courcelle [3] :
Corollary 2.3 [11] For any directed planar graph with incoming-degree at most 3, there exists a semi-strong encoding of its orientation which uses at most 320 labels.
Note that by a theorem of Nash-Williams [10], every planar graph can be covered by at most 3 forests. Hence, it is always possible to give an orientation to a planar graph in such a way that any vertex has an incoming-degree which is at most 3.
4
3 Encoding the orientation of k-reducible graphs The idea we use in this section is the following : let H = (V; A) be a directed graph, x be any vertex of V , y1; : : :; yk be the neighbours of x in H and Hx denote the graph obtained from H by deleting the vertex x and possibly adding some new arcs linking the yi's. Suppose that the orientation of Hx can be encoded by using a set L of labels in such a way that all the yi's have distinct labels. If for any such labeling of y1; : : :; yk and any orientation of the edges (x; yi); 1 i k; we can nd an adequate label for x in L then the orientation of H can also be encoded by using L as label set. Moreover, the orientation of any graph which can be thus \reduced" (we mean by successively deleting vertices with degree at most k) can be encoded by using L. We will show how such an encoder can be obtained for k = 2, leading to optimal results for outerplanar and serie-parallel graphs. More formally, we will say that an encoder E = (V ; A) satis es the property (Pk ) (k > 0) if : 8 x1; : : :; xk 2 V (pairwise distinct), 8 (b1; : : :; bk ) 2 f0; 1gk ; 9 x 2 V s.t. 8 i; 1 i k; if bi = 0 then (x; xi) 2 A else (xi; x) 2 A: Note that any encoder satisfying (Pk ) also satis es (Pk ) for any k0 < k. 0
Let H = (V; A) be a directed graph with n vertices. We say that the orientation of H is discriminating if any of its encodings must use n labels. Note that any orientation of a complete graph is discriminating. Hence, any graph can always be \completed" (by adding new arcs) in such a way that the orientation thus obtained is discriminating. For any directed graph H = (V; A) and any vertex x 2 V we will denote by N (x) the subgraph of H induced by the neighbours of x. We will denote by Hx the graph obtained from H by deleting x and by Hx+ any graph obtained by completing Hx in such a way that the orientation of N (x) is discriminating. We will then say
that the graph H is k-reducible if either it has no edge or if there exists a vertex x in V with degree at most k and such that there exists a graph Hx+ which is k-reducible. In other words, H can be completely erased by successively \deleting" vertices with degree at most k. For example, it is not dicult to see that a graph is 1-reducible if and only if it is a forest and that any planar graph is 5-reducible (every planar graph has a vertex with degree 5 and it is always possible to discriminately complete its neighbourhood in a \planar" way). An identical notion, for 2-reducibility only, has been considered in [15]. Moreover, we have the following result :
Theorem 3.1 Let E = (V ; A) be an encoder satisfying the property (Pk ), then the orientation of any k-reducible graph H can be encoded by E . 5
3
t A A A A A A A At t Q A Q A Q A Qt A A Q Q A A QQ A Q A Q A A Q Q t At t
5
2
1
4
6
1
t H @ ? H BB H @ H jH ? * B HH ? R @
@ Ht t ? - BM X Q XX B @ A X ? XX Q yX B 9 @ ? A ? Q X X XX K? 3 @ B X A Q 6A XXX AQQ B t @t ? X PP @ P A P QQ sQ B ? B Q @ A PPP ) ? i P P Q IA PPQ B ? @ QB? PP @ t A t
L1 = f2; 3; 5g L2 = f3; 4; 6g 7 L3 = f4; 5; 7g L4 = f5; 6; 1g L5 = f6; 7; 2g 6 L6 = f7; 1; 3g L7 = f1; 2; 4g
2 3
5
4
7
Figure 1: Numbering the Fano plane.
Proof. This result can be obtained by induction on the number of vertices of H : if H has only one vertex the result is obvious. Otherwise, there exists a vertex x of H with degree at most k, and a graph Hx+ whose orientation can be encoded by E in such a way that the orientation of N (x) is discriminating. Thanks to property (Pk ) for any orientation of the edges incident to x, any encoding of the orientation of Hx+ can be extended to H . 2 Up to now, the construction of minimal encoders satisfying the property (Pk ) remains an open question for k > 2. For k = 1, the minimal encoder is the directed graph C3, that is the directed circuit with 3 vertices. For k = 2, such a minimal encoder has at least 7 vertices since any vertex must have an incoming- (resp. outcoming) degree at least 3. The corresponding minimal encoder is the graph F7 associated with the Fano plane of order 7. The Fano plane (see gure 1) is given as 7 vertices and 7 lines of three vertices each (the \internal" line is drawn as a triangle) such that any two lines have a unique common vertex. If we number the vertices from 1 to 7, it is then possible to number the lines from 1 to 7 in such a way that : ( i 2= Li ) and ( j 2 Li ) i 2= Lj ) The associated directed graph F7 = (V7; A7) is then de ned by V7 = f1; 2; : : : ; 7g and 8 i; j 2 V7; (i; j ) 2 A7 i j 2 Li. Hence, each line Li corresponds to the set of successors of vertex i. The following lemma shows that the encoder F7 satis es the property (P2) :
Lemma 3.2 The encoder F7 = (V7; A7) associated with the Fano plane satis es the property (P2). 6
4
7
5
t t HH HH HH HH jH * * Y H H HH H tH H H t t H HH H H HH jH H * YH * H H H H H t t
1
6
3
2
Figure 2: Encoding the orientation of an outerplanar (SP-)graph with F7.
Proof. By using simple symmetry arguments, it sucies to check the property for any two given vertices, e.g. 1; 2 and we have : (i) (1; 3) 2 A7, (2; 3) 2 A7, (ii) (7; 1) 2 A7 , (7; 2) 2 A7, (iii) (1; 5) 2 A7, (5; 2) 2 A7 and (iv) (6; 1) 2 A7, (2; 6) 2 A7. 2 Any outerplanar undirected graph has a vertex with degree 2. Let x be such a vertex and let y; z denote its neighbours. The graph obtained by deleting x and linking (in any order) y and z if they were not already linked, remains outerplanar and any encoding of its orientation assigns dierent labels to y and z. Hence, we obtain :
Corollary 3.3 Let G be an outerplanar undirected graph, then any orientation of G can be encoded by using at most 7 labels. An undirected graph G is a serie-parallel graph (or SP-graph) if it has no subgraph homeomorphic to K4 [13] (this notion also corresponds to that of partial 2-tree). It is not dicult to see that such a (simple) graph always has a vertex of degree at most 2 whose neighbourhood can be discriminately completed, leading to a new graph which is also a SP-graph. Then, we obtain :
Corollary 3.4 Let G be a simple SP-graph, then any orientation of G can be encoded by using at most 7 labels. The two above results are optimal : gure 2 shows a (directed) outerplanar SP-graph with 7 vertices whose orientation is discriminating (all the vertices must have distinct labels).
7
4 Encoding the orientation of graphs with maximal degree three In this section we will consider the case of directed graphs having maximal degree 3. Let H be such a graph and x be a vertex of H with degree 3. Any discriminating orientation of a graph with 3 vertices must use at least 2 arcs. Hence, if we want to delete x from H and discriminately complete its neighbourhood we may obtain a graph with maximal degree 4. Thus, the previously introduced technique can no longer be used there. However, if we delete x from H , the degree of each of the neighbours of x becomes at most 2. Hence, it sucies to nd an encoder which oers as many choices for labeling vertices with degree 2 as necessary for ensuring that any three vertices with degree 2 may be labeled with distinct labels. We rst introduce the encoder we will use and then show how it encodes the orientation of any directed graph with maximal degree 3. Let T16 = (V16; A16) be the directed graph de ned by : (i ) V16 = f1; : : : ; 7g [ f1; : : :; 7g [ f0; 0g; (ii ) 8 i; j 2 f1; : : :; 7g; (i; j ) 2 A16 () (i; j) 2 A16 () (i; j ) 2 A7; (we have two isomorphic copies of the encoder F7) (iii ) 8 i 2 f1; : : :; 7g; (0; i); (i; 0); (0; i); (i; 0) 2 A16; (iv ) 8 i; j 2 f1; : : :; 7g; (i; j) 2 A16 () (i; j ) 2 A16 () (j; i) 2 A7; (the arcs between the two copies of F7 are \reversed"): This construction has been rst introduced by Tromp [14] (see section 5). The graph T16 is such that for any of its vertices x, the subgraph induced by the successors (resp. predecessors) of x is isomorphic to F7. Moreover, vertices x and x are never linked together and the successors (resp. predecessors) of x are exactly the predecessors (resp. successors) of x. Note that this graph satis es neither property (P2) nor (P3). The following technical lemmas show that the encoder T16 has the required properties.
Lemma 4.1 For any arc (i1; i2) 2 A16 and any pair (b1; b2) 2 f0; 1g2, there exist 3 distinct vertices x1; x2; x3 2 V16 such that 8 2 f1; 2; 3g; 8 2 f1; 2g; if b = 0 then (x; i ) 2 A16 else (i ; x) 2 A16: Moreover, 8 ; 0 2 f1; 2; 3g; x = 6 x , which implies that x1; x2 and x3 are linked
together.
0
8
Proof. Note that if x is a solution for (b1; b2), then x is a solution for (1?b1; 1?b2). Hence, by using simple symmetry arguments it sucies to check the property for one arc (e.g. (1; 2)) and for (b1; b2) = (0; 0) or (0; 1) and we have : for (b1; b2) = (0; 0), the solutions are 0; 7 and 3, and for (b1; b2) = (0; 1), the solutions are 4; 6 and 5. This concludes the proof. 2
Lemma 4.2 For any 3 vertices i31; i2; i3 2 V16 such that 8 ; 0 2 f1; 2; 3g; x 6= x and any triple (b1; b2 ; b3) 2 f0; 1g , there exists a vertex x such that 8 2 f1; 2; 3g; if b = 0 then (x; i) 2 A16 else (i; x) 2 A16:
0
Proof. Recall rst that any such 3 vertices are necessary pairwise linked by an arc, leading to either a circuit (e.g. i1 ! i2 ! i3 ! i1) or an ordered sequence (e.g. i1 ! i2 ! i3 and i1 ! i3). Using the same symmetry arguments as before, we only need to consider one circuit and one ordered sequence in the following cases :
i1; i2; i3 (b1; b2; b3) : (0,0,0) (0,0,1) (0,1,0) (1,0,0) (circuit) f1,2,3g 0 7 6 4 (ord. seq.) f1,2,4g 0 3 5 6
2
This concludes the proof. We are now able to prove the main result of this section :
Theorem 4.3 The orientation of any directed graph with maximal degree three can be encoded by T16. Proof. Let H = (V; A) be such a graph. If H has only one vertex the result is obvious. Otherwise, let x be a vertex with minimal degree d(x) 3. If d(x) = 1 then any encoding of the orientation of Hx can be extended to H . If d(x) = 2, let y; z denote the neighbours of x and Hx+ be the graph obtained from H by deleting x and linking (in any order) y and z if they were not already linked in H . By + lemma 4.1 any encoding of the orientation of Hx can be extended to H (note that three choices are there possible for labeling vertex x). Finally, if d(x) = 3, let y; z; t denote the neighbours of x ; y; z and t have maximal degree 2 and by lemma 4.1 the orientation of Hx can be encoded in such a way that the labels of y; z; t ful ll the requirements of lemma 4.2 which allows to extend that encoding to H . 2 This technique can be extended to any family of graphs having maximal degree k : if any vertex with degree k ? 1 can be labeled by k distinct labels then it is 9
possible to ensure that the neighbours of a vertex with degree k all have distinct labels. It can be shown that the graph L2k?1 introduced in the last section has the required property and we obtain :
Theorem 4.4 The orientation of any directed graph with maximal degree k can be encoded by using at most (2k ? 1):22k?2 labels. Note that this construction do not give optimal results : in the case of graphs with maximal degree 3, the corresponding encoder L5 uses 80 labels.
10
5 Encoding the orientation of string-graphs In this section, we turn to a combinatorial problem concerning the encoding of the natural orientation (from left to right) of string-graphs by using vertex labels in such a way that any \substring replacement" can be realised by a local relabeling of the string-graph. We show that such an encoding can be obtained by using a set of 7 vertex labels. Such a result is useful within the theory of graph-grammars which deal with undirected graphs in order to be able to simulate usual string grammars (see e.g. [12]). When we represent words (or strings) as undirected string-graphs, it is necessary to use additional information allowing us to locally retrieve their natural \from left to right" orientation. This can easily be done by using vertex labels taken in the set f0; 1; 2g according to the following rule : an edge fx; yg is directed from x to y i (y) = (x) + 1 (mod 3). Hence, any string on an alphabet X can be encoded by a string-graph whose vertices are labeled in X f0; 1; 2g. For example, the string aabac can be encoded as follows (the orientation component is written separately for clarity) : a a b a c t
0
t
1
t
2
t
0
t
1
If we want to simulate a string grammar by a graph grammar, we must be able to handle string productions such as ab ?! bcba, that is the transformation of aabac in abcbaac. In order to encode the orientation of abcbaac, we have to relabel all the left (or right) side of the rewritten part, thus having : a b c b a a c t
0 or 1
t
1 2
t
2 0
t
0 1
t
1 2
t
2 0
t
0 1
As we want to \locally" relabel the corresponding string-graphs, we will have to use a more elaborate encoding for string orientation. For any string u, we will denote by D(u) its associated directed vertex-labeled string-graph representation. The concatenation of strings can be naturally extended to string-graphs by setting D(u):D(v) = D(uv). If E = (V ; A) is an encoder for the orientation of D(u) and an encoding mapping, we will denote by UE (u; ) the encoded version of D(u) given by . Note that if u = u1; : : :; um and u0 = u01; : : : ; u0n are two non-empty strings, then the concatenation of UH (u; ) and UH (u0; 0) is only de ned when and 0 are \compatible", that is when ((um ); 0(u01)) 2 A. However, it is not dicult to see that u0 can always be (re)oriented by a mapping 00 compatible with . 11
a
b
t -
t -
c
t -
d
t -
e
t
0t -
(a) the string-graph D(abcde) a
b
c
d
e
0
1
2
0
1
t
t
t
t
6? t?
? ?
2
t
(b) the encoded string-graph UC3 (abcde; )
1t
(c) the encoder C3
Figure 3: Encoding the orientation of a string-graph with C3.
Example 5.1 As we have seen before, the directed cycle C3 (see gure 3(c)) is an
encoder of any string-graph. For example, the string-graph D(abcde) (see gure 3(a)) can be oriented as shown in gure 3(b), thanks to the mapping given by (a) = (d) = 0; (b) = (e) = 1; (c) = 2. In order to handle an arbitrary \growing" of a string-graph by a local relabeling of its vertices, we need an encoder E satisfying : (S 1) 8 (x; y) 2 A; 9 z 2 V ; s:t: (x; z) 2 A and (z; y) 2 A: Note that property (S 1) is equivalent to the following one :
8 (x; y) 2 A; 8 k > 0; 9 z1; : : :; zk 2 V (not necessarily distinct), s:t: (x; z1) 2 A; (z1; z2) 2 A; : : : ; (zk ; y) 2 A: It is not dicult to see that such an encoder must have at least 7 vertices (any vertex must have 3 predecessors and 3 successors) and that the minimal encoder satisfying (S 1) is the graph F7 introduced in section 3. The following proposition shows that an encoder satisfying property (S1) allows us to handle any increasing string production [5] by means of a local relabeling.
Proposition 5.2 Let ?! , j j jj, be an increasing string production, E = (V ; A) be an encoder satisfying (S 1), u = u1u2 and be an orientation mapping of D(u). Then, there exists an orientation mapping 0 of D(u1 u2) such that 8 x 2 0 u1u2; (x) = (x).
12
Proof. If u1 = " or u2 = " the result is obvious. Suppose now that u2 = x2u02 and let (x2) = z, = 12 : : : m, (m ) = y, = 1 2 : : : n (n m). De ne 0 as follows : for any i; 1 i m, let 0( i) = (i) ; since (y; z) 2 A, property (S 1) 2
says that we can nd adequate labels for m+1; : : :; n.
Example 5.3 Let U (aabac; ) be the following graph : a
t
a
t
b
t
1 2 3 then U (abcbaac; 0) may be de ned as follows : a b c b t
1
t
2
t
3
t
5
a
c
4
5
a
a
c
7
4
5
t
t
t
t
t
Let us now consider the case of decreasing string productions, that is productions ?! with j j < jj. Such productions cannot be handled by a relabeling of the only rewritten part (the substring ) : suppose that the string u1x1x2u2 is encoded by an orientation mapping such that (x1) = (x2) ; then it is not possible to handle a production such as ?! x (x 2 A) by only giving a new label to x, since any encoder is antisymmetric. In such cases, we have to extend the relabeled part of the rewritten string. This can be done when the encoder satis es the following property : (S 2) 8 x; y 2 V ; x 6= y; 9 z 2 V ; s:t: (x; z) 2 A and (z; y) 2 A: Note that property (S 2) implies property (S 1) and is equivalent to the following one : 8 x; y 2 V ; x 6= y; 8 k > 0; 9 z1; : : :; zk 2 V (not necessarily distinct), s:t: (x; z1) 2 A; (z1; z2) 2 A; : : : ; (zk ; y) 2 A: Moreover, we have :
Proposition 5.4 Let ?! , j j < jj, be a decreasing string production, E = (A; V ) be an encoder satisfying (S 2), u = u1u2 and be an orientation mapping of D(u). Then, there exists an orientation mapping 0 of D(u1 u2) such that if u1 = u01x1 and u2 = x2u02 then 8 x 2 u01u02; 0(x) = (x). Proof. If ju1j 00 1 or ju2j 1 the result is obvious. Suppose now that u1 = u001 y1x1 and u2 = x2y2u2 ; if (y1) = 6 (y2) property (S 2) allows us to nd new labels for x1 1 : : : nx2. If (y1) = (y2 ) then we have necessarily (x1) = 6 (y2) and we are 13
now able to nd new labels for 1 : : : nx2. Note that in both cases the result also follows for = ". 2 We can easily check that the encoder F7 also satis es the property (S 2). Hence, any string production can be handled in a local way by using a set of 7 orientation labels. It is not dicult to see that the same result holds for any (not necessarily always from left to right) orientation of the edges of a string-graph as well as of a tree. Let G = (V; A) be a directed graph and (x; y) be an arc in A. Let us consider the graph operation O which consists in deleting the arc (x; y) and adding a new vertex z together with two arcs linking x; z and y; z in any direction (this operation is usually called subdivision). Then we have :
Proposition 5.5 Let E = (A; V ) be an encoder satisfying (S 1), and G be a directed graph such that the orientation of G can be encoded by E . Then, the orientation of any graph G0 obtained from G by a sequence of O-operations can be encoded by E . In particular, if the orientation of G is encoded by F7 via a labeling function then can be extended in order to encode the orientation of G0 in such a way that the labels already assigned (to vertices of G) do not have to be modi ed.
14
6 Remarks In this paper we have considered the problem of labeling (or colouring) directed graphs in such a way that the labels assigned to the vertices are \compatible" with the graph orientation. This problem is a staightforward generalization of the well-known colouring problem for undirected graphs [10]. We have given upper and lower bounds for the number of labels needed to encode the orientation of some families of directed graphs. All the techniques we have used provide \online" algorithms (see [8]) for obtaining such labelings : we are able to assign a label to a vertex without modifying the labels already assigned to the other vertices (except the labels assigned to the neighbours of the considered vertex in the case of directed graphs with maximal degree 3). All these results may be used within the theory of graph-grammars for simulating directed graphs by means of vertex-labeled undirected graphs [12]. All the graphs we have used as encoders in this paper play a central role within the theory of bounded time-stamping. Introduced by Israeli and Li [6], bounded time-stamp systems have proven to be useful for solving many problems in the coordination of concurrent processes [2, 6]. A directed antisymmetric graph G = (V; A) is a time-stamp system of order k if any ordered sequence of less than k vertices in G has a successor (a sequence of n vertices x1; : : : ; xn is said to be an ordered sequence if 8 i; j; 1 i < j n; (xi; xj ) 2 A). The encoder C3 is the minimal time-stamp system of order 2, the encoder F7 the minimal time-stamp system of order 3 and the encoder T16 the minimal timestamp system of order 4. The encoder used in section 2 for planar graphs is a graph introduced by Lamport [7] for solving a mutual exclusion problem and which has proven to be a time-stamp system of order 5 [2]. The construction of Lamport provides time-stamp systems of any order k using k:2k?1 vertices and for k 9 no time-stamp system with a smaller number of vertices is known. These graphs are de ned in the following way : Consider the subset Vk of f1; : : : ; kg f0; 1gk consisting of elements (; x1; : : : ; xk) such that x = 0, as a set of vertices of a graph Lk = (Vk ; Ak ) and let Ak be such that ((; x1; : : :; xk ); ( ; y1; : : : ; yk )) 2 Ak
i ( > and x 6= y) or ( < and x = y): Then, the graph Lk thus de ned is a time-stamp system of order k having exactly k:2k?1 vertices. Note that the property (Pk ) introduced in section 3 is such that any directed graph satisfying (Pk ) is a time-stamp system of order k +1 (but the converse does not hold). More generally, all the properties we need for encoders are stronger than the time-stamp systems requirements but many solutions (namely the optimal solutions) for time-stamp systems also give solutions for the encoding of graph orientations. 15
References [1] O.V. Borodin, On acyclic coloring of planar graphs, Discrete Math. 25 (1979), 211-236. [2] R. Cori, E. Sopena, Some combinatorial aspects of time-stamp systems, Internal report 92-1, University Bordeaux I, to appear in J. European Combinatorics (1993). [3] B. Courcelle, The monadic second-order logic of graphs VI : on several representations of graphs by relationnal structures, to appear in Discrete Applied Math. (1993). [4] B. Grunbaum, Acyclic coloring of planar graphs, Israel J. Math. 14 (1973), 390-412. [5] M. Harrison, Introduction to formal language theory, Addison-Wesley (1978). [6] A. Israeli, M. Li, Bounded time-stamps, Proc. 28th IEEE Symposium on Foundations of Comp. Sci. (1987), 371-382. [7] L. Lamport, The mutual exclusion problem (II) : statement and solutions, J. ACM 33-2 (1986), 327-348. [8] L. Lovasz, M. Saks, W. T. Trotter, An on-line graph colouring algorithm with sublinear performance ratio, Annals of Discrete Math. 43 (1989), 319-325. [9] C. St. J. A. Nash-Williams, Decomposition of nite graphs into forests, J. London Math. Soc. 39 (1964). [10] R. Nelson, R.J. Wilson (Eds), Graph colourings, Pitman Research Notes in Math. Series 218 (1989). [11] A. Raspaud, E. Sopena, Good and semi-strong colorings of oriented planar graphs, (1993), submitted. [12] E. Sopena, A generative approach of graph relabeling systems, Internal Report 93-7, University Bordeaux I (1993), submitted. [13] M. M. Syslo, On some generalizations of outerplanar graphs : results and open problems, Proceedings WG'86, Lecture Notes in Comp. Sci. 246 (1987), 146164. [14] J. Tromp, personnal communication. [15] M. Wiegers, Recognizing outerplanar graphs in linear time, Proceedings WG'86, Lecture Notes in Comp. Sci. 246 (1987), 165-176.
16