1Department of Mathematics, Islamic Azad University, Central Tehran Branch, Tehran, Iran
2Department of Mathematics, Islamic Azad Uni- versity, Central Tehran Branch, Tehran, Iran
3Department of Mathematics, College of Sciences, Shiraz University, Shiraz, Iran
The annihilating-ideal graph of a commutative ring $R$ is denoted by $AG(R)$, whose vertices are all nonzero ideals of $R$ with nonzero annihilators and two distinct vertices $I$ and $J$ are adjacent if and only if $IJ=0$. In this article, we completely characterize rings $R$ when $gr(AG(R))neq 3$.