In an edge coloring, an edge e is called rich if all edges adjacent to e have different colors. An edge coloring is called a rich-neighbour edge coloring if every edge is adjacent to some rich edge. The smallest number of colors for which there exists such a coloring is denoted by X′rn(G). I'm interersted in a greedy algorythm that finds such a coloring. (The graph representation I'm using is a list of neighboring vertices)
I am getting stuck when it comes to traversing back when I find that the current coloring can't satisfy my conditions. Any help would be appreciated.