my algorithm for graph color refinement has a bug when color refining some graphs.
it starts to loop infinitely, while renewing all colors, but the colors stay relatively the same (the distance between them), which is pointless.
so i made a fix, which is the string at label 1. but this still gets the amount of iterations wrong, which i do need to have correct.
i think the issue lies in the refine() function but i cant tell for sure.
would really appreciate some help.
graph that it would fail on:
# Number of vertices:
9
# Edge list:
1,2
5,1
8,2
3,6
3,4
5,6
7,6
4,1
0,7
2,0
8,4
3,5
--- Next graph:
# Number of vertices:
9
# Edge list:
4,8
6,3
2,7
0,8
0,3
5,8
4,1
5,6
4,2
7,0
1,6
5,3
--- Next graph:
# Number of vertices:
9
# Edge list:
4,2
4,7
8,2
7,8
0,6
2,5
4,6
5,1
3,0
1,8
7,6
3,1
--- Next graph:
# Number of vertices:
9
# Edge list:
0,3
2,4
1,6
5,4
3,2
6,4
8,7
0,7
1,5
8,6
7,1
0,8
--- Next graph:
# Number of vertices:
9
# Edge list:
5,1
1,2
7,0
5,6
7,8
4,0
3,2
4,2
6,3
0,8
5,7
1,8```