How can I find out whether there are some close-loops inside the graph, like the one marked in red (or more complicated ones)? In other words I need to create an algorithm that will check if there are some "recurencies" in the graph. By recurencies I mean the situation where one node will be producing results that will be used further down by nodes that are inputs to the first node.
Any tips, key words or directions where to look for the solution will be much appreciated. I am new to the subject so please let me know if something needs more explanation.