| | Input: the sets and produced by equation (1) | | Output: zero-divisor graph . | | (1) | Initialization: set the operations (intersection, union and difference, symmetric difference, etc.) on sets and to generate the vertex set . | | (2) | for to do | | (3) | | | (4) | for to do | | (5) | if weight weight () then | | (6) | Generate the edge set: is the number of vertices connected to , is the set of vertices with the smallest labeling. | | (7) | else | | (8) | , | | (9) | return Step 6. | | (10) | end if | | (11) | end for | | (12) | end for | | (13) | return. |
|