I need to analyse a directed graph (not a DAG) but I don't know the name of the algorithm I would need to use. The graph has many cycles.
My desired behaviour is: given a graph source and graph sink, find the longest path by number of edges, excluding cycles.
By graph source, I mean a vertex with one or more edges to other vertices and no incoming edges, and the opposite for sink. If there's better terminology, then please let me know about this.
It's important that I'm able to determine what the path is, so I would need an algorithm that can produce a list of edges.
By excluding cycles, this might entail not traversing an edge the process traversed previously.
Do you recognise this algorithm and could you tell me the name, please?
Thanks in advance