Corrected Naive algorithm
Implemented structured graphs