Your question
1) is not in line with the CP
guideleines[
^]: "I want..." is at the edge of being impolite
2) lacks crucial details like graph kind, if performance/memory/... matters, if you ask for papers or code, ...?
3) does not give background of what you did try yourself (asking Goolge is the minimum one can expect nowadays)...
Nonetheless, I assume now you have a DAG -
Directed Acyclic Graph[
^]:
-
Google: DAG longest path[
^]
-
http://en.wikipedia.org/wiki/Longest_path_problem[
^]
- ...
Cheers
Andi