Vertex identification in trees

A red-white coloring of a nontrivial connected graph G of diameter d is an assignment of red and white colors to the vertices of G where at least one vertex is colored red. Associated with each vertex v of G is a d-vector, called the code of v, whose ith coordinate is the number of red vertices at distance i from v. A red-white coloring of G for which distinct vertices have distinct codes is called an identification coloring or ID-coloring of G. A graph G possessing an ID-coloring is an ID-graph. The minimum number of red vertices among all ID-colorings of an ID-graph G is the identification number or ID-number of G. Necessary conditions are established for those trees that are ID-graphs. A tree T is starlike if T is obtained by subdividing the edges of a star of order 4 or more. It is shown that for every positive integer r different from 2, there exist starlike trees satisfying some prescribed properties having ID-number r.


Introduction
Over the years, many methods have been introduced with the goal of uniquely identifying the vertices of a connected graph. Often these approaches have employed distance and coloring. The oldest of these methods deal with what is referred to as the metric dimension of a connected graph. For a nontrivial connected graph G of order n, the goal is to locate an ordered set W = {w 1 , w 2 , . . . , w k } of k vertices in G, 1 ≤ k ≤ n, and associate with each vertex v of G the k-vector (a 1 , a 2 , . . . , a k ), where a i is the distance d(v, w i ) between v and w i , 1 ≤ i ≤ k. If the n k-vectors produced in this manners are distinct, then the vertices of G have been uniquely identified. For each connected graph G, such a set W can always be found since we can always choose W = V (G). The primary problem here is to determine the minimum size of such a set W . This is referred to as the metric dimension of G. Equivalently, the metric dimension of a connected graph G can be defined as the minimum number of vertices of G that can be assigned the same color, say red, such that for every two vertices u and v of G, there exists a red vertex w such that d(u, w) = d(v, w). This parameter is defined for every connected graph.
Another method that has been studied to uniquely identify the vertices of a connected graph G has been referred to as the partition dimension of G. For a nontrivial connected graph G of order n, the goal is to obtain a k-coloring, 1 ≤ k ≤ n, of the vertices of G, where the coloring is not required (or expected) to be a proper coloring. This results in k color classes V 1 , V 2 , . . . , V k of V (G). For each vertex v of G, we once again associate a vector, here a k-vector (a 1 , a 2 , . . . , a k ) where a i denotes the distance from v to a nearest vertex in V i for 1 ≤ i ≤ k. If the vertices of G have distinct k-vectors, then the vertices of G have been uniquely identified. Such a coloring always exists since we can always assign distinct colors to the vertices of G, thereby obtaining a procedure that has similarity to metric dimension. The minimum number of colors that accomplishes this goal is referred to as the partition dimension of G. The partition dimension of a connected graph G can also be defined as the minimum number k of colors (denoted by 1, 2, . . . , k) that can be assigned to the vertices of G, one color to each vertex, so that for every two vertices u and v of G, there exists a color i such that the distance between u and a nearest vertex colored i is distinct from the distance between v and a nearest vertex colored i. This parameter is also defined for every connected graph.
Another method that has been introduced for the purpose of uniquely identifying the vertices of a connected graph is referred to as an identification coloring. Let G be a connected graph of diameter d ≥ 2 and let there be given a redwhite vertex coloring c of the graph G where at least one vertex is colored red. That is, the color c(v) of a vertex v in G is either red or white and c(v) is red for at least one vertex v of G. With each vertex v of G, there is associated a d-vector d(v) = (a 1 , a 2 , . . . , a d ) called the code of v corresponding to c, where the ith coordinate a i is the number of red vertices at distance i from v for 1 ≤ i ≤ d. If distinct vertices of G have distinct codes, then c is called an identification coloring or ID-coloring. Equivalently, an identification coloring of a connected graph G is an assignment of the color red to a nonempty subset of V (G) (with the color white assigned to the remaining vertices of G) such that for every two vertices u and v of G, there is an integer k with 1 ≤ k ≤ d such that the number of red vertices at distance k from u is different from the number of red vertices at distance k from v. A graph possessing an identification coloring is an ID-graph. A major difference here from the two methods described above is that not all connected graphs are ID-graphs.
The concept of metric dimension was introduced independently by Slater [15] and by Harary and Melter [10] and has been studied by many (see [4,7], for example). Slater described the usefulness of these ideas when working with U.S. Coast Guard Loran (long range aids to navigation) stations in [15,16]. Johnson [13,14] of the former Upjohn Pharmaceutical Company applied this in attempts to develop the capability of large datasets of chemical graphs. The concept of partition dimension was introduced in [6]. These concepts as well as other methods of vertex identifications in graphs have been studied by many with various applications (see [2,3,8,9,11,12,17,18] for example). The concepts of ID-colorings and ID-graphs were introduced and studied in [5].
All of the methods mentioned above involve constructing a vertex coloring of a connected graph G with the goal of producing a vertex labeling of G (using vectors of the same size as labels) so that distinct vertices of G have the distinct labels. Consequently, the goal of each of these methods is to obtain an irregular labeling of G. The general topic of irregularity in graphs is described in [2]. There is the related topic of obtaining a labeling of G by means of colorings where exactly two vertices of G have the same label. These are called artiregular labelings, a topic discussed in [1].
We first present five results obtained in [5] on ID-colorings. For an integer t ≥ 2, the members of a set S of t vertices of a graph G are called t-tuplets (twins if t = 2 and triplets if t = 3) if either (1) S is an independent set in G and every two vertices in S have the same neighborhood or (2) S is a clique, that is the subgraph G[S] induced by S is complete and every two vertices in S have the same closed neighborhood.   The following result describes a property of ID-colorings.
Since H contains all red vertices in G and d G (v, w) = d H (v, w) for every vertex w of G, it follows that a i = a i for 1 ≤ i ≤ d and so the restriction of c to H is an ID-coloring of H.
Both conditions stated in the hypothesis of Proposition 1.3 for a connected subgraph H of a graph G are needed. For example, consider the ID-graph G in Figure 1. The subgraph H 1 of G does not contain all red vertices of G while the subgraph H 2 is not distance-preserving. For i = 1, 2, the restriction of the ID-coloring c of G to the subgraph H i of G is not an ID-coloring of H i (since there are twins both of which are colored white).
Here, our emphasis turns to trees that are ID-graphs, namely ID-trees. We investigate structural problems of ID-trees, provide necessary conditions for trees to be ID-trees, and establish a realization result on ID-numbers of ID-trees satisfying some prescribed conditions.

ID-colorings of trees
The only t-tuplets, t ≥ 2, in a tree T are end-vertices of T , all with the same neighbor. As we saw, if T contains triplets, then T is not an ID-tree. If T contains twins and possesses an ID-coloring, then the twins must be colored differently in every ID-coloring. We now see that for trees, the concepts of twins and triplets are special cases of something more general.  If T is a tree with a vertex v possessing two isomorphic branches B 1 and B 2 , then B 1 and B 2 are twin branches at v if there is an isomorphism from B 1 to B 2 fixing v. If T contains a vertex v possessing three isomorphic branches B 1 , B 2 , and B 3 such that every two of them are twin branches, then B 1 , B 2 , and B 3 are triplet branches at v. If the size of each branch at v is 1, then T contains twins or triplets. For example, there are three isomorphic branches of size 5 at the vertex v of the tree T of Figure 2. However, T has twin branches at v but no triplet branches at v.
q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q  Let T 1 and T 2 be two rooted trees whose roots are v 1 and v 2 , respectively. Then T 1 and T 2 are considered to be isomorphic rooted trees, denoted Then c 1 and c 2 are considered to be isomorphic colorings, denoted Let T 0 be a tree of size k ≥ 1 rooted at a vertex v. If the color of v is fixed, say v is white, then there are at most 2 k distinct (non-isomorphic) red-white colorings of T 0 in which v is colored white. Consequently, if there are more than 2 k copies of a particular branch of size k at v, then T is not an ID-tree by Observation 2.1. In the case when k = 1, this simply says that no ID-tree can contain a triplet.
Let T be a tree rooted at a vertex v and let c be an ID-coloring of T . If T 0 is a subtree of T of minimum order rooted at v such that T 0 contains all red vertices in T , then the restriction of c to T 0 is an ID-coloring of T 0 by Proposition 1.3. Necessarily, all end-vertices of T 0 are red. In the case when T 0 is a path P k+1 of size k whose end-vertices are v and w, there are at most 2 k−1 distinct red-white colorings of P k+1 in which v is white and w is red.
A tree T is starlike if T is obtained by subdividing the edges of a star of order 4 or more. Equivalently, a tree T is starlike if and only if T has exactly one vertex whose degree is greater than 2. This vertex is referred to as the central vertex of T . If the degree of the central vertex v of a starlike T is k ≥ 3, then T has k branches (paths) at v, each branch containing v as an end-vertex of T . For example, the starlike tree T in Figure 3 has four branches at its central vertex. This tree is twin-free but does contain twin branches at its central vertex. This starlike tree is an ID-graph and an ID-coloring having exactly four red vertices is shown in Figure 3. In fact, ID(T ) = 4. branch is colored red. Thus, the minimum number of branches of size i at v without duplicating a red-white coloring of these branches is 2 i−1 . Therefore, the maximum number of all such red-white colorings of branches of all possibles sizes at v is Since there can be one branch of size k or less at v all of whose vertices are colored white, it follows that there can be 2 k branches at v such that the red-white colorings of every two isomorphic branches at v are different.
Corollary 2.1. Let T be a starlike tree whose largest branch at its central vertex v has size k. If T has more than 2 k branches at v, then T is not an ID-tree.
For example, if T is a starlike ID-tree whose largest branch at its central vertex v has size 3, then (1)   The tree of Figure 4(a) has eight branches of size 3 at its central vertex and no branches of size less than 3 at its central vertex. The tree of Figure 4(b) has four branches of size 3, four branches of size 2, and no branches of size 1 at its central vertex. The tree of Figure 4(c) has four branches of size 3, two branches of size 2, and two branches of size 1 at its central vertex. In each case, there are eight branches at the central vertex of the tree. The red-white colorings of the three trees in Figure 4 are essentially the same coloring. It can be shown that this coloring is an ID-coloring. For the red-white coloring of the tree T of Figure 4(c), partial codes of the vertices of T containing the initial coordinates of each code are shown in Figure 5. (These partial codes are sufficient to show that all codes are distinct.) Since every two distinct vertices of T have distinct codes, this red-white coloring is an ID-coloring of T . Suppose that d(x, v) = s and d(y, v) = t. We consider two cases, according to whether s = t or s = t. Case 1. s = t, say s < t. Then a s ∈ {0, 1} and b s ∈ {1, 2}. If a s = b s , then d(x) = d(y). Thus, we may assume that a s = b s = 1. Thus, a s+1 ∈ {k − 1, k} and b s+1 ∈ {0, 1}. Since k ≥ 3, it follows that a s+1 ≥ 2 and so a s+1 = b s+1 , implying that d(x) = d(y).
Case 2. s = t. Then x and y belong to different branches of T at v, say x ∈ V (B i ) and where then x = v s and y = u s . If m i − s + 1 = s, then a mi−s+1 = 0 and b mi−s+1 ≥ 1. If m i − s + 1 = s, then b mi−s+1 = a mi−s+1 + 1. In either case, d(x) = d(y). Therefore, c is an ID-coloring of T .

Starlike trees with prescribed ID-number
We saw in Theorem 1.3 that for every integer r ≥ 3, there exists a connected graph G with ID(G) = r. For such a given integer r, the graph G described in the proof of Theorem 1.3 contains r pairwise disjoint twins from which it follows that ID(G) ≥ r. It was therefore only necessary to show that ID(G) ≤ r. We now show that for every integer r ≥ 3, there exists a tree T with no twins at all such that ID(T ) = r. In addition, we show that there is a tree without twin branches having IDnumber r. In particular, we show that for every odd integer r ≥ 5 there is a twin-free tree T whose automorphism group contains (r + 1)! elements such that ID(T ) = r. We also show that there is a red-white coloring c of the same class of trees T where exactly r − 1 vertices are colored red such that d(x) = d(y) for exactly one pair x, y of vertices of T . Consequently, there is a red-white coloring of these trees T with exactly two vertices having the same code. As we metioned earlier, such a (red-white) coloring results in an antiregular labeling (see [1,2], for example.) For each integer r ≥ 3, let T = S r−1 (K 1,r+1 ) be the starlike tree obtained from the star K 1,r+1 of order r+2 by subdividing each edge of the r + 1 edges in K r+1 exactly r − 1 times. Let v be the central vertex of T . Then the degree of v is r + 1 and each of the r + 1 branches of T at v has length r. For each integer i with 0 ≤ i ≤ r, let B i = (v, v i,1 , v i,2 , . . . , v i,r ) be a branch of T at v. Then diam(T ) = 2r and T is twin-free. Proof. For an odd integer r ≥ 3, let T = S r−1 (K 1,r+1 ), where v is the central vertex of T and B i = (v, v i,1 , v i,2 , . . ., v i,r ) is a branch of T at v for 0 ≤ i ≤ r. First, we show that ID(T ) ≥ r. For any red-white coloring of T that assigns the color red to at most r − 1 vertices of T , there are at least two branches, say B 0 and B 1 , of T at v such that the paths B 0 − v and B 1 − v contain no red vertices of T . However then, d(v 0,1 ) = d(v 1,1 ), for example, and so this red-white coloring is not an ID-coloring of T . Therefore, ID(T ) ≥ r.
Next, we show that T has an ID-coloring with exactly r red vertices. Define a red-white coloring c of T by assigning the color red to each vertex v i,i for 1 ≤ i ≤ r and white to the remaining vertices of T . Thus, T has exactly r red vertices. It remains to show that c is an ID-coloring of T . Since diam(T ) = 2r, the code of each vertex of T is a (2r)-vector. Let x and y be two distinct vertices of T . We consider two cases, according to whether x and y are both red or both white. Let d(x) = (a 1 , a 2 , . . . , a 2r ) and d(y) = (b 1 , b 2 , . . . , b 2r ). Case 1.
x and y are both red. Let x = v i,i and y = v j,j where 1 ≤ i < j ≤ r.
First, suppose that j = r. Since (1) the last nonzero coordinate in d(v i,i ) is the (i + r)th coordinate where i + r = d(v i,i , v r,r ) and the last nonzero coordinate in d(v j,j ) is the (j + r)th coordinate where j + r = d(v j,j , v r,r ) and (2) i < j, it follows that a j+r = 0 and b j+r = 1 and so d(x) = d(y).
Next, suppose that j = r. We saw that the last nonzero coordinate in d( . Thus, we may assume that x = v r−1,r−1 . Because the first nonzero coordinate in d(v r−1,r−1 ) is the rth coordinate where r = d(v 1,1 , v r−1,r−1 ) and the first nonzero coordinate in d(v r,r ) is the (r + 1)th coordinate where r + 1 = d(v 1,1 , v r,r ), it follows that a r = 1 and b r = 0 and so d(x) = d(y).
x and y are both white. First, we make some observations on the codes of vertices on B 0 .
• The vertices on B 0 are the only white vertices of T whose codes contain the r-tuple (1, 1, . . . , 1) = 1 r as a subsequence. The vertex v is the only white vertex of T such that the first r coordinates of its code are 1 (that is, d(v) = (1 r , 0 r )). For 1 ≤ t ≤ r, the vertex v 0,t is the only white vertex such that in d(v 0,t ) the first t coordinates and the last r − t coordinates are 0 while the remaining coordinates are 1 (that is, Thus, all codes of the vertices of B 0 are distinct and they are also distinct from the codes of those white vertices that are not in B 0 . Hence, we may assume that neither x nor y belongs to B 0 . Let Q i = B i − v = (v i,1 , v i,2 , . . . , v i,r ) be the subpath of B i for 1 ≤ i ≤ r. We consider two subcases, according to the location of x and y.
First, suppose that i = r. Since (1) the last nonzero coordinate in d(v i,p ) is the (p + r)th coordinate where p + r = d(v i,p , v r,r ) and the last nonzero coordinate in d(v i,q ) is the (q + r)th coordinate where q + r = d(v i,q , v r,r ) and (2) p < q, it follows that a q+r−1 = 0 and b q+r−1 = 1 and so d(x) = d(y).
Next, suppose that i = r. Since (1) the last nonzero coordinate in d(v r,p ) is the (p+r −1)th coordinate where p+r −1 = d(v i,p , v r−1,r−1 ) and the last nonzero coordinate in d(v r,q ) is the (q +r −1)th coordinate where q +r −1 = d(v i,q , v r−1,r−1 ) and (2) p < q, it follows that a q+r−1 = 0 and b q+r−1 = 1 and so d(x) = d(y).
and y = v j,q where 1 ≤ p, q ≤ r, p = i, and q = j. We consider two subcases, according to whether p = q or p = q.
Subcase 2.2.1. p = q. Then x = v i,p and y = v j,p where 1 ≤ i < j ≤ r and p / ∈ {i, j}.
(2) i < j, it follows that a p−j = 0 and b p−j = 1 and so d(x) = d(y).
Next suppose that 1 ≤ p ≤ i − 1. Let c 0 be the red-white coloring of T obtained by recoloring v i,i and v j,j white and all other vertices of T remain the same colors as in c. Since d(v i,p , w) = d(v j,p , w) for every red vertex w such that Finally, suppose that i + 1 ≤ p ≤ j − 1. Let c 0 be the red-white coloring of T obtained by recoloring v i,i and v j,j white and all other vertices of T remain the same colors as in c. Since d(v i,p , w) = d(v j,p , w) for every red vertex w such that Since j + p > max{i + p, j − p, i + p}, it follows that a j+p = f j+p + 1 and b j+p = f j+p and so d(x) = d(y). Subcase 2.2.2. p = q. First, suppose that j = r. Since (1) the last nonzero coordinate in d(v i,p ) is the (p + r)th coordinate where p + r = d(v i,p , v r,r ) and the last nonzero coordinate in d(v j,q ) is the (q + r)th coordinate where q + r = d(v j,q , v r,r ) and (2) p = q, it follows that either a p+r = b p+r or a q+r = b q+r , implying that d(x) = d(y).
For simplification, we now introduce notation where a code is expressed when no 0 coordinate is given after the final nonzero coordinate of a code. For example, if a code of a vertex is a 7-tuple (1, 0, 2, 1, 0, 0, 0), we simply write this code as the 4-tuple (1, 0, 2, 1).
Next, suppose that j = r. Thus, x = v i,p where 1 ≤ i ≤ r − 1 and p = i and y = v r,q where 1 ≤ q ≤ r − 1 and p = q. We consider two possibilities.
Next, suppose that 1 ≤ p ≤ i − 1. If i − p = p + for some ∈ [r] − {i}, then (1 i−1 , 0, 1 r−i ) is a subsequence of d(x) and so there is no 2 as a coordinate of d(x). If d(y) = d(v r,q ) contains a coordinate 2, then d(x) = d(y) and so d(y) = d(v r,q ) = (0 r−q−1 , 1, 0 2q−r , 1 r−1 ). Thus, d(x) = d(y). Hence, we may assume that i − p = p + for some ∈ [r] − {i} and so i = 2p + . This implies that there is exactly one coordinate 2 of d(x), namely a i−p = 2. If d(y) has no coordinate 2, then d(x) = d(y). Hence, we assume that d(y) has coordinate 2. This implies that d(v r,q , v r,r ) = r − q = q + t for some t ∈ [r − 1] and b r−q = 2 is the only coordinate 2 in d(y). Hence, i − p = r − q or r − i = q − p and so q > p. There are two possibilities here. If i − p = r − q < p + 1, then the second nonzero coordinate in d(x) is a p+1 while the the second nonzero coordinate in d(y) is b q+1 . If i − p = r − q > p + 1, then the first nonzero coordinate in d(x) is a p+1 while the the fist nonzero coordinate in d(y) is b q+1 . In either case, d(x) = d(y). Therefore, c is an ID-coloring and so ID(T ) = r.
The following is a consequence of Theorem 3.1.

Corollary 3.1.
For each odd integer r ≥ 3, there exist a twin-free starlike tree T such that ID(T ) = r.
In the statement of Theorem 3.1, the condition that r ≥ 3 is an odd integer is only required in Subcase 2.2.2.2. In fact, if r ≥ 4 is an even integer, then there are exactly two white vertices in the red-white coloring described in the proof of Theorem 3.1, namely v 1,p and v r,q where q = p + 1 and p + q = r + 1, that have the same code. That is, this red-white coloring is antiregular. Therefore, we have the following. Proposition 3.1. For each even integer r ≥ 4, there is an antiregular red-white coloring of the starlike tree S r−1 (K 1,r+1 ) having exactly r red vertices.
By the technique used in the proof of Theorem 3.1, the following result can be verified. Proposition 3.2. Let r ≥ 4 be an even integer. If T is the starlike tree obtained by subdividing exactly one edge of S r−1 (K 1,r+1 ), then ID(T ) = r.
None of the trees appearing in the results just above have the identity automorphism group. We next describe a class of trees having the identity automorphism group, where each such tree is necessarily twin-free, which can be used to show that for every integer r ≥ 3, there is a tree T with the identity automorphism group such that ID(T ) = r. Proof. For each integer r ≥ 3, let K 1,r+1 be the star of order r + 2 with central vertex v that is adjacent to the r + 1 end-vertices v 1 , v 2 , . . . , v r+1 . Let T be the starlike tree obtained from the star K 1,r+1 be subdividing the edge vv i of K 1,r+1 exactly i − 1 times for 1 ≤ i ≤ r + 1. In particular, vv 1 is not subdivided and vv r+1 is subdivided exactly r times. Thus, T is twin-free, the order of T is 1 + r+2 2 and diam(T ) = 2r + 1. Since no two vertices of T are similar, it follows that T has the identity automorphism group. For each integer i with First, we show that ID(T ) ≥ r. For any red-white coloring of T that assigns the color red to at most r − 1 vertices of T , there are at least two branches B i and B j of T at v such that the paths B i − v and B j − v contain no red vertices of T . However then, d(v i,1 ) = d(v j,1 ), for example, and so this red-white coloring is not an ID-coloring of T . Therefore, ID(T ) ≥ r. Next, we show that T has an ID-coloring with exactly r red vertices. Define a red-white coloring c of T by assigning the color red to each vertex v i,i for 1 ≤ i ≤ r and white to the remaining vertices of T . Thus, T has exactly r red vertices. It remains to show that c is an ID-coloring of T . Since diam(T ) = 2r + 1, the code of each vertex of T is a (2r + 1)-vector. Let x and y be two distinct vertices of T . We consider two cases, according to whether x and y are both red or both white. Let d(x) = (a 1 , a 2 , . . . , a 2r+1 ) and d(y) = (b 1 , b 2 , . . . , b 2r+1 ). Case 1.
x and y are both red. Let x = v i,i and y = v j,j where 1 ≤ i < j ≤ r.
First, suppose that j = r. Since (1) the last nonzero coordinate in d(v i,i ) is the (i + r)th coordinate where i + r = d(v i,i , v r,r ) and the last nonzero coordinate in d(v j,j ) is the (j + r)th coordinate where j + r = d(v j,j , v r,r ) and (2) i < j, it follows that a j+r = 0 and b j+r = 1 and so d(x) = d(y).
Next, suppose that j = r. We saw that the last nonzero coordinate in . Thus, we may assume that x = v r−1,r−1 . Because the first nonzero coordinate in d(v r−1,r−1 ) is the rth coordinate where r = d(v 1,1 , v r−1,r−1 ) and the first nonzero coordinate in d(v r,r ) is the (r + 1)th coordinate where r + 1 = d(v 1,1 , v r,r ), it follows that a r = 1 and b r = 0 and so d(x) = d(y).
x and y are both white. First, we verify the following claim.
The vertices on B r+1 are the only white vertices of T whose codes contain the r-tuple (1, 1, . . . , 1) = 1 r as a subsequence. The vertex v is the only white vertex of T such that the first r coordinates of its code are 1 (that is, d(v) = (1 r , 0 r+1 )). For 1 ≤ t ≤ r + 1, the vertex v r+1,t is the only white vertex such that in d(v r+1,t ) the first t coordinates and the last r + 1 − t coordinates are 0 while the remaining coordinates are 1 (that is, d(v r+1,t ) = (0 t , 1 r , 0 r+1−t ) for 1 ≤ t ≤ r). Thus, all codes of the vertices of B r+1 are distinct and they are also distinct from the codes of those white vertices that are not in B r+1 . Hence, the claim holds.
By the claim, we may assume that We consider two subcases, according to the location of x and y.
First, suppose that i = r. Since (1) the last nonzero coordinate in d(v i,p ) is the (p + r)th coordinate where p + r = d(v i,p , v r,r ) and the last nonzero coordinate in d(v i,q ) is the (q + r)th coordinate where q + r = d(v i,q , v r,r ) and (2) p < q, it follows that a q+r−1 = 0 and b q+r−1 = 1 and so d(x) = d(y).
Next, suppose that i = r. Since (1) the last nonzero coordinate in d(v r,p ) is the (p+r −1)th coordinate where p+r −1 = d(v i,p , v r−1,r−1 ) and the last nonzero coordinate in d(v r,q ) is the (q +r −1)th coordinate where q +r −1 = d(v i,q , v r−1,r−1 ) and (2) p < q, it follows that a q+r−1 = 0 and b q+r−1 = 1 and so d(x) = d(y).
Subcase 2.2. x ∈ V (Q i ) and y ∈ V (Q j ) where 2 ≤ i < j ≤ r. Let x = v i,p and y = v j,q where 1 ≤ p ≤ i−1 and 1 ≤ q ≤ j −1. We consider two subcases, according to whether p = q or p = q. Subcase 2.2.1. p = q. Then x = v i,p and y = v j,p where 2 ≤ i < j ≤ r and p / ∈ {i, j}. Let c 0 be the red-white coloring of T obtained by recoloring v i,i and v j,j white and all other vertices of T remain the same colors as in c. Since d(v i,p , w) = d(v j,p , w) for every red vertex w such that w / ∈ {v i,i , v j,j }, it follows that d c0 (x) = d c0 (y) = (f 1 , f 2 , . . . , f 2r ). Observe that d(v i,p , v i,i ) = i − p, d(v i,p , v j,j ) = j + p, d(v j,p , v i,i ) = i + p, and d(v j,p , v j,j ) = j − p. Since i − p < min{i + p, j − p, j + p}, it follows that a i−p = f i−p + 1 and b i−p = f i−p and so d(x) = d(y).
Subcase 2.2.2. p = q. First, suppose that j = r. Since (1) the last nonzero coordinate in d(v i,p ) is the (p + r)th coordinate where p + r = d(v i,p , v r,r ) and the last nonzero coordinate in d(v j,q ) is the (q + r)th coordinate where q + r = d(v j,q , v r,r ) and (2) p = q, it follows that either a p+r = b p+r or a q+r = b q+r , implying that d(x) = d(y).
Next, suppose that j = r. Thus, x = v i,p where 2 ≤ i ≤ r − 1 and 1 ≤ p ≤ i − 1 and y = v r,q where 1 ≤ q ≤ r − 1 and p = q. If i − p = p + for some ∈ [r] − {i}, then (1 i−1 , 0, 1 r−i ) is a subsequence of d(x) and so there is no coordinate 2 in d(x). If d(y) = d(v r,q ) contains 2 as a coordinate, then d(x) = d(y) and so d(y) = d(v r,q ) = (0 r−q−1 , 1, 0 2q−r , 1 r−1 , 0, . . . , 0). Thus, d(x) = d(y). Hence, we may assume that i − p = p + for some ∈ [r] − {i} and so i = 2p + . This implies that there is exactly one coordinate of d(x) which is 2, namely a i−p = 2. If d(y) has no coordinate 2, then d(x) = d(y). Hence, we assume that d(y) has 2 as a coordinate. This implies that d(v r,q , v r,r ) = r − q = q + t for some t ∈ [r − 1] and b r−q = 2 is the only coordinate 2 in d(y). Hence, i − p = r − q or r − i = q − p and so q > p. There are two possibilities here. If i − p = r − q < p + 1, then the second nonzero coordinate in d(x) is a p+1 while the the second nonzero coordinate in d(y) is b q+1 . If i − p = r − q > p + 1, then the first nonzero coordinate in d(x) is a p+1 while the the fist nonzero coordinate in d(y) is b q+1 . In either case, d(x) = d(y). Therefore, c is an ID-coloring and so ID(T ) = r.
Several problems are suggested by the results presented here.
(1) For a given integer r ≥ 3, what is the smallest order of a tree T such that ID(T ) = r?
(2) For a given integer r ≥ 3, what is the smallest order of a twin-free tree T such that ID(T ) = r?
For (2), we have seen that this smallest order is no more than 1 + r+2 2 .