Nothing Special   »   [go: up one dir, main page]

Academia.eduAcademia.edu

Identifying Codes in Line Graphs

2013, Journal of Graph Theory

Identifying codes in line graphs✩ Florent Foucauda , Sylvain Gravierb, Reza Naserasra,b, Aline Parreaub, Petru Valicova a LaBRI - Université de Bordeaux - CNRS, 351 cours de la Libération, 33405 Talence cedex, France. Fourier 100, rue des Maths, BP 74, 38402 St Martin d’Hères cedex, France. b Institut arXiv:1107.0207v1 [math.CO] 1 Jul 2011 Abstract An identifying code of a graph is a subset of its vertices such that every vertex of the graph is uniquely identified by the set of its neighbours within the code. We study the edge-identifying code problem, i.e. the identifying code problem in line graphs. If γ ID (G) denotes the size of a minimum identifying code of an ID identifiable graph G, we √ show that the usual bound γ (G) ≥ ⌈log2 (n + 1)⌉, where n denotes the order of G, can be improved to Θ( n) in the class of line graphs. Moreover, this bound is tight. We also prove that the upper bound γ ID (L(G)) ≤ 2|V (G)| − 5, where L(G) is the line graph of G, holds (with two exceptions). This implies that a conjecture of R. Klasing, A. Kosowski, A. Raspaud and the first author holds for a subclass of line graphs. Finally, we show that the edge-identifying code problem is NP-complete, even for the class of planar bipartite graphs of maximum degree 3 and arbitrarily large girth. Keywords: Identifying codes, Dominating sets, Line graphs, NP-completeness. 1. Introduction An identifying code of a graph G is a subset C of vertices of G such that for each vertex x, the set of vertices in C at distance at most 1 from x, is nonempty and uniquely identifies x. In other words, C is both a dominating and a separating set of G, i.e. for each vertex v ∈ V (G), N [v] ∩ C 6= ∅ and for each pair u, v ∈ V (G), N [u] ∩ C 6= N [v] ∩ C. Here N [v] is the closed neighbourhood of v in G. This concept was introduced in 1998 in [15] and is a well-studied one (see e.g. [1, 5, 6, 9, 10, 13, 15, 18]). A vertex x is a twin of another vertex y if N [x] = N [y]. A graph G is called twin-free if no vertex has a twin. The first observation regarding the concept of identifying codes is that a graph is identifiable if and only if it is twin-free. As usual for many other graph theory concepts, a natural problem in the study of identifying codes is to find one of a minimum size. Given a graph G, the smallest size of an identifying code of G is called identifying code number of G and denoted by γ ID (G). The main lines of research here are to find the exact value of γ ID (G) for interesting graph classes, to approximate it and to give lower or upper bounds in terms of simpler graph parameters. Examples of classic results are as follows: Theorem 1. [13] If G is a twin-free graph with at least two edges then γ ID (G) ≤ |V (G)| − 1. The collection of all twin-free graphs reaching this bound is classified in [9]. A better upper bound in terms of both number of vertices and maximum degree of a graph is also proposed: Conjecture 2. [10] There exists a constant c such that for every twin-free graph G, γ ID (G) ≤ |V (G)| − |V (G)| ∆(G) + c. Some support for this conjecture is provided in [9, 10, 11]. The parameter γ ID (G) is also bounded below by a function of |V (G)| where equality holds for infinitely many graphs. ✩ This research is supported by the ANR Project IDEA • ANR-08-EMER-007, 2009-2011. Preprint submitted to July 4, 2011 Theorem 3. [15] For any twin-free graph G, γ ID (G) ≥ ⌈log2 (|V (G)| + 1)⌉. The collection of all graphs attaining this lower bound is also classified in [18]. From a computational point of view, it is shown that given a graph G, finding the exact value of γ ID (G) is in the class of NP-hard problems. It in fact remains NP-hard for many subclasses of graphs [1, 5]. Furthermore, approximating γ ID (G) is not easy either as shown in [16, 12, 19]. The problem of finding identifying codes in graphs can be viewed as a special case of the more general combinatorial problem of finding transversals in hypergraphs (a transversal is a set of vertices intersecting each hyperedge). More precisely, to each graph G one can associate the hypergraph H(G) whose vertices are vertices of G and whose hyperedges are all the sets of the form N [v] and N [u] ⊖ N [v] (symmetric difference of N [u] and N [v]). Finding an identifying code for G is then equivalent to finding a transversal for H(G). Though the identifying code problem is captured by this more general problem, the structural properties of the graph from which the hypergraph is built allow one to obtain stronger results which are not true for general hypergraphs. In this work, we show that even stronger results can be obtained if we consider hypergraphs coming from line graphs. These stronger results follow from the new perspective of identifying edges by edges. Given a graph G and an edge e of G, we define N [e] to be the set of edges adjacent to e together with e itself. An edge-identifying code of a graph G is a subset CE of edges such that for each edge e the set N [e] ∩ CE is nonempty and uniquely determines e. When considering edge-identifying codes we will assume the edge set of the graph is not empty. It is easily observed that the notion of edge-identifying code of G is equivalent to the notion of identifying code of the line graph of G, L(G). Thus a graph G admits an edge-identifying code if and only if L(G) is twin-free. A pair of twins in L(G) would correspond in G to a pair of: 1. parallel edges; 2. adjacent edges whose non common ends are of degree 1; 3. adjacent edges whose non common ends are of degree 2 but they are connected to each other. Since we will consider simple graphs, we will not have parallel edges. Two edges of the type described in the other two cases are called pendant and thus a graph is edge-identifiable if and only if it is pendant-free. The smallest size of an edge-identifying code of an edge-identifiable graph G is denoted by γ EID (G) and is called edge-identifying code number of G. To warm up we notice that five edges of a perfect matching of the Petersen graph P , form an edgeidentifying code of this graph (see Figure 1). The lower bound of Theorem 3 proves that γ EID (P ) ≥ 4. Later, by improving this bound for line graphs, we will see that in fact γ EID (P ) = 5 (see Proposition 10 and Theorem 14). Figure 1: An edge-identifying code of the Petersen graph. The outline of the paper is as follows: in Section 2, we give the edge-identifying code number of some basic families of graphs. In Section 3, we improve the general lower bound for the class of line graphs, then in Section 4 we improve the upper bound. Finally, in Section 5 we show that determining γ EID (G) is also in the class of NP-hard problems even when restricted to planar subcubic bipartite graphs of arbitrarily large girth. 2 2. Preliminaries In this section we first give some easy tools which help for finding the minimum edge-identifying code of graphs. We then apply these tools to determine the exact values of γ EID for some basic families of graphs. We recall that Cn is the cycle on n vertices, Pn is the path on n vertices, Kn is the complete graph on n vertices and Kn,m is the complete bipartite graph with parts of size n and m. Lemma 4. Let G be a simple graph with girth at least 5. Let CE be a subset of edges of G that covers vertices of G (that is, an edge cover of G), such that the graph (V (G), CE ) is pendant-free. Then CE is an edge-identifying code of G. In particular, if G has a perfect matching M , M is an edge-identifying code of G. Proof. Since CE covers all the vertices of G, it is an edge-dominating set. Thus we only need to prove that CE is also an edge-separating set. Let e1 , e2 be two edges of G. If e1 , e2 ∈ CE , then CE ∩N [e1 ] 6= CE ∩N [e2 ] because (V (G), CE ) is pendant-free. Otherwise, we can assume that e2 ∈ / CE . If e1 ∈ CE and CE ∩ N [e1 ] = CE ∩ N [e2 ], then e2 must be adjacent to e1 . Let u be their common vertex and e2 = uv. Since CE is an edge cover, there is an edge e3 ∈ CE which is incident to v. However, e3 cannot be adjacent to e1 because G is triangle-free. Therefore e3 separates e1 and e2 . Finally, we assume neither of e1 and e2 is in CE . Then there are two edges of CE , say e3 and e4 , adjacent to the two ends of e1 . But since G has neither C3 nor C4 as a subgraph, e3 and e4 cannot be both adjacent to e2 and, therefore, e1 and e2 are separated. We note that in the previous proof the absence of C4 is only used at the last part where e1 , e2 , e3 , e4 could induce a C4 which is not adjacent to any other edge of CE . Thus, we have the following stronger statement: Lemma 5. Let G be a graph with girth at least 4. Let CE be a subset of edges of G that covers vertices of G, such that CE is pendant-free. If no pair of isolated edges in CE induces a C4 , then CE is an edge-identifying code of G. We will also need the following lemma about pendant-free trees. Lemma 6. If T is a pendant-free tree on more than two vertices, then T has two vertices of degree 1 each adjacent to a vertex of degree 2. Proof. Take a longest path in T , then it is easy to verify that both ends of this path satisfy the condition of the lemma. We are now ready to determine γ EID of some families of graphs. ( 5, if n = 4 or 5 Proposition 7. We have γ EID (Kn ) = . Furthermore, let CE be an edge-identifying n − 1, if n ≥ 6 code of Kn of size n − 1 (n ≥ 6) and let G1 , G2 , . . . , Gk be the connected components of (V (Kn ), CE ). Then exactly one component, say Gi , is isomorphic to K1 and every other component Gj (j 6= i) is isomorphic to a cycle of length at least 5. Proof. We note that L(K4 ) is isomorphic to K6 \ M , where M is a perfect matching of K6 . This graph is known to have identifying code number 5. It is also an easy case analysis that K5 does not admit an edgeidentifying code of size 4 and that edges of a C5 form an edge-identifying code of size 5 of K5 . Furthermore, it is not difficult to check that the set of edges of a cycle of length n − 1 (n ≥ 6) identifies all edges of Kn . Thus we have γ EID (Kn ) ≤ n − 1. The fact that γ EID (Kn ) ≥ n − 1 would follow from the second part of the theorem which is proved as follows. Let CE be an edge-identifying code of Kn of size n − 1 or less (n ≥ 6). Let G′ = (V (Kn ), CE ). Let G1 , G2 , . . . , Gk be the connected components of G′ . Since G′ has n vertices but only n − 1 edges, at least one component of G′ is a tree. On the other hand we claim that at most one of these components can be a tree and that such tree would be isomorphic to K1 . Let Gi be a tree. First we show that |V (Gi )| ≤ 2. If not, by 3 Lemma 6 there is a vertex x of degree 1 in Gi with a neighbour u of degree 2. Let v be the other neighbour of u. Then the edges xv and uv are not identified. If V (Gi ) = {x, y} then for any other vertex u, the edges ux and uy are not separated. Finally, if there are Gi and Gj with V (Gi ) = {x} and V (Gj ) = {y}, then the edge xy is not dominated by CE . Thus exactly one component of G′ , say G1 , is a tree and G1 ∼ = K1 . This implies that γ EID (Kn ) ≥ n − 1. Therefore, γ EID (Kn ) = n − 1 and furthermore each Gi , (i ≥ 2), is a graph with a unique cycle. It remains to prove that each Gi , i ≥ 2 is isomorphic to a cycle of length at least 5. By contradiction suppose one of these graphs, say G2 , is not isomorphic to a cycle. Since G2 has a unique cycle, it must contain a vertex v of degree 1. Let t be the neighbour of v in G2 and let u be the vertex of G1 . Then the edges tv and tu are not separated by CE . Finally we note that such cycle cannot be of length 3 or 4, because C3 is not pendant-free and in C4 , the two non-edges (which are edges of Kn ) would not be separated.   for n ≥ 3 Proposition 8. γ EID (Kn,n ) = 3n−1 2 n 2 be a partition of vertices such Proof. Let X and Y be the two parts of Kn,n . If n is even, then let {Ai }i=1 that each Ai has exactly two vertices in X and two in Y . Let Gi be a subgraph of Kn,n isomorphic to P4 and with Ai as its vertices. If n is odd, let A1 be of size 2 and having exactly one element from X and one element from Y and let also G1 be the subgraph (isomorphic to K2 ) induced by A1 . Then we define Ai ’s and Gi ’s (i ≥ 2) as in the previous case (for Kn−1,n−1 ). By Lemma 5, the set of edges in the Gi ’s induces an edge-identifying code of Kn,n of size 3n−1 . To complete the proof we show that there cannot be any 2 smaller edge-identifying code. Let CE be an edge-identifying code of G. Let G1 , G2 , . . . , Gk be the connected components of (X ∪Y, CE ). The proof will be completed if we show that except possibly one, every Gi must have at least four vertices. To prove this claim we first note that there is no connected pendant-free graph on three vertices. We now suppose G1 and G2 are both of order 2. Then the two edges connecting G1 and G2 are not separated. If G1 is of order 1 and G2 is of order 2, then the edge connecting G1 to G2 is not identified from the edge of G2 . If G1 and G2 are both of order 1, then both of their vertices must be in the same part of the graph as otherwise the edge connecting them is not dominated by CE . But now for any vertex x which is not in the same part as G1 and G2 , the edges connecting x to G1 and G2 are not separated. The following examples show that if true, the upper bound of Conjecture 2 is tight even in the class of line graphs. These examples were first introduced in [10] but without using the notion of edge-identifying codes. Proposition 9. Let G be a k-regular multigraph (k ≥ 3). Let G1 be obtained from G by subdividing each |V (L(G1 ))| 1 )| edge exactly once. Then γ EID (G1 ) = (k − 1)|V (G)| = |E(G1 )| − |E(G 2k−2 = |V (L(G1 ))| − ∆(L(G1 )) . Proof. Let x be a vertex of G1 of degree at least 3 (an original vertex from G). For each edge exi incident to x k x let e′i be the edge adjacent to exi but not incident to x and let Ax = {e′x i }i=1 . Then {Ax | x ∈ V (G)} is a ′x partition of E(G1 ). For any edge-identifying code CE of G1 , if two elements of Ax , say e′x 1 and e2 , are both x x not in CE , then e1 and e2 are not separated. Thus |CE ∩Ax | ≥ k − 1. This proves that |CE | ≥ (k − 1)|V (G)|. But then it is easy to build an edge-identifying code of this size. Hypercubes, being the natural ground of code-like structures, have been a center of focus for determining the smallest size of their identifying codes. The problem has proved to be a challenging one from both theoretical and computational points of view. Today the precise identifying code number is known for only seven hypercubes [4]. In contrast, we show here that finding the edge-identifying code number of a hypercube is not so difficult. We first introduce the following general proposition. Proposition 10. Let G be a connected pendant-free graph. We have: γ EID (G) ≥ 4 |V (G)| 2 Proof. Let CE be an edge-identifying code of G. Let G′ be the subgraph induced by CP E and let G1 , . . . , Gs s be the connected components of G′ . Let ni be the order of Gi and ki be its size (thus i=1 ki = |CE |). Let ′ ′ X = V (G) \ V (G ) and ni be the number of vertices in X that are joined to a vertex of Gi in G. We show that n′i + ni ≤ 2ki . If ki = 1, then clearly n′i = 0 and n′i + ni = 2 = 2ki . If Gi is a tree, then ni = ki + 1 and, by Lemma 6, Gi must have two vertices of degree 2 each having a vertex of degree 1 as a neighbour. Then no vertex of X can be adjacent to one of these two vertices in G. Moreover, each other vertex of Gi can be adjacent to at most one vertex in X. So n′i ≤ ki − 1, and finally ni + n′i ≤ 2ki . If Gi is not at tree, we have ni ≤ ki and n′i ≤ ni and, therefore, n′i + ni ≤ 2ki . Finally, since G is connected, each vertex in X is connected to at least one Gi . Hence by counting the number vertices of G we have: |V (G)| ≤ s X i=1 (ni + n′i ) ≤ 2 s X i=1 ki ≤ 2|CE | Proposition 10 together with Lemma 4 leads to the following result: Corollary 11. Let G be an edge-identifiable graph with girth at least 5. If G has a perfect matching M , then M is an optimal edge-identifying code and γ EID (G) = |V (G)| . 2 This shows for example that the edge-identifying code of the Petersen graph given in Figure 1 is optimal. This result can be extended to graphs with girth 4 which have a perfect matching with no pair of edges of the matching that induces a C4 . This is the case for the hypercube of dimension d ≥ 4. The hypercube of dimension d, denoted Hd , is a graph whose vertices are elements of Zd2 with two vertices being adjacent if their difference is in the standard basis: {(1, 0, 0, . . . , 0), (0, 1, 0, . . . , 0), . . . , (0, 0, . . . , 0, 1)}. The hypercube of dimension d can also be viewed as the cartesian product of the hypercube of dimension d − 1 and K2 . In this way of building Hd we add a new coordinate to the left of the vectors representing the vertices of Hd−1 . Proposition 12. For d ≥ 4, we have γ EID (Hd ) = 2d−1 . Proof. By Proposition 10, we have γ EID (Hd ) ≥ 2d−1 . We will construct by induction a perfect matching Md of Hd such that no pair of edges induces a C4 , for d ≥ 4. By Lemma 5, Md will be an edge-identifying code of Hd , proving the result. Two such matchings of H4 , which are also disjoint, are presented in Figure 2. The matching M5 can now be built using each of these two matchings of H4 - one matching per copy of H4 in H5 . It is easily verified that M5 has the required property. Furthermore, M5 has the extra property that for each edge uv of M5 , |u − v| 6= (1, 0, 0, 0, 0). We now build the matching Md of Hd (d ≥ 6) from Md−1 in such a way that no two edges of Md belong to a 4-cycle in Hd and that for each edge uv of Md , |u − v| 6= (1, 0, 0, . . . , 0). To do this let H1′ and H2′ be the two copies of Hd−1 in Hd . We then choose an exact copy of Md−1 in H1′ and an image of Md−1 in H2′ obtained from the following automorphism of Hd−1 : σ(x) = x + (1, 0, 0, . . . , 0). It is now easy to check that the new matching has both properties we need. We note that the formula of Proposition 12 does not hold for d = 2 and d = 3. For d = 2 the hypercube H2 is isomorphic to C4 and thus γ EID (H2 ) = 3. For d = 3, we note that an identifying code of size 4, if it exists, must be a matching with no pair of edges belonging to a 4-cycle. But this is not possible. An identifying code of size 5 is shown in Figure 3, therefore γ EID (H3 ) = 5. 3. Lower Bounds Recall from Theorem 3 that γ ID (G) is bounded below by a function of the order of G. As mentioned before, this bound is tight. Let C be a set of c isolated vertices. We can build a graph G of order 2c − 1 such that C is an identifying code of G. To this end, for every subset X of C with |X| ≥ 2, we associate a new vertex which is joined to all vertices in X and only to those vertices. Then, it is easily seen that C is an identifying code of this graph. However, the graph built in this way is far from being a line graph as it contains K1,t for even large values of t. In fact this lower bound turns out to be far from being tight 5 Figure 2: Two disjoint edge-identifying codes of H4 . Figure 3: An optimal edge-identifying code of H3 . for the family of line graphs. In this section we give a tight lower bound on the size of an edge-identifying code of a graph in terms of the number of its edges. Equivalently we have a lower bound√for the size of an identifying code in a line graph in terms of its order. This lower bound is of the order Θ( n) and thus is a much improved lower bound with respect to the general bound of Theorem 3. Let G be an edge-identifiable graph and let CE be an edge-identifying code of G. To avoid trivialities such as having isolated vertices we may assume G is connected. We note that this does not mean that the subgraph induced by CE is also connected, in fact we observe almost the contrary, i.e. in most cases, an edge-identifying code of a minimum size will induce a disconnected subgraph of G. We first prove a lower bound for the case when an edge-identifying code induces a connected subgraph. Theorem 13. If an edge-identifying code CE of a nontrivial  graph G induces a connected subgraph of G which is not isomorphic to K2 , then G has at most |CE2|+2 − 4 edges. Furthermore, inequality can only hold if CE induces a path. Proof. Let G′ be the subgraph induced by CE . Since we assumed G′ is connected, and since G′ is pendantfree, it cannot have three vertices. Since we assumed G′ ≇ K2 , we conclude that G′ has at least four vertices. For each vertex x of G′ , let Cx be the set of all edges incident to x in G′ . Let e = uv be an edge of G, then one or both of u and v must be in V (G′ ) and, therefore, e is uniquely determined by either Cu , or Cv , or  ′ Cu ∪ Cv . The total number of sets of this form is |V (G2 )|+1 , thus if |V (G′ )| ≤ |CE | we are done. Otherwise, since G′ is connected |V (G′ )| = |CE | + 1 and G′ is a pendant-free tree on at least 4 vertices. If v is a vertex of degree 1 adjacent to u, then we have Cv = {uv} but uv ∈ Cu and, therefore, Cu = Cu ∪ Cv . On the other hand, by Lemma 6, there are two vertices of degree 2 that have neighbours of degree 1. Let u be such a vertex, let v be its neighbour of degree 1 and x be its other neighbour. Then Cv = {uv} and Cu = {uv, ux} and, therefore, Cu ∪ Cx = Cv ∪ Cx . Thus the total number of distinct sets of the form Cy or Cy ∪ Cz is at  most |CE2|+2 − 4. But if equality holds there can only be two vertices of degree 1 in G′ and hence CE is a path. We note that if this bound is tight, then G′ is a path. Furthermore, for each path Pk+1 one can build 6  many graphs which have Pk+1 as an edge-identifying code and have k+2 − 4 edges. The set of all these 2 graphs will be denoted by Jk . An example of such a graph is obtained from Kk+2 by removing a certain set of four edges as shown in Figure 4. Note that every other member of Jk is obtained from the previous example by splitting the vertex that does not belong to Pk+1 (but without adding any new edge). a (k + 1)-clique with two edges removed ··· Figure 4: An extremal graph of Jk with its connected edge-identifying code Next we consider the case when the subgraph induced by CE is not necessarily connected. Theorem 14. Let G be an edge-identifiable graph and let CE be an edge-identifying code of G with |CE | = k. Then we have:  4 k  if k ≡ 0 mod 3  432 ,  3 (k−1)+1 + 1, E(G) ≤ if k ≡ 1 mod 3 2   43 (k−2)+2 + 2, if k ≡ 2 mod 3 2 Proof. Let G be a graph with maximum number of edges among all graphs with γ EID (G) = k. It can be easily checked that for k = 1, 2 or 3, the maximum number of edges of G is 1, 3 or 6 respectively. For k ≥ 4, we prove a slightly stronger statement: given a k-edge-identifying code CE of G, all but at most two of the connected components of the subgraph induced by CE must be isomorphic to P4 . When there is only one component not isomorphic to P4 , it must be isomorphic to a P2 , a P5 or a P6 . If there are two such components, then they can be two copies of P2 , a P2 with a P5 , or just two copies of P5 . This would depend on the value of k mod 3. To prove our claim let G be a graph as defined above, let CE be an edge-identifying code of size k of G and let G′ be the subgraph induced by CE . For each vertex u ∈ V (G) \ V (G′ ), we can assume that u has degree 1: if u has degree d > 1, with neighbours v1 , . . . , vd necessarily in V (G′ ), then replace u by d vertices of degree 1: u1 , . . . , ud , connecting ui to vi . Then the number of edges does not change, and the code CE remains an edge-identifying code of size k, thus it would suffice to prove our claim for this new graph. Let G′1 , G′2 , . . . , G′r be the connected components of G′ with |V (G′i )| = n′i . For each i ∈ {1, . . . , r}, let Gi be the graph induced by the vertices of G′i and the vertices connected to G′i only. To each vertex x of G′ we assign the set Cx of edges in G′ incident to x. We first note that no G′i can be of order 3, because there is no connected pendant-free graph on three vertices. If u and v are vertices from two disjoint components of G′ with each component being of order at least 4, then the pair u, v is uniquely determined by Cu ∪ Cv , thus by maximality of G, uv is an edge of G. If a component of G′ is isomorphic to K2 , assuming u and u′ are vertices of this component, then for any other vertex v of G′ exactly one of uv or u′ v is an edge of G. We now claim that each G′i with n′i ≥ 4 is a path. By contradiction, if a G′i is not a path, we replace Gi by a member Jn′i −1 of Jn′i −1 with Pn′i being its edge-identifying code. Then we join each vertex of Pn′i to each vertex of each G′j (with j 6= i and n′j ≥ 4) and to exactly one vertex of each Gj with n′j = 2. We note that the new graph is still k-edge-identifiable. However, it has more edges than G. Indeed, while the 7 number of edges connecting G′i and the G′j ’s (j 6= i) is not decreased, the number of edges in Gi is increased when we replace Gi by Jn′i −1 . This can be seen by applying Theorem 13 on Gi . We now show that none of the G′i ’s can have more than six vertices. By contradiction, suppose G′1 is a component with n′1 ≥ 7 vertices (thus n′1 − 1 edges). We build a new graph G∗1 from G as follows. We take disjoint copies of J3 ∈ J3 and Jn′1 −4 ∈ Jn′1 −4 with P4 and Pn′1 −3 being, respectively, their edge-identifying codes. We now let V (G∗1 ) = V (J3 ) ∪ V (Jn′1 −4 ) ∪ (V (G) \ V (G1 )). The edges of J3 , Jn′1 −4 and G − G1 are also edges of G∗1 . We then add edges between these three parts as follows. We join every vertex of P4 to each vertex of Pn′1 −3 . For i = 2, 3, . . . , r if n′i ≥ 4, join every vertex of G′i to each vertex of P4 ∪ Pn′1 −3 . If n′i = 2, we choose exactly one vertex of G′i and join it to each vertex of P4 ∪ Pn′1 −3 . The construction of G∗1 ensures that it still admits an edge-identifying code of size k, but it has more edges than G. In fact, the number of edges is increased in two ways. First, because P4 ∪ Pn′1 −3 has one more vertex than G′1 , the number of edges connecting P4 ∪ Pn′1 −3 to G − G1 has increased (unless r = 1). More importantly, the  ′ n′ 2 3n′ number of edges induced by J3 ∪ Jn′1 −4 is 6 + n12−2 − 4 + 4 × (n′1 − 3) = 21 + 2 1 − 7 which is strictly n′ 2 n′ more than |E(G′1 )| = 21 + 21 − 4 for n′1 ≥ 3. Since n′1 ≥ 7, this contradicts with the maximality of G. With a similar method, the following transformations strictly increase the number of edges while the new graph still admits an edge-identifying code of size k: 1. Two components of G′ each on six vertices transform into two graphs of J3 and a graph of J4 . 2. One component of G′ on six vertices and another component on five vertices transform into three graphs of J3 . 3. One component of G′ on six vertices and one on two vertices transform into two graphs of J3 . 4. Three components of G′ each on five vertices transform into four graphs of J3 . 5. Two components of G′ on five vertices and one on two vertices transform into three graphs of J3 . 6. A component of G′ on five vertices and two on two vertices transform into two graphs of J4 . 7. Three components of G′ each isomorphic to P2 transform into a graph of J3 . For the proof of case 7, we observe that the number of edges identified by the three P2 ’s would be the same as the number of edges identified by the P4 . However, since k ≥ 4, there must be some other component in G′ . Moreover, the number of vertices of the three P2 ’s, which are joined to the vertices of the other components of G′ , is three, whereas the number of these vertices of the P4 , is four. Hence the maximality of G is contradicted. We note that cases 1, 2 and 3 imply that if a component of G′ is isomorphic to P6 , every other component is isomorphic to P4 . Then cases 4, 5 and 6 imply that if a component is isomorphic to P5 , then at most one other component is not isomorphic to P4 and such component is necessarily either a P2 or a P5 . Finally, case 7 shows that there can be at most two components both isomorphic to P2 . We conclude that each of the components of G′ is isomorphic to P4 except for possibly two of them. These exceptions are dependent on the value of k mod 3 as we described. Hence, the formulas of the theorem can be derived using these structural properties of G. We note that this bound is tight and the examples were in fact built inside the proof. More precisely, for k ≡ 0 mod 3 we take k3 disjoint copies of elements of J3 each having a P4 as an edge-identifying code. We then add an edge between each pair of vertices coming from two distinct such P4 ’s. We note that the union of these P4 ’s is a minimum edge-identifying code of the graph. If k 6≡ 0 mod 3, then we build a similar construction. This time we use elements from J3 with at most two exceptions that are elements of J4 or J5 . The above theorem can be restated in the language of line graphs as follows. √ p p Corollary 15. Let G be a line graph. Then we have γ ID (G) ≥ 38 (1 + 1 + 8|V (G)|) > 3 4 2 |V (G)|. 8 p Remark. Note that the lower bound of γ ID (G) ≥ Θ( |V (G)|), which holds for the class of line graphs, is also implied by Proposition 10. In [2], Beineke characterized line graphs by a list of nine forbidden induced subgraphs. Considering Beineke’s characterization, the lower bound of Corollary 15 can be restated p as follows: γ ID (G) ≥ Θ( |V (G)|) holds if G has no induced subgraph from Beineke’s list. It is then natural to ask what is a minimal list of forbidden induced subgraphs for which a similar claim would hold. Note that the claw graph, K1,3 , belongs to Beineke’s list of forbidden subgraphs. However, we remark that our bound does not hold for the class of claw-free graphs. Examples can be built as follows: let A be a set of size k and let B be the set of nonempty subsets of A. Let G be the graph built on A ∪ B, where A and B each induce a complete graph and a vertex a of A is joined to a vertex b of B if a ∈ b. This graph is claw-free and it is easy to find an identifying code of size at most 2k = Θ(log |V (G)|) in G. 4. Upper bounds The most natural question in the study of identifying codes in graphs is to find an identifying code as small as possible. A general bound, only in terms of the number of vertices of a graph, is provided by Theorem 1. Furthermore, the class of all graphs with γ ID (G) = |V (G)| − 1 is classified in [9]. It is easy to check that none but six of these graphs are line graphs. Thus we have the following corollary (where G ⊲⊳ H denotes the complete join of graphs G and H): Corollary 16. If G is a line graph with G ∈ / {P3 , P4 , C4 , P4 ⊲⊳ K1 , C4 ⊲⊳ K1 , L(K4 )}, then we have γ ID (G) ≤ |V (G)| − 2. Since γ EID (K2,n ) = 2n − 2, γ ID (L(K2,n )) = |V (L(K2,n ))| − 2 and the bound of Corollary 16 is tight for an infinite family of graphs. Conjecture 2 proposes a better bound in terms of both the number of vertices and the maximum degree of a graph. As pointed out in Proposition 9, most of the known extremal graphs for Conjecture 2 are line graphs. In this section, after proving some general bound for the edge-identifying code number of a pendant-free graph we will show that Conjecture 2 holds for the class of line graphs of high enough density. We recall that a graph on n vertices is 2-degenerated if its vertices can be ordered v1 , v2 , . . . , vn such that each vi is joined to at most two vertices in {v1 , v2 , . . . , vi−1 }. Our main idea of proving upper bounds is to show that given a pendant-free graph G, any minimal edge-identifying code CE induces a 2-degenerated subgraph of G and hence |CE | ≤ 2|V (G)| − 3. Our proofs are constructive and one could build such small edge-identifying codes. Theorem 17. Let G be a pendant-free graph and let CE be a minimal edge-identifying code of G. Then G′ , the subgraph induced by CE , is 2-degenerated. Proof. Let uv be an edge of G′ with dG′ (u), dG′ (v) ≥ 3. By minimality of CE the subset C ′ = CE − uv of E(G) is not an edge-identifying code of G. By the choice of uv, C ′ is still an edge-dominating set, thus there must be two edges, e1 and e2 , that are not separated by C ′ . Hence one of them, say e1 , is incident to either u or v and the other one (e2 ) is not. We consider two cases: either e1 = uv or e1 is incident to only one of u and v. In the first case, e2 is adjacent to every edge of C ′ which uv is adjacent to. Since for each vertex of uv there are at least two edges in C ′ incident to this vertex, the subgraph induced by u, v and the vertices of e2 must be isomorphic to K4 and there should be no other edge of C ′ incident to any vertex of this K4 (see Figure 5(a)). In the other case, suppose e1 is adjacent to uv at u. Let x and y be two neighbours of u in G′ other than v. Then it follows that e2 = xy and, therefore, dG′ (u) = 3. Let z be the other end of e1 . We consider two subcases: either z ∈ / {x, y}, or, without loss of generality, z = x. Suppose z ∈ / {x, y}. Recall that uv is the only edge separating e1 and e2 , but e1 must be separated from both ux and uy. Thus zy ∈ CE and by a similar argument zx ∈ CE . Furthermore, dG′ (x) = dG′ (y) = dG′ (z) = 2 and {x, y, z, u} induces a C4 in G′ (see Figure 5(b)). Now suppose e1 = ux, since uv is the only edges separating e1 and e2 , then uy and possibly xy are the only edges in G′ incident to y, so dG′ (y) ≤ 2 and dG′ (u) = 3 (see Figures 5(c) and 5(d)). To summarize, we proved that given an edge uv, in a minimal edge-identifying code CE , we have one of the following cases. 9 e2 u e1 (a) e1 v y v u e1 e2 x z y (b) e2 (c) v ··· u ··· v ··· u e1 z=x y e2 z=x (d) Figure 5: Case distinctions in the proof of Theorem 17. Black vertices have fixed degree in G′ . • One of u or v is of degree at most 2 in G′ . • Edge uv is an edge of a connected component of G′ isomorphic to K4− (that is K4 with an edge removed), see Figure 5(a). • dG′ (u) = 3 (considering the symmetry between u and v) in which case either u is incident to a C4 whose other vertices are of degree 2 in G′ (Figure 5(b)), or to a vertex of degree 1 in G′ (Figure 5(c)) or to a triangle with one vertex of degree 2 in G′ (Figure 5(d)). In either case, there exists a vertex x of degree at most 2 in G′ such that when x is removed, either u or v becomes of degree at most 2 in the remaining subgraph of G′ . In this way we can define an order of elimination of the vertices of G′ showing that G′ is 2-degenerated. By further analysis of our proof we prove the following: Corollary 18. If G is a pendant-free graph on n vertices not isomorphic to K4 or K4− , then γ EID (G) ≤ 2n−5. Proof. We first prove that if G is a pendant-free graph on n vertices not isomorphic to K4 , then γ EID (G) ≤ 2n − 4. Let CE be a minimal edge-identifying code and let G′ be the subgraph induced by CE . Then, by Theorem 17, G′ is 2-degenerated. Let vn , vn−1 , . . . , v1 be a sequence of vertices of G′ obtained by a process of eliminating vertices of degree at most 2. Since v1 and v2 can induce at most a K2 , we notice that there could only be at most 2n − 3 edges in G′ . But if there are exactly 2n − 3, at every step of the vertex-elimination process, the vertex to be removed must have degree exactly 2. Hence, the subgraph induced by v1 , v2 , v3 and v4 is isomorphic to K4− . Considering symmetries, there are three possibilities for the subgraph induced by {v1 , . . . , v5 } (recall that in this graph v5 is of degree 2). In each of these three cases, one can easily find an edge with both ends of degree at least 3 which also does not belong to any of the four configurations described in the proof of Theorem 17 (see Figure 5), which is a contradiction. Now we show that if γ EID (G) = 2n − 4, then G ∼ = K4− . This can be easily checked if G has at most four ′′ vertices, so we may assume n ≥ 5. Let G be the subgraph of G′ induced by {v1 , v2 , v3 , v4 , v5 }. If G′′ has seven edges, then we could repeat the argument of the previous paragraph, to obtain a contradiction. Thus we may assume that G′′ has exactly six edges and, since it is 2-degenerated, by an easy case analysis, it must be isomorphic to one of the graphs of Figure 6. If G′′ is a graph in part (a), (b) or (c) of Figure 6, then one could repeat the proof of Theorem 17 with the edge uv of the corresponding figure, to obtain a contradiction. If G′′ is isomorphic to the graph in part (d), since it is not pendant-free there must be a vertex v6 which is joined to exactly two vertices of G′′ . Without loss of generality, let u be a vertex of degree 2 in G′′ which is adjacent to v6 . We first repeat the argument of the proof of Theorem 17 using the edge uv. Of the four possible end-configurations of Figure 5, one can check that only the last one is possible, in which case v6 must also be adjacent to v ′ . But then we repeat the same argument, this time on the edge uv ′ , the only possible case being the one of Figure 5(a). The connected component of G′ containing uv should be isomorphic to K4− — a contradiction. 10 v′ u v v u (a) v v u u u (b) v t (c) (d) (e) Figure 6: The five possibilities of 2-degenerated graphs on five vertices with six edges. Finally, let G′′ be isomorphic to the graph of Figure 6(e). If there is a vertex v6 and it is adjacent to a vertex other than u and v, say to t, then, by repeating the argument of the proof of Theorem 17, we imply that v6 must be adjacent to t and u. But if we apply the same argument on tv we will get a contradiction. Hence v6 and, therefore, by symmetry, every other vertex is joined, in G′ , to only u and v. Furthermore, since |E(G′ )| = |CE | = 2n−4, G′ is a spanning subgraph of G. But then it is easy to verify that CE \{xu, xv} is an edge-identifying code of G — a contradiction. We note that γ EID (K2,n ) = 2n − 2 = 2|V (K2,n )| − 6 thus this bound cannot be improved much. Corollay 18 implies that Conjecture 2 holds for a large subclass of line graphs: ¯ Corollary 19. If G is a pendant-free graph on n vertices and with average degree d(G) ≥ 5, then we have n ID γ (L(G)) ≤ n − ∆(L(G)) . ¯ Proof. Let u be a vertex of degree d(u) ≥ d(G) ≥ 5. Since G is pendant-free there is at least one neighbour ¯ v of u that is of degree at least 2. Thus there is an edge uv in G with d(u) + d(v) ≥ d(G) + 2 and, therefore, ¯ ∆(L(G)) ≥ d(G). Hence, considering Corollary 18, it is enough to show that 2|V (G)| − 5 ≤ |E(G)| − |E(G)| . ¯ d(G) ¯ ¯ To this end, since d(G) ≥ 5, we have 4|V (G)| ≤ (d(G) − 1)|V (G)|, therefore, ¯ 4|V (G)| − 10 ≤ (d(G) − 1)|V (G)| Mutiplying both sides by d̄(G) 2 we have: ¯ d(G) ¯ ¯ ¯ |V (G)| = (d(G) − 1)|E(G)| (2|V (G)| − 5)d(G) ≤ (d(G) − 1) 2 5. Complexity This section is devoted to the study of the decision problem associated to the concept of edge-identifying codes. Let us first define the decision problems we use. The IDCODE problem is defined as follows: IDCODE INSTANCE: A graph G and an integer k. QUESTION: Does G have an identifying code of size at most k? IDCODE was proved to be NP-complete even when restricted to the class of bipartite graphs of maximum degree 3 (see [5]) or to the class of planar graphs of maximum degree 4 and arbitrarily large girth (see [1]). The EDGE-IDCODE problem is defined as follows: EDGE-IDCODE 11 INSTANCE: A graph G and an integer k. QUESTION: Does G have an edge-identifying code of size at most k? We will prove that EDGE-IDCODE is NP-hard in some restricted class of graphs by reduction from PLANAR (≤ 3, 3)-SAT, which is a variant of the SAT problem and is defined as follows [8]: PLANAR (≤ 3, 3)-SAT INSTANCE: A collection Q of clauses over a set X of boolean variables, where each clause contains at least two and at most three distinct literals (a variable x or its negation x). Moreover, each variable appears in exactly three clauses: twice in its non-negated form, and once in its negated form. Finally, the bipartite incidence graph of Q, denoted B(Q), is planar (B(Q) has vertex set Q ∪ X and Q ∈ Q is adjacent to x ∈ X if x or x appears in clause Q). QUESTION: Can Q be satisfied, i.e. is there a truth assignment of the variables of X such that each clause contains at least one true literal? PLANAR (≤ 3, 3)-SAT is known to be NP-complete [8]. We are now ready to prove the main result of this section. Theorem 20. EDGE-IDCODE is NP-complete even when restricted to bipartite planar graphs of maximum degree 3 and arbitrarily large girth. Proof. The problem is clearly in NP: given a subset C of edges of G, one can check in polynomial time whether it is an edge-identifying code of G by computing the sets C ∩ N [e] for each edge e and comparing them pairwise. We now reduce PLANAR (≤ 3, 3)-SAT to EDGE-IDCODE. We first give the proof for the case of girth 8 and show that it can be easily extended to an arbitrarily large girth. We first need to define a generic sub-gadget (denoted P -gadget) that will be needed for the reduction. In order to have more compact figures, we will use the representation of this gadget as drawn in Figure 7. We will say that a P -gadget is attached at some vertex x if x is incident to edge a of the gadget as depicted in the figure. e d P c b a x x G G Figure 7: The generic P -gadget We make the following claims. Claim 1. In any graph containing a P -gadget, at least three edges of this gadget must belong to any edgeidentifying code. 12 Claim 1 is true because d is the only edge separating b and c. Similarly c is the only edge separating d and e. Finally, in order to separate d and c, one has to take at least one of a, b or e. Claim 2. If G is a pendant-free graph obtained from a graph H with a P -gadget attached at a vertex x of H, then any edge-identifying code of G must contain an edge of H incident to x. Claim 2 follows from the fact that edge a must be separated from edge b. We are now ready to describe the reduction. Given an instance Q = {Q1 , . . . , Qm } of PLANAR (≤ 3, 3)-SAT over the set of boolean variables X = {x1 , . . . , xn } together with an embedding of its bipartite incidence graph B(Q) in the plane, we build the graph GQ as follows. For each variable xj and clause Qi we build the subgraphs Gxj and GQi respectively, as shown in Figure 8. We recall that a given variable xj appears in positive form in exactly two clauses, say Qp , Qq , and in negative form in exactly one clause, say Qr . We then unify vertex x1j of Gxj with vertex lpk of GQp which corresponds to xj . We do a similar unification for vertices x2j and xj 1 with corresponding vertices from GQq and GQr . This can be done while ensuring the planarity of GQ , using the given planar embedding of B(Q). Moreover, GQ is bipartite since B(Q) is bipartite and there are no odd cycles in the variable and clause gadgets. Finally, it is easy to see that GQ has maximum degree 3 and girth 8. Since a clause gadget has fourty-five vertices and a variable gadget, fourty-two vertices, GQ has 45m + 42n vertices and, therefore, the construction has polynomial size in terms of the size of Q. li2 P bi2 P ai2 ai3 c2 c0 P bi3 P x1j li3 t1j P P tj e1 f1 d1 c1 P 1 f5 t2j e2 f2 d2 P ai1 x2j xj 1 e3 f3 d3 P P e4 f4 bi1 tj d4 P li1 P (a) Clause gadget GQi (b) Variable gadget Gxj Figure 8: Reduction gadgets for clause Qi and variable xj . We will need two additional claims in order to complete the proof. 13 2 Claim 3. In a variable gadget Gxj , in order to separate the four pairs of edges {di , ei } for 1 ≤ i ≤ 4, at 1 2 least two edges of A = {di , ei | 1 ≤ i ≤ 4} ∪ {t1j , tj , t2j , tj } belong to any edge-identifying code C. Moreover, 1 2 if |C ∩ A| = 2, then either C ∩ A = {t1j , t2j } or C ∩ A = {tj , tj }. The first part of Claim 3 follows from the fact that the two edges of each of the pairs {d1 , e1 } and {d3 , e3 } must be separated. The second follows from an easy case analysis. The following claim follows directly from Claim 2. Claim 4. Let v1 v2 v3 v4 be a path of four vertices where each of the vertices v2 and v3 has its own P -gadget attached and both v2 and v3 have degree 3. Then, at least one of the three edges of the path belong to any identifying code of the graph. If exactly one belongs to a code, it must be v2 v3 . We now claim that Q is satisfiable if and only if GQ has an edge-identifying code of size at most k = 25m + 22n. For the sufficient side, given a truth assignment of the variables satisfying Q, we build an edge-identifying code C as follows. For each P -gadget, edges a, c, d are in C. For each clause gadget GQi , edge c0 belongs to C. For each literal lik of Qi , 1 ≤ k ≤ 3, if lik is true, edge aik belongs to C; otherwise, edge bik belongs to C. If Qi has only two literals and vertex lik is the vertex not corresponding to a literal of Qi , then edge bik belongs to C. Now, one can see that all edges of GQi are dominated. Furthermore, with the exception of the pair {c1 , c2 }, every edge of GQi is separated from every other edge of GQ . Next, in each variable 1 2 gadget Gxj , if xj is true, edges t1j and t2j belong to C. Otherwise, edges tj and tj belong to C. Edges 1 f1 , f2 , f3 , f4 and f5 also belong to C. Because of this choice, all edges of Gxj \ {t1j , t2j , tj } are dominated. 1 Since each of the three edges t1j , t2j , tj is incident to a vertex of a P -gadget of some clause gadget, they are 1 also dominated. Moreover, all pairs of edges containing at least one edge of Gxj \ {t1j , t2j , tj } are clearly 1 separated. Now, since for each P -gadget of the clause gadgets, edge a is in C, t1j , t2j , tj are separated from all edges in GQ . It remains to prove that C separates the pair {c1 , c2 } of each clause gadget. Since we are considering a satisfying assignment of Q, in every clause Qi of Q, there exists a true literal. Hence, for each clause Qi , at least one edge aij with 1 ≤ j ≤ 3, must be in the code and, therefore, the pair {c1 , c2 } is separated. We conclude that C is an edge-identifying code of size k. For the necessary side, let C ′ be an edge-identifying code of GQ with |C ′ | ≤ k. It follows from Claim 1 that three edges of each of the seven P -gadgets of a clause gadget GQi must belong to C ′ . Moreover, by Claim 2, edge c0 is forced to be in any code. Finally, by Claim 2, for each vertex lik (1 ≤ k ≤ 3) of GQi , one of the edges aik and bik is in C ′ . Note that this is a total of at least twenty-five edges per clause gadget. Similarly, it follows from Claim 1 that in each variable gadget Gxj , at least fifteen edges of C ′ are contained in the P -gadgets of Gxj . Following Claim 2, all edges fi (1 ≤ i ≤ 5) belong to C ′ . Note that this is a total of at least twenty edges in each variable gadget. We have considered 25m + 20n edges of C ′ so far. Hence 2n edges remain to be considered. It follows from Claim 3 that for each variable gadget, at least two additional edges belong to C ′ (in order to separate the pairs {di , ei }, for 1 ≤ i ≤ 4). Therefore, in each variable gadget, exactly two of these edges belong to C ′ . Hence, following the second part of Claim 3, either 1 2 {t1j , t2j } or {tj , tj } is a subset of C ′ . Remark that we have now considered all k = 25m + 22n edges of C ′ . Therefore, in each clause gadget GQi , exactly one of the edges aik and bik of GQi belongs to C ′ . We can now build the following truth assignment: for each variable gadget, if {t1j , t2j } is a subset of C ′ , 1 2 xj is set to TRUE. Otherwise, {tj , tj } is a subset of C ′ and xj is set to FALSE. Let us prove that this assignment satisfies Q. In each clause gadget GQi , note that edges c1 and c2 must be separated by C ′ ; this means that one edge / C ′ and by Claim 4, aik from {ai1 , ai2 , ai3 } belongs to C ′ . Hence, as noted in the previous paragraph, bik ∈ 1 1 in the path formed by edges {aik , bik , tj }, tj belongs to the code (without loss of generality, we suppose that lik = xj and t1j is the edge of Gxj incident to vertex lik of GQi ). Therefore, in the constructed truth 14 assignment, literal lik has value TRUE, and the clause is satisfied. Repeating this argument for each clause shows that the formula is satisfied. Now, it remains to show that similar arguments can be used to prove the final statement of the theorem for larger girth. Consider some integers λ ≥ 1 and µ ≥ 2. We build the graph GQ (λ, µ) using modified variable gadgets Gxj (µ) and modified clause gadgets GQi (λ), which are depicted in Figure 9. The construction is the same as in the previous proof and GQ (λ, µ) has (36λ + 9)m + (30µ − 18)n vertices. We claim that the girth of GQ (λ, µ) is now at least min{4µ, 8(λ + 1)}. Indeed, Gxj (µ) has a cycle of size exactly 4µ and since the girth of B(Q) is at least 4, it follows that the minimum length of a cycle between some clause gadgets (at least two) and some variable gadgets (at least two) is at least 4(2λ + 1) + 2 + 2 = 8(λ + 1). Now, using a similar proof as the proof for girth 8, it can be shown that Q is satisfiable if and only if GQ (λ, µ) has an identifying code of size at most k = (21λ + 4)m + (17µ − 12)n. It is known that a line graph L(G) is perfect if and only if G has no odd cycles of length more than 3, see [20]. Moreover, one can check that the line graphs of the graphs constructed in the previous proof are planar, have maximum degree 4 and clique number 3. Therefore, the following corollary follows: Corollary 21. IDCODE is NP-complete even when restricted to perfect 3-colorable planar line graphs of maximum degree 4. In the following, by slightly restricting the class of graphs considered in Theorem 20, we show that EDGE-IDCODE becomes linear-time solvable in this restricted class. Let us first introduce some necessary concepts. A graph property P is expressable in counting monadic second-order logic, CMSOL for short (see [7] for further reference), if P can be defined using: • vertices, edges, sets of vertices and sets of edges of a graph • the binary adjacency relation adj where adj(u, v) holds if and only if u, v are two adjacent vertices • the binary incidence relation inc, where inc(v, e) holds if and only if edge e is incident to vertex v • the equality operator = for vertices and edges • the membership relation ∈, to check whether an element belongs to a set • the unary cardinality operator card for sets of vertices • the logical operators OR, AND, NOT (denoted by ∨, ∧, ¬) • the logical quantifiers ∃ and ∀ over vertices, edges, sets of vertices or sets of edges It has been shown that CMSOL is particularly useful when combined with the concept of the graph parameter tree-width (we refer the reader to [7] for a definition). Some important classes of graphs have bounded tree-width. For example, trees have tree-width 1, series-parallel graphs have tree-width 2 and outerplanar graphs have tree-width 3. The following result shows that many graph properties can be checked in linear time for graphs of bounded tree-width. Theorem 22 (Courcelle [7]). Let P be a graph property expressable in CMSOL and let c be a constant. Then, for any graph G of tree-width at most c, it can be checked in linear time whether G has property P. We now show that CMSOL can be used in the context of edge-identifying codes: Proposition 23. Given a graph G and an integer k, let EID(G, k) be the property that γ EID (G) ≤ k. Property EID(G, k) can be expressed in CMSOL. 15 P 2λ times P P P P 2λ times P P P ... P P P ... P 2λ times ... P P P P (a) Clause gadget GQi (λ) 2µ − 3 times P P P ... P P P P P P P (b) Variable gadget Gxj (µ) Figure 9: Reduction gadgets for clause Qi and variable xj for arbitrarily large girth. Proof. Let V = V (G) and E = E(G). We define the CMSOL relation dom(e, f ) which holds if and only if e, f are edges of E and e, f dominate each other, i.e. e and f are incident to the same vertex. We have dom(e, f ) := ∃x ∈ V, (inc(x, e) ∧ inc(x, f )). 16 Now we define EID(G, k) as follows: EID(G, k)  := ∃C, C ⊆ E, card(C) ≤ k, ∀e ∈ E, ∃f ∈ C, dom(e, f ) ∧   ∀e ∈ E, ∀f ∈ E, e 6= f, ∃g ∈ C, (dom(e, g) ∧ ¬dom(f, g)) ∨ (dom(f, g) ∧ ¬dom(e, g)) This together with Theorem 22 implies the following corollary. Corollary 24. EDGE-IDCODE can be solved in linear time for all classes of graphs having their tree-width bounded by a constant. This result implies, in particular, that one can find the edge-identifying code number of a tree in linear time. Note that a similar approach has been used for the case of vertex-identifying codes in [17]. The proof of Theorem 22 is constructive and gives a linear-time algorithm, but it is very technical. Therefore, it would be interesting to give a simpler linear-time algorithm for EDGE-IDCODE in trees. Observe that this has been done in [1] for the case of vertex-identifying codes. References [1] D. Auger. Minimal identifying codes in trees and planar graphs with large girth, European Journal of Combinatorics 31(5):1372–1384, 2010. [2] L. W. Beineke. Characterizations of derived graphs, Journal of Combinatorial Theory 9(2)2:129–135, 1970. [3] N. Bertrand, I. Charon, O. Hudry and A. Lobstein. Identifying and locating-dominating codes on chains and cycles, European Journal of Combinatorics 25(7), 969–987, 2004. [4] I. Charon, G. Cohen, O. Hudry and A. Lobstein. New identifying codes in the binary Hamming space, European Journal of Combinatorics 31(2):491–501, 2010. [5] I. Charon, O. Hudry and A. Lobstein. Minimizing the size of an identifying or locating-dominating code in a graph is NP-hard. Theoretical Computer Science 290(3):2109–2120, 2003. [6] I. Charon, O. Hudry and A. Lobstein. Extremal cardinalities for identifying and locating-dominating codes in graphs. Discrete Mathematics 307(3-5):356–366, 2007. [7] B. Courcelle. The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Information and Computation 85(1):12–75, 1990. [8] E. Dahlhaus, D. S. Johnson, C. H. Papadimitriou, P. D. Seymour and M. Yannakakis. The complexity of multiterminal cuts. SIAM Journal of Computing 23(4):864–894, 1994. [9] F. Foucaud, E. Guerrini, M. Kovše, R. Naserasr, A. Parreau and P. Valicov. Extremal graphs for the identifying code problem. European Journal of Combinatorics 32(4):628–638, 2011. [10] F. Foucaud, R. Klasing, A. Kosowski and A. Raspaud. On the size of identifying codes in triangle-free graphs. Submitted, 2010. [11] F. Foucaud and G. Perarnau. Bounds on identifying codes in terms of degree parameters. Submitted, 2011. [12] S. Gravier, R. Klasing and J. Moncel. Hardness results and approximation algorithms for identifying codes and locatingdominating codes in graphs. Algorithmic Operations Research 3(1):43–50, 2008. [13] S. Gravier and J. Moncel. On graphs having a V \ {x} set as an identifying code. Discrete Mathematics 307(3-5):432–434, 2007. [14] T. W. Haynes, D. J. Knisley, E. Seier and Y. Zou. A quantitative analysis of secondary RNA structure using domination based parameters on trees. BMC Bioinformatics 7:108, 2006. [15] M. G. Karpovsky, K. Chakrabarty and L. B. Levitin. On a new class of codes for identifying vertices in graphs. IEEE Transactions on Information Theory 44:599–611, 1998. [16] M. Laifenfeld, A. Trachtenberg and T. Y. Berger-Wolf. Identifying codes and the set cover problem. Proceedings of the 44th Annual Allerton Conference on Communication, Control and Computing, Monticello, USA, September 2006. [17] J. Moncel. Codes Identifiants dans les Graphes. PhD Thesis, Université Joseph-Fourier - Grenoble I, France, June 2005. Available online at http://tel.archives-ouvertes.fr/tel-00010293. [18] J. Moncel. On graphs on n vertices having an identifying code of cardinality log2 (n + 1). Discrete Applied Mathematics 154(14):2032–2039, 2006. [19] J. Suomela. Approximability of identifying codes and locating-dominating codes. Information Processing Letters 103(1):28–33, 2007. [20] M. E. Trotter. Line perfect graphs. Mathematical Programming 12(1):255–259, 1977. 17