All unicyclic graphs of order n with locating-chromatic number n − 3

Characterizing all graphs having a certain locating-chromatic number is not an easy task. In this paper, we are going to pay attention on finding all unicyclic graphs of order n (≥ 6) and having locating-chromatic number n− 3.


Introduction
Let G = (V, E) be a connected graph. For any two vertices a and b in G, define the distance between a and b, denoted by d(a, b), is the length of a shortest path connecting a and b. The distance from a vertex a to a set S in G, denoted by d(a, S), is min{d(a, x) | x ∈ S}. Let Π = {L 1 , L 2 , ..., L k } be an ordered partition of V (G) induced by a k-coloring c. The color code c Π (v) of a vertex v of G is defined as c Π (v) = (d(v, L 1 ), d(v, L 2 ), ..., d(v, L k )).
If any two distinct vertices u and v of G satisfy that c Π (u) = c Π (v), then the coloring c is called a locating-coloring of G. The locating-chromatic number of G, denoted by χ L (G), is the smallest integer k such that G has a locating-coloring with k colors.
Chartrand et al. [5] introduced the notion of the locating-chromatic number of a graph. They derived some bounds of the locating-chromatic number of a graph in terms of its order and diameter. The locating-chromatic numbers of some well-known graphs are also obtained, such as for paths, cycles, double stars, and complete multipartite graphs. The existence of a tree of order n ≥ 5 having locating-chromatic number k for any k ∈ {3, 4, ..., n − 2, n} is also shown. In [8], Furuya and Matsumoto have proposed an algorithm to estimate an upper bound for the locatingchromatic number of any tree. This bound depends on the number of leaves and the number of local end-branches in a tree. Recently, Assiyatun et al. [3] proposed an improved algorithm for calculating the upper bound for the locating-chromatic number of any tree. The bound obtained is much better than the one of Furuya and Matsumoto.
All connected graphs of order n and having locating-chromatic number n have been completely characterised, i.e., complete multipartite graphs, see [5]. For small locating-chromatic number, all connected graphs with locating-chromatic number 3 have been characterized, see [4] and [2]. In particular for trees, Syofyan et al. [9] has found all trees of order n with locating-chromatic number t, where 2 ≤ t < n 2 . Furthermore, in [6], Chartrand et al. characterized all connected graphs of order n and having locating-chromatic number n − 1. However, the problem on characterizing all connected graphs of order n and having locating-chromatic number n − 2 is still open. A graph is called unicyclic if it contains exactly one cycle. Recently, Arfin and Baskoro [1] characterized all unicyclic graphs of order n ≥ 5 with locating-chromatic number n − 2. Such graphs are presented in the following theorem. In this paper, we characterize all unicyclic graphs of order n (≥ 6) with locating-chromatic number n − 3.

Basic Properties
In this section, we give some basic properties of locating-chromatic number of graphs. Let G(V, E) be a nonempty connected graph of order n. The degree of vertex v in G, denoted by deg(v), is the number of vertices in G that are adjacent to v. A vertex of degree one is called an end-vertex or a leaf of G. The external degree of a vertex v in G, denoted by d + (v), is the number of leaves adjacent to v. The maximum external degree of a graph G is max{d + (v) | v ∈ V (G)} and denoted by ∆ + (G). The set of all vertices adjacent to vertex v in G is denoted by N (v). The following observation and corollary are natural.
Observation 2.1. [5] Let c be a locating-coloring in a connected graph G. If u and v are dis- Furthermore, Chartrand, et al. [5] derived some bounds on the locating-chromatic number of a connected graph in relation with its order and diameter, as shown in the following theorem.
Note that diam(G) is the diameter of graph G. As a direct consequence of Theorem 2.1, we have the following corollaries.
Corollary 2.3. If k is the length of a cycle in a unicyclic graph G of order n (≥ 6) with locatingchromatic number n − 3, then 3 ≤ k ≤ 11.
A tree T for which a vertex v is distinguished is called a rooted tree and the distinguished vertex is called a root of the tree. A rooted tree will be considered to be leveled, i.e. level 0 contains the root, v, of the tree, level 1 consists of all vertices adjacent to v, etc. A rooted tree T is called trivial if it is of order 1, otherwise it is nontrivial. Let H be a unicyclic graph containing a cycle of length k. Then, the graph H can be also considered as the graph obtained from k rooted trees T i of roots a i (1 ≤ i ≤ k) by connecting all these roots into a cycle C k such that: In this paper, we denote by H the set of all unicyclic graphs H of order n ≥ 6 with χ L (H) = n − 3. Note that there is no such unicyclic graph H of order n ≤ 5 with χ L (H) = n − 3.

Maximum external degree
In this section, we are going to show that every unicyclic graph H of order n ≥ 8 with χ L (H) = n − 3 must have the maximum external degree n − 4, namely ∆ + (H) = n − 4. To do this, let us first consider the following lemma.  If ∆ + (H) = 0, it follows that H ∼ = C n which means χ L (H) = 3 for odd n or 4 for even n, a contradiction. If ∆ + (H) = 1, then by Lemma 3.1, we have χ L (H) ≤ n − 4, a contradiction. Therefore, 2 ≤ ∆ + (H) ≤ n − 5. Let u 1 , u 2 , · · · , u ∆ + (H) be the leaves adjacent to x in H. By Corollary 2.1 the vertices x, u 1 , u 2 , · · · , u ∆ + (H) must be assigned with distinct colors, say 1, 2, · · · , ∆ + (H) + 1. Now, consider the remaining vertices other than x and its leaves in H. Let J be a subgraph induced by these remaining vertices, say V (J) = {v 1 , v 2 , · · · , v n−∆ + (H)−1 }. Then, there are at least 5 vertices in J. Let p and q be two non-adjacent vertices in J such that d(p, w) = d(q, w) for some w ∈ V (H)\{p, q}. Define a coloring such that p and q are assigned with the same color, and the other n − ∆ + (H) − 3 remaining vertices in J are assigned with distinct colors different from the colors of p and q. Such a coloring of H is a locating-coloring, hence χ L (H) ≤ max{∆ + (H) + 1, n − ∆ + (H) − 2} ≤ n − 4, which is a contradiction. Therefore, ∆ + (H) = n − 4. www.ijc.or.id All unicyclic graphs of order n with locating-chromatic number n − 3 | E.T. Baskoro and Arfin

Characterization
Let H be a unicyclic graph of order n ≥ 6 with χ L (H) = n − 3. In this section, we will characterize all graphs H. Proof. Let H be a unicyclic graph of order n ≥ 8 and χ L (H) = n − 3. By Theorem 3.1, we have ∆ + (H) = n − 4. Let x be a vertex of H with maximum external degree, i.e. d + (x) = ∆ + (H) = n − 4. Then, there are exactly three remaining vertices other than x and its leaves. The connected subgraph induced by these three vertices together with x will contain a unique cycle. Therefore, there are exactly three possible graphs H up to isomorphism (see Figure 5). For the converse, by Corollary 2.1, we have that χ L (H) ≥ n − 3. Next, each of these three graphs has a locating-coloring with n − 3 colors (see Figure 5), hence χ L (H) ≤ n − 3. Therefore, for each of these graphs H, we have χ L (H) = n − 3. To complete the characterization, we have to find all the unicyclic graphs H of order n ≤ 7 with the required locating-chromatic number. Our search will be based on the length of the unique cycle C k in H.
There are exactly two non-isomorphic unicyclic graphs H of order n ≤ 7 with χ L (H) = n − 3 containing C k for k ≥ 5. Figure 6. Graphs C 6 , G 1 , G 2 , G 3 , G 4 , and G 5 , each with its minimum locating-coloring.
Proof. Let H be a unicyclic graph of order n ≤ 7 with χ L (H) = n − 3 and containing the cycle of length k ≥ 5. Then, k = 5, 6, or 7. If k = 7 then H ∼ = C 7 and χ L (C 7 ) = 3 (= n − 4), a contradiction. If k = 5 or 6, then H must be isomorphic to C 6 , G 1 , G 2 , G 3 , G 4 , or G 5 (see Figure 6). We can see that G 1 and G 5 are the only graphs having the required locating-chromatic number. Proof. Let H be a unicyclic graph of order n ≤ 7 containing C 3 . Since the order of H must be at least 6, then H must be a connected graph obtained from three rooted trees of total order n = 6 or n = 7, by connecting all roots into such a cycle C 3 . By Corollary 2.2, the diameter of H is at least 2 and at most 5. These restrictions lead to 25 possible graphs H up to isomorphism, as shown in Figure 7 with their minimum locating-colorings. Thus, there are only 12 of them having the required locating-chromatic number (inside the blue square).  Proof. Let H be a unicyclic graph of order n ≤ 7 containing C 4 . Since the order of H must be at least 6, then H must be a connected graph obtained from three rooted trees of total order n = 6 or n = 7, by connecting all roots into such a cycle C 4 . By Corollary 2.2, the diameter of H is at least 2 and at most 5. These restrictions lead to 13 possible graphs H up to isomorphism, as shown in Figure 8 with their minimum locating-colorings. Thus, there are only 8 of them having the required locating-chromatic number (inside the blue square), hence it completes the proof.