Adaptive Identification of Sets of Vertices in Graphs

In this paper, we consider a concept of adaptive identiﬁcation of vertices and sets of vertices in different graphs, which was recently introduced by Ben-Haim, Gravier, Lobstein and Moncel (2008). The motivation for adaptive identiﬁcation comes from applications such as sensor networks and fault detection in multiprocessor systems. We present an optimal adaptive algorithm for identifying vertices in cycles. We also give efﬁcient adaptive algorithms for identifying sets of vertices in different graphs such as cycles, king lattices and square lattices. Adaptive identiﬁcation is also considered in Hamming spaces, which is one of the most widely studied graphs in the ﬁeld of identifying codes.


Introduction
Let G = (V, E) be a simple connected undirected graph with V as the set of vertices and E as the set of edges.Assume that the set V of vertices of G is finite.Then the set E of edges of G is also finite.A non-empty subset of V is called a code, and its elements are called codewords.The distance d(x, y) is the number of edges in any shortest path between the vertices x and y.Let r be a positive integer.We say that x r-covers y if d(x, y) ≤ r.Define then the r-ball B r (x) of radius r centered at x ∈ V by B r (x) = {y ∈ V | d(x, y) ≤ r}.
If all the r-balls in G have the same cardinality, then the cardinality of an r-ball is denoted by V r (G).For X ⊆ V , we denote B r (X) = x∈X B r (x).
Let C ⊆ V be a code and X be subset of V .An I-set of the set X with respect to the code C is I r (C; X) = I r (X) = B r (X) ∩ C. † Email: viljun@utu.fi1365-8050 c 2012 Discrete Mathematics and Theoretical Computer Science (DMTCS), Nancy, France A code C is called an r-covering (or an r-covering code), if the set I r (C, x) is non-empty for all x ∈ V .In other words, each vertex in G is r-covered by at least one codeword.The minimum cardinality of an rcovering of G is denoted by γ r (G).A code C is called an r-packing, if the number of vertices in I r (C, x) is at most one for all x ∈ V .In other words, the r-balls centered at the vertices of C are all pairwise disjoint.The maximum cardinality of an r-packing of G is denoted by c r (G).If a code C is both an r-covering and an r-packing of G, then C is called an r-perfect code.If there exists an (r, ≤ )-identifying code for a graph G = (V, E), then G is said to be (r, ≤ )identifiable.
The original motivation for identification comes from fault detection in multiprocessor systems [15].A multiprocessor system can be modeled as a graph, where vertices are seen as processor and edges as links between processors.A set of processors C ⊆ V corresponding to an identifying code is chosen.Then each processor in C sends an alarm signal, if there exists a faulty processor in its neighborhood.Now the set of alarming processors corresponds to an I-set I(X) of the identifying code, where X is the set of faulty processors.Hence, the set of faulty processors X can be located since each I-set is unique.Identifying codes can also be applied, for example, to sensor networks, where they are used in design of location and detection systems [17].The most studied underlying graphs for identification are, e.g., square and king lattices, Hamming spaces and cycles [16].
Assume that a given graph G may contain faulty vertices and that we can ask whether there is a faulty vertex (or faulty vertices) in B r (x) for all x ∈ V .The query Q r : V −→ {0, 1} is equal to 1 for x ∈ V , if there is a faulty vertex in B r (x), else Q r (x) is equal to 0. We also say that a vertex y ∈ V is r-covered by a query Q r (x) (x ∈ V ), if y belongs to the r-ball B r (x).Now the problem is to locate the faulty vertices using the queries Q r (x).The definition of identifying codes guarantees that if C ⊆ V is an (r, ≤ )-identifying code in G, then by asking simultaneously all the queries Q r (c) for c ∈ C we can locate in one step all the faulty vertices in G (assuming that there are at most faulty vertices in G).
The definition of identifying codes is based on the fact that all the queries have to be asked simultaneously.However, adaptive identification, which has been recently introduced in [2], is based on the idea that the queries can be asked one after the other, i.e. that a new query may depend on the answers given by the previous queries.In what follows, we call the identifying codes in Definition 1.1 as regular to distinguish them from the adaptive ones.
Let be the maximum number of faulty vertices in a graph G.The minimum cardinality of an (r, ≤ )identifying code in G is then denoted by i (r,≤ ) (G).In adaptive identification, the corresponding value is the minimum number of queries required in the worst case to identify the (at most ) faulty vertices and it is denoted by a (r,≤ ) (G).We also say that an algorithm (or a series of queries) A is adaptive (r, ≤ )-identifying, if it can identify the at most faulty vertices in G using only the queries Q r (x) (x ∈ V ).
In Ben-Haim et al. [1], [2] and [3], adaptive (r, ≤ 1)-identification is considered in torii of square and king lattices.They suggest that further study would be needed in these torii when > 1.This motivated the study in Sections 2.2 and 2.4.Adaptive (r, ≤ )-identification in cycles and Hamming spaces are studied in Sections 2.1 and 2.3, respectively.
In adaptive (r, ≤ )-identification (and in regular (r, ≤ )-identification), it is common that we encounter problems with large .Namely, the considered graph is no longer (r, ≤ )-identifiable with large enough .For example, square and king lattices are not (r, ≤ )-identifiable when r > 1 and ≥ 3. Therefore, we introduce a slightly modified version of adaptive (r, ≤ )-identification in Section 3 to enable the handling of larger , for example, in king lattices.

Adaptive identification
The following theorem is a generalized version of Theorem 1 in [1,2].
Theorem 2.1 Let r and be positive integers.Assume G is an (r, ≤ )-identifiable graph such that each r-ball in G has the same cardinality.Then we have Proof: Let G = (V, E) be an (r, ≤ )-identifiable graph such that each r-ball in G has the same cardinality.Consider then an algorithm A that is adaptive (r, ≤ )-identifying.It is clearly possible that the values given by the first c r (G) − 1 queries of A are all equal to 0, i.e. that there are no faulty vertices in the r-balls of the first c r (G) − 1 queries.After the first c r (G) − 1 queries there are still at least |G| − (c r (G) − 1)V r (G) vertices that are not r-covered by any of the previously asked queries.Furthermore, we know that among these uncovered vertices there exist from 0 to faulty vertices.Therefore, the number of different possibilities for these faulty vertices to be among these uncovered vertices is i=0 K i , where K = |G| − (c r (G) − 1)V r (G).Hence, we need at least log 2 ( i=0 K i ) queries to locate these faulty vertices or to conclude that there are none.Thus, the following lower bound follows: is the maximum number of vertices in an r-packing of G. Thus, the slightly weaker lower bound of Theorem 1 in [1,2] immediately follows from the previous result:

Adaptive identification in cycles
Let G be a cycle of length n, i.e. a cycle with n vertices.Regular identification in cycles have been studied, for example, in [5], [10] and [18].The following theorem provides the accurate value for the number of queries a (r,≤1) (G) needed in the adaptive (r, ≤ 1)-identification of G, when n > 2r + 1.Notice also that if n ≤ 2r + 1, then the cycle G is not (r, ≤ 1)-identifiable.
Theorem 2.2 Let G be a cycle of length n.If n = 2r + 1 + k with 1 ≤ k ≤ 2r, then we have If n ≥ 2(2r + 1), then we have Proof: Let G = (V, E) be a cycle of length n and V = {x 1 , x 2 , . . ., x n }.Consider first the result (1) for the cycles of length n = 2r + 1 + k with 1 ≤ k ≤ 2r.Notice that now each query outputting 1 tell us that one of the vertices covered by the query is faulty and also that none of the k uncovered vertices is faulty.Let us begin by showing a lower bound on a (r,≤1) (G) when n = 2r + 1 + k with 1 ≤ k ≤ 2r.We can assume that the first query asked outputs value 1.Therefore, the faulty vertex is one of the 2r + 1 vertices covered by the first query.We can assume that the next (2r+1)/k −1 queries also output value 1.By the considerations in the first paragraph above, there still exists at least 2r + 1 − k( (2r + 1)/k − 1) vertices such that exactly one of them is faulty.Hence, we still need at least log 2 (2r + 1 − k( (2r + 1)/k − 1)) queries to locate the faulty vertex.Thus, at least (2r + 1)/k + log 2 (2r + 1 − k( (2r + 1)/k − 1)) queries is needed to identify the faulty vertex.Now the following algorithm is adaptive (r, ≤ 1)-identifying: 1. Begin by asking the query Q r (x r+1 ).If Q r (x r+1 ) = 0, then there does not exist any faulty vertex in B r (x r+1 ).Hence, the possible faulty vertex belongs to the remaining k vertices, which are consecutive ones in a cycle.Therefore, since k ≤ 2(2r + 1) + 1, we obtain using dichotomic (or binary) search (as in the step 3) that at most log 2 (k + 1) queries are needed to locate the faulty vertex among the remaining k vertices or to conclude there is none.It can be easily verified that in this case we use at most If the query Q r (x r+1+jk ) = 0 for some j, then the faulty vertex belongs to the set {x (j−1)k+1 , x (j−1)k+2 , . . ., x jk }, which consists of k consecutive vertices.Now the faulty vertex can be located in this set as in the step 3. Again it is easy to verify that also in this case we need at most 3. Assume now that all the (2r + 1)/k queries asked in the previous steps outputted the value 1.
Then the faulty vertex is one of the remaining 2r + 1 − k( (2r + 1)/k − 1) vertices in the set Therefore, the faulty vertex can now be located by dichotomic search using at most log 2 (2r + 1 − k( (2r + 1)/k − 1) queries.By the considerations in the first paragraph, the dichotomic search can now, indeed, be used since 2r + 1 − k( (2r + 1)/k − 1) < 2k and there are k (2r + 1)/k consecutive vertices that are known to be not faulty (the set of uncovered vertices can now always be divided into two roughly equal halves).
Thus, we need at most (2r + 1)/k + log 2 (2r + 1 − k( (2r + 1)/k − 1)) queries to locate the faulty vertex or to conclude there is none.In conclusion, the first result (1) of the claim holds.Consider then the result (2) for the cycles with length n ≥ 2(2r + 1).Denote first n = q 1 (2r + 1) + q 0 , where 0 ≤ q 0 < 2r + 1.Then consider the upper bound on a (r,≤1) (G).The following algorithm is adaptive (r, ≤ 1)-identifying: then there exists a faulty vertex in B r (x j(2r+1)−r ).The vertices in the ball are clearly consecutive and, therefore, we can locate the faulty vertex by dichotomic (or binary) search as in step 2. Thus, the number of queries needed in this case is bounded above by the value given in the equation (2).
2. Assume then that all the vertices r-covered by the queries in step 1 are not faulty.Now there are still 2r + 1 + q 0 vertices that are not r-covered by any of the queries from step 1.Since the number of uncovered vertices is 2r + 1 + q 0 < 2(2r + 1), the possible faulty vertex can be located by dichotomic search.Hence, we need at most log 2 (2r + 1 + q 0 + 1) queries in this step.
Theorem 2.3 Let G be a cycle of length n.If n ≥ 3(2r + 1), then we have Proof: Let G = (V, E) be a cycle of length n and V = {x 1 , x 2 , . . ., x n }.Denote also n = q 1 (2r+1)+q 0 , where 0 ≤ q 0 < 2r + 1.The following algorithm is adaptive (r, ≤ 2)-identifying: 1.For i = 1, . . ., q 1 , we first ask the queries Q r (x i(2r+1)−r ).If two of these queries give value 1, then we proceed as in step 3. Assuming this is not the case, we need to ask one additional (carefully chosen) query.If the first query Q r (x r+1 ) = 1, then the additional query is , where the index of x is subtracted by n if it is larger than n.Notice that each vertex in G has now been r-covered by a query and that if two queries output value 1, then there exist two faulty vertices in G (one in each query giving value 1).
2. If all the queries in step 1 output value 0, then there clearly exist no faulty vertices in G.
3. If two of the queries in step 1 give value 1, then there are exactly two faulty vertices in G. Namely, one faulty vertex in each r-ball corresponding to the queries outputting 1. Denote these r-balls containing a faulty vertex by B 1 and B 2 .Note that the vertices in B 1 and B 2 are consecutive ones.Hence, the faulty vertex in B 1 (or B 2 ) can be located by dichotomic search and, in particular, using queries that do not r-cover vertices from B 2 (or B 1 ).(Here we use the assumption that n ≥ 3(2r + 1).)Therefore, the faulty vertices can be located by dichotomic search using at most 2 log 2 (2r + 1) queries.
4. If there is exactly one query giving value 1, then we know that this query is r-covering 1 or 2 faulty vertices.Denote the considered r-ball by B = {y 1 , y 2 , . . ., y 2r+1 } and assume that the two vertices adjacent to y 1 are y 0 and y 2 .The faulty vertices in B can then be located as follows: (i) First the r-ball B is divided into two halves B 1 = {y 1 , . . ., y (2r+1)/2 } and B 2 = {y (2r+1)/2 +1 , . . ., y 2r+1 }.Then we find out whether there is a faulty vertex in B 1 or B 2 using the queries Q r (y 0 ) and Q r (y 2r+1 ).
(ii) If the halves B 1 and B 2 both contain a faulty vertex, then the faulty vertices from B 1 and B 2 can be separately located by dichotomic search.Otherwise, we know that only either B 1 or B 2 contain faulty vertices.For simplicity, assume that B 1 contains faulty vertices.Then we proceed as in step (i), but we replace the set B by B 1 .
Thus, in step 4 we locate the faulty vertices using at most 2 log 2 (2r + 1) queries.
In conclusion, the algorithm locates the faulty vertices using at most q 1 + 1 + 2 log 2 (2r + 1) queries.Thus, the claim follows. 2 Notice that the difference between the lower bound (3) and the upper bound (4) is at most 4 queries for any r and n.Indeed, this can be concluded by estimating the term with logarithm in the lower bound when the term with logarithm in the upper bound gives a fixed value.Hence, we conclude that the upper and lower bounds differ only by a constant (for any radius r).

Adaptive identification in torii of king lattice
Let p and q be positive integers.The graph T k p,q = (V, E) is a p × q torus in the king lattice, if the vertex set is and the edge set is where the first coordinate is calculated modulo p and the second coordinate is calculated modulo q (see Figure 1).Consider then an r-ball in T k p,q .The r-ball B r ((x, y)), which is shortened as B r (x, y), can be seen as a (2r + 1) × (2r + 1) square in the king lattice since Now it is easy to see that there exists an r-perfect code C ⊆ T k p,q if and only if both p and q are dividable by 2r + 1.
Proof: Assume p and q are positive integers dividable by 2r + 1.Let T k p,q be a torus in the king lattice with pq vertices.Now there exists an r-perfect covering C of T k p,q .The following algorithm is adaptive (r, ≤ 2)-identifying: 1.For every c ∈ C ask the query Q r (c).
2. If all the queries output value 0, then there clearly exist no faulty vertices in T k p,q .
3. If two queries output r-covered by a query can now found as follows: we first locate by dichotomic search the column containing a faulty vertex and then from this column we identify the faulty vertex again using dichotomic search.(Notice that suitable queries used in dichotomic searches can be found even if the r-balls of the two queries are next to each other.Here we actually use the assumption that p ≥ 3(2r + 1) and q ≥ 3(2r + 1).)In conclusion, we need at most 4 log 2 (2r + 1) queries in this step.

4.
If there is exactly one query outputting value 1, then this query is r-covering 1 or 2 faulty vertices.
Using similar ideas as in the proof of Theorem 2.3, we can locate the columns (or a column) containing faulty vertices using at most 2 log 2 (2r + 1) queries (consider columns in the king lattice as the vertices in cycles) and then from these columns (or a column) identify the faulty vertices using at most 2 log 2 (2r + 1) queries.Thus, we need at most 4 log 2 (2r + 1) queries in this step.
In conclusion, the previous algorithm identifies the faulty vertices using at most pq/(2r+1) 2 +4 log 2 (2r+ 1) queries. 2 Using similar arguments as in the case of cycles, we conclude that the difference between the lower bound ( 5) and the upper bound ( 6) is at most 5 queries for any r.

Adaptive identification in Hamming spaces
In this subsection, we consider adaptive (1, ≤ )-identification in binary Hamming spaces.Let n be a positive integer.The binary Hamming space F n is the n-fold Cartesian product of the binary field F = {0, 1}.The Hamming distance d(x, y) between words x, y ∈ F n is the number of coordinate places in which they differ.The following simple lemma, which is needed in the sequel, can be easily proven.
Lemma 2.5 Let x, y ∈ F n .Then We begin by considering adaptive (1, ≤ 1)-identification in Hamming spaces.The following lemma is needed in the proof of Theorem 2.7, which provides a lower bound for a (1,≤1) (F n ).Lemma 2.6 Let X be a non-empty subset of F n .Assume that there is 0 or 1 faulty words in X.Then an adaptive (1, ≤ 1)-identifying algorithm needs at least |X| 2 queries, which are centered at a word in F n , to locate the faulty word in X or to conclude that there is none.
Proof: Let X be a non-empty subset of F n and let A be an algorithm that identifies the faulty word in X using queries from F n .Define then k as the maximum number of words in X that are 1-covered by a (1) By the previous definition, a query Q 1 (x) with x ∈ F n can 1-cover at most k words of X. Assume that the first |X|/k − 1 queries of A output value 0. Now there still exist at least k words that are not 1-covered by any of the previous queries, and we need at least log 2 (k + 1) queries to locate the faulty word among these uncovered words or to conclude that there is none.Thus, the number of queries used in A is at least |X|/k − 1 + log 2 (k + 1) .If k = 1, then the claim clearly follows.Otherwise, we need at least |X|/k queries in the algorithm A.
(2) On the other hand, we know by Lemma 2.5 that the number of words in the intersection of two different 1-balls of F n is at most 2. Let then x ∈ F n be a word such that the number of words in B 1 (x) ∩ X is equal to k. Assume that there exists a faulty word in B 1 (x) ∩ X.Using similar arguments as in the first lower bound from (1), we obtain that the number of queries used in Therefore, the number of queries needed is at least k/2.
By the considerations above, the number of queries needed in A is at least max{|X|/k, k/2}.Therefore, by straightforward analysis, it can be concluded that (with any choice of k) the number of queries needed is at least |X| 2 .

2
The following theorem provides a lower bound for a (1,≤1) (F n ).
Theorem 2.7 We have Proof: Let algorithm A be an adaptive (1, ≤ 1)-identifying code (in F n ).(Notice that the size of a ball of radius 1 in F n is equal to n + 1.) Assume then that the first c 1 (F n ) − (n + 1)/8 queries of A output value 0. (By simple analysis, it can be shown that the number of queries c 1 (F n ) − (n + 1)/8 is chosen in such a way that it gives the best possible lower bound using this approach.)Then the number of words that are not 1-covered by the previous queries is at least (n + 1)/8 (n + 1).Therefore, by Lemma 2.6, the number of queries used in A is at least where the second inequality is 4 or not. 2 The following provides an upper bound for a (1,≤1) (F n ).
Theorem 2.8 We have Proof: Denote then by e i the word in F n that has value 1 in the ith coordinate place and value 0 in all other places.Now the following algorithm is adaptive (1, ≤ 1)-identifying: for any i = 1, . . ., |C| − 1, then the faulty word in B 1 (x i ) can be located as in the following step 2.
2. Assume then that all the previous queries output value 0, meaning that none of these queries do not 1-cover any faulty word.Now we can assume without loss of generality that x |C| = 0.For i = 1, . . ., n/2 −1 ask the query Q 1 (e 2i−1 +e 2i ).If now for any i we have Q 1 (e 2i−1 +e 2i ) = 1, then the faulty word can be located using one more suitably chosen query.Hence, assume that none of the previous queries 1-cover any faulty word.Now it can be easily seen that we only need two more queries to locate the faulty word in the remaining words or to conclude that there are none.
In conclusion, the previous algorithm uses at most Let then F n be a Hamming space with integers n = 2 s − 1 and s ≥ 3.By [7], we know that there now exists a 1-perfect covering of F n .Hence, we have c 1 (F n ) = γ 1 (F n ) = 2 n /(n + 1).Therefore, for the previous lengths, Theorems 2.7 and 2.8 can be written as follows: As above, assume that n = 2 s − 1 and s ≥ 3. Consider then adaptive (1, ≤ )-identification in F n with > 1. Theorem 2.7 naturally provides a lower bound also for a (1,≤ ) (F n ).The following theorem gives us then an upper bound on a (1,≤ ) (F n ).Theorem 2.9 Let n and s be integers such that n = 2 s − 1 and s ≥ 3.If now < n/6 + 1, then we have Using c 1 (F n ) queries, we can now locate the 1-balls centered at the words of C which contain faulty words.Assume then that the 1-balls B 1 (x 1 ), B 1 (x 2 ), . . ., B 1 (x k ) with 1 ≤ k ≤ are the ones containing faulty words.Denote the set consisting of these 1-balls by S.
Consider then locating the faulty words inside B 1 (x 1 ).We can assume without loss of generality that x 1 = 0. We would now like to 1-cover B 1 (0) using m words of weight two and 1 word of weight one one and two which 1-cover words from other 1-balls containing faulty words.The choice of m words of weight two and 1 word of weight one that 1-cover B 1 (0) is called a partition of B 1 (0).Notice that if x and y are two different words in a partition of B 1 (0), then the intersection of the sets B 1 (x)∩B 1 (0) and B 1 (y)∩B 1 (0) is empty.A partition is called unavailable, if some of the words in the partition 1-cover words in other 1-balls containing faulty words.In what follows, we show that all partitions are not unavailable.
The number of all different partitions is equal to where the numerator is the usual multinomial coefficient and the number of 2's in it is equal to m.Notice that all the 1-balls of S that make partitions unavailable are centered at words of weights three or four, since words that are of weight at most two are not included in the 1-perfect code C and words of weight at least five cannot clearly make partitions unavailable.Hence, we consider the number of partitions that are made unavailable by a 1-ball of S centered at a word of weight three or four.Each 1-ball centered at a word of weight three that contains faulty words produces at most unavailable partitions.Each 1-ball centered at a word of weight four that contains faulty words produces at most unavailable partitions.Hence, by the equations ( 7), ( 8) and ( 9), the number of available partitions is at Since k ≤ < n/6 + 1, the number of available partitions is positive.Thus, there exists a partition that is not unavailable.In conclusion, we need at most m + 1 = (n + 1)/2 queries to locate which of the m pairs of two words of weight one contain faulty words and whether there exist faulty words in the pair containing the last word of weight 1 and the word 0.
Assume now that a pair {e i1 , e i2 } contains faulty words, where i 1 , i 2 ∈ {1, 2, . . ., n} (e i defined as in the proof of Theorem 2.8).In order to conclude whether e i1 is a faulty word, we need a word e i1 + e j of weight two such that B 1 (e j ) \ {e i1 } contains no faulty vertices, i.e. e j is not included in any of the pairs containing faulty words in B 1 (x 1 ) and B 1 (e j ) does not intersect with any of the 1-balls of S other than B 1 (x 1 ).Now we have that the number of such words of weight two is at least Since < n/6 + 1, the previous number of words is positive.Hence, there exists a word of weight two satisfying the previous conditions.Assume then that the pair {0, e i } (i ∈ {1, 2, . . ., n}) contain faulty words.Using similar counting arguments as before, we can show that the faulty words can be found in this pair by at most each pair containing them.If k , then, by the previous considerations and by the fact that now we need only one query to identify the faulty word from a pair {e i1 , e i2 }, we need at most queries to locate the faulty words in F n .If 1 ≤ k ≤ − 1, then we also need at most queries.Thus, the claim follows. 2 Remark 2.10 It should be noted that the upper bound of the previous theorem can be sharpened to c 1 (F n ) + • (n + 1)/2.This slight improvement is obtained by more detailed considerations in the last paragraph of the proof (as pointed out by an anonymous referee).

Adaptive identification in square lattices
Let p and q be positive integers.The graph T p,q = (V, E) is a p × q torus in the square lattice, if the vertex set is and the edge set is E = {((i, j), (i, j + 1)), ((i, j), where the first coordinate is calculated modulo p and the second coordinate is calculated modulo q (see Figure 2). in square [4], [13] and [14].Consider (1, ≤ )-identification of T p,q .case with = 1 is considered in [1,2].If, on the other hand, ≥ 4, then it is easy to see that T p,q is not (1, ≤ )-identifiable.Hence, we concentrate on this subsection to the cases with = 2 and = 3.
The size of the 1-ball in T p,q is clearly 5, i.e.V 1 (T p,q ) = 5 (see Figure 2).By [8] and [9], we know that there exists a 1-perfect code of T p,q , if both p and q are dividable by 5.
Consider then adaptive (1, ≤ 2)-identification in T p,q .By Theorem 2.1, we have the lower bound The following theorem provides an upper bound for a (1,≤2) (T p,q ).Theorem 2.11 Let p and q be positive integers dividable by 5.If p ≥ 10 and q ≥ 10, then we have Proof: The proof is similar to and even easier than the proof of Theorem 2.12.Therefore, the proof is omitted here.2 Consider then adaptive (1, ≤ 3)-identification in T p,q .Again by Theorem 2.1, we have the lower bound The following theorem provides an upper bound for a (1,≤3) (T p,q ).Theorem 2.12 Let p and q be positive integers dividable by 5.If p ≥ 15 and q ≥ 15, then we have Proof: Assume p and q are positive integers dividable by 5. Let T p,q be a torus in the square lattice with pq vertices.Now there exists a 1-perfect covering C of T p,q .In what follows, we present a sketch of an adaptive (1, ≤ 3)-identifying algorithm: using queries that 1-cover vertices in B y − 1).If Q 1 y − 1) = 0, then the faulty vertices can be found using queries Q 1 (x − 1, y − 1), Q 1 (x, y + 2) and Q 1 (x + 1, y − 1) as illustrated in Figure 3(a) (totally at most 4 queries).
We have still not considered the somewhat more problematic case when Q 1 (x − 1, y) = 0. Now we know that the vertex (x, y − 1) is faulty and that the vertices (x, y), (x − 1, y) and (x, y + 1) are not faulty (see Figure 3(c)).However, there exists no fourth query telling whether the vertex (x + 1, y) is faulty, since queries 1-covering vertices in B 1 (x + 2, y + 1) cannot be used.Therefore, we proceed next by locating the faulty vertices in the 1-ball B 1 (x + 2, y + 1) using similar queries as with B 1 (x, y).(Indeed, the faulty vertices can be located from B 1 (x + 2, y + 1) using at most 5 queries, since we know that the vertices (x, y) and (x, y + 1) are not faulty.)After locating the faulty vertices in B 1 (x + 2, y + 1), we can also conclude whether the vertex (x + 1, y) is faulty or not.Hence, we use in this case at most 9 queries to locate all the faulty vertices in T p,q .
In other cases, we also proceed by finding the faulty vertices (or a faulty vertex) in B 1 (x + 2, y + 1) using similar queries as with B 1 (x, y).Notice that if there is only one faulty vertex in a 1-ball, then it can be located using 4 queries, and if there are two faulty vertices, then they can be located using 5 queries.Hence, in all the cases we need at most 9 queries to locate all the faulty vertices in T p,q .
It should also be noted that if the two queries outputting 1 after step 1 are not next to each other we can still use similar techniques to locate the faulty vertices using at most 9 queries.
5. Assume then that three queries in step 1 output value 1.Now each of these queries 1-cover exactly one faulty vertex.There are again several cases, but here we consider only one case as an example (others are analogous).
Assume that the queries outputting 1 are Q 1 (x, y), Q 1 (x − 1, y + 2) and Q 1 (x + 2, y + 1).Ask then the query Q 1 (x − 1, y − 1) (see Figure 3(d)).If Q 1 (x − 1, y − 1) = 1, the faulty vertex can be found by the query Q 1 (x − 2, y).Otherwise the faulty vertex can be located by asking the query Q 1 (x + 1, y − 1) and depending on the answer we might need one auxiliary query.In conclusion, we need at most 3 queries to locate the faulty vertex in B 1 (x, y).Notice that these queries are chosen in such a way that they do not intersect with the balls B 1 (x − 1, y + 2) and B 1 (x + 2, y + 1).Therefore, we need at most 9 queries to locate the faulty vertices in T p,q .
With any other choice of the queries outputting 1 in step 1, we can always found the faulty vertices using at most 9 queries.
In conclusion, the previous algorithm shows that a (1,≤3) (T p,q ) ≤ pq 5 + 9. (x,y) Fig. 3: The proof of Theorem 2.12 illustrated.The black and squared vertices respectively represent faulty and nonfaulty vertices.Moreover, at least one of the grey vertices is faulty.Furthermore, the dashed squares represent the asked queries.

Definition 1 . 1
Let r and be positive integers.A codeC ⊆ V is said to be (r, ≤ )-identifying in G if for all X, Y ⊆ V such that |X| ≤ , |Y | ≤ and X = Y we have I r (C; X) = I r (C; Y ).If = 1, then we simply say that C is r-identifying.Remark 1.2 Let r and be positive integers.Then there exists an (r, ≤ )-identifying code C ⊆ V if and only if for all X, Y ⊆ V such that |X| ≤ , |Y | ≤ and X = Y we have B r (X) = B r (Y ).

Fig. 1 :
Fig. 1: A 2-ball centered at the black vertex is illustrated in the torus T k 7,7 .Notice that the vertices in the border are wrapped around as suggested by the definition of the edge set E.

Fig. 2 :
Fig. 2: A 1-ball centered at the black vertex is illustrated in the torus T7,7.