sorry, I  made it probably not clear enough but whole first section was meant to be about Minimum Generating Set problem