1. Introduction
In theoretical chemistry, molecular descriptors or topological indices are utilized to configure properties of chemical compounds. A topological index is a real number connected with chemical structure indicating relationships of chemical configuration with different physical properties, chemical reactivity or biological activity, which is utilized to understand properties of chemical compounds in theoretical chemistry. Topological indices have been observed to be helpful in chemical documentation, isomer discrimination, structure-property relations, structure-activity (SAR) relations and pharmaceutical medication plans. All through the paper, all graphs are considered to be simple and connected.
Let 
 be a simple graph with 
 vertices and 
 edges. For 
, degree of 
u, denoted by 
, is number of vertices attached to 
 in the graph. The maximum distance from a vertex to any other vertex in the graph 
 is called eccentricity of the vertex and is denoted by 
 i.e., 
, where 
 denotes the distance between 
 and 
 in 
. The first Zagreb index (
) and second Zagreb index 
 are the oldest known indices introduced by Gutman and Trinajstić [
1] defined as
      
Several topological indices depend upon the eccentricity of the vertices and are very effective in drug design. Sharma, Goswami and Madan [
2] proposed the eccentric connectivity index of the graph 
, which is defined as
      
In 2000, Gupta, Singh and Madan [
3] introduced another distance-cum-degree based topological descriptor termed the connective eccentricity index:
      
Other eccentricity related indices include the eccentric distance sum [
4], augmented and super augmented eccentric connectivity indices [
5,
6,
7], and adjacent eccentric distance sum index [
8,
9].
Recently, the first Zagreb eccentricity index and second Zagreb eccentricity index 
 and 
 have been proposed as the revised versions of the Zagreb indices 
 and 
, respectively, by Ghorbani and Hosseinzadeh [
10]. The first Zagreb eccentricity index (
) and the second Zagreb eccentricity index (
) of a graph 
 are defined as
      
      respectively. Das et al. [
11] gave a few lower and upper bounds on the first Zagreb eccentricity index and the second Zagreb eccentricity index of trees and graphs, and also characterized the extremal graphs. Nilanjan [
12] computed a few new lower and upper bounds on the first Zagreb eccentricity index and the second Zagreb eccentricity index. Zhaoyang and Jianliang [
13] computed Zagreb eccentricity indices under different graph operations. Farahani [
14] computed precise equations for the First Zagreb Eccentricity index of Polycyclic Aromatic Hydrocarbons. Evidently, Zagreb indices and the family of all connectivity indices express mathematically attractive invariants. In this manner, we expect numerous more studies on these indices and anticipate further development of this area of mathematical chemistry.
  2. Results and Discussion
Consider a graph 
 with vertex set 
 and a set of positive integers 
. The thorn graph of 
, denoted by 
, is obtained by attaching 
 pendant vertices to 
 for each 
. The idea of a thorn graph was presented by Gutman [
15], and various studies on thorn graphs and different topological indices have been conducted by some researchers in the recent past [
16,
17,
18,
19]. In this paper, we will derive explicit expressions for computing the first Zagreb eccentricity index and the second Zagreb eccentricity index of thorny graphs of some well-known classes of graphs like complete graphs, complete bipartite graphs, star graphs, cycles and paths.
  2.1. The Thorny Complete Graph
Suppose that we take the complete graph  with  vertices. Obviously,  and . The thorny complete graph  is obtained from  by attaching  thorns at each vertex of , . Suppose that the total number of thorns attached to  are denoted by .
Theorem 1. The first Zagreb eccentricity index and the second Zagreb eccentricity index of  are given by:  Proof.  Let 
 be a compete graph. Suppose that 
, 
 are the vertices of 
, and 
, 
 are the newly attached pendant vertices. Then, 
, 
 for 
 are the eccentricities of the vertices of 
. Thus, the first Zagreb eccentricity index and the second Zagreb eccentricity index of 
 are given by
        
   2.2. The Thorny Complete Bipartite Graph
Assume that we take the complete bipartite graph  having  vertices. Obviously, the eccentricities are equal to two for all the vertices of . Then,  and . The thorny complete bipartite graph  is attained by attaching pendant vertices to each vertex of . Let  be the total number of pendent vertices.
Theorem 2. The first Zagreb eccentricity index and the second Zagreb eccentricity index of  are given by:  Proof.  Suppose that 
 is the vertex set of 
, and let 
 be the newly attached pendant vertices to 
, 
 and 
 be the pendant vertices of 
. Then, the eccentricity of the vertices of 
 is given by 
, 
, for 
 and 
, 
, for 
. Thus, the Zagreb eccentricity indices of 
 are given by:
        
 The second Zagreb eccentricity index is computed as:
        
  2.3. The Thorny Star Graph
Suppose that we have the star graph  of  vertices. Obviously,  and . Let the thorny star graph  be obtained by joining  pendant vertices to every vertex ,  and  pendant vertices to the central vertex  of .
Theorem 3. The first Zagreb eccentricity index and the second Zagreb eccentricity index of  are given by:  Proof.  Assume 
, 
 and 
, for 
 are the newly attached pendant vertices. Then, the eccentricities of the vertices of 
 are given by 
, 
, for 
, 
, for 
, 
, for 
. Thus, the Zagreb eccentricity indices of 
 are
        
        from which we get the desired result. Now,
        
        and the result follows.
   2.4. The Thorny Cycle
Let  be a cycle having  vertices and  edges. Clearly, , if  is odd and , if  is even. Let  be the thorny cycle of  obtained by joining  thorns  to each vertex ,  of .
Theorem 4. The first Zagreb eccentricity index and the second Zagreb eccentricity index of  are given by
        and
        
        respectively.
  Proof.  The vertex eccentricities of  are given as  and , if  is odd;  and , if  is even; for .
 Thus, when 
 is an odd number, the first Zagreb eccentricity index of 
 is
        
        and the second Zagreb eccentricity index of 
 is
        
Now, when 
 is an even number, the first Zagreb eccentricity index of 
 is given by
        
Next, we proceed for the second Zagreb eccentricity index as
        
  2.5. The Thorny Path Graph
Consider the path graph  with  vertices. If m is even, then we write , and suppose that the vertices of  are serially indicated by , where the centers of the path  are  and  having eccentricity . If  is odd, then we write , and we suppose that we have  as the consecutive vertices of , where the center of the path  is  having the eccentricity . Then, the thorny path graph  is obtained from  by attaching  and  pendant vertices to each  and  , respectively. We define . Now, we will find the first Zagreb eccentricity index and the second Zagreb eccentricity index of .
Theorem 5. The first Zagreb eccentricity index and the second Zagreb eccentricity index of  are given by
        and
        
        respectively.
  Proof.  If 
, then all the vertices of 
 have eccentricities 
, for 
 , for 
. Thus, the Zagreb eccentricity indices of 
 are given by
        
        and
        
In addition,
        
       and the result follows.
If 
 is odd, then the vertices of 
 have the eccentricities, 
, for 
  , for 
 (the equalities do not apply for 
 and 
). Now, the Zagreb eccentricity indices of 
 are given as
        
 In addition,
        
        and we get the desired result.
Now, 
In addition,
        
        and we obtain the equality.