This is pretty similar to my last question. but I found this maple code on a website that is suppose to find a vertex coloring of a graph G. The output is is supposed to be a list for example like [3, table([y = 1, k = 2, c = 2, m = 3, h = 1, x = 1] where the first part (in this case 3) is the number of colors and 1,2,3 in the second part are the colors to which each vertex is assigned. However, no matter what graph I run this on I get everything equal to 1. such as [1, table([y = 1, k = 1, c = 1, m = 1, h = 1, x = 1])]. Why is this happening?

color:=proc(G)
local i, j, C, U, V, total_used;
V:=Vertices(G); total_used:=1;
C[V[1]]:=1;

for i from 2 to nops(V) do
C[V[i]]:=0;
end do;

for i from 2 to nops(V) do
U:={};
for j from 1 to nops(neighbors(V[i], G)) do
U:=U union C[neighbors(V[i], G)[j]];
end do;
j:=1;
while member(j, U) do
j:=j+1;
end do;

C[V[i]]:=j;
if j>total_used then
total_used:=j;
end if;
end do;
[total_used, eval(C)];
end: