Longest Path Problem

In graph theory and theoretical computer science, the longest path problem is the problem of finding a simple path of maximum length in a given graph. A path is called simple if it does not have any repeated vertices; the length of a path may either be measured by its number of edges, or (in weighted graphs) by the sum of the weights of its edges. In contrast to the shortest path problem, which can be solved in polynomial time in graphs without negative-weight cycles, the longest path problem is NP-hard, meaning that it cannot be solved in polynomial time for arbitrary graphs unless P = NP. Stronger hardness results are also known showing that it is difficult to approximate. However, it has a linear time solution for directed acyclic graphs, which has important applications in finding the critical path in scheduling problems.

Read more about Longest Path Problem:  NP-hardness, Acyclic Graphs and Critical Paths, Approximation, Parameterized Complexity, Special Classes of Graphs, See Also

Famous quotes containing the words longest, path and/or problem:

    The ensuing year will be the longest of my life, and the last of such hateful labours. The next we will sow our cabbages together.
    Thomas Jefferson (1743–1826)

    The path of social advancement is, and must be, strewn with broken friendships.
    —H.G. (Herbert George)

    If a problem is insoluble, it is Necessity. Leave it alone.
    Mason Cooley (b. 1927)