# Spectra of the zero-divisor graph of finite rings

Krishnat D. MasalkarA $A$ Department of Mathematics, Abasaheb Garware College,
Pune-411 004, India<EMAIL_ADDRESS>,  Anil KhairnarA,1 $A$
Department of Mathematics, Abasaheb Garware College, Pune-411 004, India.
<EMAIL_ADDRESS><EMAIL_ADDRESS>,  Anita LandeA $A$ Department
of Mathematics, Abasaheb Garware College, Pune-411 004, India.
<EMAIL_ADDRESS><EMAIL_ADDRESS>and  Avinash PatilB $B$ Department
of Mathematics, JET’s Z. B. Patil College, Dhule-424 002, India.
<EMAIL_ADDRESS>
###### Abstract.

The zero-divisor graph $\Gamma(R)$ of a ring $R$ is a graph with nonzero zero-
divisors of $R$ as vertices and distinct vertices $x,y$ are adjacent if $xy=0$
or $yx=0$. We provide an equivalence relation on a ring $R$ and express
$\Gamma(R)$ as a generalized join of graphs on equivalence classes of this
relation. We determined the adjacency and Lapalcian spectra of $\Gamma(R)$
when $R$ is a finite semisimple ring.

###### 2010 Mathematics Subject Classification:

Primary: 05C25, Secondary: 05C50; 15A18

11footnotetext: Corresponding author

Keywords: Zero-divisor graph, generalized join of graphs, eigenvalue,
eigenvector

##  1\. Introduction

Algebra and graph contribute significant applications in the development of
artificial intelligence, information systems, image processing, clustering
analysis, medical diagnosis and decision making. Graph theory that can be used
to describe the relationships among several individuals has numerous
applications in diverse fields such as modern sciences and technology,
database theory, data mining, neural networks, expert systems, cluster
analysis, control theory, and image capturing.

Diagonalization of matrices is one of the techniques in mathematics. Most of
the time diagonalization is discussed for real or complex matrices. A large
part of linear algebra can be performed over arbitrary commutative rings, and
also over non-commutative rings. It is therefore natural to ask how the theory
can be extended from the real or complex case to arbitrary rings. In [8] Dan
Laksov propose a method for diagonalization of matrices with entries in
commutative rings.

Let $G=\left<V,~{}E\right>$ be a simple undirected graph with a vertex set $V$
and an edge set $E$. The cardinality of $V$ is the order of $G$. If there is
an edge $e\in E$ with end vertices $u$ and $v$ then we say that $u$ and $v$
are adjacent and the edge $e$ is denoted by $u-v$. For any vertex $u$ in $G$,
$N(u)=\left\\{v\in V(G)\colon u-v\in E(G)\right\\}$ is the neighborhood of $u$
and $d(u)=|N(u)|$ is a degree of $u$. A graph $G$ is $r-$regular if every
vertex has the same degree equal to $r$.The notion of the compressed graph is
useful in studying the properties of graphs. The relation $\approx$ (which is
an equivalence relation) on a vertex set $V$ is defined by $a\approx
b~{}~{}\text{ if and only if }~{}~{}N(a)=N(b).$ Let
$\displaystyle\frac{V}{\approx}=\\{[a]\colon[a]=\\{b\in V\colon b\approx
a\\}\\}$ be set of its equivalence classes. The compressed graph $G^{\approx}$
is a graph on $\frac{V}{\approx}$ such that $[a]^{\approx}-[b]^{\approx}$ is
an edge if and only if $a-b$ is an edge in $G$.

The adjacency matrix and the Laplacian matrix of a graph
$G=\left<V=\\{1,2,...,n\\},E\right>$ are given by $A(G)=[a_{ij}]_{n\times n}$
and $L(G)=d(G)-A(G)$, where $a_{ij}=1$ if $i-j\in E(G)$ and $a_{ij}=0$
otherwise and $d(G)=diag(d(1),\ldots,d(n))$. A multiset of eigenvalues,
$\sigma_{A}(G)=\left\\{\lambda_{1}^{(s_{1})},\ldots,\lambda_{n}^{(s_{n})}\right\\}$
of $A(G)$ is the adjacency spectra of $G$. The Laplacian spectra
$\sigma_{L}(G)$ of a graph $G$ is defined as the multiset of eigenvalues of
$L(G)$. The author refers to [9] for introduction to graph theory and spectral
graph theory. The _generalized join of the family of graphs_ is defined as
below, which is useful to find $\sigma_{A}(G)$ and $\sigma_{L}(G)$ of a graph
$G$.

######  Definition 1.1 ([6, Definition 2.1]).

Let $H=\left<I=\\{1,2..n\\},E\right>$ be a graph. and
$\displaystyle\mathcal{F}=\\{G_{i}=(V_{i},E_{i})\colon i\in I\\}$ be a family
of graphs and $V_{i}\cap V_{j}=\emptyset$ for all $i\neq j$. The
$H$-generalized join of the family $\mathcal{F}$ is denoted by
$\displaystyle{\bigvee_{H}\mathcal{F}}$ and is a graph formed by replacing
each vertex $i$ of $H$ by the graph $G_{i}$ and joining each vertex of $G_{i}$
to every vertex of $G_{j}$ whenever $i$ and $j$ are adjacent in H.

Motivated from Theorem 1.2, in [6] Cardoso et al. gave adjacency spectrum
$\displaystyle A\left(\displaystyle\bigvee_{H}\mathcal{F}\right)$ and
Laplacian spectrum $\displaystyle L\left(\bigvee_{H}\mathcal{F}\right)$. For
sake of convenience, we state result by Fiedler.

######  Theorem 1.2 ([12, Fiedler’s result]).

Let $A$ be a $m\times m$ symmetric matrix with eigenvalues
$\alpha_{1},\alpha_{2},\ldots,\alpha_{m}$. Let $u$ be a unit eigenvector of
$A$ corresponding to $\alpha_{1}$. Let $B$ be another $n\times n$ symmetric
matrix with eigenvalues $\beta_{1},\beta_{2},\ldots,\beta_{n}$ and $v$ be unit
eigenvector of $B$ corresponding to $\beta_{1}$. Then for any $\rho$ the
matrix $C=\begin{bmatrix}A&\rho uv^{t}\\\ \rho vu^{t}&B\end{bmatrix}$ has
eigenvalues
$\alpha_{2},\ldots,\alpha_{m},\beta_{2},\ldots,\beta_{n},\gamma_{1},\gamma_{2}$
where $\gamma_{1},\gamma_{2}$ are eigenvalues of the matrix
$C_{1}=\begin{bmatrix}\alpha_{1}&\rho\\\ \rho&\beta_{1}\end{bmatrix}$.

Let $R$ be a ring and $Z(R)$ denote its set of nonzero zero-divisors. Anderson
et al. [2] introduced the zero-divisor graph $\Gamma(R)$ of a commutative ring
$R$, which was extended to non-commutative rings by Redmond [18] as the graph
with vertex set $Z(R)$ where two vertices $a,~{}b$ are adjacent if and only if
$ab=0~{}~{}\text{or}~{}ba=0$. The aim of considering these graphs is to study
the interplay between graph theoretic properties of $\Gamma(R)$ and the
algebraic properties of the ring $R$. In ([11]), the authors examine
preservation of diameter and girth of the zero-divisor graph under extension
to Laurent polynomial and Laurent power series rings.

Recently, Chattopadhyay et al. [7] studied the Laplacian eigenvalues of
$\Gamma(\mathbb{Z}_{n})$. Afkhami et al. [1] studied the signless Laplacian
and normalized Laplacian spectra of $\Gamma(\mathbb{Z}_{n})$. Bajaj and
Panigrahi [3] studied the adjacency spectrum of $\Gamma(\mathbb{Z}_{n})$.
Pirzada et al. [16] studied the adjacency spectrum of
$\mathbb{Z}_{p^{M}q^{N}}$. In [4] Bajaj and Panigrahi studied the universal
adjacency spectrum of $\Gamma(\mathbb{Z}_{n})$. Katja M$\ddot{o}$nius [13]
determined adjacency spectrum of
$\Gamma\left(\mathbb{Z}_{p}\times\mathbb{Z}_{p}\times\mathbb{Z}_{p}\right)$
and
$\Gamma\left(\mathbb{Z}_{p}\times\mathbb{Z}_{p}\times\mathbb{Z}_{p}\times\mathbb{Z}_{p}\right)$
for a prime number $p$. Jitsupat Rattanakangwanwong and Yotsanan Meemark [10]
studied the eigenvalues and eigenvectors of adjacency matrix of the zero
divisor graphs of finite direct products of finite chain rings.

In this paper, we provide an equivalence relation $\sim$ on a finite ring $R$
and express $\Gamma(R)$ as $\Gamma(R)^{\sim}-$generalized join of null and
complete graphs. By using the equivalence relation $\approx$, $\Gamma(R)$ is
expressed as $\Gamma(R)^{\approx}-$generalized join of a family of null
graphs. Using Cardoso’s result we find the adjacency and Laplacian spectra of
$\Gamma(R)$ when $R$ is a finite semisimple ring. Also, we provide a method to
find adjacency spectra of a graph which generalized join graph of a family of
null graphs.

##  2\. representation of zero-divisor graph of rings using generalized join

In order to simplify the representation of $\Gamma(R)$, it is often useful to
consider the notion called compressed zero-divisor graphs and the notion of
the generalized join of graphs. In ([14]), Mulay introduced a compressed zero
divisor graph of a commutative ring $R$. If $R$ is a commutative ring then the
relation $\sim_{m}$ on $Z(R)$ defined by $a\sim_{m}b$ if and only if
$ann(a)=ann(b)$. For a commutative ring $R$, a compressed zero-divisor graph
$\Gamma_{E}(R)$ is a graph with vertex set $\left\\{[a]^{\sim_{m}}~{}|a\in
Z(R)\right\\}$, where $~{}[a]^{\sim_{m}}=\left\\{x\in
Z(R)~{}|~{}ann(x)=ann(a)\right\\}$ is equivalence class of the relation
$\sim_{m}$ containing $a$ and any two vertices $[a],[b]$ in $\Gamma_{E}(R)$
are adjacent if and only if $a$ and $b$ are adjacent in $\Gamma(R)$. This
notion of compressed zero divisor graph $\Gamma_{E}(R)$ can be extended to
noncmmutative ring. If $R$ be noncommutative ring then for $a\in R$, set of
annihilators of $x$ is denoted by $ann(a)$ and it given by
$ann(a)=\left\\{x\in Z(R)~{}|~{}ax=0~{}~{}\text{or}~{}~{}xa=0\right\\}$.Note
that $ann(a)=ann_{l}(a)\cup ann_{r}(a)$, where $ann_{l}(a)=\left\\{x\in
Z(R)~{}|~{}xa=0\right\\}$ and $ann(a)=\left\\{x\in Z(R)~{}|~{}ax=0\right\\}$.
The relation $\sim_{m}$ is also an equivalence relation on $Z(R)$ when $R$ is
a noncommuatative ring. Also for a ring $R$, $\Gamma^{\approx}(R)$ is one of
the compressed zero divisor graph with vertex set
$\left\\{[a]^{\approx}~{}|~{}a\in Z(R)\right\\}$, where
$[a]^{\approx}=\left\\{x\in
Z(R)~{}|~{}N(x)=N(a)~{}~{}\text{in}~{}~{}\Gamma(R)\right\\}$. Clearly for
$a\in\Gamma(R)$, $N(a)=ann(a)\setminus\\{a\\}.$
Consider ring $R=Z_{18}$. The vertex set of the graph $\Gamma_{E}(R)$ is

$\left\\{[2]^{\sim_{m}}=\\{2,4,8,10,14,16\\},[3]^{\sim_{m}}=\\{3,15\\},[6]^{\sim_{m}}=\\{6,12\\},[9]^{\sim_{m}}=\\{9\\}\right\\}$

while vertex set of the graph $\Gamma(R)^{\approx}$ is

$\left\\{[2]^{\approx}=\\{2,4,8,10,14,16\\},[3]^{\approx}=\\{3,15\\},[6]^{\approx}=\\{6\\},[12]^{\approx}=\\{12\\},[9]^{\approx}=\\{9\\}\right\\}.$

Let $R$ be a ring then we will show that, if $R$ is reduced then
$\Gamma_{E}(R)=\Gamma^{\approx}(R)$. But converse is not true. Ring $Z_{4}$ is
not reduced and $\Gamma_{E}(Z_{4})=\Gamma^{\approx}(Z_{4})=K_{1}$.

######  Proposition 2.1.

Let $R$ be a ring. Then $R$ is reduced then
$\Gamma_{E}(R)=\Gamma^{\approx}(R)$.

###### Proof.

Assume $R$ is a reduced ring. Therefore $a^{2}=0$ imply $a=0$ for any $a\in
R$. Hence for any $a\in Z(R)$, $ann(a)=ann(a)\setminus\\{a\\}=N(a)$. So for
any $a,b\in R$, $ann(a)=ann(b)$ if and only if $N(a)=N(b)$. Therefore
$a\sim_{m}b$ if and only if $a\approx b$. This imply
$[a]^{\sim_{m}}=[a]^{\approx}$ for any $a\in Z(R)$. Hence
$\Gamma_{E}(R)=\Gamma^{\approx}(R)$. ∎

In following proposition we give the relation between equivalence classes of
relations $\sim_{m}$ and $\approx$ defined on the commutative ring with unity.

######  Proposition 2.2.

Let $R$ be a commutative ring with unity 1 and $a\in Z(R)$. If $R$ contains
unit $u$ with $(1-u)^{2}\neq 0$ then

  1. (1)

$a^{2}\neq 0$ imply $[a]^{\approx}=[a]^{\sim_{m}}$.

  2. (2)

$a^{2}=0$ imply $[a]^{\approx}=\\{a\\}$.

###### Proof.

Let $R$ be commutative ring with unity 1 and $u$ is unit in $R$ with
$(1-u)^{2}\neq 0$. We will prove statement (1). Let $a\in Z(R)$ and $a^{2}\neq
0$. Let $x\in[a]^{\sim_{m}}$ . Then $ann(x)=ann(a)$, and hence
$(x)=\frac{R}{ann(x)}=\frac{R}{ann(a)}=(a)$. Therefore $a=xc$ for some $c\in
R$. Since $a^{2}\neq 0$, we have $x^{2}\neq 0$. Therefore
$N(x)=ann(x)=ann(a)=N(a)$ . Hence $x\in[a]^{\approx}$. This gives
$[a]^{\sim}\subseteq[a]^{\approx}$. Let $x\in[a]^{\approx}$. Then
$N(x)=ann(x)\setminus\\{x\\}=N(a)=ann(a)$. Hence $ax\neq 0$. If $x^{2}=0$ then
$xu\in N(x)=N(a)$. This implies that $axu=0$ and hence $ax=0$, which
contradicts to $ax\neq 0$. Therefore $x^{2}\neq 0$. This yields
$ann(x)=ann(x)\setminus\\{x\\}=ann(a)$. This gives $x\in[a]^{\sim_{m}}$.
Therefore $[a]^{\approx}\subseteq[a]^{\sim_{m}}$. Thus
$[a]^{\sim_{m}}=[a]^{\approx}$.
Now, we will prove statement (2). Let $a^{2}=0$. If $x\in[a]^{\sim_{m}}$ then
$(a)=\frac{R}{ann(a)}=\frac{R}{ann(x)}=(x)$. Hence $x^{2}=xa=0$, that gives
$x\in N(a)\setminus N(x)$. This implies that $x\notin[a]^{\approx}$. If
$x\notin[a]^{\sim_{m}}$ then we will show that $x\notin[a]^{\approx}$. If
$x=au$ then $x\in N(a)\setminus N(x)$ and hence $x\notin[a]^{\approx}$.
Suppose that $x\neq au$. If $x\in[a]^{\approx}$, then $N(a)=N(x)$ and hence
$xa\neq 0$. Since $au\in N(a)=N(x)$, therefore $xau=0$. Hence $xa=0$, which is
a contradiction. Thus $x\notin[a]^{\approx}$. ∎

In the following proposition we give the relation between equivalence classes
of relations $\sim_{m}$ and $\approx$ defined on noncommutative ring with
unity.

######  Proposition 2.3.

Let $R$ be a noncommutative ring with unity 1 and $a\in Z(R)$. If there exist
units $u$ and $v$ in $R$ such that $u+v=1$ then

  1. (1)

$a^{2}=0$ imply $[a]^{\approx}=\\{a\\}$.

  2. (2)

$a^{2}\neq 0$ imply $[a]^{\approx}=[a]^{\sim_{m}}$.

###### Proof.

Let $R$ be a non-commutative ring with unity $1$ and $a\in Z(R)$.
$(1):$ Let $a^{2}=0$. Let $x\in[a]^{\sim_{m}}$ and $x\neq a$. Therefore $a\in
ann(a)=ann(x)$. Therefore $ax=0$ or $xa=0$. This gives $x\in N(a)\setminus
N(x)$. So $x\notin[a]^{\approx}$. Let $x\notin[a]^{\sim_{m}}$. Assume contrary
$x\in[a]^{\approx}$. Therefore $xa\neq 0$ and $ax\neq 0$. Since $1-u$ and $u$
are units, $au\neq a$ and $a(1-u)\neq a$. Since $N(x)=N(a)$,
$ax=aux+a(1-u)x=0+0=0$. Which is contradiction. Therefore
$x\notin[a]^{\approx}$. Hence we conclude that $[a]^{\approx}=\\{a\\}$.
$(2):$ Let $a^{2}\neq 0$, $x\in[a]^{\sim_{m}}$ and $x\neq a$. If $x^{2}\neq 0$
then $N(x)=ann(x)=ann(a)=N(a)$. Hence $x\in[a]^{\approx}$. Assume that
$x^{2}=0$. Since $x\in ann(x)=ann(a)$, $x\in N(a)\setminus N(x)$.Therefore
$x\notin[a]^{\approx}$. Let $y\notin[a]^{\sim_{m}}$. If $ya=0$ or $ay=0$ then
$y\in N(a)\setminus N(y)$ and hence $y\notin[a]^{\approx}$. Therefore assume
that $ya\neq 0$ and $ay\neq 0$. Let $y^{2}\neq 0$. If $y\in[a]^{\approx}$ then
$ann(y)=ann(y)\setminus\\{y\\}=N(y)=N(a)=ann(a)\setminus\\{a\\}=ann(a)$. So
$y\in[a]^{\sim_{m}}$. This contradicts to fact that $y\notin[a]^{\sim_{m}}$.
If $y^{2}=0$ then $yu\neq y$ and $y(1-u)\neq y$, as $1-u$ and $u$ are units.
If $y\in[a]^{\approx}$ then $yu,~{}~{}y(1-u)\in N(y)=N(a)$. Hence $yua=0$ and
$y(1-u)a=0$. This implies that $ya=y(1-u)a+yua=0+0=0$. This contradicts to
fact that $ya\neq 0$. Therefore $y\notin[a]^{\approx}$. Hence we conclude
that, $[a]^{\approx}=[a]^{\sim_{m}}\setminus N_{2}$. From (1), we get that
$[a]^{\approx}=[a]^{\sim_{m}}$. ∎

The following proposition gives another equivalence relation $\sim$ on a ring
with unity.

######  Proposition 2.4.

Let $R$ be a ring with unity. A binary relation $\sim$ on $Z(R)$ defined by

$a\sim b~{}\text{if and only if}~{}a=ub=bv,~{}\text{ for some units }u,~{}v\in
R,$

is an equivalence relation.

###### Proof.

Let $x,y,z\in Z(R)$. Since $x=1x=x1,$ $x\sim x$. Also $x\sim y$ implies
$x=uy=yv$, for some units $u,v\in R,$ which gives $y=u^{-1}x=xv^{-1}$ and
hence $y\sim x$. If $x\sim y$ and $y\sim z$, then there exist units
$u_{1},u_{2},v_{1},v_{2}$ such that $y=u_{1}x=xv_{1}$ and $z=u_{2}y=yv_{2}$;
and so $z=u_{2}u_{1}x=v=xv_{2}v_{1}$, where $u_{2}u_{1}$ and $v_{2}v_{1}$
units in $R$. Hence $x\sim z$. Therefore $\sim$ is an equivalence relation on
$Z(R)$. ∎

######  Corollary 2.5.

Let $R$ be a commutative ring with unity. A binary relation $\sim$ on $Z(R)$
defined by

$a\sim b~{}\text{ if and only if }~{}a=ub,~{}\text{ for some unit }u\in R$

is an equivalence relation.

######  Proposition 2.6.

Let $R$ be a ring and $a,b\in Z(R)$. If $R$ is finite, reduced, commutative,
and has unity then $a\sim b$, $a\approx b$ and $a\sim_{m}b$ are equivalent.

###### Proof.

Let $R$ be finite commutative reduced ring with unity. Therefore
$R=F_{1}\times F_{2}\times...\times F_{k}$ , where $F_{1},F_{2},...F_{k}$ are
finite fields. Let $a=(a_{1},a_{2},...a_{k})\in R$ and
$b=(b_{1},b_{2},...b_{n})$ in $R$. Assume $a\approx b$. Hence
$ann(a)=N(a)=N(b)=ann(b)$. Then $a_{i}\neq 0$ if and only if $b_{i}\neq 0$.
Therefore there are units $u_{i}\in F_{i}$ such that $a_{i}=u_{i}b_{i}$ for
all $i=1,2,...,k$. Therefore $a=ub$ with $u=(u_{1},u_{2},...u_{k})$ is unit in
$R$. Clearly $a\sim b$ then $a=ub$ for some unit in $R$. Therefore
$N(a)=ann(a)=ann(b)=N(b)$. Hence $a\sim b$. Also that by proposition (2.3),
$a\approx b$ and $a\sim_{m}b$ are equivalent. ∎

######  Example 2.7.

Let $R$ be a ring with unity.

  1. (1)

Consider ring $R=\mathbb{Z}_{16}$. Then the set of all zero divisors in $R$ is
$Z(R)=\\{2,4,6,8,10,12,14\\}$, and set of all units in $R$ are
$U(R)=\\{1,3,5,7,9,11,13,15\\}$.
Equivalence classes with respect to $\sim$ are

$\big{\\{}\\{2,6,10,14\\},\\{8\\},\\{4,12\\}\big{\\}},$

while equivalence classes with respect to $\approx$ are

$\big{\\{}\\{2,6,10,14\\},\\{8\\},\\{4\\},\\{12\\}\big{\\}}.$

  2. (2)

Consider matrix ring $M_{n}(F)$ over finite field $F$. Let $A\in M_{n}(F)$ and
$B\in[A]^{\sim}$. Then $A^{2}=0$ if and only if $B^{2}=AB=BA=0$. Since
$M_{n}(F)$ has unit $u$ such that $1-u$ is also unit, $[A]^{\approx}=\\{A\\}$
if $A^{2}=0$. Also $[A]^{\sim}\subseteq[A]^{\approx}=[A]^{\sim_{m}}$ if
$A^{2}\neq 0$.

Following relation given in ([7]), equivalence relation on defined on ring
$Z_{n}$.
$a\sim_{1}b$ in $\mathbb{Z}_{n}\text{ if and only if }(a,n)=(b,n)$, where
$(a,n)$ is the gcd of $a$ and $n$.

######  Proposition 2.8.

Let $a,b$ in $Z_{n}$. Then $a\sim b$ is equivalent to $a\sim_{1}b$.

###### Proof.

We prove that $a\sim_{i}b$ if and only if $a\sim b$, for $i=1,2,3,4$.
Claim (1): $a\sim_{1}b$ if and only if $a\sim b$.
Assume that $a\sim_{1}b$ in $\mathbb{Z}_{n}$. Suppose $(a,n)=(b,n)=d.$ Hence
$ann(a)=ann(b)=(n/d)$. Then
$(a)=\frac{Z_{n}}{ann(a)}=\frac{Z_{n}}{ann(b)}=(b)$. Assume
$n=p_{1}^{k_{1}}p_{2}^{k_{2}}...p_{m}^{k_{m}}$ is prime factorization of $n$.
By chineese remainder theorem,

$Z_{n}=\frac{Z_{n}}{(p_{1}^{k_{1}})}\times\frac{Z_{n}}{(p_{2}^{k_{2}})}\times...\times\frac{Z_{n}}{(p_{m}^{k_{m}})}$

and the ismorphism is given by
$\phi(x)=(x+(p_{1}^{k_{1}}),....,x+(p_{m}^{k_{m}})).$
Let $a=a_{i}+(p_{i}^{k_{i}})$ for all $i=1,2,...m$. We prove that
$(a_{i})=(b_{i})$ in $\frac{Z_{n}}{(p_{i}^{k_{i}})}$ for each $i=1,2...,m$.
Since $(a)=(b)$ in $Z_{n}$, there exist $c\in Z_{n}$ such that $a=bc$.
Applying isomorphism $\phi$, we get $\phi(a)=\phi(b)\phi(c)$. Hence
$(\phi(a))\subseteq(\phi(b))$. Therefore $(a_{i})\subseteq(b_{i})$ for all
$i=1,2...,m$. Similarly we can show that $(b_{i})\subseteq(a_{i}).$ Therefore
we get $(a_{i})=(b_{i})$ in each of ring $\frac{Z_{n}}{(p_{i}^{k_{i}})}$ and
$a=a_{1}a_{2}..a_{m},~{}~{}b=b_{1}b_{2}...b_{m}$. In ring
$\frac{Z_{n}}{(p_{i}^{k_{i}})}$, there exist unit $u_{i}$ such that
$a_{i}=b_{i}u_{i}$. Hence we get
$a=a_{1}a_{2}...a_{m}=b_{1}b_{2}...b_{m}(u_{1}u_{2}...u_{m})=bu$, where
$u=u_{1}u_{2}...u_{m}$ is an unit in $Z_{n}$. So $a\sim b$.
Conversely, assume that $a\sim b$ then there is an unit $u~{}\text{such
that}~{}a=ub$. This yields $(a,n)=(ub,n)=(b,n)$, that is $a\sim_{1}b$. ∎

######  Proposition 2.9.

Let $F$ be a field. Let $A,B$ in $M_{n}(F)$. Then $A\sim B$ is equivalent to
$column~{}space(A)=column~{}space(B)~{}\text{ and }~{}\\\
row~{}space(A)=row~{}space(B)$

###### Proof.

Assume that $A\sim_{2}B$ in $Z(M_{n}(F))$. Therefore
$row~{}space(A)=row~{}space(B)$ and
$column~{}space(A)=column~{}space(B)$. Let $E,F$ be row reduced echelon forms
of $A$ and $B$ respectively. Then there exist invertible matrices $C$ and $D$
such that $CA=E,~{}DB=F$. Since row spaces of $A$ and $B$ are same, we must
have $E=F$, which imply $CA=DB$, i.e., $A=PB\text{ and }P=C^{-1}D$. Similarly,
there exists an invertible matrix $Q$ such that $A=BQ$. Therefore $A\sim B$.
Conversely, assume that $A\sim B$. Hence there exist invertible matrices $P$
and $Q$ such that $A=PB=BQ$. Since $P$ is invertible, there exist elementary
matrices, say $E_{1},E_{2},\ldots,E_{k}$ such that $P=E_{1}E_{2}\ldots E_{k}$.
Also, we know that for any elementary matrix $E,$
$row~{}space(B)=row~{}space(EB)$. Hence inductively we get
$row~{}space(B)=row~{}space(PB)=row~{}space(A)$. Similarly, we have,
$column~{}space(A)=column~{}space(B)$. Thus $A\sim_{2}B$. ∎

Let $F$ be field and $A,B\in M_{n}(F)$. Then each of the following statements
is equivalent to the statement $A\sim B$.

  1. (1)

$~{}row~{}null~{}space(A)=row~{}null~{}space(B)~{}and~{}\\\
column~{}null~{}space(A)=column~{}null~{}space(B)$.

  2. (2)

$~{}row~{}null~{}space(A)=row~{}null~{}space(B)~{}\\\
and~{}column~{}space(A)=column~{}space(B)$.

Now we show that two relations $\sim$ and $\sim_{m}$ on a ring are same on a
matrix ring over finite field.

######  Proposition 2.10.

Let $R=M_{n}(F)$ be a matrix ring over field $F$ and $A,B\in R$. Then $A\sim
B$ if and only if $A\sim_{m}B$.

###### Proof.

Let $A\sim B$. Then there are units $U$ and $V$ in $R$ such that $B=UA=AV$.
Therefore $CA=0$ if and only if $CB=0$. Also $AC=0$ if and only if $BC=0$.
Hence $ann(A)=ann_{l}(R)\cup ann_{r}(A)=ann_{l}(B)\cup ann_{r}(B)=ann(B)$.
Therefore $A\sim_{m}B$.
Conversely assume $A\sim_{m}B$. Therefore $ann_{r}(A)\cup
ann_{l}(A)=ann_{r}(B)\cup ann_{l}(B)$. Let $E$ and $F$ be idempotents such
that $ann_{r}(A)=ann_{r}(E)$ and $ann_{l}(A)=ann_{l}(F)$. Note that idempotent
$E$ can be obtained from row reduced echelon form $E_{A}$ of $A$ by arraging
leading 1’s on diagonal using rwo operations on $E_{A}$. Let $G$ and $H$
idempotents are such that Hence $ann_{r}(B)=ann_{r}(G)$ and
$ann_{l}(H)=ann_{l}(H)$. Therefore $ann_{r}(E)\cup ann_{l}(F)=ann_{r}(G)\cup
ann_{l}(H)$. If $E\notin ann_{r}(G)$ then $ann_{r}(E)=ann_{l}(H)=J~{}(say)$.
Hence $J$ is a proper two sided ideal of $M_{n}(F)$ and hence $J=0$. Therefore
$E^{-1}$ exist and hence $A^{-1}$ exist, a contradiction. Hence $E\in
ann_{r}(G)$. Similarly $G\in ann_{r}(E)$. Hence
$ann_{r}(A)=ann_{r}(E)=ann_{r}(G)=ann_{r}(B)$. Therefore there exist
invertible matrix $P\in M_{n}(F)$ such that $PA=B$. Similarly there is
invertible matrix $Q\in M_{n}(F)$ such that $AQ=B$. ∎

######  Corollary 2.11.

Let $R$ is a finite semisimple ring and $a,b$ in $R$. Then $a\sim b$ if and
only if $a\sim_{m}b$.

###### Proof.

Since $R$ is a finite semisimple ring , it is finite direct sum over finite
fields. Let $a=A_{1}\oplus A_{2}\oplus...\oplus A_{k}$ and $b=B_{1}\oplus
B_{2}\oplus...\oplus B_{k}$ . Therefore $a\sim b$ if and only if $A_{i}\sim
B_{i}$ for all $i=1,2,...k$ if and only if $a\sim_{m}b$. ∎

Let $R$ be a ring with unity. Let $\frac{Z(R)}{\sim}=\\{[x]\colon[x]=\\{y\in
Z(R)\colon y\sim x\\}\\}$ be the set of equivalence classes of $\sim$. Let
$\Gamma([x])$ is an induced subgraph of $\Gamma(R)$ on $[x]$, where
$[x]\in\frac{Z(R)}{\sim}$. Let $\Gamma(R)^{\sim}$ be a graph on
$\frac{Z(R)}{\sim}$ such that $[x]-[y]$ is an edge in $\Gamma(R)^{\sim}$ if
and only if $x-y$ is an edge in $\Gamma(R)$. We can write $\Gamma(R)$ as
$\Gamma(R)^{\sim}-$ generalized join of family of its induced subgraphs on
equivalence classes of $\sim$.

######  Proposition 2.12.

Let $R$ be a ring with unity. Let
$\mathcal{F}=\left\\{\Gamma([x])\colon[x]\in\frac{Z(R)}{\sim}\right\\}$. Then

  1. (1)

$\displaystyle\Gamma(R)=\bigvee_{\Gamma(R)^{\sim}}\mathcal{F}.$

  2. (2)

If $x^{2}=0$, then $\Gamma([x])$ is a complete graph. otherwise, it is a null
graph.

  3. (3)

Let $x\in R$ and $e,f\in\Gamma([x])$ with $e^{2}=e,f^{2}=f$ then $e=f$ and
$\Gamma([x])$ is a null graph.

  4. (4)

The ring $R$ is reduced (i.e., $0$ is the only nilpotent element in $R$) if
and only if each graph $\Gamma([x])$ is a null graph.

###### Proof.

Claim (1): Let $x,y\in Z(R)$, and $a\in[x],~{}b\in[y]$. So there are units
$u_{1},v_{1},u_{2},v_{2}$ such that $a=u_{1}x=xv_{1}$ and $b=u_{2}y=yv_{2}$.
Hence $ab=u_{1}xyv_{2}~{}~{}\text{and}~{}~{}ba=u_{2}yxv_{1}$. Therefore
$xy=0~{}~{}\text{if and only
if}~{}~{}ab=0~{}~{}\text{and}~{}~{}yx=0~{}~{}\text{if and only if}~{}~{}ba=0$.
Therefore $[x],[y]~{}\text{ are adjacent}~{}~{}\text{if and only
if}~{}~{}xy=0~{}\text{ or}~{}~{}yx=0~{}~{}\text{if and only
if}~{}~{}ab=0~{}~{}\text{ or}~{}~{}ba=0~{}~{}\text{if and only
if}~{}~{}a,b~{}\text{are adjacent}.$ Thus, each vertex of $\Gamma([x])$ is
adjacent to every vertex of $\Gamma([y])$ if and only if $[x]$ and $[y]$ are
adjacent in $\Gamma(R)^{\sim}$.
Claim(2): Let $x\in Z(R)$ be fixed. If $a,b\in[x]$, then there exist units
$u_{1},v_{1},u_{2},v_{2}$ such that $a=u_{1}x=xv_{1}$ and $b=u_{2}x=xv_{2}$.
Hence $ab=u_{1}x^{2}v_{2}=0~{}~{}\text{or}~{}~{}ba=u_{2}x^{2}v_{1}=0$ if and
only if $x^{2}=0$. So all vertices in $\Gamma([x])$ are adjacent to each other
if and only if $x^{2}=0$. Therefore $\Gamma([x])$ is either a complete graph
or a null graph.
Claim(3): If $e,f$ are nonzero idempotents in $\Gamma([x])$, then
$e=xu_{1}=v_{1}x,f=xu_{2}=v_{2}x$, for some units $u_{1},u_{2},v_{1},v_{2}$ in
$R$. Therefore $e=xu_{1}=xu_{2}u_{2}^{-1}u_{1}=fu_{2}^{-1}u_{1}=fu,$ where
$u=u_{2}^{-1}u_{1}$. Similarly $e=vf,$ where $v=v_{1}v_{2}^{-1}$. Hence
$fe=f^{2}u=fu=e$ and $ef=vf^{2}=vf=e$. Therefore $e=ef=fe$. Similarly we can
show that $f=ef=fe$. Hence we get $e=f$.
Claim (4): If the ring $R$ is not reduced, then there exists a nonzero element
$y$ such that $y^{2n}=0$ and $y^{2n-1}\neq 0$, for some positive integer $n$.
Let $x=y^{n}$ then $x\neq 0$ and $x^{2}=0$. Therefore by Claim (2),
$\Gamma([x])$ is a complete graph. Therefore, if $\Gamma([x])$ is a null graph
for each $x\in Z(R)$ then $R$ is a reduced ring. Conversely, assume that every
$\Gamma([x])$ is a null graph. Then $x^{2}\neq 0$, for any $x\in Z(R)$. Thus
$R$ is reduced. ∎

Some times following lemma can be used to find spectra of graphs.

######  Lemma 2.13.

Let $F$ be a field and $A.B,D\in M_{n}(F)$. If $B,D$ are diagonal matrices and
$A$ is a symmetric matrix with $AB=BA$ then
$\sigma(B+DAD)=\sigma(B)+\sigma(DAD)$.

###### Proof.

Since $A$ is symmetric and $D$ is a diagonal matrix, $DAD$ is a symmetric
matrix. There is matrix $P$ such that $P^{t}P=I$ and $P^{t}DADP=\Lambda$,
where $\Lambda$ is a diagonal matrix and its diagonal entries are eigenvalues
of $DAD$. Since $B$ is a diagonal matrix, it is also diagonalizable. If
$AB=BA$ then $(DAD)B=B(DAD)$ , which gives $A$ and $B$ are simultaneously
orthogonally diagonalizable. That is, there exist orthogonal matrix $P$ such
that each column of $P$ is an eigenvector of $DAD$ as well as $B$. Therefore
$P^{t}(B+DAD)P=P^{t}BP+P^{t}DADP.$ Hence
$\sigma(B+DAD)=\sigma(B)+\sigma(DAD).$ ∎

######  Remark 2.14.

Let each $i=1,2...,n$, $G_{i}$ is $r_{i}$ regular graph and $|G_{i}|=n_{i}$.
Let $\displaystyle G=\bigvee_{H}\\{G_{1},G_{2},\ldots,G_{n}\\}$ and each
$G_{i}$ is $r_{i}$-regular graph with $|G_{i}|=n_{i}$.
Let
$B=diag(r_{1},r_{2},\ldots,r_{n}),~{}C=diag(N_{1},N_{2},\ldots,N_{n})~{}and~{}D=diag(\sqrt{n_{1}},\sqrt{n_{2}},\ldots,\sqrt{n_{n}})$.
Then

$C_{A}(H)=B+DA(H)D~{}~{}\text{ and }~{}~{}C_{N}(H)=C+DA(H)D.$

If $BA(H)=A(H)B$ and $CA(H)=A(H)C$ then by Lemma 2.13,

$\sigma(C_{A}(H))=\sigma(B)+\sigma(DA(H)D)~{}~{}\text{ and
}~{}~{}\sigma(C_{N}(H))=\sigma(C)+\sigma(DA(H)D).$

Now we state the results by Cardoso et al. from [6].

######  Proposition 2.15.

Let $H$ be a graph on set $I=\left\\{1,2,\ldots,n\right\\}$ and let
$\displaystyle\mathcal{F}=\\{G_{i}\colon i\in I\\}$ be a family of $n$
pairwise disjoint $r_{i}-$ regular graphs of order $n_{i}$ respectively. Let
$\displaystyle
G=\bigvee_{H}\mathcal{F}~{}~{}~{}~{}~{}~{}~{}~{}\text{and}~{}~{}~{}~{}~{}~{}~{}N_{i}=\begin{cases}\displaystyle\sum_{j\in
N(i)}n_{j},&N(i)\neq\phi\\\ 0,&\text{otherwise}\end{cases}.$
If

$\displaystyle C_{A}(H)=(c_{ij})=\begin{cases}r_{i},&i=j\\\
\sqrt{n_{i}n_{j}},&i\text{ adjacent to }j\\\
0,~{}~{}&\text{otherwise}\par\par\end{cases}$ and

$\displaystyle C_{N}(H)=(d_{ij})=\begin{cases}N_{i},&i=j\\\
-\sqrt{n_{i}n_{j}},&i~{}~{}\text{adjacent to }j\\\
0,&\text{otherwise}\par\par\end{cases}$.

then

(2.1)
$\sigma_{A}(G)=\left(\bigcup_{i}^{n}\left(\sigma_{A}(G_{i})\setminus\left\\{r_{i}\right\\}\right)\right)\bigcup\sigma(C_{A}(H)).$

and

(2.2)
$\sigma_{L}(G)=\left(\bigcup_{i}^{n}\left(N_{i}+(\sigma_{L}(G_{i})\setminus\left\\{0\right\\})\right)\right)\bigcup\sigma(C_{N}(H)).$

######  Remark 2.16.

Note that in the above proposition, each $G_{i}$ is $r_{i}$-regular graph,
hence $[\underbrace{1,1,\ldots,1}_{n_{i}~{}~{}times}]^{t}$ is its Perron
vector, i.e., eigenvector associated to largest eigenvalue $r_{i}$.

######  Corollary 2.17.

Let $H$ be a graph on vertices $\\{1,2,\ldots,t\\}$; and
$G=\displaystyle\bigvee_{H}\\{K_{n_{1}},\ldots,K_{n_{r}},\overline{K}_{n_{r+1}},\ldots,\overline{K}_{n_{t}}\\}$.
Then

(2.3)
$\displaystyle\sigma_{A}(G)=\left(\bigcup_{i=1}^{r}\\{(-1)^{(n_{i}-1)}\\}\right)\bigcup\left(\bigcup_{i=r+1}^{t}\\{0^{(n_{i}-1)}\\}\right)\bigcup\sigma(C_{A}(H)),~{}~{}$
$\displaystyle\sigma_{L}(G)=\left(\bigcup_{i=1}^{r}\\{(N_{i}+n_{i})^{(n_{i}-1)}\\}\right)\bigcup\left(\bigcup_{i=r+1}^{t}\\{0^{(n_{i}-1)}\\}\right)\bigcup\sigma(C_{N}(H)).$

###### Proof.

We have, $\sigma(K_{n_{i}})=\\{(n_{i}-1)^{(1)},(-1)^{n_{i}-1}\\}$ for each
$i=1,2...,r$ and $\sigma(\overline{K_{n_{i}}})=\\{0^{n_{i}}\\}$ for each
$i=r+1,...,t$. Expressions for $\sigma_{A}(H)$ and $\sigma_{L}(H)$ in (2.3)
are evident from Proposition 2.15. ∎

If $R$ is a finite ring with unity, then the adjacency matrix $A(\Gamma(R))$
is obtained from $A(\Gamma(R)^{\sim})$ as below. For a finite ring with unity,
we write $\sigma_{A}(\Gamma(R))$ and $\sigma_{L}(\Gamma(R))$ using the
generalized join operation.

######  Proposition 2.18.

Let $R$ be a finite ring with unity and
$\Gamma(R)^{\sim}=\\{[x_{1}],[x_{2}],...,[x_{r}],[x_{r+1}],\ldots,[x_{t}]\\}$
with $x_{i}^{2}=0$ for $i=1,2,...,r$. Suppose that $n_{i}=|[x_{i}]|$, for
$i=1,2,\ldots,t$. Then

  1. (1)

$\displaystyle\Gamma(R)=\bigvee_{\Gamma(R)^{\sim}}\\{K_{n_{1}},\ldots,K_{n_{r}},\overline{K}_{n_{r+1}},\ldots,\overline{K}_{n_{t}}\\}$.

  2. (2)

$\displaystyle\sigma_{A}(\Gamma(R))=\left(\bigcup_{i=1}^{r}\\{(-1)^{(n_{i}-1)}\\}\right)\bigcup\left(\bigcup_{i=r+1}^{t}\\{0^{(n_{i}-1)}\\}\right)\bigcup\sigma(C_{A}(G^{\sim}))$.

  3. (3)

$\displaystyle\sigma_{L}(\Gamma(R))=\left(\bigcup_{i=1}^{r}\\{(N_{i}+n_{i})^{(n_{i}-1)}\\}\right)\bigcup\left(\bigcup_{i=r+1}^{t}\\{0^{(n_{i}-1)}\\}\right)\bigcup\sigma(C_{N}(\Gamma(R)^{\sim}))$,
where $\sigma(C_{A}(G^{\sim}))$ and $\sigma(C_{N}(\Gamma(R)^{\sim}))$ are as
given in Corollary 2.17 with $i$ replaced by $x_{i}$. Also $r_{i}=n_{i}-1$,
for $i=1,2,\ldots,r$ and $r_{i}=0$, for $i=r+1,\ldots,t$.

###### Proof.

Follows from Propositions 2.12, 2.15 and Corollary 2.17. ∎

Let $n$ be a positive integer and $V=\\{i\in\mathbb{N}\colon
1<i<n,i~{}\text{divides }~{}n\\}$. Chattopadhyay et al. [7] defined the simple
graph $\Upsilon_{n}$ whose vertex set is $V$ in which two distinct vertices
$i$ and $j$ are adjacent if and only if $n$ divides $ij$. They have shown that
$\displaystyle\Gamma(\mathbb{Z}_{n})=\bigvee_{\Upsilon_{n}}\Gamma(A_{i})$,
where where $A_{i}=\\{x\in\mathbb{Z}_{n}\colon(x,n)=i\\}$. Observe that,
$A_{i}=[i]^{\sim}$, for each $i$ and
$\Upsilon_{n}=\Gamma(\mathbb{Z}_{n})^{\sim}$. Thus we have essentially
extended the results of Chattopadhyay et al. [7] to finite rings with unity.
In the following result, we prove that any graph $G$ is a
$G^{\approx}$-generalized join of its induced subgraphs on equivalence classes
of the relation $\approx$. Let $G$ be any graph and $G^{\approx}$ be its
compressed graph. For each vertex $x\in G,$ $[x]^{\approx}$ denotes the
equivalence class of $\approx$ containing $x$. Also, $G_{[x]^{\approx}}$ is an
induced subgraph of $G$ on $[x]^{\approx}$.

######  Proposition 2.19.

Let $G$ be a graph and for each vertex $x\in G$, $G_{[x]^{\approx}}$ be an
induced subgraph of the graph $G$ on $[x]^{\approx}$. If
$|G_{[x]^{\approx}}|=n_{x}$ then $G_{[x]^{\approx}}=\overline{K_{n_{x}}}$ and
$G$ is $G^{\approx}-$ generalized join of null graphs.

###### Proof.

Let $[x]^{\approx},[y]^{\approx}\in G^{\approx}$ and
$u\in[x]^{\approx},~{}~{}v\in[y]^{\approx}.$ If $[x]^{\approx}=[y]^{\approx}$
then $N(x)=N(y)=N(u)=N(v)$. Therefore $x-y$ and $u-v$ are not edges in the
graph $G$. Suppose that $[x]^{\approx}\neq[y]^{\approx}$. Hence
$[x]\cap[y]=\emptyset$. Suppose $x-y$ is an edge. Therefore $y\in N(x)=N(u)$.
If $u-v$ is not an edge in the graph G then $v\notin N(u)=N(x)$. Hence
$x\notin N(v)=N(y)$. This gives $x-y$ is not an edge in $G$, which is a
contradiction. Therefore, if $x-y$ is an edge in $G$ then $u-v$ is an edge in
$G$. Similarly if $u-v$ is an edge then $x-y$ is also an edge. Therefore $x-y$
is edge if and only if $u-v$ is an edge. Hence $G$ is $G^{\approx}-$
generalized join of induced subgraphs on distinct equivalence classes of
$\approx$.

Now we will show that each graph $G_{[x]^{\approx}}$ is a null graph. Let
$u,v\in[x]^{\approx}$. Then $N(u)=N(v)=N(x)$. If $u-v$ is an edge, then
$N(u)\neq N(v),$ a contradiction to $N(u)=N(v)=N(x)$. Therefore each
$G_{[x]^{\approx}}$ is a null graph. ∎

######  Corollary 2.20.

Let $R$ be a finite ring with unity and
$\\{[x_{i}]^{\approx}~{}|~{}i=1,2,3...,m\\}$ be distinct equivalence classes
of $\approx$ on $Z(R)$. Suppose that $n_{i}=|[x_{i}]^{\approx}|$, for
$i=1,2,\ldots,m$. Then
$\displaystyle\Gamma(R)=\bigvee_{G^{\approx}}\\{\overline{K_{n_{1}}},\ldots,\overline{K}_{n_{m}}\\},$
and

$\sigma_{A}(\Gamma(R))=\left(\bigcup_{i=1}^{m}\\{0^{(n_{i}-1)}\\}\right)\bigcup\sigma(C_{A}(\Gamma(R)^{\approx}))),\sigma_{L}(\Gamma(R))=\left(\bigcup_{i=1}^{m}\\{0^{(n_{i}-1)}\\}\right)\bigcup\sigma(C_{N}(\Gamma(R)^{\approx})),$

where $C_{A}(\Gamma(R)^{\approx}))$ and $C_{N}(\Gamma(R)^{\approx}))$ are as
given in Corollary 2.17 with $i$ replaced by $x_{i}$.

###### Proof.

The proof follows from Proposition 2.19. ∎

A ring $R$ is regular (von-Neumann regular) if for any $a\in R$, there exist
$b\in R$ such that $a=aba$. Let $a=aba$ for some $a,b\in R$ and $e=ab$,
$ba=f$. Observe that, $e^{2}=e$ and $f^{2}=f$ and
$ann_{r}(a)=ann_{r}(e)=(1-e)R$ and $ann_{l}(a)=ann_{l}(f)=R(1-f)$. A ring $R$
is said to rickart if for any $a\in R$ there exist idempotent $e$ such that
$ann_{r}(a)=eR$ or $ann_{l}(a)=Re$. Therefore regular rings are rickart rings.

######  Proposition 2.21.

(Beiranvand et al. [5], Proposition 2.4). Every finite commutative regular
ring or finite reduced Goldie ring is finite direct product of finite fields

######  Proposition 2.22.

( Thakare et al. [19, Theorem 6]) A $*$ ring with finitely many elements is
Bear $*$ ring if and only if $A=A_{1}\oplus A_{2}\oplus...\oplus A_{r}$ where
$A_{i}$ is a field or $A_{i}$ is a $2\times 2$ matrix ring over finite field
$F(p^{n})$ with $n$ odd positive integer and $p$ is a prime of the form
$4k+3$.

######  Proposition 2.23.

If ring $R$ is finite commutative Rickart ring or finite Von -Neumann regular
commutative ring then it is finite direct product of finite fields.

######  Proposition 2.24.

( Patil et al. [15]) Let $R$ be finite commutative Von Neumann regular ring
with set of nontrivial idempotents $B(R)=\\{e_{i}~{}|~{}i=1,2,...,r\\}$,
$A_{e_{i}}=\\{x\in R~{}|~{}ann(x)=ann(e_{i})\\}$ for $i=1,2,...r$,
$\Gamma(B(R))$ is induced subgraph of $\Gamma(R)$ on $B(R)$ and
$c_{ij}=\sqrt{|A_{e_{i}}||A_{e_{j}}|}$ . Then

$\sigma_{A}(\Gamma(R))=\\{0^{(|Z(R)*|-r)}\\}\cup\sigma(C)\\}$

, where $C$ is matrix whose $(i,j)^{th}$ entry is zero if $e_{i}e_{j}\neq 0$
and $c_{ij}$ if $e_{i}e_{j}=0$. and

$\sigma_{L}(\Gamma(R))=\\{M_{e_{i}}^{(|A_{e_{i}}|-1)}\\}\cup\sigma(\sigma_{L}(\Gamma(B(R))))\\},$

where $\displaystyle M_{e_{i}}=\sum_{j,~{}e_{j}e_{i}=0}|A_{e_{j}}|$ for
$i=1,2,...,r$.

######  Proposition 2.25.

(In John D. Lagrange,) Let $R$ be a ring. Then $R$ is a Boolean ring if and
only if the set of eigenvalues $\sigma(\Gamma(R))$ (counting with
multiplicities) is partitioned into 2-element subsets of form
$\\{\lambda,\pm\frac{1}{\lambda}\\}$

Let $R$ is a direct product of finite number of finite fields. In the
following lemma, we expressed the zero-divisor graph $\Gamma(R)$ as a
generalized join graph. Further, we compute adjacency and Laplacian spectra of
$\Gamma(R)$ in terms of spectra of the Boolean ring.
Let $q_{k}=p_{k}^{m_{k}}$ with $p_{k}$ prime and $F_{q_{k}}$ be finite field,
for $k=1,2,\ldots,t$; and $R=F_{q_{1}}\times F_{q_{2}}\times\cdots\times
F_{q_{t}}$ be a ring. Let

$\displaystyle\displaystyle
e_{1}=(1,0,\ldots,0),~{}e_{2}=(0,1,0,\ldots,0),\ldots,e_{t}=(0,0,\ldots,1),$
$\displaystyle\displaystyle\mathcal{A}_{1}=\left\\{e_{1},e_{2},...,e_{t}\right\\},$
$\displaystyle\displaystyle\mathcal{A}_{2}=\left\\{e_{1}+e_{2},~{}e_{1}+e_{3},...,e_{1}+e_{t},e_{2}+e_{3},...,e_{2}+e_{t},...,e_{t-1}+e_{t}\right\\},$
$\displaystyle\displaystyle\mathcal{A}_{3}=\left\\{e_{1}+e_{2}+e_{3},....,e_{t-2}+e_{t-1}+e_{t}\right\\},....$
$\displaystyle\displaystyle\mathcal{A}_{t-1}=\left\\{e_{1}+e_{2}+...+e_{t-1},~{}e_{2}+e_{3}+...+e_{t}\right\\}.$

be orderd sets. Then
$\mathcal{A}=\mathcal{A}_{1}\cup\mathcal{A}_{2}\cup...\cup\mathcal{A}_{t-1}$
is an ordered set of all idempotents $Z(R)$. For any $e\in\mathcal{A}$, let
$S_{e}=\\{i~{}|~{}e.e_{i}\neq 0\\}$.

######  Lemma 2.26.

Let $q_{k}=p_{k}^{m_{k}}$ with $p_{k}$ prime and $F_{q_{k}}$ be finite field,
for $k=1,2,\ldots,t$; and $R=F_{q_{1}}\times F_{q_{2}}\times\cdots\times
F_{q_{t}}$ be a ring, $\mathcal{F}=\left\\{\Gamma([e_{S}]^{\sim})\colon
e_{S}\in\mathcal{A}\right\\}$ and $\displaystyle U(R)$ is the set of units in
$R$. Then

  1. (1)

$\displaystyle\Gamma(R)^{\sim}=\Gamma(\mathcal{A})=\Gamma\left(\bigoplus_{i=1}^{t}\mathbb{Z}_{2}\right)$
and $\displaystyle\Gamma(R)=\bigvee_{\Gamma(R)^{\sim}}\mathcal{F}$.

  2. (2)

$|\Gamma(R)^{\sim}|=|\mathcal{A}|=2^{t}-2$.

  3. (3)

$\displaystyle|[e]^{\sim}|=\prod_{i\in S_{e}}(q_{i}-1)=n_{e}~{}(say)$,

  4. (4)

$\displaystyle N([e]^{\sim})=(1-e)\mathcal{A}\setminus\\{0\\},~{}$
$d([e]^{\sim})=2^{t-|S_{e}|}-1$.

  5. (5)

$\displaystyle N(e)=(1-e)R\setminus\\{0\\},~{}~{}d(e)=\prod_{i\notin
S_{e}}q_{i}-1$.

  6. (6)

$\displaystyle\sigma_{A}(\Gamma(R))=\left(\bigcup_{e\in\mathcal{A}}\\{0^{(n_{e}-1)}\\}\right)\bigcup\sigma\left(B+DA\left(\Gamma\left(\bigoplus_{i=1}^{t}\mathbb{Z}_{2}\right)\right)D\right),\\\
\displaystyle\sigma_{L}(\Gamma(R))=\left(\bigcup_{e\in\mathcal{A}}\\{0^{(n_{e}-1)}\\}\right)\bigcup\sigma\left(C+DA\left(\Gamma\left(\bigoplus_{i=1}^{t}\mathbb{Z}_{2}\right)\right)D\right),$
Where $B=[d(e)]_{e\in\mathcal{A}}$ and $C=[n_{e}]_{e\in\mathcal{A}}$ are
diagonal matrices.

###### Proof.

Let $a=(a_{1},a_{2},...a_{t})\in Z(R)$ and $e_{a_{i}}=1$ if $a_{i}\neq 0$ and
$e_{a_{i}}=0$ if $a_{i}=0$ for each $i=1,2,...,t$. Hence
$e_{a}=(e_{a_{1}},...e_{a_{t}})$ is an idempotent in $R$ uniquely determined
by $a$ such that $e_{a}\sim a$. Clearly set of all idempotent in $R$ forms
Boolean ring $\displaystyle\bigoplus_{i=1}^{t}\mathbb{Z}_{2}$. For $a,b\in
Z(R)$, $a-b$ is an edge if and only if $e_{a}-e_{b}$ is an edge. Therefore (1)
holds true.
Now
$\displaystyle|\Gamma(R)^{\sim}|=|\mathcal{A}|=\sum_{i=1}^{t-1}|\mathcal{A}_{i}|=2^{t}-2$.
Hence (2) is true.
Clearly, $\displaystyle[e]^{\sim}=\\{x\in Z(R)~{}|~{}x=eu,~{}\text{for some u
in~{}}U(R)\\}=eU(R),~{}~{}$. Hence (3) is true.
Let $f$ be a vertex in $\Gamma(R)^{\sim}$. $f\in N([e]^{\sim})$ if and only if
$ef=0$ ie., $f=(1-e)\mathcal{A}$ and $f\neq 0$. Hence (4) is true.
Let $x$ be a vertex in $\Gamma(R)$. $f\in N([e]^{\sim})$ if and only if $ex=0$
ie., $x=(1-e)R$ and $x\neq 0$. Hence (5) is true.
Proof of (6), follows from proposition (2.12). ∎

######  Proposition 2.27.

Let $R$ be a finite, abelian and regular ring with unity. If $\mathcal{I}$
denotes the set of all idempotent in $R$, then the following statements hold:

  1. (1)

$\mathcal{F}=\\{\Gamma([e]^{\sim})\colon e\in\mathcal{I}\\}$ is family of null
graphs.

  2. (2)

$\Gamma(R)^{\sim}=\Gamma(\mathcal{I})$.

  3. (3)

$\Gamma(R)=\bigvee_{\Gamma(R)^{\sim}}\mathcal{F}$.

###### Proof.

Since abelian regular rings are reduced, $R$ is a reduced ring. Hence for any
$r\in R$ there exist an idempotent $e$ and a unit $u$ such that $r=ue=eu$.
(see Beiranvand et al. [5, Remark 3.4]. If there is another idempotent $f$ and
unit $v$ such that $r=vf=fv$, then we have $ue=eu=fv=vf$. Consequently,
$(1-f)eu=0=v(f-fe)$. Therefore $e=f=ef$. Hence for any $r\in R$ there exist a
unique idempotent, say $e_{r}$, such that $r\sim e_{r}$. Hence for any $r\in
Z(R),$ there exist a unique idempotent $e_{r}$ such that $e_{r}\in[r]^{\sim}$.
Hence by Proposition 2.12, $\Gamma(R)$ is $\Gamma(R)^{\sim}$ generalized join
of graphs in the family $\mathcal{F}$. Since $R$ is a reduced ring, from
Proposition 2.12, each graph $\Gamma([e]^{\sim})$ is a null graph. This proves
statements $(1),(2)$ and $(3)$. ∎

##  3\. spectra of the zero-divisor graph of $\mathbb{Z}_{n}$ and
$M_{n}(F_{q})$

Recall the following remarks, which are useful in this section.

######  Remark 3.1 ([9]).

Denote the complete graph of order $n$ and its complement, i.e., the null
graph of order $n$, by $K_{n}$ and $\overline{K_{n}}$ respectively. Since
$A(\overline{K_{n}})=L(\overline{K_{n}})$ is a zero matrix of order n,
$\sigma_{A}(\overline{K_{n}})=\sigma_{L}(\overline{K_{n}})=\left\\{0^{(n)}\right\\}$.
Note that $A(K_{n})=J_{n}-I_{n}$, where $J_{n}$ is a matrix of order $n$ of
all 1’s and $I_{n}$ is the identity matrix of order $n$. Therefore
$\sigma_{A}(K_{n})=\left\\{(-1)^{(n-1)},(n-1)^{(1)}\right\\}$. Also,
$L(K_{n})=(n-1)I_{n}-A(K_{n})=nI_{n}-J_{n}$. Hence
$\sigma_{L}(K_{n})=\left\\{n^{(n-1)},0^{(1)}\right\\}$.

######  Remark 3.2 ([17]).

Let $q=p^{k}$ with $p$ prime. Then $\displaystyle{n\choose
r}_{q}=\frac{\prod_{i=0}^{r-1}(q^{n}-q^{i})}{\prod_{i=0}^{r-1}(q^{r}-q^{i})}$
is called as $q$-binomial coefficient.

The following properties of $q$\- binomial coefficients are used in the
sequel.

  1. (1)

$\displaystyle{n\choose r}_{q}=0~{}~{}~{}\text{, if }~{}~{}r>n~{}~{}\text{ or
}~{}~{}r<0$.

  2. (2)

$\displaystyle{n\choose r}_{q}={n\choose n-r}_{q}$.

  3. (3)

$\displaystyle{n\choose 0}_{q}={n\choose n-1}_{q}=1$.

  4. (4)

$\displaystyle{n\choose 1}_{q}={n\choose
n-1}_{q}=\frac{q^{n}-1}{q-1}~{}~{}\text{, if }~{}~{}n\geq 1$.

  5. (5)

$\displaystyle\lim_{q\longrightarrow 1}{n\choose r}_{q}={n\choose r}$.

  6. (6)

$\displaystyle\sum_{r=0}^{n}q^{r^{2}}{n\choose r}_{q}={2n\choose n}_{q}$.

  7. (7)

The number of linearly independent subsets of cardinality $r$ of
$n$-dimensional vector space over a finite field $F_{q}$ is
$\displaystyle\frac{\prod_{i=0}^{r-1}(q^{n}-q^{i})}{r!}$.

  8. (8)

The number of $r$ dimensional subspaces of $n$-dimensional vector space over a
finite field $F_{q}$ is $\displaystyle{n\choose r}_{q}$.

In [12], Khaled et al. listed the following result which gives the number of
matrices of given rank and given size over a finite field. This proposition is
useful in determining cardinality of some sets.

######  Proposition 3.3.

The number of matrices of size $n\times m$ of rank $r$ over finite field of
order $q$ is

$M(n,m,r,q)=\prod_{j=0}^{r-1}\frac{(q^{n}-q^{j})(q^{m}-q^{j})}{(q^{r}-q^{j})}.$

In [7] Chattopadhyay et al. gave the adjacency and Laplacian spectra of
$\Gamma(\mathbb{Z}_{n})$. In this section, we determine the adjacency and
Laplacian spectra of $\Gamma(\mathbb{Z}_{n})$ and $\Gamma(M_{n}(F_{q}))$ using
the results proved in previous sections.

###  3.1. Spectra of $\mathbf{\Gamma(\mathbb{Z}_{n})}$

.

The following theorem will be used to find the Spectra of
$\Gamma(\mathbb{Z}_{n})$.

######  Theorem 3.4.

Let $R=\mathbb{Z}_{n}$. If $d_{1},d_{2},\ldots,d_{k}$ are nontrivial divisors
of $n$, then
$\displaystyle\Gamma(\mathbb{Z}_{n})=\bigvee_{\Gamma(R)^{\sim}}\\{\Gamma([d_{1}]),\ldots,\Gamma([d_{k}])\\}$.
And each $\Gamma([d_{i}])$ is either a complete graph or a null graph.
Moreover, $\Gamma([d_{i}])$ is a complete graph if and only if $n$ divides
$d_{i}^{2}$.

###### Proof.

Proof follows from Proposition 2.8 and Proposition 2.12. ∎

Let $R=\mathbb{Z}_{n}$ be a ring and

$\displaystyle N_{2}=\\{[d_{i}]\colon d_{i}\neq 0,d_{i}^{2}=0~{}~{}\text{
in}~{}~{}\mathbb{Z}_{n}\\}~{}~{}\text{be a set of nonzero nilpotents of index
2},$ $\displaystyle L=Z(R)\setminus N_{2}.$

######  Proposition 3.5.

Let $\displaystyle n=\prod_{i=1}^{t}p_{i}^{k_{i}}$ and $R=\mathbb{Z}_{n}$ be a
ring. Then

$\displaystyle|N_{2}|=\prod_{i=1}^{t}\left[\frac{k_{i}}{2}\right]-1=s~{}say$

and

$|L|=\displaystyle\prod_{i=1}^{t}(k_{i}+1)-1-s=l~{}say.$

Also following statements hold.

  1. (1)

$\displaystyle|\Gamma(R)^{\sim}|=\prod_{i=1}^{t}(k_{i}+1)-2$; and for any two
divisors $\displaystyle
d=\prod_{i=1}^{t}p_{i}^{\alpha_{i}},~{}~{}~{}d^{\prime}=\prod_{i=1}^{t}p_{i}^{\beta_{i}}$,
the vertices $[d],[d^{\prime}]$ are adjacent in $\Gamma(R)^{\sim}$ if and only
if $k_{i}\leq\alpha_{i}+\beta_{i}$, for all $i=1,2,\ldots,t$.

  2. (2)

For each divisor $\displaystyle d=\prod_{i=1}^{t}p_{i}^{\alpha_{i}}$ of n,
$\displaystyle|[d]|=\prod_{i=1}^{t}\left(p_{i}^{k_{i}-\alpha_{i}}-p_{i}^{k_{i}-\alpha_{i}-1}\right)=n_{d}~{}(say)$.

  3. (3)

For each divisor $\displaystyle d=\prod_{i=1}^{t}p_{i}^{\alpha_{i}}$ of n,
vertex $[d]$ in $\Gamma(R)^{\sim}$ has a degree
$\displaystyle\prod_{i=1}^{t}\left(\alpha_{i}+1\right)$.

  4. (4)

For each divisor $\displaystyle d=\prod_{i=1}^{t}p_{i}^{\alpha_{j}}$ of n, the
vertex $d$ in $\Gamma(\mathbb{Z}_{n})$ has a degree
$\displaystyle\sum_{k_{i}-\alpha_{i}\leq\beta_{i}\leq
k_{i}}\prod_{i=1}^{t}\left(p_{i}^{k_{i}-\beta_{i}}-p_{i}^{k_{i}-\beta_{i}-1}\right)$.

###### Proof.

Let $\displaystyle n=\prod_{i=1}^{t}p_{i}^{k_{i}}$. The number of nontrivial
divisors of $n$ is equal to $l=\displaystyle\prod_{i=1}^{t}(k_{i}+1)-2$ and
number of units in $\mathbb{Z}_{n}$ is
$\displaystyle\phi(n)=\prod_{i=1}^{t}(p_{i}^{k_{i}}-p_{i}^{k_{i}-1})$.
Let $d=\prod_{i=1}^{t}p_{i}^{\alpha_{i}}$ be a divisor of $n$. We count the
number of associates of $d$ in $\mathbb{Z}_{n}$. Let
$d_{i}=p_{i}^{\alpha_{i}}$. Now $\displaystyle
d\longrightarrow(d_{1},d_{2},\ldots,d_{t})$ is a bijective map from
$\mathbb{Z}_{n}$ to
$\displaystyle\mathbb{Z}_{p_{1}^{k_{1}}}\times\ldots\times\mathbb{Z}_{p_{t}^{k_{t}}}$.
Two elements $\displaystyle
d=\prod_{i=1}^{t}p_{i}^{\alpha_{i}},~{}~{}d^{\prime}=\prod_{i=1}^{t}p_{i}^{\beta_{i}}$
are associates in $\mathbb{Z}_{n}$ if and only if $\displaystyle
d_{i}=p_{i}^{\alpha_{i}}$ and $\displaystyle d_{i}^{\prime}=p_{i}^{\beta_{i}}$
are associates in $\mathbb{Z}_{p_{i}^{k_{i}}}$, for all $i=1,2,\ldots,t$.
Hence the number of associates of $d$ is equal to
$\displaystyle\prod_{i=1}^{t}n_{i},$ where $\displaystyle n_{i}=\text{number
of associates of}~{}p_{i}^{\alpha_{i}}~{}in~{}\mathbb{Z}_{p_{i}}^{k_{i}}$. The
set of associates of $\displaystyle p_{i}^{\alpha_{i}}$ in
$\displaystyle\mathbb{Z}_{{p_{i}}^{k_{i}}}$ is

$\left\\{rp_{i}^{\alpha_{i}}~{}\colon~{}(r,p_{i}^{k_{i}})=1,~{}1\leq
rp_{i}^{\alpha_{i}}<p_{i}^{k_{i}}\right\\}=\left\\{rp_{i}^{\alpha_{i}}~{}\colon~{}(r,p_{i}^{k_{i}})=1,~{}1\leq
r<p_{i}^{k_{i}-\alpha_{i}}\right\\}$
$=\left\\{rp_{i}^{\alpha_{i}}~{}\colon~{}r\in\\{1,2,\ldots,p_{i}^{k_{i}-\alpha_{i}}\\}~{}\text{and}~{}r\neq
p_{i}s,~{}\text{for some }s\in\mathbb{Z}_{p_{i}^{k_{i}}}\right\\}.$

Hence the number of associates of $\displaystyle p_{i}^{\alpha_{i}}$ is
$\displaystyle(p_{i}^{k_{i}-\alpha_{i}}-p_{i}^{k_{i}-\alpha_{i}-1})$.
Therefore the number of associates of $d$ is
$\displaystyle\prod_{i=1}^{t}\left(p_{i}^{k_{i}-\alpha_{i}}-p_{i}^{k_{i}-\alpha_{i}-1}\right)$.
Hence for each divisor $\displaystyle d=\prod_{i=1}^{t}p_{i}^{\alpha_{i}}$ of
$n,$ $\Gamma([d])$ is a graph on $\displaystyle
n_{d}=\prod_{i=1}^{t}\left(p_{i}^{k_{i}-\alpha_{i}}-p_{i}^{k_{i}-\alpha_{i}-1}\right)$
vertices. Alternatively $n_{d}=\phi\left(\frac{n}{d}\right),$ because
associates of $d$ lie in a cyclic subgroup of $\mathbb{Z}_{n}$ generated by
$d$.
Now we count the degree of each vertex $d$ in $\Gamma(\mathbb{Z}_{n})$. If
$\displaystyle d^{\prime}=\prod_{i=1}^{t}p_{i}^{\beta_{i}}$ is such that
$dd^{\prime}=0$ in $\mathbb{Z}_{n}$, then $n$ divides $dd^{\prime}$. Hence we
have $k_{i}\leq\alpha_{i}+\beta_{i}$, for each $i$. Therefore
$k_{i}-\alpha_{i}\leq\beta_{i}\leq k_{i}$, for each $i=1,2,\ldots,t$. Thus the
number of neighbors of $[d]$ in $\Gamma(R)^{\sim}$ is
$\displaystyle\prod_{i=1}^{t}(\alpha_{i}+1)$. Also, the number of neighbors of
$d$ in $\Gamma(\mathbb{Z}_{n})$ is
$\displaystyle\sum_{n|dd^{\prime},~{}d^{\prime}|n}|[d^{\prime}]|=\sum_{n|dd^{\prime},~{}d^{\prime}|n}\phi(d^{\prime})=\sum_{k_{i}-\alpha_{i}\leq\beta_{i}\leq
k_{i}}\prod_{i=1}^{t}\left(p_{i}^{k_{i}-\beta_{i}}-p_{i}^{k_{i}-\beta_{i}-1}\right)$.
Let $s$ be the number of vertices $[d]$ in $\Gamma(R)^{\sim}$ such that $d$ is
a nilpotent element of index two. Hence $s$ is the number of complete
subgraphs of type $\Gamma([d])$ in $\Gamma(\mathbb{Z}_{n})$. Each nonzero
nilpotent divisor $d$ of n having index two in $\mathbb{Z}_{n}$ is of the form
$\displaystyle\prod_{i=1}^{t}p^{m_{i}}$ with $\displaystyle k_{i}\leq
2m_{i}~{}~{}\text{and}~{}~{}\sum_{i=1}^{t}m_{i}<\sum_{i=1}^{t}k_{i}$. Hence
$s=\displaystyle\prod_{i=1}^{t}\left[\frac{k_{i}}{2}\right]-1$. Therefore
$\Gamma(R)^{\sim}$ is a graph with vertex set $V=\left\\{[d]\colon
d~{}\text{is nontrivial divisor of}~{}n\right\\}$ and edge set
$E=\left\\{\left\\{[d],[d^{\prime}]\right\\}\colon
d,d^{\prime}\in~{}V~{}\text{and}~{}n~{}\text{divides}~{}dd^{\prime}\right\\}$.
Also, $\Gamma(\mathbb{Z}_{n})$ is $\Gamma(R)^{\sim}-$ a generalized join of
family of graphs $\left\\{\Gamma([d])\colon d~{}~{}\text{is divisor
of}~{}~{}n\right\\}$ with $s$ complete graphs and $l-s$ null graphs. ∎

Finally, we give spectra of the zero-divisor graph of $\mathbb{Z}_{n}$.

######  Theorem 3.6.

Let $\displaystyle
n=\prod_{i=1}^{t}p_{i}^{k_{i}},l=\prod_{i=1}^{t}(k_{i}+1)-2,s=\prod_{i=1}^{t}\left[\frac{k_{i}}{2}\right]$.
Let $N$ be the set of all nontrivial divisors of $n$, $N_{2}$ be the set of
divisors of $n$ having nilpotency index two and for each divisor
$\displaystyle d_{i}=\prod_{j=1}^{t}p_{j}^{\alpha_{j}},~{}~{}$ $\displaystyle
n_{d_{i}}=\prod_{j=1}^{t}\left(p_{j}^{k_{j}-\alpha_{j}}-p_{j}^{k_{j}-\alpha_{j}-1}\right),$
$\displaystyle N_{d_{i}}=\sum_{n|d_{i}d_{j}}n_{d_{j}}$.
Then $\Gamma(\mathbb{Z}_{n})$ is $\Gamma(\mathbb{Z}_{n})^{\sim}-$ generalized
join of graphs
$\displaystyle\left\\{\Gamma([d_{i}])\simeq\overline{K_{n_{d_{i}}}}\colon
d_{i}\in N\setminus N_{2}\right\\}\bigcup\left\\{\Gamma([d_{i}])\simeq
K_{n_{d_{i}}}\colon d_{i}\in N_{2}\right\\}$. Also,

  1. (1)

$\displaystyle\sigma_{A}(\Gamma(\mathbb{Z}_{n}))=\left(\bigcup_{d_{i}\in
N_{2}}\left\\{-1^{(n_{d_{i}}-1)}\right\\}\right)\bigcup\left(\bigcup_{d_{i}\in
N\setminus
N_{2}}\left\\{0^{(n_{d_{i}}-1)}\right\\}\right)\bigcup\sigma(C_{A}(\Gamma(\mathbb{Z}_{n})))$,
where $C_{A}(\Gamma(\mathbb{Z}_{n}))$ is a square matrix of order $l$ defined
as below. If $N_{2}=\left\\{d_{1},d_{2},\ldots,d_{s}\right\\}$ and $N\setminus
N_{2}=\left\\{d_{s+1},\ldots,d_{l}\right\\}$, then

$C_{A}(\Gamma(\mathbb{Z}_{n}))=(c_{ij})=\begin{cases}n_{d_{i}}-1~{}~{}~{}&d_{i}=d_{j}~{}\text{and}~{}d_{i}\in
N_{2}\\\ \sqrt{n_{d_{i}}n_{d_{j}}}~{}~{}&d_{i}~{}~{}\text{adjacent
to}~{}~{}d_{j}\\\ 0~{}~{}&\text{otherwise}\par\par\end{cases}.$

  2. (2)

$\sigma_{L}(\Gamma(\mathbb{Z}_{n}))=\left(\bigcup_{d_{i}\in
N_{2}}\left\\{(N_{d_{i}}+n_{d_{i}})^{(n_{d_{i}}-1)}\right\\}\right)\bigcup\left(\bigcup_{d_{i}\in
N\setminus
N_{2}}\left\\{N_{d_{i}}^{(n_{d_{i}}-1)}\right\\}\right)\bigcup\sigma(C_{N}(\Gamma(\mathbb{Z}_{n})))$,
where

$C_{N}(\Gamma(\mathbb{Z}_{n}))=(c_{ij})=\begin{cases}N_{d_{i}}~{}~{}~{}&d_{i}=d_{j}\\\
-\sqrt{n_{d_{i}}n_{d_{j}}}~{}~{}&d_{i}~{}~{}\text{adjacent to}~{}~{}d_{j}\\\
0~{}~{}&\text{otherwise}\par\par\end{cases}.$

###### Proof.

The proof is clear from Propositions 2.12, 2.15, and 3.5. ∎

###  3.2. Spectra of $\mathbf{\Gamma(M_{n}(F_{q}))}$

Let $p$ be a prime, $~{}q=p^{k}$ and $M_{n}(F_{q})$ be a matrix ring of
$n\times n$ matrices over a finite field $F_{q}$. The following lemma gives
the cardinality of every equivalence class of the relation $\sim$ on
$Z(M_{n}(F_{q}))$.

######  Lemma 3.7.

Let $A\in Z(M_{n}(F_{q}))$. If $rank(A)=r$, then
$\displaystyle|[A]|=\prod_{i=0}^{r-1}(q^{r}-q^{i})$.

###### Proof.

Let $G^{o}$ be a group with nonempty set $GL_{n}(F_{q})$ together with the
binary operation $(U,V)\longrightarrow V.U$. Let $G=G^{o}\times G^{o}$ be the
external direct product of groups and $X=M_{n}(F_{q})$. Consider the map
$f:G\times X\longrightarrow X$ defined by $f((P,Q),A)=PAQ^{-1}$, for all $A\in
X$ and $(P,Q)\in G$. This map is an action of group $G$ on $X$. Therefore

$|O(A)|=[G:S_{A}]=\frac{|G|}{|S_{A}|},$

where $O(A)=\left\\{PAQ^{-1}\colon P,Q\in G\right\\}$ is the orbit of the
action containing $A$ and $S_{A}=\\{(P,Q)\in G\colon PAQ^{-1}=A\\}$ is a
stabilizer subgroup of $A$. Let $A\in Z(M_{n}(F_{q}))$ and $rank(A)=r$. Now
$O(A)$ is a set of all matrices in $M_{n}(F_{q})$ which are equivalent to $A$,
which will consist of all matrices of rank $r$ in $M_{n}(F_{q})$. Hence from
Proposition 3.3,
$\displaystyle|O(A)|=\frac{\prod_{i=0}^{r-1}(q^{n}-q^{i})^{2}}{\prod_{i=0}^{r-1}(q^{r}-q^{i})}$.
Also, it is known that $\displaystyle|G|=\prod_{i=0}^{n-1}(q^{n}-q^{i})^{2}$.
Therefore
$\displaystyle|S_{A}|=\frac{|G|}{|O(A)|}=\left(\prod_{i=r}^{n-1}(q^{n}-q^{i})^{2}\right)\left(\prod_{i=0}^{r-1}(q^{r}-q^{i})\right)$.
Let $T=\left\\{(P,Q)\in S_{A}\colon PA=A=AQ\right\\}$. Let
$(P_{1},Q_{1}),(P_{2},Q_{2})\in S_{A}$. Hence $P_{1}A=AQ_{1}$ and
$P_{2}A=AQ_{2}$. If $(P_{1},Q_{1}),(P_{2},Q_{2})$ gives same element in $O(A)$
under the group action ie., $P_{1}A=P_{2}A,~{}AQ_{1}=AQ_{2}$ then
$P_{1}^{-1}P_{2}A=A=AQ_{2}Q_{1}^{-1}$. Therefore
$(P=P_{1}^{-1}P_{2},Q=Q_{2}Q_{1}^{-1})$ is in $T$. Thus, if $(P_{1},Q_{1})$
and $(P_{2},Q_{2})$ in $S_{A}$ gives same element in $O(A)$ then
$(P_{2},Q_{2})=(P_{1}P,QQ_{1})$ with $(P,Q)\in T$.
Conversely, If $(P_{1},Q_{1})\in S_{A}$ and $(P_{2}=P_{1}P,~{}Q_{2}=QQ_{1})$
with $(P,Q)\in T$ then $P_{1}A=P_{2}A$ and $Q_{1}A=Q_{2}A$, ie.
$(P_{1},Q_{1})$ and $(P_{2},Q_{2})$ gives same element in $O(A)$ under the
group action. So $|[A]|=\frac{|S_{A}|}{|T|}$.

Now we will find $|T|$. Let $\\{X_{1},\ldots,X_{r}\\}$ be a basis of a column
space of $A$. Let $\\{X_{1},\ldots,X_{r},Y_{r+1},\ldots,Y_{n}\\}$ be a basis
of $F_{q}^{n}$. Therefore $(P,Q)\in T$ if and only if
$PX_{1}=X_{1},\ldots,PX_{r}=X_{r}$ and $\\{PY_{r+1},\ldots,PY_{n}\\}$ is a
basis of complementary subspace of the column space of $A$. Hence the
cardinality of $S$ is equal to the number of choices of
$B=\\{PY_{r+1},\ldots,PY_{n}\\}$. Note that $PY_{r+i}\notin
span\\{X_{1},X_{2},\ldots,X_{r},\ldots,PY_{i}\\}$. Hence the total number of
choices for $B$ is $\prod_{i=r}^{n-1}(q^{n}-q^{i})$. Thus for each choice of
$B,$ the matrix $P$ is uniquely determined. Therefore total choices for $P$
are $\prod_{i=r}^{n-1}(q^{n}-q^{i})$. Now $Q^{-1}A=A$ imply that total choices
for $Q$ are also same as that of $P$. Therefore
$\displaystyle|T|=\left(\prod_{i=r}^{n-1}(q^{n}-q^{i})\right)^{2}.$ Hence
$\displaystyle|[A]|=\prod_{i=0}^{r-1}(q^{r}-q^{i})$. ∎

Now for any $A\in M_{n}(F_{q}),$ we have $ann_{r}(A)=\\{B\in
Z(M_{n}(F_{q}))\colon AB=0\\}$ and $ann_{l}(A)=\\{B\in Z(M_{n}(F_{q}))\colon
BA=0\\}$. If $E$ and $F$ are row reduced echelon and column reduced echelon
form of $A$ respectively, then there exist invertible matrices $P$ and $Q$
such that $A=PE=FQ$. Therefore we have $ann_{r}(A)=ann_{r}(E)$ and
$ann_{l}(A)=ann_{l}(F)$. Also note that $E^{2}=E$ and $F^{2}=F$. In the
following lemma, we find the degree of $A$ in $\Gamma(M_{n}(F_{q}))$.

######  Lemma 3.8.

Let $A\in Z(M_{n}(F_{q}))$ and $A^{2}\neq 0$. If $rank(A)=r$, then

$\displaystyle d(A)=2q^{n(n-r)}-q^{(n-r)^{2}}-1.$

###### Proof.

Let $R=M_{n}(F_{q})$, $A\in R$ and $rank(A)=r$. Degree of $A$ is given by
$d(A)=|N(A)|=|ann_{r}(A)|+|ann_{l}(A)|-|ann_{r}(A)\cap ann_{l}(A)|-1.$
Let $E$ be an idempotent obtained from reduced row echelon form of $A$ by
interchanging row, so that that leading 1’s on the diagonal. Similarly, $F$ be
an idempotent obtained from reduced column echelon form of $A$ by
interchanging columns, so that leading 1’s on the diagonal. There exist
invertible matrices $P$ and $Q$ such that $A=PE=FQ$,
$ann_{r}(A)=ann_{r}(E)=(I-E)R$ and $ann_{l}(A)=ann_{l}(F)=R(I-F)$. Let
$~{}T_{I-E}(X)=(I-E)X:R\longrightarrow R$ be a map. Then
$(I-E)R=range(T_{I-E})=W_{1}\oplus W_{2}\oplus\ldots\oplus W_{n}$, where
$W_{k}=\left\\{[C_{1},C_{2},\ldots,C_{k},\ldots,C_{n}]\colon~{}C_{i}\in
F_{q}^{n},~{}C_{i}=0,~{}\text{for all}~{}i\neq
k,~{}~{}\text{and}~{}~{}(I-E)C_{k}=C_{k}\right\\}$. Hence the dimension of
$range(T_{I-E})$ is $\displaystyle\sum_{i=1}^{n}dim(W_{i})=n(n-r)$. Let
$\left\\{v_{1},\ldots,v_{n(n-r)}\right\\}$ be a basis of $range(T_{I-E})$.
Then $range(T_{I-E})=\\{k_{1}v_{1}+\ldots+k_{n(n-r)}v_{n(n-r)}\colon
k_{1},\ldots,k_{n(n-r)}\in F_{q}\\}$. Therefore
$|ann_{r}(A)|=|(I-E)R|=|range(I-E)|=q^{n(n-r)}$. Similarly
$|ann_{l}(A)|=q^{n(n-r)}$.
Now $ann_{r}(A)\cap ann_{l}(A)=ann_{r}(E)\cap
ann_{l}(F)=((I-E)R)\cap(R(I-F))=(I-E)R(I-F)$. Since $nullity(I-E)$ is $r$, its
row echelon form has $r$ zero rows. Similarly column echelon form of $I-F$ has
$r$ zero columns. Therefore any matrix of the form $(I-E)B(I-F)$ has $r$ zero
rows and $r$ zero columns. So that it has $2rn-r^{2}$ zero entries and other
$n^{2}-(2rn-r^{2})$ entries are arbitrary. Therefore number of matrices of the
form $(I-E)B(I-F)$ is $q^{(n-r)^{2}}$. Therefore
$d(A)=2q^{n(n-r)}-q^{(n-r)^{2}}-1$. ∎

######  Remark 3.9.

In above lemma, if we take $A^{2}=0$ then

$\displaystyle d(A)=|N(A)|$
$\displaystyle=|ann_{r}(A)\setminus\\{A\\}|+|ann_{l}(A)\setminus\\{A\\}|-|ann_{r}(A)\cap
ann_{l}(A)\setminus\\{A\\}|-1$ $\displaystyle=2q^{n(n-r)}-q^{(n-r)^{2}}-2$

where $r=rank(A)$.

######  Lemma 3.10.

Let $q=p^{k}$. The number of nontrivial idempotent matrices in $M_{n}(F_{q})$
is $\displaystyle\sum_{r=0}^{n}q^{r(n-r)}{n\choose r}_{q}-2$. Also, the number
of nilpotent matrices of index 2 in $M_{n}(F_{q})$ is
$\displaystyle\sum_{r=1}^{[n/2]}{n\choose r}_{q}{n-r\choose r}_{q}$.

###### Proof.

Let $A$ be an idempotent matrix in $M_{n}(F_{q})$ of rank r. Hence $A$ is
similar to the diagonal matrix $diag(I_{r},O_{n-r})$. Consider a action of
group $GL_{n}(F_{q})$ on set
$S=\left\\{A_{r}=diag(I_{r},I_{n}-r)\colon r=1,2,\ldots,n-1\right\\}$ defined
by $f(A)=PAP^{-1},~{}~{}~{}\text{for all}~{}~{}A\in S$. Hence for each
$A_{r}\in S,$
$\displaystyle|O(A_{r})|=\frac{|GL_{n}(F_{q})|}{|N(A_{r})|},~{}~{}\text{where}~{}~{}O(A_{r})~{}~{}\text{is
the orbit containing}~{}~{}A_{r}$ and

$N(A_{r})=\left\\{P\in GL_{n}(F_{q})\colon PA_{r}=A_{r}P\right\\}.$

Now if $P\in N(A_{r})$, then $P=diag(Q,R)$, where $Q\in GL_{r}(F_{q}),~{}R\in
GL_{n-r}(F_{q})$. Hence $|N(A_{r})|=|GL_{r}(F_{q})|.|GL_{n-r}(F_{q})|$.
Therefore

$\displaystyle|O(A_{r})|$
$\displaystyle=\frac{|GL_{n}(F_{q})|}{|GL_{r}(F_{q})|.|GL_{n-r}(F_{q})|}$
$\displaystyle=\frac{\prod_{i=0}^{n-1}(q^{n}-q^{i})}{\left(\prod_{i=0}^{r-1}(q^{r}-q^{i})\right)\left(\prod_{i=0}^{n-r-1}(q^{n-r}-q^{i})\right)}$
$\displaystyle={n\choose
r}_{q}\frac{\prod_{i=r}^{n-1}(q^{n}-q^{i})}{\prod_{i=0}^{n-r-1}(q^{n-r}-q^{i})}$
$\displaystyle=q^{r(n-r)}{n\choose r}_{q}.$

Hence the number of all nonzero idempotents is equal to
$\displaystyle\sum_{r=0}^{n}|O(A_{r})|-2=\sum_{r=0}^{n}q^{r(n-r)}{n\choose
r}_{q}-2$. Note that, $N\in M_{n}(F_{q})$ is a nonzero matrix of nilpotency
index 2 and of rank $r$ if and only if $(0)\subset range(N)\subseteq
ker(N)\subset F_{q}^{n}$ and $dim(range(N))=r\leq dim(ker(N))=n-r$, i.e.,
$r\leq[n/2]$. Therefore number of choices for $ker(N)$ is ${n\choose n-r}_{q}$
and number of choices of $range(N)$ is ${n-r\choose r}_{q}$. By Proposition
2.8, two matrices are related under the relation $\sim$ if and only if they
have the same range and the same kernel. Hence the total number of nonzero
nilpotent matrices of index 2 is

$\sum_{r=1}^{[n/2]}{n\choose n-r}_{q}{n-r\choose
r}_{q}=\sum_{r=1}^{[n/2]}{n\choose r}_{q}{n-r\choose r}_{q}.$

∎

######  Lemma 3.11.

The number of equivalence classes of $\sim$ in $M_{n}(F_{q})$ is
$\displaystyle\sum_{r=1}^{n-1}{n\choose r}_{q}^{2}$.

###### Proof.

If $A\sim B$ in $M_{n}(F_{q})$, then $A$ and $B$ have the same rank. Let
$n_{r}$ be the number of equivalence classes of $\sim$ in $C_{r},$ where
$C_{r}$ is a set of all rank $r$ matrices. Hence the total number of
equivalence classes is $\displaystyle m=\sum_{r=1}^{n-1}n_{r}$. If $A$ is a
matrix of rank $r$, then by Lemma 3.7, the cardinality of the equivalence
class containing $A$ is $|[A]|=\prod_{i=0}^{r-1}(q^{r}-q^{i})$. Hence
$n_{r}=\frac{|C_{r}|}{\prod_{i=0}^{r-1}(q^{r}-q^{i})}$.
In $[7]$, it is given that
$|C_{r}|=\frac{\prod_{i=0}^{r-1}(q^{n}-q^{i})^{2}}{(q^{r}-q^{i})}$. Therefore

$m=\sum_{r=1}^{n-1}n_{r}=\sum_{r=0}^{r-1}\frac{\prod_{i=0}^{r-1}(q^{n}-q^{i})^{2}}{(q^{r}-q^{i})^{2}}=\sum_{r=1}^{n-1}{n\choose
r}_{q}^{2}.$

∎

######  Definition 3.12.

Let $q=p^{k}$ and $F_{q}$ be a finite field. Let $T=\left\\{[A]\colon A\in
Z(M_{n}(F_{q}))\right\\}$ be a set of all equivalence classes of the relation
$\sim$. The directed graph $\overline{\Gamma}(T)$ is a graph with vertex set
$T$ and there is a directed edge $[A]\longrightarrow[B]$ between two vertices
$[A]~{}and~{}[B]$ in $T$ if and only if $AB=0$, i.e., $range(B)\subseteq
ker(A)$. Note that there is an undirected graph $\Gamma(T)=G^{\sim}$, where
$[A]-[B]$ is an edge in $G^{\sim}$ if and only if $AB=0~{}\text{or}~{}BA=0,$
that is, $range(B)\subseteq ker(A)$ or $range(A)\subseteq ker(B)$.

######  Definition 3.13.

Let $F_{q}$ be a finite field and

$S=\left\\{(U,V)~{}\colon~{}U,V\text{are subspaces
of}~{}~{}F^{n}_{q}~{}~{}\text{with}~{}dim(V)+dim(W)=n\right\\}.$

The directed graph $\overline{\Gamma}(S)$ is a graph on a vertex set $S$ and
with an edge set defined as:
$(U_{1},V_{1})\longrightarrow(U_{2},V_{2})$ if and only if $U_{2}\subseteq
V_{1}$. The undirected graph ${\Gamma}(S)$ is a graph on a vertex set $S$ and
with an edge set defined as:
$(U_{1},V_{1})-(U_{2},V_{2})$ if and only if $U_{2}\subseteq V_{1}$ or
$V_{2}\subseteq U_{1}$

######  Proposition 3.14.

Let $[A]\in T$ and rank of $A$ is $r$. Then in a graph $\overline{\Gamma}(T),$

$\displaystyle d^{+}([A])=d^{-}([A])=\sum_{i=1}^{n-r}{n-r\choose
i}_{q}{n\choose i}_{q}.$

###### Proof.

Define a map $\phi:\overline{\Gamma}(T)\longrightarrow\overline{\Gamma}(S)$ by
$\phi([A])=(range(L_{A}),ker(L_{A}))$, for all $[A]\in T$. Observe that $\phi$
is a graph isomorphism.
Number of pairs of subspaces $(U,V)$ of $F_{q}^{n}$ such that
$dim(U)+dim(V)=n$ and $dim(V)=i$ is equal to $\displaystyle{n\choose
i}_{q}{n\choose n-i}_{q}={n\choose i}_{q}^{2}$. Hence the total number of
vertices in $\overline{\Gamma}(S)$ is equal to total number of all such pairs
of subspaces $(U,V)$ such that $dim(U)+dim(V)=n$; and it is given by
$\displaystyle\sum_{i=1}^{n-1}{n\choose i}_{q}^{2}$. In
$\overline{\Gamma}(T)$, a vertex $(U^{\prime},V^{\prime})$ is post adjacent to
$(U,V)$ if and only if $U^{\prime}\subseteq V$. Let $A\in M_{n}(F_{q})$ with
$rank(A)=r$ and $t=n-r$. Let $U=range(A),~{}V=ker(A)$. Therefore
$d^{+}([A])=d^{+}(U,V)$. The number of subspaces of $V$ of dimension $i$ is
equal to $\displaystyle{t\choose i}_{q}$. For each subspace $X$ of $V$ with a
dimension equal to $i,$ the number of vertices of the form $(X,*)$ is equal to
$\displaystyle{t\choose i}_{q}{n\choose n-i}_{q}={t\choose i}_{q}{n\choose
i}_{q}$. Hence there are $\displaystyle\sum_{i=1}^{t}{t\choose i}_{q}{n\choose
i}_{q}=\sum_{i=1}^{n-r}{n-r\choose i}_{q}{n\choose i}_{q}$ post adjacent
vertices of $(U,V)$.
In $\overline{\Gamma}(T)$, a vertex $(U^{\prime},V^{\prime})$ is pre-adjacent
to $(U,V)$ if and only if $U\subseteq V^{\prime}$. Since $dim(U)=n-dim(V)=r,$
$F^{n}_{q}/U\equiv F^{t}_{q}$. Hence number of subspaces of $F^{n}_{q}$ with
dimension $j$ that contains $U$ is equal to the number of subspaces of
$F^{t}_{q}$ having dimension $j-r,$ and this is equal to
$\displaystyle{n-r\choose j-r}_{q}={n-r\choose n-j}_{q}$. Hence the number of
all pre-adjacent vertices of $(U,V)$ of the form $(U^{\prime},V^{\prime})$
with $dim(V^{\prime})=j$ is equal to $\displaystyle{n-r\choose
n-j}_{q}{n\choose n-(n-j)}_{q}={n-r\choose n-j}_{q}{n\choose n-j}_{q}$.

$\text{Hence}~{}~{}d^{-}((U,V))=\sum_{j=1}^{n-r}{n-r\choose n-j}_{q}{n\choose
n-j}_{q}=\sum_{i=1}^{n-r}{n-r\choose i}_{q}{n\choose i}_{q}.$

Therefore

$\displaystyle d^{+}([A])=d^{-}([A])=\sum_{i=1}^{n-r}{n-r\choose
i}_{q}{n\choose i}_{q}.$

∎

######  Corollary 3.15.

Let $q=p^{k}$ with $p$ prime and $A\in Z(M_{n}(F_{q}))$. Then

$d([A])=2\sum_{i=1}^{n-r}{n-r\choose i}_{q}{n\choose
i}_{q}-\sum_{i=1}^{n-r}{n-r\choose i}_{q}^{2},$

where $r=\text{rank}(A)$.

###### Proof.

Let $R=M_{n}(F_{q})$, $A\in Z(R)$ and $rank(A)=r$. We have
$d(A)=d^{+}(A)+d^{-}(A)-|S|$, where $\displaystyle S=\\{[B]\in
Z(R)\colon[B][A]=[A][B]=0\\}=\\{(X=range(B),Y=ker(B))~{}|~{}X~{}\text{ is
subspace}\text{ of }~{}ker(A)~{}\text{ and}~{}range(A)~{}\text{ is subspace of
}~{}Y\\}$. Now we will find $|S|$. Let $U=range(A),~{}~{}V=ker(A)$. The number
of possible pairs of subspaces $(X,Y)$ such that $X\subseteq
V,~{}~{}U\subseteq Y$ and $dim(X)=i,~{}dim(Y)=n-i$ is equal to
$\displaystyle{n-r\choose i}_{q}{n-r\choose n-r-i}_{q}={n-r\choose
i}_{q}{n-r\choose i}_{q}$. Hence the total number of pairs of subspaces
$(X,Y)$ required is
$\displaystyle\sum_{i=1}^{n-r}{n-r\choose i}_{q}{n-r\choose i}_{q}$. Hence
$\displaystyle|S|=\sum_{i=1}^{n-r}{n-r\choose i}_{q}^{2}$.

$\text{Therefore}~{}~{}d([A])=2\sum_{i=1}^{n-r}{n-r\choose i}_{q}{n\choose
i}_{q}-\sum_{i=1}^{n-r}{n-r\choose i}_{q}^{2}.$

∎

######  Theorem 3.16.

Let $q=p^{k}$ with $p$ prime. Consider a ring $R=M_{n}(F_{q})$. For each
$A_{i}\in\Gamma(R),$ let

$\displaystyle[A_{i}]=\left\\{B\in Z(R)\colon B\sim
A_{i}~{}~{}ie.,~{}B=PA_{i}=A_{i}Q~{}\text{for some P, Q}\in
GL_{n}(F_{q})\right\\}.$ $\displaystyle X=\\{[A_{i}]\colon A_{i}\in
Z(R)\\}X_{2}=\\{[A_{i}]\in X\colon A_{i}\neq
0,A_{i}^{2}=0\\},Y_{2}=\\{[A_{i}]\in X\colon A_{i}^{2}=A_{i}\\}$
$\displaystyle
n_{i}=|[A_{i}]|,l=|N_{2}|,m=|Y_{2}|,d_{i}=d([A_{i}]),r_{i}=rank(A_{i}),~{}~{}\displaystyle
N_{i}=\sum_{A_{j}\in N(A_{i})}n_{j}.$

Then

$\displaystyle
n_{i}=\prod_{k=1}^{r_{i}-1}(q^{r_{i}}-q^{k}),~{}d_{i}=2\sum_{k=1}^{n-r_{i}}{n-r_{i}\choose
k}_{q}{n\choose k}_{q}-\sum_{k=1}^{n-r_{i}}{n-r_{i}\choose k}^{2}_{q},$
$\displaystyle m=\sum_{k=0}^{n}q^{k(n-k)}{n\choose
k}_{q}-2,~{}~{}l=\sum_{k=1}^{[n/2]}{n\choose k}_{q}{n-k\choose k}_{q},$

  1. (1)

$\displaystyle\Gamma(R)=\bigvee_{\Gamma(R)^{\sim}}\left\\{\overline{K_{n_{i}}}\colon[A_{i}]\in
X\setminus X_{2}\right\\}\bigcup\left\\{K_{n_{i}}\colon[A_{i}]\in
X_{2}\right\\},$ $\sigma_{A}(\Gamma(R))=\left(\bigcup_{[A_{i}]\in
X_{2}}\left\\{-1^{(n_{i}-1)}\right\\}\right)\bigcup\left(\bigcup_{[A_{i}]\in
X\setminus
X_{2}}\left\\{0^{(n_{i}-1)}\right\\}\right)\bigcup\sigma(C_{A}(\Gamma(R))),$

where $C_{A}(\Gamma(R))$ is a square matrix of order $l$ defined as below.

$C_{A}(\Gamma(A))=(c_{ij})=\begin{cases}n_{i},~{}~{}~{}&[A_{i}]=[A_{j}]\\\
\sqrt{n_{i}n_{j}}~{}~{},&[A_{i}]~{}~{}\text{adjacent to}~{}~{}[A_{j}]\\\
0,~{}~{}&\text{otherwise}\par\par\end{cases}$

and

  2. (2)

$\displaystyle\sigma_{L}(R)=\left(\bigcup_{[A_{i}]\in
X_{2}}\left\\{(N_{i}+n_{i})^{(n_{i}-1)}\right\\}\right)\bigcup\left(\bigcup_{[A_{i}]\in
X\setminus
X_{2}}\left\\{N_{i}^{(n_{i}-1)}\right\\}\right)\bigcup\sigma(C_{N}(\Gamma(R))),$

where

$C_{N}(\Gamma(R))=(d_{ij})=\begin{cases}N_{i},~{}~{}~{}&[A_{i}]=[A_{j}]\\\
-\sqrt{n_{i}n_{j}},~{}~{}&[A_{i}]~{}~{}\text{adjacent to}~{}~{}[A_{j}]\\\
0,~{}~{}&\text{otherwise}\par\par\end{cases}.$

###### Proof.

The proof follows from Proposition 2.15, Lemma 3.7, 3.10, 3.11 and Corollary
3.15. ∎

##  4\. Spectra of zero-divisor graph of finite semisimple rings

######  Lemma 4.1.

Let $I$ be an indexing set and $i\in I$. Let $R_{i}$ be finite ring and
$T=\prod_{i\in I}R_{i}$. Then the following statements hold.

  1. (1)

Let $x=(x_{i})~{}~{}_{i\in I},y=(y_{i})_{i\in I}$ be any two elements in
$Z(T)$. The relation $\sim_{T}$ defined by

$x\sim_{T}y~{}~{}\text{ if and only
if}~{}x_{i}=u_{i}y_{i}=y_{i}v_{i},~{}\text{ for some
units}~{}~{}u_{i},v_{i}\in R_{i}$

is an equivalence relation. Further, the relation $\sim_{T}$ is equivalent to
the relation $\sim$ which is defined as,

$x\sim y~{}\text{ if and only if}~{}x=uy=yv,~{}\text{ for some units}~{}u,v\in
T.$

  2. (2)

Let $x=(x_{i})_{i\in I}\in Z(T)$; and $I_{1}=\\{i\in I\colon
x_{i}~{}~{}\text{is unit}\\},~{}I_{2}=\\{i\in I\colon
x_{i}=0\\},I_{3}=I\setminus(I_{1}\cup I_{2}).$ Then $|[x]|=\left(\prod_{\in
I_{1}}|U(R_{i})|\right)\left(\prod_{i\in I_{3}}|[x_{i}]|\right)$.

  3. (3)

Let $x=(x_{i})_{i\in I}\in Z(T)$ and $I_{1}=\\{i\in I\colon x_{i}\neq
0\\},~{}~{}I_{2}=\\{i\in I\colon x_{i}=0\\}$. Then $\displaystyle
d(x)=\prod_{i\in I_{1}}(d(x_{i})+1)\prod_{i\in I_{2}}|R_{i}|-1$; and
$\displaystyle d([x])=\prod_{i\in I_{1}}(d([x_{i}])+1)\prod_{i\in
I_{2}}|\Gamma(R_{i})^{\sim}|-1$.

###### Proof.

(1) Let $x=(x_{i})_{i\in I}$ and $y=(y_{i})_{i\in I}$ in $Z(T)$. Assume that
$x\sim y$. Hence there exist units $u=(u_{i})_{i\in I}$ and $v=(v)_{i\in I}$
in $T$ such that $x=(x_{i})_{i\in I}=uy=(u_{i}y_{i})_{i\in
I}=yv=(y_{i}v_{i})_{i\in I}$. Since $u,v$ are units, $u_{i},v_{i}$ are also
units, for each $i$. Therefore $x_{i}\sim y_{i}$, for all $i\in I$. Hence
$x\sim_{T}y$. Similarly the converse follows.
(2) Let $x=(x_{i})_{i\in I}\in Z(T)$ and $y=(y_{i})_{i\in I}\in Z(T)$. Let
$y\sim x$. Hence $y_{i}\sim x_{i}$, for all $i\in I$. Observe that
$[x_{i}]=U(R_{i})~{}\text{if }~{}x_{i}~{}\text{is unit}$ and $[0]=\\{0\\}$ in
the ring $R_{i}$. Now if $x_{i}$ is nonzero non unit, then $x_{i}\in
Z(R_{i}),$ because $R_{i}$ is finite ring. Hence by the multiplication
principle of counting, (2) holds.
(3) Let $x=(x_{i})_{i\in I}\in Z(T)$ and $I_{1}=\\{i\in I\colon x_{i}\neq
0\\},~{}~{}I_{2}=\\{i\in I\colon x_{i}=0\\}$. If $y=(y_{i})_{i\in I}\in Z(T)$
such that $xy=0$, then $x_{i}y_{i}=0$, for all $i\in I$. Hence $y_{i}\in
N(x_{i})\cup\\{0\\}$, for $i\in I_{1}$ and $y_{i}\in R_{i}$, for $i\in I_{2}$.
Therefore $\displaystyle d(x)=\prod_{i\in I_{1}}(|N(x_{i})|+1)\prod_{i\in
I_{2}}|R_{i}|-1$, where $N(x_{i})$ is a set of all neighbors of $x_{i}$ in a
graph $\Gamma(R_{i})$. Hence we get $\displaystyle d(x)=\prod_{i\in
I_{1}}(d(x_{i})+1)\prod_{i\in I_{2}}|R_{i}|-1$. Similarly we can prove that,
$\displaystyle d([x])=\prod_{i\in I_{1}}(d([x_{i}])+1)\prod_{i\in
I_{2}}|\Gamma(R_{i})^{\sim}_{i}|-1$. ∎

######  Proposition 4.2.

For $k\in I=\\{1,2,\ldots,t\\}$, let $n_{k},m_{k}$ be positive integers. Let
$p_{k}$ be distinct primes and $q_{k}=p_{k}^{m_{k}}$. Let $\displaystyle
R=\bigoplus_{k=1}^{t}M_{n_{k}}(F_{q_{k}})$ be a ring, where each $F_{q_{k}}$
is a finite field. If $\displaystyle A=(A_{1},\ldots,A_{t})\in R,$
$rank(A_{k})=r_{k}$, for all $k=1,2,\ldots,t$; and $I_{1}=\\{k\colon
r_{k}=n_{k}\\},I_{2}=\\{k\colon r_{k}=0\\},I_{3}=I\setminus(I_{1}\cup I_{2})$
and $I_{4}=\\{k\colon r_{k}\neq 0\\}$. Then

  1. (1)

$\displaystyle|[A]|=\prod_{k\in
I_{1}}\left(\prod_{i=1}^{n_{k}-1}(q_{k}^{n_{k}}-q_{k}^{i})\right)\prod_{k\in
I_{3}}\left(\prod_{i=0}^{r_{k}-1}(q_{k}^{r_{k}}-q_{k}^{i})\right)$.

  2. (2)

$\displaystyle d([A])=\prod_{k\in I_{2}}\left(\sum_{i=1}^{n-1}{n\choose
i}_{q}^{2}\right)\prod_{k\in
I_{4}}\left(\sum_{i=1}^{n-r_{k}}\left(2{n-r_{k}\choose i}_{q}{n\choose
i}_{q}-{n-r_{k}\choose i}_{q}^{2}\right)\right)-1$.

  3. (3)

$\displaystyle d(A)=\left(\prod_{k\in
I_{2}}q_{k}^{n_{k}^{2}}\right)\left(\prod_{k\in
I_{4}}\left(2q^{n_{k}(n_{k}-r_{k})}-q^{(n_{k}-r_{k})^{2}}\right)\right)-1$.

###### Proof.

Proof follows from Lemma 3.7, 3.8 and Corollary 3.15. ∎

######  Theorem 4.3.

$\text{For}~{}~{}k\in I=\\{1,2,\ldots,t\\}$, let $m_{k},n_{k}$ be positive
integers. Let $p_{k}$ be distinct primes and $q_{k}=p_{k}^{m_{k}}$. Let
$\displaystyle R=\bigoplus_{k=1}^{t}M_{n_{k}}(F_{q_{k}})$ be a ring, where
each $F_{q_{k}}$ is a finite field.
For each $A_{i}=(A_{i1},A_{i2},\ldots,A_{it})\in\Gamma(R),$ let
$rank(A_{ik})=r_{ik}$, for all $k=1,2,\ldots,t$,

$\displaystyle I_{1}=\\{k\colon r_{k}=n_{k}\\},I_{2}=\\{k\colon
r_{k}=0\\},I_{3}=I\setminus(I_{1}\cup
I_{2})~{}~{}\text{and}~{}~{}~{}I_{4}=\\{k\colon r_{k}\neq 0\\},$
$\displaystyle[A_{i}]=\\{B=(B_{k})_{k=1}^{t}\in Z(R)\colon B_{k}\sim
A_{ik}~{}k\in I\\},~{}~{}X=\\{[A_{i}]\colon A_{i}\in\Gamma(R)\\},$
$\displaystyle X_{2}=\\{[A_{i}]\in X\colon A_{i}\neq
0,A_{i}^{2}=0\\},Y_{2}=\\{[A_{i}]\in X\colon A_{i}^{2}=A_{i}\\},$
$\displaystyle
n_{i}=|[A_{i}]|,l=|N_{2}|,m=|Y_{2}|,d_{i}=d([A_{i}]),r_{ik}=rank(A_{ik}),~{}~{}\displaystyle
N_{i}=\sum_{A_{j}\in N(A_{i})}n_{j}.$

Then

$\displaystyle n_{i}=\prod_{k\in
I_{1}}\left(\prod_{j=1}^{n_{k}-1}(q_{k}^{n_{k}}-q_{k}^{j})\right)\prod_{k\in
I_{3}}\left(\prod_{j=0}^{r_{ik}-1}(q_{k}^{r_{ik}}-q_{k}^{j})\right),$
$\displaystyle d_{i}=\prod_{k\in I_{2}}\left(\sum_{l=1}^{n_{k}-1}{n_{k}\choose
l}_{q}^{2}\right)\prod_{k\in
I_{4}}\left(\sum_{l=1}^{n_{k}-r_{ik}}\left(2{n_{k}-r_{ik}\choose
l}_{q_{k}}{n_{k}\choose l}_{q_{k}}-{n_{k}-r_{ik}\choose
i}_{q_{k}}^{2}\right)\right)-1,$ $\displaystyle
m=\prod_{k=1}^{t}\left(\sum_{j=0}^{n_{k}}q_{k}^{j(n_{k}-j)}{n_{k}\choose
j}_{q_{k}}\right)-2,~{}~{}l=\prod_{k=1}^{t}\left(\sum_{j=1}^{[n_{k}/2]}{n_{k}\choose
j}_{q_{k}}{n_{k}-j\choose j}_{q_{k}}\right)$

and adjacency and Laplacian spectra of $\Gamma(R)$ are given as in Theorem
3.16.

###### Proof.

The proof follows from Lemma 4.1 and Proposition 4.2. ∎

######  Corollary 4.4.

Let $k\in I=\\{1,2,\ldots,t\\}$, $m_{k}$ are positive integer and
$q_{k}=p_{k}^{m_{k}}$, where $p_{k}$ are distinct primes. Let $\displaystyle
R=\bigoplus_{k=1}^{t}M_{2}(F_{q_{k}})$ be a ring. For each
$A_{i}=(A_{i1},A_{i2},\ldots,A_{it})\in\Gamma(R),$

$\displaystyle I_{1}=\\{k\colon A_{ik}~{}~{}\text{is
unit}\\},~{}~{}I_{2}=\\{k\colon A_{ik}=0\\},~{}~{}I_{3}=I\setminus(I_{1}\cup
I_{2}),$ $\displaystyle[A_{i}]=\left\\{B=(B_{k})_{k=1}^{t}\in Z(R)\colon
B_{k}\sim A_{ik}~{}k\in I\right\\}.~{}~{}X=\\{[A_{i}]\colon
A_{i}\in\Gamma(R))\\},$ $\displaystyle X_{2}=\\{[A_{i}]\in X\colon A_{i}\neq
0,A_{i}^{2}=0\\},~{}~{}Y_{2}=\\{[A_{i}]\in X\colon A_{i}^{2}=A_{i}\\},$
$\displaystyle
n_{i}=|[A_{i}]|,l=|N_{2}|,~{}~{}m=|Y_{2}|,d_{i}=d([A_{i}]),~{}~{}r_{ik}=rank(A_{ik}),~{}~{}\displaystyle
N_{i}=\sum_{A_{j}\in N(A_{i})}n_{j}.$

Then

$\displaystyle n_{i}=\prod_{k\in I_{1}}\left(q_{k}^{2}-q_{k}\right)\prod_{k\in
I_{3}}\left(q_{k}-1\right),~{}~{}~{}d_{i}=\prod_{k\in
I_{2}}(q_{k}+1)\prod_{k\in I_{4}}(2q_{k}+1)-1,$ $\displaystyle
m=\prod_{k=1}^{t}\left(\sum_{j=0}^{2}q_{k}^{j(2-j)}{2\choose
j}_{q_{k}}\right)-2,~{}~{}l=\prod_{k=1}^{t}(q_{k}+1)$

and adjacency and Laplacian spectra of $\Gamma(R)$ are given as in Theorem
3.16.

##  5\. A method to find spectra of the generalized join of graphs

Let $H$ be a graph on $I=\\{1,2,\ldots,n\\}$ vertices and for each $i\in I$,
$G_{i}$ be a graph on $\\{v_{i1},\ldots,v_{in_{i}}\\}$ vertices. If
$\displaystyle G=\bigvee_{H}\\{G_{1},G_{2},\ldots,G_{n}\\}$, then $A(G)$ is a
block matrix
$\displaystyle\begin{bmatrix}A(G_{1})&J_{12}&J_{13}&\cdots&J_{1n}\\\
J_{21}&A(G_{2})&J_{23}&\cdots&J_{2n}\\\ \vdots&\vdots&\vdots&\ddots&\vdots\\\
J_{n1}&J_{n2}&J_{n3}&\cdots&A(G_{n})\end{bmatrix},$ where $J_{ij}$ is a matrix
of all $1^{\prime}s$ if $i-j$ is an edge in $H$ and $J_{ij}$ is a matrix of
all $0^{\prime}s$ if $i-j$ is not an edge in $H$. The order of $J_{ij}$ is
$n_{i}\times n_{j}$. If all graphs $G_{i}$ are null graphs, then
$G=\bigvee_{H}\\{\overline{K}_{n_{1}},\overline{K}_{n_{2}},\ldots,\overline{K}_{n_{n}}\\}$
is multipartite graph and
$A(G)=\begin{bmatrix}O_{n_{1}}&J_{12}&J_{13}&\cdots&J_{1n}\\\
J_{21}&O_{n_{2}}&J_{23}&\cdots&J_{2n}\\\ \vdots&\vdots&\vdots&\ddots&\vdots\\\
J_{n1}&J_{n2}&J_{n3}&\cdots&O_{n_{n}}\end{bmatrix}$. In this case, $A(G)$ is
obtained by duplicating $i^{th}$ row and $i^{th}$ column by $n_{i}$ times
iteratively. Now we have one important observation about the eigenvalues and
eigenvectors of matrices.

######  Proposition 5.1.

Let $j\in\\{1,3...,n\\}$ and $m$ be a positive integer. Let $B$ be a square
matrix of size $n$ and $A$ be a matrix obtained by duplicating $j^{th}$ row of
$B$ $m$ times and then duplicating $j^{th}$ column of new matrix $m$ times.
Let $v_{j}=[x_{1},\ldots,x_{n-1}]^{t}$ and
$w_{j}=[x_{1},\ldots,\underbrace{x_{j},x_{j},x_{j},\ldots,x_{j}}_{m-times}\ldots,x_{n-1}]^{t}$.
If $Bv_{j}=\lambda_{j}v_{j}$ and $Aw_{j}=\mu_{j}w_{j}$ then

$\displaystyle\mu_{j}=\lambda_{j}+\frac{\displaystyle\sum_{i=1}^{n}a_{ij}}{\displaystyle\sum_{i=1}^{n}x_{i}}(m-1)x_{j}.$

###### Proof.

Let $\displaystyle B=[a_{ij}]_{n\times n}$ be a matrix of size $n\times n$. If
$[x_{1},\ldots,x_{n}]^{t}$ is an eigenvector of $B$ corresponding to an
eigenvalue $\lambda$, then we have

$a_{i1}x_{1}+\ldots+a_{ij}x_{j}+\ldots+a_{in}x_{n}=\lambda
x_{i},~{}~{}~{}~{}~{}~{}\text{for all}~{}~{}i=1,2,\ldots,n.$

If $[x_{1},\ldots,x_{j1}=x_{j},\ldots,x_{jm},\ldots,x_{n}]^{t}$ is an
eigenvector of $A$ associated to its eigenvalue $\mu$, then we have

(5.1) $a_{i1}x_{1}+\ldots+a_{ij}(x_{j1}+\ldots+x_{jm})+\ldots+a_{in}x_{n}=\mu
x_{i},~{}~{}~{}~{}~{}~{}\text{for all}~{}~{}i=1,2,\ldots,n$

and

(5.2) $a_{j1}x_{1}+\ldots+a_{jk}(x_{j1}+\ldots+x_{jm})+\ldots+a_{kn}x_{n}=\mu
x_{jk},~{}~{}\text{ for all}~{}k=1,\ldots,m.$

Therefore we get

$a_{ij}\left(\sum_{k=2}^{m}x_{jk}\textasciibreve\right)=(\mu-\lambda)x_{i},~{}~{}\text{for
all}~{}i=1,2,\ldots,n$

and

$a_{jk}\left(\sum_{k=2}^{m}x_{jk}\right)=\mu x_{jk}-\lambda x_{j},~{}\text{
for all}~{}~{}k=1,2,\ldots,m.$

Hence we have,

$\left(\sum_{i=1}^{n}a_{ij}\right)\left(\sum_{k=2}^{m}x_{jk}\right)=(\mu-\lambda)\left(\sum_{i=1}^{n}x_{i}\right)~{}~{}~{}\text{and}~{}~{}~{}0=\mu(x_{jk}-x_{j}),~{}~{}~{}\text{for}~{}~{}k=2,\ldots,m.$

If $\mu\neq 0$, then $x_{jk}=x_{j},~{}~{}\text{for}~{}k=2,\ldots,m$. If
$\displaystyle\sum_{i=1}^{n}a_{ij}\neq 0$, then
$\displaystyle\mu=\lambda+\frac{\sum_{i=1}^{n}a_{ij}}{\sum_{i=1}^{n}x_{i}}(m-1)x_{j}$.
Clearly, the last part of the statement follows from equation (5.1). ∎

We discuss above proposition by an example. Consider a $3\times 3$ matrix,
$B=\begin{bmatrix}-1&0&1\\\ 0&2&0\\\ 0&0&1\end{bmatrix}$. Its eigenvalues and
corresponding eigenvectors are $\lambda_{1}=-1,\lambda_{2}=2,\lambda_{3}=1$
and
$v_{1}=\begin{bmatrix}1&0&0\end{bmatrix}^{t},v_{2}=\begin{bmatrix}0&1&0\end{bmatrix}^{t},v_{3}=\begin{bmatrix}1&0&2\end{bmatrix}^{t}$
respectively. Let us obtain matrix $A,$ by duplicating second row and second
column of $B$, so $A=\begin{bmatrix}-1&0&0&1\\\ 0&2&2&0\\\ 0&2&2&0\\\
0&0&0&1\end{bmatrix}$. Now if we duplicate the second entry of $v_{2}$ and
construct $w_{2}=\begin{bmatrix}0&1&1&0\end{bmatrix}^{t}$, then $w_{2}$ is
eigenvector of $A$ with associated eigenvalue
$\mu_{2}=4=\lambda_{2}+\frac{0+2+0}{0+1+0}1$. Also $\lambda_{1}=-1$ and
$\lambda_{3}=1$ are again eigenvalues of $A$ with corresponding eigenvectors
$w_{1}=\begin{bmatrix}1&0&0&0\end{bmatrix}^{t}$ and
$w_{3}=\begin{bmatrix}1&0&0&2\end{bmatrix}^{t}$ respectively.

######  Proposition 5.2.

Let $R$ be a finite ring with unity. Let $\mathcal{F}=\\{[v_{i}]\colon
i=1,2,\ldots,k\\}$ be a set of all distinct equivalence classes on $Z(R)$ with
respect to the relation $\approx$ and
$|[v_{i}]|=n_{i},~{}~{}\text{for}~{}~{}i=1,2,\ldots,k$. Let
$[x_{1},x_{2},\ldots,x_{k}]$ and $\displaystyle
y=[\underbrace{x_{1},\ldots,x_{1}}_{n_{1}-times},\ldots,\underbrace{x_{j},\ldots,x_{j},}_{n_{j}-times}\ldots,\underbrace{x_{k},\ldots,x_{k}}_{n_{k}-times}]^{t}$.
If $A(\Gamma(G)^{\approx})x=\lambda x$ and $A(\Gamma(R))y=\mu y$ then

$\displaystyle\displaystyle\mu$
$\displaystyle=\lambda+\frac{\displaystyle\sum_{i=1}^{k}a_{i1}}{\displaystyle\sum_{i=1}^{k}x_{i}}(n_{1}-1)x_{1}+\frac{n_{1}a_{12}+\displaystyle\sum_{i=n_{1}+1}^{k}a_{i2}}{n_{1}x_{1}+\displaystyle\sum_{i=2}^{k}x_{i}}(n_{2}-1)x_{2}$
$\displaystyle+\frac{n_{1}a_{12}+n_{2}a_{23}+\displaystyle\sum_{i=n_{1}+n_{2}+1}^{k}a_{i3}}{n_{1}x_{1}+n_{2}x_{2}+\displaystyle\sum_{i=3}^{k}x_{i}}(n_{3}-1)x_{3}+\ldots$
$\displaystyle+\frac{n_{1}a_{12}+n_{2}a_{23}+\ldots+n_{k-1}a_{k-1,k}+a_{k,k}}{n_{1}x_{1}+n_{2}x_{2}+\ldots+n_{k-1}x_{k-1}+x_{k}}(n_{k}-1)x_{k}$

###### Proof.

Let $A_{1}(\Gamma(R)^{\approx})$ be the matrix obtained by duplicating first
row and first column of $A(\Gamma(R)^{\approx})$, $n_{1}$ times. Let
$A_{i}(\Gamma(R)^{\approx})$ be the matrix obtained by duplicating $i^{th}$
row and $i^{th}$ column of $A_{i-1}(\Gamma(R)^{\approx})$, $n_{i}$ times, for
$i=2,3,\ldots,k$. Using Proposition 5.1, we can obtain eigenvalue
$\lambda_{i}$ and eigenvector $y_{i}$ of $A_{i}(G)$ from eigenvalue
$\lambda_{i-1}$ and eigenvector $y_{i-1}$. Hence the expressions for
eigenvalue $\mu=\lambda_{k}$ and eigenvector $y=y_{k}$ of
$A(\Gamma)=A_{k}(G^{\sim})$ follows. ∎

Let $R$ be a finite ring with unity. Suppose $u_{1},u_{2},\ldots,u_{n}$ are
linearly independent eigenvectors of $A(\Gamma(R)^{\approx})$ associated to
eigenvalues $\lambda_{1},\ldots,\lambda_{n}$ of $A(\Gamma(R)^{\approx})$. Then
we can find eigenvalues and eigenbasis of $A(\Gamma(R))$ by Proposition 5.1.

## References

  * [1] Afkhami, M., Barati, Z. and Khashyarmanesh, K., _On the signless Laplacian and normalized Laplacian spectrum of the zero divisor graphs._ Ricerche mat (2020).
  * [2] D.F. Anderson and P.S. Livingston, _The zero-divisor graph of a commutative ring._ J. Algebra 217 (1999) 434- 447\.
  * [3] Bajaj, S, Panigrahi, P., _On the adjacency spectrum of zero divisor graph of ring $\mathbb{Z}_{n}$._ J. Algebra Appl. (2022) Online ready, https://doi.org/10.1142/S0219498822501973
  * [4] Bajaj, S, Panigrahi, P., _Universal adjacency spectrum of zero divisor graph on the ring and its complement._ AKCE International Journal of Graphs and Combinatorics (2021) Online ready, https://doi.org/10.1080/09728600.2021.2001701
  * [5] P.K. Beiranvand and R. Beiranvand, _On zero divisor graphs of quotient rings and complemented zero divisor graphs_ , Journal of Algebra and Related Topics 4(1) (2016) 39-50.
  * [6] D.M. Cardoso, M. A. A. de Freitas, E.A. Martins and M. Robbiano, _Spectra of graphs obtained by a generalization of the join graph operation,_ Discrete Math. 313(5) (2013) 733-741.
  * [7] S. Chattopadhyay, K.L. Patra, B.K. Sahoo, _Laplacian eigenvalues of the zero divisor graph of the ring $\mathbb{Z}_{n}$_, Linear Algebra Appl. 584 (2020) 267-286.
  * [8] Dan Laksov, _Diagonalization of matrices over rings_ , Journal of Algebra 376 (2013) 123-138.
  * [9] C. Godsil and G. Royle,_Algebraic Graph Theory, Graduate Texts in Mathematics._ 207, Springer-Verlag, New York(2001).
  * [10] Jitsupat Rattanakangwanwong and Yotsanan Meemark, _Eigenvalues of zero divisor graphs of principal ideal rings,_ Linear and Multilinear Algebra (2021). https://doi.org/10.1080/03081087.2021.1917501
  * [11] A. Khairnar and B. N. Waphare, Zero-Divisor Graphs of Laurent Polynomials and Laurent Power Series, Algebra and its Applications, 345–349, Springer (2016).
  * [12] A.S. Khaled and Abdel-Ghaffar, _Counting matrices over finite fields having a given number of rows of unit weight,_ Linear Algebra Appl. 436(7) (2012) 2665-2669. https://doi.org/10.1016/j.laa.2011.08.049.
  * [13] M$\ddot{o}$nius, K., _Eigenvalues of zero-divisor graphs of finite commutative rings,_ J Algebr Comb (2020). https://doi.org/10.1007/s10801-020-00989-6
  * [14] S.B. Mulay, _Cycles and symmetries of zero-divisors._ Comm. Algebra 30(7) (2007) 3533-3558.
  * [15] A. Patil and K. Shinde, Spectrum of zero-divisor graph of von Neumann regular rings, J. Algebra Appl. (to appear).
  * [16] Pirzada S., Wani B. and Somasundaram A. _On the eigenvalues of zero-divisor graph associated to finite commutative ring $\mathbb{Z}_{p^{M}q^{N}}$._ AKCE Int. J. Graphs Comb. 18(2021) 1-6.
  * [17] A. Prasad, _Counting subspaces of a finite vector space -2._ Resonance. 15(2010) 1074-1083.
  * [18] S.P. Redmond, The zero-divisor graph of a non-commutative ring, Internat. J. Commutative Rings 1 (4) (2002) 203-211.
  * [19] N.K. Thakare and B.N. Waphare, _Bear* rings with finitely many elements_ J. Combin. Math.Combin. Comput. 26(1998) 161-164.
  * [20] M. Young,_Adjacency matrices of zero-divisor graphs of integers modulo n._ Involve 8(5)(2015) 753-762.


# HomeLabGym: A real-world testbed for
home energy management systems

Toon Van Puyvelde,
IDLab
Ghent University – imec
<EMAIL_ADDRESS>
Marie-Sophie Verwee
IDLab
Ghent University – imec
Gargya Gokhale
IDLab
Ghent University – imec
Mehran Zareh Eshghdoust
Daikin Europe NV
Chris Develder
IDLab
Ghent University – imec
Under Review

###### Abstract

Amid growing environmental concerns and resulting energy costs, there is a
rising need for efficient Home Energy Management Systems (HEMS). Evaluating
such innovative HEMS solutions typically relies on simulations that may not
model the full complexity of a real-world scenario. On the other hand, real-
world testing, while more accurate, is labor-intensive, particularly when
dealing with diverse assets, each using a distinct communication protocol or
API. Centralizing and synchronizing the control of such a heterogeneous pool
of assets thus poses a significant challenge. In this paper, we introduce
HomeLabGym, a real-world testbed to ease such real-world evaluations of HEMS
and flexible assets control in general, by adhering to the well-known OpenAI
Gym paradigm. HomeLabGym allows researchers to prototype, deploy, and analyze
HEMS controllers within the controlled test environment of a real-world house
(the IDLab HomeLab), providing access to all its available sensors and smart
appliances. The easy-to-use Python interface eliminates concerns about
intricate communication protocols associated with sensors and appliances,
streamlining the evaluation of various control strategies. We present an
overview of HomeLabGym, and demonstrate its usefulness to researchers in a
comparison between real-world and simulated environments in controlling a
residential battery in response to real-time prices.

##  1 Introduction

The surge in energy costs, coupled with the growing emphasis on demand-
response and integration of renewable energy sources (RES), has increased
interest in the use of home energy management systems (HEMS). Effective HEMS
can strategically schedule loads such as heating, ventilation, and air
conditioning (HVAC), and electric vehicle (EV) charging, while optimizing the
usage of local energy sources, e.g., photovoltaic (PV) installations and
Energy Storage Systems (ESS) [1]. HEMS control algorithms are typically tested
in simulation environments, notable examples being, e.g., ModelicaGym [2] for
integrating Functional Mockup Units (FMUs), CityLearn [3] for grid-level
energy distribution, and BOPTEST for building control [4]. Yet, no easily
reproducible _real-world_ testbed has been widely adopted for real-world
deployment of (residential) flexible asset controllers. Since realistic
simulation of real-world households is both complex to model and to run, we
believe there is a need for such easy-to-use real-world test environments to
deploy, validate, and analyze flexible asset controllers. Inspired by real-
world testbeds in other domains — e.g., OffWorld Gym for robotics [5] — we
thus propose to use a real-world environment for plug-and-play testing of HEMS
controllers. In particular, we use the
HomeLab,111https://homelab.ilabt.imec.be/ a state-of-the-art smart home for
realistic experimentation developed by the IDLab research group at Ghent
University, Belgium. However, accessing the broad set of sensors and
controlling the wide range of devices (e.g., heat pumps, battery chargers, PV
inverters) therein, requires a diverse set of protocols/interfaces. To
abstract away this complexity for HEMS control researchers, we created
HomeLabGym, a real-world testbed that is customizable to specific use cases of
researchers.

Figure 1: System Architecture of HomeLabGym.

##  2 HomeLabGym

The main objective of HomeLabGym is to offer an easy-to-use environment for
real-world (or at least realistic) deployment of innovative HEMS controllers,
particularly supporting controllers based on state-of-the-art data-driven
reinforcement learning (RL). In that particular field, OpenAI Gym is a common
platform for testing RL innovations with minimal coding efforts [6]. As
illustrated in Fig. 1, the Python based HomeLabGym package incorporates a
modular design that interfaces with different assets of the real-world testbed
i.e., IDLAB HomeLab.

Each asset has a corresponding module for implementing the necessary
communication protocols, e.g., MODBUS for the ESS and ENTSOE-API for the day-
ahead price. HomeLabGym also includes additional functionalities such as
preprocessing (for register-level conversions), data logging, Grafana-based
visualization and support for containerizing and cluster-based deployments. In
our first version, the HomeLabGym integrates existing HomeLab assets which
include the heat pump and thermostat, the home battery system, solar PV system
and smart energy meters. Additionally, the current version includes the day-
ahead energy prices for the BELPEX region. To warrant adaptability of
HomeLabGym to future extensions of the physical HomeLab infrastructure, e.g.,
an EV charger, the package is built in a modular manner as illustrated in Fig.
1.

##  3 Experiment

The objective of the short experiment is to illustrate the “plug-and-play”
nature of our HomeLabGym solution, in terms of using standard implementations
of control algorithms, e.g., based on reinforcement learning. Additionally, we
demonstrate the usefulness of such real-world experiments in uncovering
complexities that are difficult to model/reveal purely in simulation.

The case study we consider is of using a home battery to energy arbitrage
based on a real-time price profile using BELPEX spot prices.222This refers to
the organised wholesale market for power trading in the Belgium energy market,
i.e., the current European Power Exchange Belgium. The control algorithm we
use is a Deep Q-Network (DQN) agent, using the implementation from the Stable
Baselines3 RL library,333https://stable-
baselines3.readthedocs.io/en/master/modules/dqn.html out-of-the-box, as is,
given our HomeLabGym’s compatibility with OpenAI Gym. The DQN agent is trained
using 2023 Belpex prices in simulation. We then simply deploy the trained DQN
model in our HomeLab, using HomeLabGym, for a 4-day testing period. As both
the battery simulator and HomeLabGym are Gymnasium environments, this was a
plug-and-play transfer, which not only accelerates the deployment process but
also showcases the versatility and ease of integration offered by HomeLabGym.

As an example of added value that _real-world_ testing can provide, we study
the daily reward achieved with the considered DQN agent. Particularly, we
compare the cumulative reward attained with the one a purely simulation-based
experiment (with the same DQN agent) would have attained. Our experiment
revealed that the real-world reward is 2% lower than that attained in
simulation. This disparity can be attributed to variations between real-world
conditions and simulation environments. Specifically, Fig. 2(a) illustrates
the variability in actual charging power, often falling below the 1 kW
setpoint, resulting in a non-linear charging speed. Similarly, Fig. 2(b)
illustrates the (step-like) behavior of the heat pump as it approaches the
room heating set-point, giving us more insight into the hardware-level
discrepancies of the heat pump.

(a) Charging power of the battery.

(b) 2-day room temperature of the living room.

Figure 2: Graphs of real-world assets in HomeLab.

##  4 Conclusion

HEMS are often tested and benchmarked on simulated environments. However,
deploying controllers in real-world households requires additional coding and
an in-depth understanding of various communication protocols to interface with
heterogeneous assets (e.g., batteries, HVAC systems, EV chargers). Also, as
our experiment shows, simulations do not fully align with real-world dynamics.
To allow easy prototyping of flexible asset controllers on a controlled real-
world household, we have introduced HomeLabGym, a Python interface to easily
test controllers in a real-world home (i.e., the IDLab HomeLab). Our
HomeLabGym environment supports a wide range of communication protocols, thus
providing a plug-and-play tool to help investigate the real-world performance
of HEMS controllers and analyze their deployability. The IDLab HomeLab is open
for collaborations across the world to access the HomeLab testbed facilities.

## Acknowledgement

This research was funded by Daikin Europe NV under the PhD Framework Agreement
with Ghent University. For more information on HomeLab, please contact
<EMAIL_ADDRESS>
## References

  * [1] Zhe Wang and Tianzhen Hong.  Reinforcement learning for building controls: The opportunities and challenges.  Applied Energy, 269:115036, 2020.
  * [2] Oleh Lukianykhin and Tetiana Bogodorova.  Modelicagym: applying reinforcement learning to modelica models.  In Proceedings of the 9th International Workshop on Equation-based Object-oriented Modeling Languages and Tools, EOOLT ’19. ACM, November 2019.
  * [3] Jose R Vazquez-Canteli, Sourav Dey, Gregor Henze, and Zoltan Nagy.  Citylearn: Standardizing research in multi-agent reinforcement learning for demand response and urban energy management, 2020.
  * [4] David Blum, Javier Arroyo, Sen Huang, Ján Drgoňa, Filip Jorissen, Harald Taxt Walnum, Yan Chen, Kyle Benne, Draguna Vrabie, Michael Wetter, et al.  Building optimization testing framework (boptest) for simulation-based benchmarking of control strategies in buildings.  Journal of Building Performance Simulation, 14(5):586–610, 2021.
  * [5] Ashish Kumar, Toby Buckley, John B. Lanier, Qiaozhi Wang, Alicia Kavelaars, and Ilya Kuzovkin.  Offworld gym: open-access physical robotics environment for real-world reinforcement learning benchmark and research, 2020.
  * [6] Mark Towers, Jordan K. Terry, Ariel Kwiatkowski, John U. Balis, Gianluca de Cola, Tristan Deleu, Manuel Goulão, Andreas Kallinteris, Arjun KG, Markus Krimmel, Rodrigo Perez-Vicente, Andrea Pierré, Sander Schulhoff, Jun Jet Tai, Andrew Tan Jin Shen, and Omar G. Younis.  Gymnasium, March 2023.