I need an algorithm to convert a green hackenbush graph to it's equivalent tree so that I can find the Grundy value of the Graph using colon principle.I thought of finding the bridges in the given graph and compressing cycles into one node using the fusion principle but I fail to implement it when there are cycles within cycles.Can someone provide an easy to implement algorithm that can find the Grundy value (using Sprague-Grundy theorem) of a given Green - Hackenbush graph.
Algorithm for calculating the Grundy value of a green-hackenbush graph
algorithms;game theory