line 1:
|
for every edge
|
line 2:
|
if
is the color of the edge, then
|
line 3:
|
replace
with a new vertex
colored
and two new uncolored edges
and
.
|
line 4:
|
enumerate the colors used for the new graph; let
be the list of the colors.
|
line 5:
|
for every vertex
|
line 6:
|
if
is its color, then
|
line 7:
|
introduce
new uncolored vertices
and
new uncolored edges
, and
decolor
(remove color
)
|
|