1 Introduction

Motivated by the problem of uniquely recognizing the location of an intruder in a network, calculating the metric dimension of a graph was initiated by Harary and Melter [7]. Determining the metric dimension of a graph as an NP-complete problem has appeared in various applications of graph theory, for example robot navigation [9], pharmaceutical chemistry [5], combinatorial optimization [20] and so on. Strong metric dimension which is a more restricted invariant than the dimension was introduced in [20] and studied further in several articles, see, for instance, [10, 11, 15]. Computing the metric dimension and strong metric dimension of graphs associated with algebraic structures has been started, recently. Computing the metric dimension for the commuting graph of a dihedral group was done in [1], for the zero-divisor graphs of commutative rings in [17] and [19], for total graphs of finite commutative rings in [6], for annihilator graphs of commutative rings in [21] and for some graphs of modules in [18]. Moreover, strong metric dimension of zero-divisor graphs of commutative rings in [8] and strong metric dimension of the power graph of a finite group in [12] were studied. Motivated by these papers, we study the strong metric dimension of another graph associated with a commutative ring.

Let \(G=(V,E)\) be a graph, where \(V=V(G)\) is the set of vertices and \(E=E(G)\) is the set of edges. We recall that a graph is connected if there exists a path connecting any two distinct vertices. The distance between two distinct vertices x and y, denoted by d(xy), is the length of the shortest path connecting them (if such a path does not exist, then we set \(d(x,y)=\infty \)). The diameter of a connected graph G, denoted by diam(G), is the maximum distance between any pair of vertices of G. A graph in which each pair of vertices is joined by an edge is called a complete graph and we use \(K_n\) to denote it with n vertices. The graph \(H=(V_0,E_0)\) is a subgraph of G if \(V_0\subseteq V\) and \(E_0 \subseteq E\). Moreover, H is called an induced subgraph by \(V_0\), denoted by \(G[V_0]\), if \(V_0\subseteq V\) and \(E_0=\{\{u,v\}\in E\, |\,u,v\in V_0\}\). For a vertex x in G, we denote the set of all vertices adjacent to x by N(x) and \(N[x]=N(x)\cup \{x\}\). A set of vertices \(S\subseteq V(G)\) resolves a graph G, and S is a resolving set of G, if every vertex is uniquely determined by its vector of distances to the vertices of S. In general, for an ordered subset \(S=\{v_1,v_2,\dots ,v_k\}\) of vertices in a connected graph G and a vertex \(v\in V(G){\setminus } S\) of G, the metric representation of v with respect to S is the k-vector \(D(v|S)=(d(v,v_1),d(v,v_2),\dots , d(v,v_k))\). The set S is a resolving set for G if \(D(u|S)=D(v|S)\) implies that \(u=v\), for all pair of vertices, \(v,u\in V(G){\setminus } S\). A resolving set S of minimum cardinality is the metric basis for G, and the number of elements in the resolving set of minimum cardinality is the metric dimension of G. We denote the metric dimension of a graph G by \(dim_M(G)\). The strong metric dimension of a graph is defined as follows. In a connected graph G, for two distinct vertices u and v, the interval I[uv] is the collection of all vertices that belong to some shortest \(u-v\) path. A vertex \(w\in V(G)\) strongly resolves two vertices u and v if \(v\in I[u,w]\) or \(u\in I[v,w]\). In other words, two vertices u and v are strongly resolved by w if \(d(w,u)=d(w,v)+d(v,u)\) or \(d(w,v)=d(w,u)+d(v,u)\). A set W of vertices is a strong resolving set of G if every two distinct vertices of G are strongly resolved by some vertex of W and a minimum strong resolving set is called a strong metric basis and its cardinality is the strong metric dimension of G, denoted by sdim(G). For any undefined notation or terminology in graph theory, we refer the reader to [22].

Throughout this paper, all rings are assumed to be commutative with identity. The sets of all zero-divisors and nilpotent elements of a ring R are denoted by Z(R) and \(\mathrm{Nil}(R)\), respectively. For a subset T of a ring R, we let \(T^*=T{\setminus }\{0\}\). Moreover, the annihilator of T is denoted by \(ann_R(T)\). The ring R is said to be reduced if it has no nonzero nilpotent element. For any undefined notation or terminology in ring theory, we refer the reader to [3].

The concept of annihilator graph of a commutative ring R, denoted by AG(R), was introduced by Badawi in [4]. The annihilator graph AG(R) is an undirected graph whose vertex set is \(Z(R)^*\) and two distinct vertices x and y are adjacent if and only if \(ann_R(xy)\ne ann_R(x)\cup ann_R(y)\). Badawi studied some graph theoretical parameters of this graph such as diameter and girth. In addition, he studied some conditions under which the annihilator graph is identical to its well-known subgraph, zero-divisor graph (for more details on zero-divisor graphs see [2]). Among other things, he determined when AG(R) is a complete graph, a complete bipartite graph or a star graph. In [14] Nikmehr et al. studied the affinity between annihilator graph and zero-divisor graph of a commutative ring. The same authors in [13] proved that the annihilator graph of an Artinian ring is weakly perfect and they gave an explicit formula for the clique number of annihilator graphs. In [21], Soleymanivarniab et al. proved that the metric dimension of AG(R) is finite if and only if R is a finite ring. Moreover, they obtained \(dim_M(AG(R))\) for finite rings. In this paper, we study the strong metric dimension of AG(R) and some strong metric dimension formulae for annihilator graphs are given.

2 Strong Metric Dimension of Annihilator Graphs of Reduced Rings

In this section, first it is shown that \(sdim_M(AG(R))\) is finite if and only if R is finite. Then, a metric dimension formula for an annihilator graph associated with a finite reduced ring R is given. We note that every finite reduced ring is a product of finitely many finite fields.

Lemma 2.1

Let G be a connected graph. Then, the following statements hold.

  1. (1)

    \(dim_M(G)\le sdim_M(G)\).

  2. (2)

    If \(W\subset V(G)\) is a strong resolving set of G and \(u,v\in V(G)\) such that \(N(u)=N(v)\) or \(N[u]=N[v]\), then \(u\in W\) or \(v\in W\).

  3. (3)

    If \(W\subset V(G)\) is a strong resolving set of G and \(u,v\in V(G)\) such that \(d(u,v)=diam(G)\), then \(u\in W\) or \(v\in W\).

Proof

  1. (1)

    If a vertex w strongly resolves u and v, it is easy to see that w also resolves these vertices. This implies that \(dim_M(G)\le sdim_M(G)\).

  2. (2)

    and (3) are clear. \(\square \)

Proposition 2.1

Let R be a ring with unity 1 that is not an integral domain. Then, sdim(AG(R)) is finite if and only if R is finite.

Proof

The result follows from [21, Proposition 2.1] and part (1) of Lemma 2.1. \(\square \)

Theorem 2.1

Let \(n\ge 2\) be a positive integer and \(R=\prod _{i=1}^{n}{\mathbb {Z}}_{2}\). Then, the following statements hold.

  1. (1)

    If \(n=2\), then \(sdim_M(AG(R))=1\).

  2. (2)

    If \(n\ge 3\), then \( sdim_M(AG(R))=2^n-{n\atopwithdelims ()[n/2]}-2\).

Proof

(1) If \(n=2\), it is easily seen that \(AG({\mathbb {Z}}_{2}\times {\mathbb {Z}}_{2})=K_2\), and thus,

$$\begin{aligned} dim_M(AG({\mathbb {Z}}_{2}\times {\mathbb {Z}}_{2}))=sdim_M(AG({\mathbb {Z}}_{2}\times {\mathbb {Z}}_{2}))=1. \end{aligned}$$

(2) Assume that \(n\ge 3\). We show that \(sdim_M(AG(\prod _{i=1}^{n}{\mathbb {Z}}_{2}))=2^n-{n\atopwithdelims ()[n/2]}-2\). Let \(X= (x_1,\dots , x_n)\in V(AG(R))\) and \(X_t=t\) be the number of 0’s in X. Obviously, \(1\le t\le n-1\).

Assume that \(X= (x_1,\dots , x_n)\) and \(Y= (y_1,\dots ,y_n)\) are vertices of AG(R), where \(x_i, y_i \in \{0,1\}\), for every \(1\le i\le n\). Define the relation \(\thicksim _a\) on V(AG(R)) as follows:

\(X\thicksim _a Y\) whenever “\(X_t=Y_t\).”

It is easily seen that \(\thicksim _a\) is an equivalence relation on V(AG(R)). By [X], we mean the equivalence class of X. Let \(X',X''\in [X]\) with \(X'\ne X''\). Since \(X'_t=X''_t\) where \(X'_t\) is the number of 0’s in X, we have \(RX'\nsubseteq RX''\) and \(RX''\nsubseteq RX'\). Hence, \(X'\) and \(X''\) are adjacent. This implies that for every \(1\le t\le n-1\), AG(R)[X] is a complete subgraph of AG(R) and \(|[X]|= {n\atopwithdelims ()t}\), where \(t=X_t\). Let [X] and [Y] be two distinct equivalence classes and ts be the number of 0’s in X and Y, respectively. Without loss of generality, assume that \(|[Y]|\le |[X]|\). Let \(Y'\) be an arbitrary element of [Y]. Then, it is not hard to find an element \(X'\) of [X] such that \(Y'\) and \(X'\) are not adjacent. This implies that \(d(X',Y')=diam(AG(R))=2\), by [4, Theorem 2.2]. Hence, Lemma 2.1 implies that \(X'\in W\) or \(Y'\in W\), where W is a strong resolving set of AG(R). Let \(Y'\in W\). Continue this procedure for |[Y]| times. Thus, \([Y]\subseteq W\). By continuing this process, all equivalence classes except (one of, for odd n) the largest one are contained in W (Indeed, we may assume that any strong resolving set for AG(R) contains all equivalence classes except the largest one). Let [X] be the largest equivalence class. Put \(s=[n/2]\). Then, for every equivalence class [Y], \({n\atopwithdelims ()s}=|[X]|\ge |[Y]|\), where \(s=X_s\). This implies that

$$\begin{aligned} |W|\ge |\cup _{i=1,i\ne s}^{n-1}[Y]_i| =|V(AG(R))|-|[X]|=2^n-{n\atopwithdelims ()[n/2]}-2, \end{aligned}$$

in which for every \(1\le i\le n-1\), \([Y]_i=[Y]\) with \(Y_i=i\). To complete the proof, we show that

$$\begin{aligned} |W|\le |\cup _{i=1,i\ne s}^{n-1}[Y]_i| =|V(AG(R))|-|[X]|=2^n-{n\atopwithdelims ()[n/2]}-2. \end{aligned}$$

Let \(W =V(AG(R)){\setminus } [X]\). We show that W is a strong resolving set for AG(R). If uv are two distinct elements of \(V(AG(R)){\setminus } W\)(\(=[X]\)), then \(N(u)\ne N(v)\)(note that u and v are adjacent). Without loss of generality, assume that \(N(u)\nsubseteq N(v)\). Hence, \(x\in W\) and x strongly resolves two vertices u and v, for every \(x\in N(u){\setminus } N(v)\). Thus, W is a strong resolving set for AG(R) and therefore,

$$\begin{aligned} sdim_M(AG(R))=2^n-{n\atopwithdelims ()[n/2]}-2. \end{aligned}$$

\(\square \)

Example 2.1

Let \(R={\mathbb {Z}}_{2}\times {\mathbb {Z}}_{2}\times {\mathbb {Z}}_{2}\times {\mathbb {Z}}_{2}\) and

\(A=[(1,1,1,0)]=\{(1,1,1,0),(1,1,0,1),(1,0,1,1),(0,1,1,1)\}\),

\(B=[(1,1,0,0)]=\{(1,1,0,0),(1,0,0,1),(1,0,1,0),(0,0,1,1),(0,1,0,1),(0,1,1,0)\}\),

\(C=[(1,0,0,0)]=\{(1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)\}\).

For every \(a\in A\), it is easy to see that there are some vertices of B which are not adjacent to a. Hence, we may let \(A\subseteq W\), where W is a strong resolving set of AG(R). Similarly, \(C\subseteq W\). Moreover, it is not hard to check that \(A\cup C\) is a strong resolving set for AG(R). Hence, \(W=A\cup C\).

In light of Theorem 2.1, we have the following corollary.

Corollary 2.1

Let \(n\ge 2\) be a positive integer and \(R=\prod _{i=1}^{n}{\mathbb {Z}}_{2}\). Then, \(dim_M(AG(R))= sdim_M(AG(R))\) if and only if \(n=2\).

Proof

The proof is obtained from Theorem 2.1 and [21, Theorem 2.1]. \(\square \)

To prove Theorem 2.2, the following lemma is needed.

Lemma 2.2

Let R be a ring and \(x,y\in V(AG(R))\) such that \(ann_R(x)=ann_R(y)\). Then, \(N(x)=N(y)\).

Proof

See [21, Lemma 2.1]. \(\square \)

Theorem 2.2

Let \(R\cong F_1\times \cdots \times F_n\), where \(R\ncong {\mathbb {Z}}_{2}\times {\mathbb {Z}}_{2}\), \(n\ge 2\) is a positive integer and every \(F_i\) is a finite field, for \(1\le i\le n\). Then, \( sdim_M(AG(R))=|Z(R)^*|-{n\atopwithdelims ()[n/2]}\).

Proof

If \(n=2\), then it is easily seen that AG(R) is a complete bipartite graph, and hence, \( sdim_M(AG(R))=|Z(R)^*|-2\). Hence, assume that \(n\ge 3\), \(X= (x_1,\dots , x_n)\) and \(Y= (y_1,\dots ,y_n)\) are vertices of AG(R), where \(x_i, y_i \in F_i\), for every \(1\le i\le n\). Define the relation \(\thicksim _b\) on V(AG(R)) as follows: \(X\thicksim _b Y\), whenever “\(x_i=0\) if and only if \( y_i=0\)”, for every \(1\le i\le n\). It is easily seen that \(\thicksim _b\) is an equivalence relation on V(AG(R)). By [X], we mean the equivalence class of X. Let \(X_1= (x_1,\dots ,x_n)\) and \(X_2= (y_1,\dots ,y_n)\) be two elements of [X]. Since \(X_1\thicksim _b X_2\), \(x_i=0\) if and only if \( y_i=0\), for every \(1\le i\le n\). This implies that \(ann_R(X_1)=ann_R(X_2)\), and so by Lemma 2.2, \(N(X_1)=N(X_2)\). By Lemma 2.1, \(X_1\in W\) or \(X_2\in W\), for any strong resolving set W of AG(R). We continue this procedure for \(|[X]|-1\) times, and we obtain \([X]{\setminus }\{X\}\subseteq W\). Similarly, for each equivalence class [Y], we have \([Y]{\setminus }\{Y\}\subseteq W\). We note that the number of equivalence classes is \(2^n-2\). Let

$$\begin{aligned} A=\{(x_1,\dots ,x_n)\in V(AG(R))\,\,|\,\,\ x_i\in \{0,1\}\,\,\mathrm {for\,\, every}\,\,1\le i\le n\}. \end{aligned}$$

Since for every equivalence class [X], \(|[X]\cap A|=1\), we can let

$$\begin{aligned} Z(R)^*{\setminus } A\subseteq W. \end{aligned}$$

To complete the proof, put \(S=\prod _{i=1}^{n}{\mathbb {Z}}_{2}\). It is not hard to see that \(AG(R)[A]\cong AG(S)\). By the proof of Theorem 2.1, we have \(W^{\prime }\subseteq W\), where \(W^{\prime }\) is a strong resolving set of AG(S). Since \( sdim_M(AG(S))=2^n-{n\atopwithdelims ()[n/2]}-2\), by the proof of Theorem 2.1, we infer that \( sdim_M(AG(R))=|Z(R)^*|-{n\atopwithdelims ()[n/2]}\). \(\square \)

Corollary 2.2

Let R be a reduced ring and \(sdim_M(AG(R))\) is finite. Then, \(sdim_M(AG(R))=1\) or \( sdim_M(AG(R))=|Z(R)^*|-{n\atopwithdelims ()[n/2]}\).

Proof

Since \(sdim_M(AG(R))\) is finite, R is a direct product of finitely many finite fields. If \(R\cong {\mathbb {Z}}_{2}\times {\mathbb {Z}}_{2}\), then \(sdim_M(AG(R))=1\) and if \(R\ncong {\mathbb {Z}}_{2}\times {\mathbb {Z}}_{2}\), then by Theorem 2.2, \( sdim_M(AG(R))=|Z(R)^*|-{n\atopwithdelims ()[n/2]}\). \(\square \)

3 Strong Metric Dimension of Annihilator Graphs of Non-reduced Rings

In this section, we compute \(sdim_M(AG(R))\) in case R is a non-reduced ring. We start with the following result.

Theorem 3.1

Let \(n\ge 2\) be a positive integer, \(J=[n/2]\) and \(R=\prod _{i=1}^{n}{\mathbb {Z}}_{4}\). Then, \(sdim_M(AG(R))=|Z(R)^*|-\sum _{i=1}^{n-J}{n\atopwithdelims (){J+i}}- {n\atopwithdelims (){1}}\sum _{i=0}^{n-1-J}{n-1\atopwithdelims (){J+i}}-{n\atopwithdelims (){2}}\sum _{i=-1}^{n-2-J}{n-2\atopwithdelims (){J+i}}-\cdots -\) \({n\atopwithdelims (){J}}\sum _{i=1}^{n-J}{n-J\atopwithdelims (){i}}.\)

Proof

Assume that \(X= (x_1,\dots , x_n)\) and \(Y= (y_1,\dots ,y_n)\) are vertices of AG(R), where \(x_i, y_i \in R_i\), for every \(1\le i\le n\). Define the relation \(\thicksim _c\) on V(AG(R)) as follows: \(X\thicksim _c Y\), whenever \(ann_R(X)=ann_R(Y)\). In other words, \(X\thicksim _c Y\), if for every \(1\le i\le n\), we have \(x_i\in Nil(R_i)^* \Longleftrightarrow y_i\in Nil(R_i)^*\) (Indeed, \(x_i\)=2 iff \(y_i\)=2) and \(x_i\in U(R_i) \Longleftrightarrow y_i\in U(R_i)\).

It is easily seen that \(\thicksim _c\) is an equivalence relation on V(AG(R)). By [X], we mean the equivalence class of X. Let \(X_1= (x_1,\dots ,x_n)\) and \(X_2= (y_1,\dots ,y_n)\) be two elements of [X]. Since \(ann_R(X_1)=ann_R(X_2)\), Lemma 2.2 implies that \(N(X_1)=N(X_2)\). Thus, \(X_1\in W\) or \(X_2\in W\), where W is a strong resolving set of AG(R). We continue this procedure for \(|[X]|-1\) times, and we obtain \([X]{\setminus }\{X\}\subseteq W\). Similarly, for each equivalence class [Y], we have \([Y]{\setminus }\{Y\}\subseteq W\). We note that the number of equivalence classes is \(3^n-2\). Let

$$\begin{aligned} A=\{(x_1,\dots ,x_n)\in V(AG(R))\,\,|\,\,\ x_i\in \{0,1,2\}\,\,\mathrm {for\,\, every}\,\,1\le i\le n\}. \end{aligned}$$

Since for every equivalence class [X], \(|[X]\cap A|=1\), we can let

$$\begin{aligned} Z(R)^*{\setminus } A\subseteq W. \end{aligned}$$

To complete the proof, we investigate the elements of A. For this, let \(O(X)=t\) be the number of 1’s in X. Obviously, \(0\le t\le n-1\).

Define the relation \(\thicksim _d\) on A as follows:

\(X\thicksim _d Y\) whenever “\(O(X)=O(Y)\).”

It is easily seen that \(\thicksim _d\) is an equivalence relation on A. By \([X]_t\), we mean the equivalence class of X that \(O(X)=t\). Thus, all equivalence classes are:

$$\begin{aligned} {[}X]_0,[X]_1,[X]_2,\dots ,[X]_J,[X]_{J+1},\dots ,[X]_{n-1}. \end{aligned}$$

Consider \([X]_{n-1}\) and \([X]_{n-2}\). It is not hard to see that \(|[X]_{n-1}|={{n}\atopwithdelims (){n-1}}2<{{n}\atopwithdelims (){n-2}}4=|[X]_{n-2}|\). Let \(Y\in [X]_{n-1}\) and \(Z\in [X]_{n-2}\). Since \(O(Y)=O(Z)+1\), for every element \(X'\) of \([X]_{n-1}\), there exists an element \(Y'\) of \([X]_{n-2}\), such that \(X'\) and \(Y'\) are not adjacent. This implies that \(d(X',Y')=diam(AG(R))=2\). Hence, by Lemma 2.1, we can let \([X]_{n-1}\subseteq W\), for any strong resolving set W for AG(R). We continue this procedure for \(J=[n/2]\) times, and we obtain \([X]_{J+1}\cup \dots \cup [X]_{n-1}\subseteq W\).

So to complete the proof, we investigate \([X]_0,[X]_1,[X]_2,\dots ,[X]_J\). For this, let \(X\in [X]_t\) and \(O^{\prime }(X)=O(X)+s=t+s\), where s is the number of 2’s in X, for \(0\le s\le n-t\). By \(A_{t,s}\), we mean a subset of \([X]_t\) in which the number of 2’s in every element X is s, for every t, \(0\le t\le J\). Hence, \([X]_t=\cup _{s=0}^{n-t}A_{t,s}\).

Continue the proof in the following steps.

Step 1 For every \(1\le t\le J\), consider \(A_{t,0},A_{t,1}\subseteq [X]_t\). Now, we can easily get, for every element of \(A_{t,0}\) there exists an element of \(A_{t,1}\) such that they are not adjacent. So we can let \(A_{t,0}\subseteq W\), where W is a strong resolving set of AG(R). Also the induced subgraph on \( [X]_t{\setminus } A_{t,0}\) is complete.

Step 2 Consider \([X]_{J}\) and \([X]_{J-1}\). For every element of \(A_{J-1,1}\subseteq [X]_{J-1}\) there exists an element of \(A_{J,1}\subseteq [X]_{J}\) such that they are not adjacent. So we can let \(A_{J-1,1}\subseteq W\). Also similar, for every element of \(A_{J-2,1}\cup A_{J-2,2}\subseteq [X]_{J-2}\) there exists an element of \(A_{J,1}\subseteq [X]_{J}\) such that they are not adjacent. So \(A_{J-2,1}\cup A_{J-2,2}\subseteq W\). We continue this procedure and get

\(A_{J-3,1}\cup A_{J-3,2}\cup A_{J-3,3}\subseteq W\),

\(A_{J-4,1}\cup A_{J-4,2}\cup A_{J-4,3}\cup A_{J-4,4}\subseteq W\),

\(\vdots \)

\(A_{1,1}\cup A_{1,2}\cup \dots \cup A_{1,J-1}\subseteq W\),

\(A_{0,1}\cup A_{0,2}\cup \dots \cup A_{0,J}\subseteq W\).

Step 3 Put

\(B_0=[X]_0{\setminus } A_{0,1}\cup A_{0,2}\cup \dots \cup A_{0,J}=A_{0,J+1}\cup A_{0,J+2}\cup \dots \cup A_{0,n}\),

\(B_1=[X]_1{\setminus } A_{1,1}\cup A_{1,2}\cup \dots \cup A_{1,J-1}\cup A_{1,0}=A_{1,J}\cup A_{1,J+1}\cup \dots \cup A_{1,n-1}\),

\(\vdots \)

\(B_{J-1}=[X]_{J-1}{\setminus } A_{J-1,1}\cup A_{J-1,0}=A_{J-1,2}\cup A_{J-1,3}\cup \dots \cup A_{J-1,n-J+1}\),

\(B_J=[X]_J{\setminus } A_{J,0}=A_{J,1}\cup A_{J,2}\cup \dots \cup A_{J,n-J}\),

\(B=\cup _{i=0}^{J} B_i\).

Since \([X]_{J+1}\cup \dots \cup [X]_{n-1}\subseteq W\) and by Steps 1, 2, 3, \(\{[X]_{0}\cup \dots \cup [X]_{J}\} {\setminus } B \subseteq W\), we conclude that \(Z(R)^*{\setminus } B\subseteq W\). Also, since the induced subgraph on B is complete, it is not hard to see that every two distinct vertices of B are strongly resolved by some vertex of \(Z(R)^*{\setminus } B\), so \(W\subseteq Z(R)^*{\setminus } B\), and hence, \(W= Z(R)^*{\setminus } B\). Now, we have

\(|B_0|={{n}\atopwithdelims (){J+1}}+{{n}\atopwithdelims (){J+2}}+\cdots +{{n}\atopwithdelims (){n}}\),

\(|B_1|={{n}\atopwithdelims (){1}}({{n-1}\atopwithdelims (){J}}+{{n-1}\atopwithdelims (){J+1}}+\cdots +{{n-1}\atopwithdelims (){n-1}})\),

\(|B_2|={{n}\atopwithdelims (){2}}({{n-2}\atopwithdelims (){J-1}}+{{n-2}\atopwithdelims (){J}}+\cdots +{{n-2}\atopwithdelims (){n-2}})\),

\(\vdots \)

\(|B_J|={{n}\atopwithdelims (){J}}({{n-J}\atopwithdelims (){1}}+{{n-J}\atopwithdelims (){2}}+\cdots +{{n-J}\atopwithdelims (){n-J}})\).

Thus,

\( sdim_M(AG(R))=|Z(R)^*|-{n\atopwithdelims (){J+1}}-{n\atopwithdelims (){J+2}}-\cdots -{n\atopwithdelims (){n}}-\) \({n\atopwithdelims (){1}}({{n-1}\atopwithdelims (){J}}+{{n-1}\atopwithdelims (){J+1}}+\cdots +{{n-1}\atopwithdelims (){n-1}})\)

\(-{n\atopwithdelims (){2}}({{n-2}\atopwithdelims (){J-1}}+{{n-2}\atopwithdelims (){J}}+\cdots +{{n-2}\atopwithdelims (){n-2}})-\cdots -\) \({n\atopwithdelims (){J}}({{n-J}\atopwithdelims (){1}}+{{n-J}\atopwithdelims (){2}}+\cdots +{{n-J}\atopwithdelims (){n-J}})\). \(\square \)

The following example is related to Theorem 3.1.

Example 3.1

Let \(R={\mathbb {Z}}_{4}\times {\mathbb {Z}}_{4}\times {\mathbb {Z}}_{4}\times {\mathbb {Z}}_{4}\). Then,

\(A=\{(x_1,x_2,x_3,x_4)\in V(AG(R))\,\,|\,\,\ x_i\in \{0,1,2\}\,\,\mathrm {for}\,\, \mathrm {every}\,\,1\le i\le 4\}\),

\([X]_0=A_{0,1}\cup A_{0,2}\cup A_{0,3}\cup A_{0,4}\), where

\(A_{0,1}=\{(0,0,0,2),(0,0,2,0),(0,2,0,0),(2,0,0,0)\}\),

\(A_{0,2}=\{(2,2,0,0),(2,0,0,2),(0,0,2,2),(0,2,2,0),(0,2,0,2),(2,0,2,0)\}\),

\(A_{0,3}=\{(2,2,2,0),(2,2,0,2),(2,0,2,2),(0,2,2,2)\}\),

\(A_{0,4}=\{(2,2,2,2)\}\),

\([X]_1=A_{1,0}\cup A_{1,1}\cup A_{1,2}\cup A_{1,3}\), where

\(A_{1,0}=\{(0,0,0,1),(0,0,1,0),(0,1,0,0),(1,0,0,0)\}\),

\(A_{1,1}=\{(1,2,0,0),(1,0,2,0),(1,0,0,2),(2,1,0,0),(0,1,2,0),(0,1,0,2),(0,2,1,0)\),

\((2,0,1,0),(0,0,1,2),(0,0,2,1),(0,2,0,1),(2,0,0,1)\}\),

\(A_{1,2}=\{(0,1,2,2),(0,2,1,2),(0,2,2,1),(1,0,2,2),(2,0,1,2),(2,0,2,1),(1,2,0,2)\),

\((2,1,0,2),(2,2,0,1),(1,2,2,0),(2,1,2,0),(2,2,1,0)\}\),

\(A_{1,3}=\{(2,2,2,1),(2,2,1,2),(2,1,2,2),(1,2,2,2)\}\),

\([X]_2=A_{2,0}\cup A_{2,1}\cup A_{2,2}\), where

\(A_{2,0}=\{(0,0,1,1),(0,1,0,1),(1,0,0,1),(1,0,1,0),(0,1,1,0),(1,1,0,0)\}\),

\(A_{2,1}=\{(1,1,2,0),(1,2,1,0),(2,1,1,0),(1,1,0,2),(1,2,0,1),(2,1,0,1),(2,0,1,1)\),

\((1,0,2,1),(1,0,1,2),(0,2,1,1),(0,1,2,1),(0,1,1,2)\}\),

\(A_{2,2}=\{(2,2,1,1),(2,1,2,1),(1,2,2,1),(1,2,1,2),(2,1,1,2),(1,1,2,2)\}\),

\(B_0=\{(2,2,2,0),(2,2,0,2),(2,0,2,2),(0,2,2,2),(2,2,2,2)\}\),

\(B_1=\{(0,1,2,2),(0,2,1,2),(0,2,2,1),(1,0,2,2),(2,0,1,2),(2,0,2,1),(1,2,0,2)\),

(2, 1, 0, 2), (2, 2, 0, 1), (1, 2, 2, 0), (2, 1, 2, 0), (2, 2, 1, 0), (2, 2, 2, 1), (2, 2, 1, 2),

\((2,1,2,2),(1,2,2,2)\}\),

\(B_2=\{(1,1,2,0),(1,2,1,0),(2,1,1,0),(1,1,0,2),(1,2,0,1),(2,1,0,1),(2,0,1,1),\)

\((1,0,2,1),(1,0,1,2),(0,2,1,1),(0,1,2,1),(0,1,1,2),(2,2,1,1),(2,1,2,1),(1,2,2,1),\)

\((1,2,1,2),(2,1,1,2),(1,1,2,2)\}\),

\(|B|=|B_0|+|B_1|+|B_2|=39\) and \(sdim_M(AG(R))=|Z(R)^*|-39=239-39=200\).

Next we state the following corollary.

Corollary 3.1

Let \(R\cong R_1\times \cdots \times R_n\), where \(R_i\) is a finite local non-reduced ring for every \(1\le i\le n\). Then,

\( sdim_M(AG(R))=|Z(R)^*|-\sum _{i=1}^{n-J}{n\atopwithdelims (){J+i}}- {n\atopwithdelims (){1}}\sum _{i=0}^{n-1-J}{n-1\atopwithdelims (){J+i}}-{n\atopwithdelims (){2}}\sum _{i=-1}^{n-2-J}{n-2\atopwithdelims (){J+i}}-\cdots -\) \({n\atopwithdelims (){J}}\sum _{i=1}^{n-J}{n-J\atopwithdelims (){i}}.\)

Proof

Assume that \(X= (x_1,\dots , x_n)\) and \(Y= (y_1,\dots ,y_n)\) are vertices of AG(R), where \(x_i, y_i \in R_i\), for every \(1\le i\le n\). Define the relation \(\thicksim _e\) on V(AG(R)) as follows: \(X\thicksim _e Y\), whenever for every \(1\le i\le n\), the following conditions hold.

  1. (1)

    \(x_i=0\) if and only if \( y_i=0\).”

  2. (2)

    \(x_i\in Nil(R_i)^*\) if and only if \(y_i\in Nil(R_i)^*\).”

  3. (3)

    \(x_i\in U(R_i)\) if and only if \(y_i\in U(R_i)\).”

It is easily seen that \(\thicksim _e\) is an equivalence relation on V(AG(R)). By [X], we mean the equivalence class of X. Let \(X_1= (x_1,\dots ,x_n)\) and \(X_2= (y_1,\dots ,y_n)\) be two elements of [X], where \(x_i, y_i \in R_i\) for every \(1\le i\le n\). Since \(X_1\thicksim _e X_2\), by part (2) of [13, Lemma 2.2], we deduce that \(N(X_1)=N(X_2)\). By Lemma 2.1, \(X_1\in W\) or \(X_2\in W\), where W is the strong metric basis of AG(R). We continue this procedure for \(|[X]|-1\) times, and we obtain \([X]{\setminus }\{X\}\subseteq W\). Similarly, for each equivalence class [Y], we have \([Y]{\setminus }\{Y\}\subseteq W\). We note that the number of equivalence classes is \(3^n-2\). Put \(C=\{(x_1,\dots ,x_n)\in V(AG(R))|\,\, x_i\in \{0,1,a_1,a_2,\dots ,a_n\}\,\,\,\, a_i \in Nil(R_i)^*, \,\mathrm {for}\,\, \mathrm {every}\,\,1\le i\le n\}\). Since for every equivalence class [X], \(|[X]\cap C|=1\), one may suppose

$$\begin{aligned} Z(R)^*{\setminus } C\subseteq W. \end{aligned}$$

Since \(AG(R)[C]\cong AG(R)[A]\), where A is discussed and defined in the proof of Theorem 3.1, by proof of Theorem 3.1, we infer that \(W=Z(R)^*{\setminus } C \cup W_C\), where \(W_C\) is the strong metric basis of \(AG(R)[C](\cong AG(R)[A])\). By proof of Theorem 3.1,

\(|W_C|= sdim_M(AG(R)[C])=|C|-{n\atopwithdelims (){J+1}}-{n\atopwithdelims (){J+2}}-\cdots -{n\atopwithdelims (){n}}- {n\atopwithdelims (){1}}({{n-1}\atopwithdelims (){J}}+{{n-1}\atopwithdelims (){J+1}}+\cdots +{{n-1}\atopwithdelims (){n-1}})\)

\(-{n\atopwithdelims (){2}}({{n-2}\atopwithdelims (){J-1}}+{{n-2}\atopwithdelims (){J}}+\cdots +{{n-2}\atopwithdelims (){n-2}})-\cdots - {n\atopwithdelims (){J}}({{n-J}\atopwithdelims (){1}}+{{n-J}\atopwithdelims (){2}}+\cdots +{{n-J}\atopwithdelims (){n-J}})\). Hence, the result is obtained. \(\square \)

We close this paper with the following result.

Theorem 3.2

Let \(R\cong R_1\times \cdots \times R_n\times F_1\times \cdots \times F_m\), where \(R_i\) is a finite local non-reduced ring for every \(1\le i\le n\) and \(F_i\) is a finite field for every \(1\le i\le m\). Then,

\( sdim_M(AG(R))=|Z(R)^*|-2^m(\sum _{i=1}^{n-J}{n\atopwithdelims (){J+i}}- {n\atopwithdelims (){1}}\sum _{i=0}^{n-1-J}{n-1\atopwithdelims (){J+i}}-{n\atopwithdelims (){2}}\sum _{i=-1}^{n-2-J}{n-2\atopwithdelims (){J+i}}- \cdots -{n\atopwithdelims (){J}}\sum _{i=1}^{n-J}{n-J\atopwithdelims (){i}}).\)

Proof

Put \(S\cong R_1\times \cdots \times R_n\). Let \(W_S\) be the strong metric basis of AG(S) and \(D=Z(S)^*{\setminus } W_S\). By proof of Theorem 3.1 and Corollary 3.1, AG(S)[D] is a complete subgraph of AG(S). Let \(R\cong R_1\times \cdots \times R_n\times F_1\times \cdots \times F_m\) and \(W=Z(R)^*{\setminus } E\). Then, W is the strong metric basis of AG(R), where \(E=\{(x_1,\dots , x_n,y_1,\dots , y_m)\in V(AG(R))|\,\,(x_1,\dots , x_n)\in D \,\,\mathrm {and}\,\, y_i\in \{0,1\} \,\,\mathrm {for\,\, every}\,\,1\le i\le m\}\)(note that since AG(S)[D] is complete, AG(R)[E] is complete too). Since \(|E|=2^m|D|\), we conclude that

\( sdim_M(AG(R))=|Z(R)^*|-|E|=|Z(R)^*|-2^m(\sum _{i=1}^{n-J}{n\atopwithdelims (){J+i}}- {n\atopwithdelims (){1}}\sum _{i=0}^{n-1-J}{n-1\atopwithdelims (){J+i}}-{n\atopwithdelims (){2}}\sum _{i=-1}^{n-2-J}{n-2\atopwithdelims (){J+i}}- \cdots -{n\atopwithdelims (){J}}\sum _{i=1}^{n-J}{n-J\atopwithdelims (){i}}).\) \(\square \)