To resolve the first requirement in this. A node connected only to itself should be considered as a start node in the graph. Probably it should be included in the #40 later.