One embodiment of the invention provides a system that creates a
phase-shifting mask for a photolithographic process used in fabricating an
integrated circuit. The system starts by receiving a layout for the
integrated circuit. The system then associates nodes with features in the
layout, and generates arcs between the nodes. Next, the system generates a
coloring for the nodes using two colors. The system then generates phase
shifters for the phase-shifting mask and assigns different phases to the
phase shifters based upon the coloring of the nodes.