Locating-dominating sets and identifying codes in graphs of girth at least 5

Locating-dominating sets and identifying codes are two closely related notions in the area of separating systems. Roughly speaking, they consist in a dominating set of a graph such that every vertex is uniquely identified by its neighbourhood within the dominating set. In this paper, we study the size of a smallest locating-dominating set or identifying code for graphs of girth at least 5 and of given minimum degree. We use the technique of vertex-disjoint paths to provide upper bounds on the minimum size of such sets, and construct graphs who come close to meet these bounds.


Introduction
Various forms of distinguishing problems in graphs arising from several applications have been studied. Imagine a setting where one wants to detect a hazard in a network (graph) using simple local detectors. Every network node should be within reach of some detector, say at graph distance at most 1: in this case the detectors must form a dominating set. If, in addition, one wants to be able to precisely locate the hazard, every node must be uniquely determined by the set of detectors covering it. This is the notion of a locating-dominating set or an identifying code (depending on whether the detector nodes should be distinguished themselves).
Since the introduction of locating-dominating sets by Slater [24,25] and identifying codes by Karpovsky, Chakrabarty and Levitin [13], these concepts have been widely studied and applied to hazard-or fault-detection in networks and facilities [13,27], routing [16], as well as in relation with graph isomorphism [3] and logical characterizations of graphs [14]. An online bibliography on these topics is maintained by Lobstein [17]. We remark that these problems belong to the more general set of distinguishing or separating problems in graphs and hypergraphs; see the concept of hypergraph separating systems [5,22] (which is also known under the name of test covers [7,19] or discriminating codes [8], and is related to a celebrated theorem of Bondy [6]).
In this paper, we study locating-dominating sets and identifying codes in graphs of girth at least 5 (that is, containing no triangle or 4-cycle). Their behaviour in this class is quite different from the class of graphs with girth 3 or 4. We are able to give upper bounds on the smallest size of such sets in terms of the order of the graph, and discuss the tightness of our bounds.
Definitions. All graphs in this paper will be undirected and finite. The order of a graph will be denoted by the letter n; the closed neighbourhood of a vertex x is denoted N [x], and a path along vertices x 1 , . . . , x k is denoted x 1 − . . . − x k . We may also denote the concatenation of two paths P, P ′ by P − P ′ .
In a graph G, a vertex dominates itself and all its neighbours. A set D of vertices dominates vertex x if some vertex of D dominates x. Similarly, D 2-dominates x if at least two distinct vertices of D dominate x. Set D is called a dominating set if D dominates all vertices in V (G). If a vertex x belongs to the symmetric difference N [u]∆N [v] (i.e. x dominates exactly one of u, v) we say that x separates u from v.
We have the following definitions of the core concepts of this paper: Definition 1 ( [13,24,25]) Given a graph G, a subset C of vertices of V (G) which is both a dominating set and such that all vertices of V (G) \ C are separated by some vertex of C is called a locating-dominating set of G. If, moreover, all vertices of V (G) are separated by some vertex of C, it is called an identifying code of G.
The minimum size of a dominating set, a locating-dominating set, and an identifying code of a graph G are called the domination number γ(G), the location-domination number γ LD (G) and the identifying code number γ ID (G) of G, respectively. If G is identifiable we have γ(G) ≤ γ LD (G) ≤ γ ID (G).
Note that a graph always has a locating-dominating set, but it has an identifying code (it is identifiable) if and only if it has no twins (vertices with the same closed neighbourhood). However, for triangle-free graphs (and thus for graphs of girth at least 5), twins cannot have any common neighbour, leading to the following observation: Observation 2 A triangle-free graph is identifiable if and only if it has no connected component with two vertices.
Related work. A classic result in domination due to Ore [20] is that for every graph G of order n with minimum degree at least 1, γ(G) ≤ n 2 . Later, McCuaig and Shepherd [18] proved that besides seven exceptional graphs, if G is connected and has minimum degree at least 2, then γ(G) ≤ 2n 5 . For minimum degree at least 3, Reed [21] proved the bound γ(G) ≤ 3n 8 , which was recently improved to γ(G) ≤ 4n 11 by Kostochka and Stodolsky [15] for connected graphs with n ≥ 9. More generally, it is known that any graph G with minimum degree δ has domination number γ(G) ≤ O log δ δ n (see [1]), and this bound is asymptotically tight [2].
A bound of this form does not exist for locating-dominating sets or identifying codes. Indeed, d-regular graphs with locating-dominating number and identifying code number of the form were constructed by the second author and Perarnau [10]. However, these constructions contain either triangles or 4-cycles, and the same authors showed that for any graph G of order n, girth at least 5 and minimum degree δ, an (asymptotically tight) upper bound of the form γ LD (G) ≤ γ ID (G) = O log δ δ n (similar to the one for dominating sets) holds. However, for small values of δ the bound of [10] is not meaningful; when δ = 2, the second author showed the bound γ ID (G) ≤ 7n 8 = 0.875n in his PhD thesis [9]. In this paper, we study the following question: Question 3 What are tight upper bounds on γ LD (G) and γ ID (G) for graphs G of given (small) minimum degree δ ≥ 2 and girth at least 5?
Our results and structure of the paper. We study the cases where the minimum degree δ ∈ {2, 3}, and also the case of cubic graphs. In Section 2, we give upper bounds on parameters γ LD and γ ID for these graph classes, and discuss their tightness by constructing examples with large values of γ LD and γ ID in Section 3. We briefly conclude in Section 4. A summary of our results is given in Table 1. To obtain the upper bounds, we use the technique of building vertex-disjoint paths of the graph, that was introduced by Reed [21] for dominating sets and was used in related works, see e.g. [15,28].

Upper bounds using vertex-disjoint path covers
This section contains the proofs of our upper bounds. We start with some preliminary tools.  [26] Cor. 12 Thm. 18 [13] Cor. 17 Table 1: Upper bounds and largest known ratios (in terms of the graph's order) of location-domination and identifying code numbers in connected graphs of girth at least 5 and minimum degree δ.

Preliminary lemmas and definitions
Next, we give useful characterizations of locating-dominating sets and identifying codes in graphs of girth 5.
Lemma 4 Let G be a graph of girth at least 5, and let C be a dominating set of G. Then C is a locating-dominating set of G if and only if, for Proof. If C is a locating-dominating set, N (x) ∩ C = N (y) ∩ C for all x, y ∈ X. Then clearly the function f : be a cycle of length 4. Thus, C is a locating-dominating set.
The following is a more complicated version of Lemma 4 for identifying codes. It is a more precise extension of a lemma used by the second author and Perarnau in [10].
Lemma 5 Let G be an identifiable graph of girth at least 5. Let C be a dominating set of G and let C ≥3 be the set of vertices of C belonging to a connected component of G[C] of size at least 3. Then, C is an identifying code of G if and only if the following conditions hold: (i) None of the components of G[C] have size 2; Proof. First, assume that C is an identifying code of G. Then, Property (i) is clear (otherwise the two vertices of some component C i of order 2 would not be separated). To see that Property (ii) holds, let x ∈ X. Let f : X → C be defined such that f (x) is the unique neighbour of x in C. Since C is an identifying code, f (x) has a neighbour in C (otherwise x, f (x) would not be separated), hence f (x) ∈ C ≥3 ∩ N (x). To prove the injectivity of f , assume by contradiction, that there are two vertices x, y ∈ X with y = x and f (x) = f (y). Then x, y would not be separated, a contradiction.
For the other side, assume that C is a dominating set fulfilling Properties (i) and (ii) and, by contradiction, assume that there are two distinct vertices x, y that are not separated by C, i.e.
If both x, y belong to C, x and y induce a component of G[C] of size 2, a contradiction. Otherwise, exactly one of them belongs to C (say x). But then y is only dominated by x, who does not belong to C ≥3 , a contradiction to Property (ii).
Thus, x and y are non-adjacent and, since there are no 4-cycles, |N (x) ∩ N (y)| ≤ 1. Hence, there is a vertex z with N (x) ∩ C = N (y) ∩ C = {z}. It follows that x, y ∈ X but f (x) = z = f (y), a contradiction.
We now define the key concept of vertex-disjoint path cover of a graph, and introduce some related notation.
Definition 6 A vertex-disjoint path cover (vdp-cover for short) of G is a partition of V (G) into sets of vertices, each of them inducing a graph with a Hamiltonian path.
For 0 ≤ i ≤ 4, a path whose order is congruent to i modulo 5 is called an i-path (an empty path is a 0-path). Given a vdp-cover S, we will usually denote by S i the set of i-paths in S.
Given a path P = x 0 − . . . − x p−1 ∈ S and a vertex x i of P , we say that x i is an (s, t)-vertex if the two paths on the sets {x j , 0 ≤ j < i} and {x j , i < j < p} are an s-path and a t-path, that is, i = s mod 5 and p − i = t mod 5.
The following result of Reed [21] will be used for some of our bounds. Theorem 7 ( [21]) Every connected cubic graph of order n has a vdp-cover with at most n 9 vertices.

Locating-dominating sets
The bound given in the following theorem also follows from a stronger result in a very recent manuscript by Garijo, González and Márquez [11] (see there Proposition 6.6). However, we give an independent proof by a completely different method, which is a good and simple illustration of this technique that will be used several times in this paper.
Theorem 8 Let G be a graph of order n, girth at least 5 and minimum degree at least 2. Then γ LD (G) ≤ n 2 .
Proof. Let S be a vdp-cover of G and let T 1 and T 3 be the sets of paths of length 1 and 3 in S, respectively. Let S be chosen such that 2|T 1 | + |T 3 | is minimized. Without loss of generality, we can assume that all paths in S have length at most 5, since otherwise we can split any longer path into paths of lengths 2 or 5 without affecting the minimality condition. For each path P ∈ S of length 1 ≤ p ≤ 5, we define an order Let C be the set of vertices containing all vertices of the paths of S of even index (i.e. all x 2 's and all x 4 's). Also, we define a function f on all vertices with index 1 or 5 in the following way.
According to Lemma 4, if the end-vertices of the 3-paths in S have, besides of its neighbor on the path, a second neighbor in C and if all vertices of the 1-paths from S have two neighbors in C, then C is a locating-dominating set. We will show that these vertices cannot have neighbors outside C. Herefor, we will say that a vertex x is a (p, q)-vertex if it belongs to a path of length p + q + 1 and the part of the path on one side of v has length p and the other part has length q. Further, we say that, for fixed p and q, the (p, q)-vertices are good if they all belong to C, otherwise they are bad. Taking into account that p + q + 1 ≤ 5, we have the following bad vertices: (0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (1, 2) and (2, 2). Let P = x ∈ S be a 1-path. If x is adjacent to a (0, q)-vertex for some q ∈ {0, 1, 2, 3, 4}, then we can replace the 1-path and the (q + 1)-path by a (q + 2)-path, obtaining in all cases a lower value for the sum 2|T 1 | + |T 3 |, a contradiction. Hence suppose that x is adjacent to either a (1, 2)-vertex or to a (2, 2)-vertex. Then we can substitute the 1-path and the 4-or 5-path by a 2-path and a 3-or 4-path, obtaining in each case a lower value for the sum 2|T 1 | + |T 3 |, which is a contradiction. Hence, x has to be adjacent only to good vertices. As δ(G) ≥ 2, it follows that x is adjacent to two vertices from C. Completely analogous we obtain a contradiction when P is a 3-path having an end-vertex adjacent to a bad vertex. Altogether, it follows that all vertices not in C have either an assignment via f or two neighbors in C. Hence, by Lemma 4, C is a locating-dominating set. Since each path from S has at most half of its vertices in C, we obtain γ LD (G) ≤ |C| ≤ n 2 .
Theorem 8 is tight for the cycles C 6 and C 8 , which can easily be seen to have location-domination numbers 3 and 4, respectively (see also [25]). In Proposition 21, we will give a construction of arbirarily large graphs based on copies of C 6 .
Next, given a vdp-cover S of a graph G with girth 5, we will show how to construct a set D and an injective function f : V (G) \ D → D meeting the conditions of Lemma 4. We will build D by taking roughly two vertices out of five in each path of S, then adding a few vertices for each path whose length is nonzero modulo five.

Definition 9
Let G be a graph of girth at least 5 and S be a vdp-cover of G. Then, the set D(S) and the function f D(S) are constructed as follows.
For each path P = x 0 − . . . − x p−1 in S, we do the following. Assume that P ∈ S i (0 ≤ i ≤ 4), that is, p = 5k + i for some k ≥ 0. If k ≥ 1, D contains the set {x j ∈ V (P ), j = 1, 3 mod 5, j < 5k}. Now, if P belongs to S \ S 0 , we add some vertices to D according to the following case distinction: To finish the construction of the function f D(S) , for j < 5k, if x j ∈ D and j = 0 mod 5, An illustration of Definition 9 is given in Figure 1. Proof. The proof follows from Lemma 4; indeed, each vertex x of V (G) \ D with x ∈ P that is not 2-dominated has an image f D(S) (x) ∈ P , and f D(S) is injective. Now, using Theorem 7 and the above construction of the set D(S), we can give an improved bound for cubic graphs, based on the following general theorem: Theorem 11 Let G be a graph of order n, girth at least 5 and having a vdp cover with α · n paths. Then γ LD (G) ≤ 2+4α 5 n. Proof. Let S be the vdp-cover of G. We consider the set D(S) defined in Definition 9. By Lemma 10, D(S) is a locating-dominating set of G. It remains to estimate the size of D(S).
For each path P in S i with 5k + i vertices, we have added 2k 5 vertices of P to D in the first step of the construction. Then, in the second step, for each path in S 1 ∪ S 2 and S 3 ∪ S 4 , we have added one and two additional vertices, respectively. So in total we get: We get the following corollary of Theorems 7 and 11: Corollary 12 Let G be a connected cubic graph of order n and girth at least 5. Then γ LD (G) ≤ 22 45 n < 0.489n.

Identifying codes
The methods used in this subsection are similar to the ones of Subsection 2.2, but the proofs are more intricate.
Theorem 13 Let G be an identifiable graph of order n, girth at least 5 and minimum degree δ ≥ 2.
Proof. Given a vdp-cover S of G, let T i be the set of paths of length i in S. We choose S such that is minimized. Let P ∈ S be an r-path and suppose that r ≥ 10. Then we can replace P by paths of lengths 5, 6 and 7 without affecting the minimality of (1): • If r ≡ 0 mod 5, then we can replace P by paths of length 5.
• If r ≡ 1 mod 5, then we can replace P by one 6-path and the remaining part by paths of length 5.
• If r ≡ 2 mod 5, then we can replace P by one 7-path and the remaining part by paths of length 5.
• If r ≡ 3 mod 5, then we can replace P by one 6-path, one 7-path, and the remaining part by in paths of length 5.
• If r ≡ 4 mod 5, then we can replace P by two 7-paths and the remaining part by paths of length 5.
Hence, without loss of generality, we can assume that there are no paths of length 10 or more in S. Now we define a set C in the following way. For each r-path P = x 1 − x 2 − . . . − x r of S, we add some vertices to C and define a function f according to the following distinction: • If r = 2, then let C contain x 2 .
• If r = 3, then let C contain x 2 and x 3 .
• If r = 4, then let C contain x 1 and x 4 and let f (x 2 ) = x 1 and f (x 3 ) = x 4 .
• If r = 9, then let C contain x 2 , x 3 , x 4 , x 5 , x 8 and x 9 and let f ( An illustration of set C is given in Figure 2. We will show that C is an identifying code of G. We say that a vertex x is a (p, q)-vertex if it belongs to a path of length p + q + 1 and the part of the path on one side of x has length p and the other part has length q. Further, we say that, for fixed p and q, the (p, q)-vertices are good if they all belong to C, otherwise they are bad. Taking into account that p + q + 1 ≤ 9, we have the following set B of bad vertices: Claim 13.A For a path P ∈ S of length r = 8, 9, we can assume that the end-vertex x r , which belongs to C, has either a second neighbor from P contained in C (i.e. different from its predecessor x r−1 in P ) or it has a neighbor outside P . r = 1: r = 2: x 1 x 2 r = 3: Suppose that x 8 is not adjacent to any of x 2 , x 3 , x 4 . Suppose also that x 8 has no neighbor outside P . Since G has girth at least 5, x 8 is neither adjacent to x 5 nor to x 6 . Hence, as δ ≥ 2, x 8 has to be adjacent to x 1 . Now, either G = C 8 or one of the vertices from P has one neighbor outside P . In the first case, an independent set of size 4 is an identifying code of G = C 8 and satisfies the desired bound. Hence we may assume that G = C 8 and thus there is a vertex from P having a neighbor outside P . In this case, we may reorder the vertices along the cycle such that x 8 has one neighbor outside P . Hence, Claim 13.A follows for r = 8. The same argument can be used to prove the case r = 9. Suppose that, for an r ∈ {1, 2, 3, 4, 8, 9}, there is an end-vertex of an r-path P which is adjacent to a (p, q)-vertex outside P with (p, q) ∈ B. Note that we can replace these paths by either an (r +p+1)path and a q-path or by a p-path and an (r + q + 1)-path. 1 We will see that, in each case, we obtain a vdp-cover which contradicts the minimality of (1). If p = 0, then we can join the r-path together with the (q + 1)-path obtaining an (r + q + 1)-path. This gives in all cases a lower value for the sum (1), which is a contradiction. Hence we can suppose that (p, q) ∈ {(1, 2), (3,4), (2,5), (2,6), (3,5)}. When r = 4 and (p, q) is arbitrary or when r = 2 and (p, q) = (1, 2), we can replace the r-and the (p + q + 1)-path by an (r + q + 1)-and a p-path and we obtain in all cases a lower value for (1). For r ∈ {1, 3, 8, 9} and (p, q) is arbitrary or r = 2 and (p, q) = (1, 2), we can replace the r-and the (p + q + 1)-paths by an (r + p + 1)-and a q-path and we obtain always a lower value for (1). Since we obtain in all cases a contradiction to the minimality of (1), it follows that, for r = 1, 2, 3, 4, 8, 9, every end-vertex of an r-path is adjacent to a good vertex.
Claim 13.C Every vertex from a 1-path is adjacent to two vertices from C.
As δ ≥ 2 and since by the proof of Claim 13.C the vertex belonging to a 1-path cannot be adjacent to a bad vertex, then it has to be adjacent to two good vertices. Since the girth of G is at least 5 and δ ≥ 2, all end-vertices of a 2-, 3-or 4-path P have a neighbor outside P . By Claim 13.B, these neighbors have to be good vertices. Hence, there are no 1-components in G[C]. On the other side, if P is an 8-or a 9-path, Claim 13.A implies that the end-vertices of P have either a further neighbor in P belonging to C or they have a neighbor outside P , which, by Claim 13.B, is a good vertex. Thus, the only possibilities to have 2-components in G[C] are given when two 2-paths or one 2-path and one 4-path or two 4-paths are connected through their good end-vertices. In these cases we could get either a 4-path, a 6-path or an 8-path which contributes less to the sum (1) than the original paths, which is a contradiction.
Hence, Claim 13.A, 13.B, 13.C and 13.D and by the construction of the function f , C fulfils the conditions of Lemma 5, which certifies that it is an identifying code. Since at most 5 7 |P | vertices from every path P ∈ S belong to C, C is an identifying code of G of cardinality at most 5 7 n.
Theorem 13 is tight for the cycle C 7 , which can easily be seen to have identifying code number 5 (see also [4]).
As for locating-dominating sets, given a vdp-cover S of a graph G with girth 5, we define a set C(S) and a function f C(S) as follows.
Definition 14 Let G be a graph of girth at least 5 and S be a vdp-cover of G. Then, the set C(S) and the function f = f C(S) are constructed as follows.
For each path P = x 0 − . . . − x p−1 of S, we do the following. Assume that P ∈ S i (0 ≤ i ≤ 4), that is, p = 5k + i for some k ≥ 0. If k ≥ 1, D contains the set {x j ∈ V (P ), j = 1, 2, 3 mod 5, j < 5k}. Now, if P belongs to S \ S 0 , we add some vertices to C according to the following case distinction: • If P ∈ S 1 and k ≥ 1, we let C contain x p−2 and f (x p−1 ) = x p−2 . If k = 0, C contains x 0 .
• If P ∈ S 2 and k ≥ 1, C also contains To finish the construction of the function f , for j < 5k, if x j ∈ C and j = 0 mod 5, f (x j ) = x j+1 ; if j = 4 mod 5, f (x j ) = x j−1 . Note that each vertex x ∈ P of V (G) \ C has an image f (x) belonging to P . Figure 3. Proof. The proof follows from Lemma 5; indeed, each vertex x of V (G) \ C with x ∈ P that is not 2-dominated has an image f C(S) (x) ∈ P , f C(S) is injective, and the only potentially isolated vertices in C are vertices v belonging to a path of S of order 1 (hence by construction no vertex x has f C(S) (x) = v).

An illustration of Definition 14 is given in
Similarly to Theorem 11 for locating-dominating sets, we have the following generic theorem: Theorem 16 Let G be an identifiable graph of order n, girth at least 5 and having a vdp cover with α · n paths. Then γ ID (G) ≤ 3+4α 5 n. Proof. Let S be the vdp-cover of G. The idea is to construct a set C and an injective function f : V (G) \ C → C meeting the conditions of Lemma 5. We will build C by taking roughly three vertices out of five in each path of S, then adding a few vertices for each path whose length is nonzero modulo five, and finally performing a few local modifications.
Step 1: Constructing an initial pseudo-code. We construct C = C(S) and f = f C(S) by the procedure described in Definition 14.
Step 2: Taking care of components of G[C] of order 2. By Lemma 15, all conditions of Lemma 5 are fulfilled, except for Property (i): there might be some paths in S 2 of order exactly 2 and forming a connected component of G[C] (second item of our case distinction). Let P be such a path, and V (P ) = {x 0 , x 1 }. Then, since G is identifiable, one of x 0 , x 1 (say x 1 ) has a neighbour y, and since P is a connected component in G[C], y / ∈ C. By the construction of C, y belongs to a path and is adjacent to vertex f (y) in C. We perform the following modification: remove x 0 from C, put y instead, and let f (x 0 ) = x 1 . It is clear that repeating this for each such case, we get rid of all components of order 2 in G[C]. Now, all conditions of Lemma 5 are fulfilled, hence C is an identifying code of G.
Step 3: Saving one vertex for each path of S 3 . We consider all paths in S 3 one by one, in an arbitrary order. For each such path P with V (P ) = {x 0 , . . . , x p−1 } (p = 5k + 3 for some k ≥ 0), we remove x p−3 , x p−2 , x p−1 from C. We now distinguish some cases.
If x i ∈ {x p−2 , x p−1 } has a neighbour in C, then, we add both x p−2 , x p−1 to C and let f ( Note that in both cases, the two new code-vertices are now part of a component of G[C] of order at least 3, hence all conditions of Lemma 5 are preserved.
If none of x p−3 , x p−2 , x p−1 have a neighbour in C, we add x p−3 and x p−1 to C. Note that x p−2 is now 2-dominated, hence all conditions of Lemma 5 are again preserved.
Repeating this at every step, C is still an identifying code, and we have decreased the size of C by |S 3 |.
Step 4: Estimating the size of the code. It remains to compute the size of C.
For each path P in S i with 5k + 1 vertices, we have added 3k 5 vertices of P to C in the Step 1 of the construction. Then, in Step 2, for each path in S 1 , S 2 , S 3 , S 4 , we have added one, two, three and three additional vertices, respectively. In Step 3, we did not change the size of C, but in Step 4, we were able to reduce the size of C by one for each path in S 3 . So in total we have: We get the following improved bound for cubic graphs, a corollary of Theorems 7 and 16: Corollary 17 Let G be a connected cubic identifiable graph of order n and girth at least 5. Then γ ID (G) ≤ 31 45 n < 0.689n.

Constructions
In this section, we provide constructions of graphs with large location-domination or identifying code number. First of all, the following result is a lower bound on parameters γ LD and γ ID depending on the maximum degree ∆ of a graph. It will be useful since it also applies to ∆-regular graphs.
Theorem 18 ([9, 13, 26]) Let G be a graph of order n and maximum degree ∆. Then γ LD (G) ≥ 2n ∆+3 . If G is identifiable, then γ ID (G) ≥ 2n ∆+2 , and any identifying code of this size is an independent 2-dominating set whose vertices all have degree ∆ in G.
We remark that the last part of the statement is not very difficult to obtain from the proof of the bound; a proof is available in the first author's PhD thesis [9, Section 4.1].

Generic constructions
We now define constructions based on the Petersen graph that will be used later on.
The graphs of Definition 19 are illustrated in Figure 4.   Definition 20 For any k ≥ 2, let G k 11 be the graph formed by a vertex y connected to k copies of P 11 (each attached via vertex x).
The graph G k 11 is illustrated in Figure 5.

Locating-dominating sets
We now give constructions with large location-domination number. The first construction is based on copies of the 6-cycle C 6 .

Proposition 21
There are infinitely many connected graphs G of order n, girth 5 and minimum degree 2 with γ LD (G) = n−1 2 .
Proof. Consider the graph G obtained from one vertex x and k ≥ 2 disjoint copies of C 6 , each joined to x by exactly one edge. We have n = 6k + 1, and we claim that γ LD (G) = 3k. It is easy to check that a set consisting of 3 vertices in each copy of C 6 (see Figure 6) is locating-dominating. For the lower bound, assume that D is an optimal locating-dominating set, and that x / ∈ D. Then, each copy of C 6 contains at least γ LD (C 6 ) = 3 vertices of D, and we are done. Hence, assume that x ∈ D.
Each copy of C 6 has at least two vertices from D (otherwise D is not dominating). Assume some copy contains exactly two (y, z): then the neighbour of x in that copy must be only dominated by x. Indeed, if this is not the case (say he isdominated also by y), there would be two vertices in the C 6 that are not in D but only dominated by z, a contradiction. But now observe that in the whole graph, at most one vertex of V (G) \ D can be dominated only by x, hence all other copies of C 6 contain three vertices of D, and we are done.
x . . . We will use the following lemma about the graph P 11 .

Lemma 22
Let G be a graph of girth 5 containing a copy P of P 11 as an induced subgraph, such that in P , only vertex x has neighbours out of P . Let D be a locating-dominating set of G. Then, we have |D ∩ V (P )| ≥ 4.
Proof. By contradiction, we assume that D P = D ∩ V (P ) has size 3. If x / ∈ D P , then D P must form a locating-dominating set of P \ {x}. By Theorem 18, γ LD (G) ≥ 20 6 > 3, a contradiction. Hence, x ∈ D P . But now it is not possible to even dominate the remaining vertices with just two vertices, a contradiction.
Proof. Consider the graph G k 11 from Definition 20, which has n = 11k + 1 vertices. A locatingdominating set of size 4k is given by selecting vertices {x, 3, 6, 9} of each copy of P 11 (see Figure 5 Therefore, we have at least three vertices in D that are adjacaent only to vertices of S. Since H 14 is vertex-transitive, we assume without loss of generality that vertex 0 is such a vertex. Among the neighbours of 0 (vertices 1, 5,13), at most one is dominated only by 0.
Assume that one of them is in that case. By the symmetries of the graph, there are automorphisms pairwise exchanging edges {0, 1}, {0, 5}, {0, 13}. Hence, without loss of generality, we can assume that vertex 5 is 1-dominated, but vertices 1, 13 are 2-dominated. Hence, vertices 4, 6 / ∈ D but at least one vertex among 2, 10 and 8, 12 belongs to D, respectively. Moreover, in order to dominate vertices 4 and 6, one of 3, 9 and 7, 11 belongs to D, respectively. Since these four sets are disjoint and |D| = 5, D contains exactly one of each.
Hence, 2 / ∈ D and 10 ∈ D. If 3 / ∈ D, then 9 ∈ D and moreover 12 ∈ D in order to dominate 3 (hence 8 / ∈ D). Since 7 is dominated, 7 is the last vertex of D. But then 2, 6 are both dominated only by 7, a contradiction. Hence, 3 ∈ D and 9 / ∈ D. To separate 2, 4, 7 ∈ D (hence 11 / ∈ D). Then 8 is the last vertex of D, otherwise it would not be separated by 6. But then 4, 12 are not separated, a contradiction.
Therefore, we can assume that all neighbours of 0 are 2-dominated. Hence, at least one vertex among {2, 10}, {4, 6} and {8, 12}, respectively, belongs to D. Assume first that 2 ∈ D. Then, in order for 10 to be dominated, one of 9, 10, 11 belongs to D. Then, exactly one of 8, 12 belongs to D. If 10 ∈ D, one of 8, 12 would not be dominated, a contradiction. If 9 ∈ D, then 12 ∈ D (otherwise it is not dominated). But then, both 8, 10 are only dominated by 9, a contradiction. A similar contradiction follows if 11 ∈ D.
Hence, 2 / ∈ D, and 10 ∈ D. Then, (exactly) one of 3, 7 belongs to D, otherwise 2 is not dominated. If 3 ∈ D and 7 / ∈ D, 8 ∈ D (otherwise 8 is not dominated). Since 6 must be dominated, 6 itself is the last vertex of D; but then, 4, 12 are both only dominated by 3, a contardiction. Hence, If 7 ∈ D and 3 / ∈ D. Then, 12 ∈ D (otherwise it is not dominated). Hence, 8 / ∈ D. But now, both 2, 8 are only dominated by 7, a contradiction. Therefore, D does not exist, which completes the proof.

Identifying codes
We now give constructions with large identifying code number. We start with a construction based on the 5-cycle C 5 , which has identifying code number 3 [4].

Proposition 25
There are infinitely many connected graphs G of order n, girth 5 and minimum degree 2 with γ ID (G) = 3 5 (n − 1).
Proof. Consider a vertex x attached to k ≥ 2 copies of C 5 via one of each copies' vertex ( Figure 8). The set formed by three consecutive vertices of each copy of C 5 (centered in the neighbour of x) is clearly an identifying code. For the lower bound, assume that some copy contains at most two vertices of an identifying code C. Then they must be non-adjacent (otherwise some vertex is not dominated). But then at least one these two vertices is not separated from one of its neighbours, a contradiction. Hence each copy of c 5 contains at least three vertices of C, proving the bound.
x . . . The following lemma is about the graph P 11 .

Lemma 26
Let G be an identifiable graph of girth 5 containing a copy P of P 11 as an induced subgraph, such that in P , only vertex x has neighbours out of P . Let C be an identifying code of G and C ∩ V (P ) = C P . Then: (ii) if |C P | = 4, then x is only dominated by a vertex y / ∈ V (P ); Proof. (i) By contradiction, assume that |C P | = 3. If C P induces a connected graph, then one can check that there are some non-dominated vertices in P . Hence, by Lemma 5(ii), either C P induces a K 2 containing x and an isolated vertex, or three isolated vertices. In both cases some vertices of P would not be separated, a contradiction.
(ii) Assume that |C P | = 4 and by contradiction, that x is dominated by a vertex of C P . If x / ∈ C P , then C P must form an identifying code of P \ {x}. Then, the bound γ ID (G) ≥ 2n ∆+2 of Theorem 18 is tight, and by the same theorem, all vertices in C P have degree 3 in P \ {x}. Hence the neighbours of x do not belong to C P , a contradiction. Hence, x ∈ C P .
Let m(C P ) and m(C P , S) count the number of edges between vertices of C P and edges between vertices of C P and S = V (P ) \ C P , respectively. Let i denote the number of vertices in C P that are not adjacent to any other vertex of C P . Then, we have m(C P ) = 4 − i − 1 (indeed C P must induce a forest). We also have m(C P , S) = 11 − 2m(C P ) (since x ∈ C P and has degree 2 in P ). We get that m(C P , S) = 5 + 2i. On the other hand, at most 4 − i vertices in S can be 1-dominated, and the other ones must be at least 2-dominated. Since |S| = 7, we get m(C P , S) ≥ 4 − i + 2(7 − (4 − i)) = 10 + i. Putting both inequalities together, we get that i ≥ 5, a contradiction.
Proof. Consider the graph G k 11 from Definition 20. An identifying code of size 5k, formed by vertices {x, 2, 4, 7, 9} of each copy of P 11 , is illustrated in Figure 5(b). Now, consider an identifying code C of the graph. By Lemma 26(i), every copy of P 11 contains at least four vertices of C. By Lemma 26(ii), for each copy of P 11 containing exactly four code-vertices, then y ∈ C and vertex x is dominated only by y. Hence there can be only one such copy, proving the lower bound.
We now define a cubic graph on 12 vertices with girth 5. An illustration is given in Figure 9. We remark that alternately, G 12 can be obtained from the Petersen graph by subdividing two edges that are at maximum distance (i.e. distance 2) from each other and joining the two new vertices by an edge. A third way is to take the Heawood graph, delete two adjacent vertices x, y and adding an edge between the two neighbours of x and an edge between the two neighbours of y.
To prove our claim, it is sufficient to show that there is no identifying code on 5 vertices. Assume for contradiction that there is an identifying code C of G 12 of size 5. Let I be the set of isolated vertices in C, S = V (G 12 ) \ C. Let m(C) and m(C, S) count the number of edges between vertices of C and the edges between C and S, respectively. By Lemma 5, at least |S| − |C \ I| vertices from S have to be 2-dominated. Hence, there are at least |C \ I| + 2(|S| − |C \ I|) edges from S to C. On the other side, there are 3|C| − 2m(C) = 15 − 2m(C) edges from C to S. Hence By Lemma 12, the subgraph induced by C consists either of a single component of order 5, a component of order 4 and an isolated vertex, a component of order 3 and two isolated vertices, or C is an independent set. We distinguish now between these cases. S, say s 7 , has exactly 3 neighbours in I, the other 6 vertices from S have exactly 2 neighbours in I. Since G 12 is cubic, the vertices in {s 1 , s 2 , s 3 , s 4 , s 5 , s 6 } are paired by a matching, say {s 1 , s 2 }, {s 3 , s 4 }, {s 5 , s 6 }. Consider the edge {s 1 , s 2 } and its neighbours in I, say {x 1 , x 2 , x 3 , x 4 }. Going through all edges from the graph G 12 and considering their four independent neighbours, there are only two possibilities where the corresponding independent sets can be completed to an independent set of size 5. These are the edges {3, 4} and {7, 8} which give each two possible independent sets {0, 2, 5, 7, 10}, {0, 2, 5, 8, 10} and {1, 3, 6, 9, 11}, {1, 4, 6, 9, 11}. Hence, C = I has to be one of these sets. However, it is easy to check that none of them is an identifying code.
Hence, G 12 has no identifying code of size 5 and γ ID (G 12 ) = 6.

Conclusion
We proved the two tight upper bounds γ LD (G) ≤ n 2 and γ ID (G) ≤ 5 7 n for graphs G of minimum degree at least 2, as well as improved bounds for cubic graphs. While the first bound is asymptotically tight for large values of n, we are not certain about the latter one.
For minimum degree at least 3, these bounds are either not tight or we have not found the graphs with highest value of parameters γ LD and γ ID . In particular, the question whether every graph G of girth at least 5 and minimum degree at least 3 satisfies γ ID (G) ≤ n 2 remains open. By Proposition 29 this would be tight for the graph G 12 . Though we have tried to get better bounds when δ ≥ 3, it seemed that our technique is not powerful enough for such an improvement (at least without any new idea).
To conclude, we remark that another interesting question would be to conduct a similar study for the open location-domination number, a related concept studied e.g. in [12,23].