Let R be a commutative ring with identity. The set R of all ideals of R is a bounded semiring with respect to ordinary addition, multiplication and inclusion of ideals. The zero-divisor graph of R is called the annihilating-ideal graph of R, denoted by R . We write for the set of graphs whose cores consist of only triangles. In this paper, the types of the graphs in that can be realized as either the zero-divisor graphs of bounded semirings or the annihilating-ideal graphs of commutative rings are determined. A necessary and sufficient condition for a ring R such that R โ is given. Finally, a complete characterization in terms of quotients of polynomial rings is established for finite rings R with R โ . Also, a connection between finite rings and their corresponding graphs is realized.