Locating and Identifying Codes in Circulant Graphs

Identifying and locating-dominating codes have been studied widely in circulant graphs. Recently, Ville Junnila et al. (Optimal bounds on codes for location in circulant graphs, Cryptography and Communications; 2019) studied identifying and locatingdominating codes in circulants Cn(1, d), Cn(1, d − 1, d), and Cn(1, d − 1, d, d + 1). In this paper, identifying, locating, and selfidentifying codes in the circulant graphs Cn(k, d), Cn(k, d − k, d), and Cn(k, d − k, d, d + k) are studied, and this extends Junnila et al.’s results to general cases.


Introduction
Let Γ � (V, E) be a graph with vertex set V and edge set E. We say vertices u and v are adjacent, if there is an edge between u and v in Γ. e distance d (u, v) is the number of edges of a shortest path between the vertices u and v, and it is denoted by d (u, v). For any vertex u ∈ V, the open neighborhood of u in Γ is denoted by A nonempty subset of vertices C⊆V is called code and its elements are called codewords, and the number of elements in it is called the order of C denoted by |C|. For a finite nonempty set S⊆V in a graph Γ � (V, E), we define the density of a code C⊆V in S by |S ∩ C|/|S|. A code C is called dominating if every vertex u of Γ is either in C or it has a neighbor in C. e I-set of a vertex u depending on a code C is defined by A set C ⊆V(Γ) is called a locating code in Γ, if C is a dominating code and for any distinct vertices u, v ∈ V, C, we have I(C; u) ≠ I(C; v). In a finite graph Γ, the smallest possible order of a locating code is denoted by c LD (Γ). A locating-dominating code with order c LD (Γ) is called optimal. A set C⊆V(Γ) is called an identifying code in Γ, if C is a dominating code and for any distinct vertices u, v ∈ V, we have I(C; u) ≠ I(C; v). e smallest possible order of an identifying code in a finite graph Γ is denoted by c ID (Γ). An identifying code with c ID (Γ) codewords is called optimal. A code C⊆V is self-identifying in Γ � (V, E) if for all distinct u, v ∈ V, I(C; u), I(C; v) ≠ ∅. In addition, there is an equivalent definition of self-identifying code [1,2]: C is a self-identifying code in Γ if and only if for all u ∈ V, we have In a finite graph Γ, the smallest possible order of a self-identifying code is denoted by c SID (Γ) and a self-identifying code with order c SID (Γ) is called optimal.
By definition, it is easy to see every identifying code is also a locating code and a self-identifying code is also an identifying code.
In 1988, to promote nuclear power plant safety, locating codes were first introduced by P. J. Slater [3]; vertices of a locating-dominating set S correspond to safeguards and an intruder corresponding to a vertex in V, S. In 1998, identifying codes were first introduced in a more general form by Karpovsky et al. [4].
Locating and identifying codes of some special graphs have been studied (see [5][6][7][8][9][10] for reference). Great efforts are made in studying locating and identifying codes in circulants. M. Ghebleh and L. Niepel studied locating and identifying code numbers of C n (1, 3) in [11], but they stated as an open question what happens in the graphs C n (1, d) with d being greater than 3 and mentioned that the methods used in their paper seem to be nonapplicable. So, Ville Junnila, Tero Laihonen, and Gabrielle Paris present a new approach to study identifying, locating-dominating, and self-identifying codes in the circulant graphs C n (1, d), C n (1, d − 1, d), and C n (1, d − 1, d, d + 1) using suitable grids in [12]. However, there is no relevant conclusion for the more general 4, 6, 8 degree circulant graphs. is is the motivation of this paper. Theorem 1. Let n, k, and d be positive integers such that n > 2 d > 2k ≥ 2, (k, d, n) � 1, and Γ � C n (k, d). en, Γ is connected and (2) Theorem 2. Let n, k, and d be positive integers such that n > 2 d > 4k, (k, d, n) � 1, and Γ � C n (k, d − k, d). en, Γ is connected and Theorem 3. Let n, k, and d be positive integers such that . en, Γ is connected and Remark 1 (i) ere is an infinite sequence of identifying codes in the circulant graphs C n (k, d − k, d) such that their density tends to 1/4.
(ii) We have an infinite sequence of identifying codes in the circulant graphs C n (k, d − k, d, d + k) such that their density tends to 2/9. (iii) All other bounds given above are optimal. Examples are given in this paper.

Infinite Grids and Circulant Graphs
In order to study the codes of circulant graphs, we first give the necessary and sufficient conditions of these circulants to be connected.

Lemma 1.
Let n and d be positive integers and d ≥ 2. en, where (s 1 , n) � 1. So, there exists t 0 ∈ Z such that s 1 t 0 � 1(mod n), and then we have On the contrary, if (k, d, n) � l > 1, we have 〈k, d〉 � 〈l〉 < Z n , and C n (k, d) is not connected. In addition, 〈k, d − k, d〉 � 〈k, d − k, d, d + k〉 � 〈k, d〉. □ Next, we give definitions of infinite square, triangular, and king grids.
(i) e square grid S: the vertex set of the square grid is V � Z 2 , and vertex u � (x, y) ∈ Z 2 is adjacent to v if and only if v ∈ (x ± 1, y), (x, y ± 1) � N(S; u) (see Figure 1(a) for details). (ii) e triangular grid T: the vertex set of the triangular grid is V � Z 2 , and vertex u � (x, y) ∈ Z 2 is adjacent to v if and only if v ∈ N(S; u) ∪ (x { +1, y + 1), (x − 1, y − 1)} � N(T; u) (see Figure 1(b) for details). (iii) e king grid K: the vertex set of the king grid is Figure 2 for details).
In order to study the codes of circulant graphs, we give correspondences between circulant graphs and grids.
(i) Let Γ � C n (k, d) be a circulant graph. Let φ 1 be the mapping from the vertices in the square grid to vertices in Γ, such that (ii) Let Γ � C n (k, d − k, d) be a circulant graph. Let φ 2 be the mapping from the vertices in the triangular grid to vertices in Γ, such that 2 Discrete Dynamics in Nature and Society Let φ 3 be the mapping from the vertices in the square grid to vertices in Γ, such that Now, we will prove that these maps keep the adjacency relationships.
erefore, the map keeps the adjacency relationships. Discrete Dynamics in Nature and Society 3 erefore, the map keeps the adjacency relationships.
erefore, the map keeps the adjacency relationships. Next, we give the relationship about identifying, locating-dominating, and self-identifying code between the circulants C n (k, d), C n (k, d − k, d), and C n (k, d − k, d, d + k) and the square, triangular, and king grids.

Lemma 2. Let n, d, k, and t be positive integers such that
then there is an identifying code in the infinite square grid S with the density t/n. Analogous conclusions remain true for locating and self-identifying codes.
First, we show that C S is an identifying code in the square grid S. Suppose there are two distinct vertices x � (i, j) ∈ Z 2 and y � (i, j) + (a, b) ∈ Z 2 (a, b ∈ Z) in the square grid such that I(S; x) � I(S; y). Because C is a dominating set, so is C S , and then I(S; x) and I(S; y) are nonempty sets. So, we just need to consider the cases of N(y)). Without less of generality, we assume b ≥ 0 (otherwise, you just need to switch the roles of x and y). So, e proof is similar for the locating codes. Just notice that the vertices x � (i, j) ∈ Z 2 and y � x + (a, b) ∈ Z 2 are non-codewords, and their corresponding vertices i · k + j · d and (i + a) · k + (j + b) · d are also non-codewords in Γ. Now, we give the proof for self-identifying codes. By the definitions of identifying and self-identifying codes, we know every self-identifying code is also an identifying code. Suppose that C is a self-identifying code in Γ, C is also an identifying code in it. According to the above proof of identifying codes, we know C S is an identifying code in S. Next, we show that I(S; x), I(S; y) ≠ ∅ for any distinct vertices x � (i, j) ∈ Z 2 and y � x + (p, q) ∈ Z 2 (p, q ∈ Z).
Since C S is an identifying code, the result is true if d S (x, y) ≥ 3.
us, I[S; x], I[S; y] always contains a codeword of C S . is completes the proof.
□ Lemma 3. Let n, d, k, and t be positive integers such that with order t, then there is an identifying (locating or self − identifying) code in the infinite triangular grid T with the density t/n.
Now, we claim that C T is an identifying code in the triangular grid T. Suppose that C T is not an identifying code, so there are two distinct vertices x � (i, j) ∈ Z 2 and Because C is a dominating set, so is C T , and then I(T; x) and I(T; y) are nonempty sets. So, we just need to consider the cases of N(y)). Without less of generality, we assume b ≥ 0 (otherwise, you just need to switch the roles of x and y).  However, (a, b) ∈ T, I(T, x) ≠ I(T, y) by verifying all cases of (a, b) which contradicts to I(T; x) � I(T; y), so C T is an identifying code in T. e proof is similar for the locating-dominating codes. Just notice that the vertices x � (i, j) ∈ Z 2 and y � x + (a, b) ∈ Z 2 are non-codewords in T, and their corresponding vertices i · k + j · (d − k) and (i + a) · k+ (j + b)· (d − k) are also non-codewords in Γ. Now, we give the proof for self-identifying codes. Suppose that C is a self-identifying code in Γ (it is also an identifying code) and C T is an identifying code in T. Next, we show that I(T; x), I(T; y) ≠ ∅ for any distinct vertices x � (i, j) ∈ Z 2 and y � x + (p, q) ∈ Z 2 (p, q ∈ Z). Since C T is an identifying code, the result is true if d T (x, y) ≥ 3.
us, I[T; x], I[T; y] always contains a codeword of C T . We are done. □ Lemma 4. Let n, d, k, and t be positive integers such that n > 2 d > 4k, 2 d + k ≠ n, and 2 d + 2k ≠ n. If C is an identifying code in C n (k, d − k, d, d + k) with order t, then there is an identifying code in the infinite king grid K with the density t/n. Analogous conclusions remain true for locating and selfidentifying codes.
We first show that C K is an identifying code in the king grid K. Suppose there are two distinct vertices x � (i, j) ∈ Z 2 and y � (i, j) + (a, b) ∈ Z 2 (a, b ∈ Z) in the king grid such that I(K; x) � I(K; y). Because C is a dominating set, so is C K , and then I(K; x) and I(K; y) are nonempty sets. So, we just need to consider the cases of N(y)). Without loss of generality, we assume b ≥ 0 (otherwise, you just need to switch the roles of x and y). So, Moreover, because C is an identifying code, we have i · k + j · d ≡ (i + a) · k+ (j + b) · d(mod n). Hence, a · k + b · d ≡ 0(mod n). However, (a, b) ∈ K, I(K, x) ≠ I(K, y) by verifying all cases of (a, b) which contradicts to I(K; x) � I(K; y), so C K is an identifying code in K.
e proof is similar for the locating codes. Just notice that the vertices x � (i, j) ∈ Z 2 and y � x + (a, b) ∈ Z 2 are non-codewords in K, and their corresponding vertices i · k + j · d and (i + a) · k + (j + b) · d are also non-codewords in Γ. Now, we give the proof for self-identifying codes. Suppose that C is a self-identifying code in Γ (it is also an identifying code) and C K is an identifying code in K. Next, we show that I(K; x), I(K; y) ≠ ∅ for any distinct vertices

The Constructions for Lower Bounds
In this section, we will give codes in the circulant graphs of meeting or infinitely approaching the lower bounds. e following lemma gives optimal ID codes and LD codes in C n (k, d).
It is easy to verify that B 1 is an identifying code in C 20 (2, 3), where (2, 3, 20) � 1. Next, if we prove that all the I-sets I(C n (k, d), C 1 ; x) are nonempty and unique, then C 1 is an identifying code in C n (k, d). According to the structure of C 1 , it is easy to know that where x ≡ x 0 (mod 20) is an integer and 0 ≤ x 0 ≤ 19. Hence, I(C n (k, d), C 1 ; x) are nonempty for all x ∈ Z n . Next, suppose x ∈ Z n and y ∈ Z n are distinct vertices, and the following two cases are discussed: is contradicts the fact that B 1 is the identifying code in C 20 (2, 3). Case 1.2: x ≡ y(mod 20): Next, we show that N[C n (k, d), Assume that there are x, y ∈ Z n such that It is a contradiction. So, any vertex of Z n is dominated by a codeword of C 1 and I(C n (k, d), C 1 ; x) ≠ I (C n (k, d), C 1 ; y).
us, C 1 is an identifying code in C n (k, d). Case 2: let n ≡ 0(mod 20), k ≡ 3(mod 20), and d ≡ 5(mod 20). We define B 2 � 0, 1, 2, 11, 12, 13 { } and It is easy to verify that B 2 is an identifying code in C 20 (3,5), where (3, 5, 20) � 1. en, it is similar as in case 1 that C 2 is an identifying code in C n (k, d), where (k, d, n) � 1 (just notice x and y are assumed to be non-codewords). □ In the next theorem, we give an infinite sequence of identifying codes which infinitely approach the lower bound for identifying codes in eorem 2. Proof. Let k > 1 be even, d � 3k − 1 be odd, and n � 6k. Let It is easy to see that code C d has order 3[k/2 + 1]. erefore, lim k⟶∞ |C d |/n � 1/4. Next, we will prove that C d is an identifying code in C n (k, d − k, d).
{ }, we know only I(x) contains elements x + d and x − d at the same time. So, I(x) ≠ I(y) for any x ≠ y. If k ≤ s ≤ 2k − 1 or s � 0 and x ≡ s(mod2k) is even, then we have In summary, C d is an identifying code in C n (k, d − k, d) and their density tends to 1/4. □ Now, we give the construction of optimal locating and identifying codes in the circulant graph C n (k, d − k, d, d + k). Theorem 6. Let C n (k, d − k, d, d + k) be a circulant graph with k, d, n positive integers such that n > 2 d > 4k, 2 d + k ≠ n, 2 d + 2k ≠ n, and (k, d, n) � 1. 6 Discrete Dynamics in Nature and Society (i) For k � 2, d � 9, n ≥ 30, and n ≡ 0(mod10), then c LD (C n (2,7,9,11)) � (n/5).

(ii) We have an infinite sequence of identifying codes in
the circulant graphs C n (k, d − k, d, d + k) such that their density tends to 2/9.

Proof.
(i) Let k � 2, d � 9, n ≥ 30, and n ≡ 0(mod10). Denote a code Next, we will verify C ′ is a locating code in C n (2,7,9,11). According to the above conditions, we can obtain the I-sets of non-codewords x of modulo 10. Let x ≠ y. Next, we just need prove that I(x) ≠ I(y) for any non-codewords x and y, and the following two cases are discussed.
Case 2: x ≡ y(mod10).: in this case, the codewords in I(x) are translated along Z n to obtain the codewords in I(y), so I(x) ≠ I(y) for any x ≡ y(mod10). (ii) Let k � 5, d ≥ 15, d ≡ 3(mod6), and n � 3 d − 9 (n ≡ 0(mod6)). Next, we divide the vertices of the circulant graph into three parts: . We define the code Next, we will add another 7 codewords to C d and get C d ′ , so as to construct an identifying code of circulant graph. e value C d /n tends to 2/9 when d tends to infinity. Firstly, we remove some "borderline" vertices from above three parts and denote A 1 ′ � A 1 , 0, 1, 2, 3, 4, 5, 6,7,8,9,10,11,12,13 . ese borderline vertices are discussed at the end. Let us first check the I-sets According to Tables 3-5, these I-sets are analyzed and compared. Obviously, when |I(x)| � 1, the I-sets are different. Now, consider the case of |I(x)| � 2. In Tables 3, 4, and 5, we can see the distances d(c 1 , c 2 ) � c 1 − c 2 with c 1 > c 2 . If the distance d(c 1 , c 2 ) is different, the I-sets are also different, and if the distance d(c 1 , c 2 ) is same, the c 1 (mod6) and c 2 (mod6) are different as shown in Tables 3-5, so the I-sets cannot be the same. e following is the case of |I(x)| � 3. From Tables 3, 4, and 5, we can see that I-sets are different except for x ∈ A 1 ′ , where x ≡ 2(mod6) and y ∈ A 3 ′ (y ≡ 2(mod6)). However, through verification, we can get d(c 1 , c 2 ) � d − 4 in I(x), where c 1 � 5(mod6), c 2 � 0(mod6), and d(c 1 , c 2 ) � d − 14 in I(y), where c 1 � 5(mod6) and c 2 � 0(mod6). Consequently, I(x) ≠ I(y) if x, y ∈ A 1 ′ ∪ A 2 ′ ∪ A 3 ′ and x ≠ y.
Discrete Dynamics in Nature and Society