A note on the identification numbers of caterpillars

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. A caterpillar is a tree of order 3 or more, the removal of whose leaves produces a path. A caterpillar possessing an ID-coloring is an ID-caterpillar. In this note, we characterize all ID-caterpillars, determine all possible values of the ID-numbers of ID-caterpillars, and show that each value is realizable.


Introduction
Let G be a nontrivial connected graph. The distance d (u, v) between vertices u and v in G is the minimum number of edges in a u − v path in G. The eccentricity e(v) of a vertex v of G is the distance between v and a vertex farthest from v in G. The diameter diam(G) of G is the largest eccentricity among the vertices of G. Equivalently, the diameter of G is the greatest distance between any two vertices of G.
Let G be a connected graph of diameter d ≥ 2 and let there be given a red-white vertex coloring c of 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 of G. A graph possessing an identification 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 ID(G) of G. These concepts were introduced by Gary Chartrand and first studied in [1]. In this note, we study a well-known class of trees, namely caterpillars.
A caterpillar T is a tree of order 3 or more, the removal of whose leaves produces a path called the spine of T . A star is therefore a caterpillar with a trivial spine and a double star (a tree of diameter 3) is a caterpillar whose spine is the path P 2 of order 2. A caterpillar possessing an ID-coloring is therefore an ID-caterpillar. Here, we determine all those caterpillars that are ID-caterpillars and their possible ID-numbers. For this purpose, it is useful to present some results obtained in [1,2].
For an integer t ≥ 2, the members of a set S of t vertices in a graph G are called t-tuplets (twins if t = 2 and triplets if Since every caterpillar of maximum degree 5 or more contains triplets, the following observation is an immediate consequence of Proposition 1.1. Observation 1.1. No caterpillar of maximum degree 5 or more is an ID-tree.
By Theorems 1.2 and 1.3 and Observation 1.1, we need only consider caterpillars of diameter 3 or more and maximum degree 3 or 4. In this note, we present the following results on ID-caterpillars and their ID-numbers. 1. A caterpillar is an ID-caterpillar if and only if it is triplet-free.
2. If T is a caterpillar of diameter 3 or more and maximum degree 3, then ID(T ) = 3.
3. If T be a k-twin caterpillar (a caterpillar with exactly k pairs of twins) of diameter 4 or more and maximum degree 4, then max{3, k} ≤ ID(T ) ≤ k + 3. Furthermore, for each pair (k, t) of integers where k ≥ 0 and t ∈ {0, 1, 2, 3} such that k + t ≥ 3, there is a k-twin caterpillar T k,t for which ID(T k,t ) = k + t.

Which caterpillars are ID-graphs?
We begin with caterpillars of diameter 3 or more and maximum degree 3.
Theorem 2.1. If T is a caterpillar of diameter 3 or more and maximum degree 3, then T is an ID-caterpillar and ID(T ) = 3.
Proof. Let T be a caterpillar of diameter d ≥ 3 and maximum degree 3. By Theorems 1.1 and 1.2, it suffices to show that T has an ID-coloring with exactly three red vertices. If d = 3, then T is a double star of order 5 or 6. Since these two double stars have ID-colorings with exactly three red vertices (as shown in Figure 1), we may assume that d ≥ 4.
, then let u i be the end-vertex of T that is not in P and adjacent to v i . Define a red-white coloring c of T by assigning the color red to v i if i = 0, 1, d and the color white to the remaining vertices of T . This red-white coloring is illustrated for the caterpillar of diameter 8 in Figure 2. We show that c is an ID-coloring of T . Let x and y be two distinct vertices of T . By Proposition 1.2, we may assume that x and y have the same color in T . Since (i) the first and the last coordinates of d(v 0 ) are both 1, (ii) the first coordinate of d(v 1 ) is 1 and the last coordinate of d(v 1 ) is 0, and (iii) the first coordinate of d(v d ) is 0 and the last coordinate of d(v d ) is 1, it follows that the three red vertices v 0 , v 1 and v d have distinct codes. Thus, we may assume that x and y are white vertices. Let d(x) = (a 1 , a 2 , . . . , a d ) and d(y  Figure 2: An ID-coloring of a caterpillar of diameter 8. First, observe that for each vertex z of T , the eccentricity of z is e(z) = max{d(z, v 0 ), d(z, v d )}. Since v 0 and v d are red vertices of T , it follows that the e(z)th coordinate of d(z) is the final coordinate of d(z) that is not 0. Consequently, if e(x) = e(y), say e(x) < e(y) = s, then a s = 0 but b s = 0, which implies that d(x) = d(y). Hence, we may assume that e(x) = e(y) = s. We consider three cases, according to the location of x and y.
. Thus, we may assume that a s = b s and a s−1 We now consider triplet-free caterpillars of diameter at least 4 and maximum degree 4. A triplet-free caterpillar with exactly k pairs of twins is called a k-twin caterpillar. Figure 3 shows a 2-twin caterpillar of diameter 4 and a 4-twin caterpillar of diameter 5. Next we show that every triplet-free caterpillar of diameter at least 4 and maximum degree 4 is an ID-caterpillar and present bounds for the ID-number of a k-twin caterpillar, which shows that its ID-number is one of four numbers (in terms of k).
Thus, r ≥ 3 if k ∈ {0, 1, 2}. It remains to show that c is an ID-coloring of T . Let x and y be two distinct vertices of T . By Proposition 1.2, we may assume that x and y have the same color in T . Let d(x) = (a 1 , a 2 , . . . , a d ) and d(y) = (b 1 , b 2 , . . . , b d ).
First, observe that for each vertex z of T , the eccentricity of z is e(z) = max{d(z, u 1 ), d(z, u d−1 )}. Since u 1 and u d−1 are red vertices of T , it follows that the e(z)th coordinate of d(z) is the final coordinate of d(z) that is not 0. Consequently, if e(x) = e(y), say e(x) < e(y) = s, then a s = 0 but b s = 0, which implies that d(x) = d(y). Hence, we may assume that e(x) = e(y) = s. We consider two cases, according to whether x and y are both red or both white.
x and y are both red. Observe that • u 1 and v 1 are the only red vertices whose first coordinate is 1 and e(u 1 ) > e(v 1 ); Thus, we may assume that x = u i and y = u j where 2 ≤ i < j ≤ d − 2. Since e(u i ) = e(u j ) = s and 2 ≤ i < j ≤ d − 2, it follows that s = d(u i , u d−1 ) = d(u j , u 1 ). Since (1) Case 2.
x and y are both white. Observe that • w 1 (should it exist) is the only white vertex whose whose code begins with 111 • w d−1 (should it exist) is only white peripheral vertex whose code begins with 0, and • w 2 (should it exist) is the only white vertex whose whose code begins with 02.
Thus, we may assume that x, y ∈ {w i : We consider three cases, according to the location of x and y.
By Theorem 2.2, if T is a k-twin caterpillar, then max{3, k} ≤ ID(T ) ≤ k + 3. In fact, every integer between max{3, k} and ≤ k + 3 is realizable as the ID-number of some k-twin caterpillar, as we show next. Theorem 2.3. For each pair (k, t) of integers where k ≥ 0 and t ∈ {0, 1, 2, 3} such that k+t ≥ 3, there is a k-twin caterpillar T for which ID(T ) = k + t.
Proof. We verify the following four statements.
1. For each integer k ≥ 0, there exists a k-twin caterpillar T with ID(T ) = k + 3.
2. For each integer k ≥ 1, there exists a k-twin caterpillar T with ID(T ) = k + 2.
3. For each integer k ≥ 2, there exists a k-twin caterpillar T with ID(T ) = k + 1.
4. For each integer k ≥ 3, there exists a k-twin caterpillar T with ID(T ) = k.
We provide a complete proof for Statements 1 and 2 and provide an outline of a proof for Statements 3 and 4.
First, we verify Statement 1. By Theorem 2.1, if T is a caterpillar of diameter 3 or more and maximum degree 3, then ID(T ) = 3. Thus, the statement is true for k = 0 and so we may assume that k ≥ 1. Let T be a caterpillar of diameter d = k + 3 ≥ 4 and let P be the spine of T such that each end-vertex of P is adjacent to exactly one end-vertex and each interior vertex of P is adjacent to exactly two end-vertices. Thus, T contains exactly k = d − 3 twins. We show that ID(T ) = d = k + 3. Let (v 0 , v 1 , . . . , v d ) be the longest path in T and so P = (v 1 , v 2 , . . . , v d−1 ) is the spine of T . For each integer i with 2 ≤ i ≤ d − 2, let u i and w i be the two end-vertices of T that are adjacent to v i . Since T contains exactly d − 3 twins, it follows by Theorem 2.2 that ID(T ) ≤ d. Thus, it remains to show that ID(T ) ≥ d. Assume, to the contrary, that ID(T ) ≤ d−1 and let c be an ID-coloring of T with exactly ID(T ) red vertices. Since u i and w i are twins in T for 2 ≤ i ≤ d−2, we may assume that c(u i ) is red and c(w i ) is white. Since d(v 1 , z) = d(w 2 , z) for each z ∈ V (T ) − {v 0 }, it follows that if v 0 and v 1 are both white, then d(v 1 ) = d(w 2 ), which is impossible. Thus, at least one of v 0 and v 1 is red. If v 0 is white and v 1 is red, then d(v 1 ) = d(u 2 ). Thus, v 0 must be red. Similarly, v d must be red. Hence, ID(T ) = d − 1 and v 0 , v d , and u i , where 2 ≤ i ≤ d − 2, are the d − 1 red vertices of T . However then, d(v 0 ) = d(v d−1 ), for example, which is impossible. Therefore, ID(T ) = d = k + 3 and so Statement 1 holds.