• retagged by
3,585 views
0 0 votes
Which of the following procedure is suitable to find the longest path from a given vertex  to any other given vertex in a directed acyclic graph (weighted) with few negative edge weights.

A Divide and conquer

B Greedy approach

C Dynamic programming.

D All of these

 ANSWER GIVEN IS C but why not gredy

1 Answer

0 0 votes
This problem is for a single source longest path, with weighted negative edge, which can only be solved by bellman ford.

Bellman Ford works in greedy approach, not dynamic programming
Position:
Show:

Related questions

0 0 votes
1 1 answer
2.2k
2.2k views
Nandkishor3939 asked Jan 5, 2019
2,203 views
Which is the best data structure to implement topological sort on directed graph?HeapStackqueueArray
1 1 vote
2 2 answers
3.4k
3.4k views
Abhishek Kumar 38 asked Jan 4, 2019
3,369 views
Which of the following statement is true?For a directed graph, the absence of back edges in a DFS tree can have cycle.If all edge in a graph have distinct weight then the...
0 0 votes
0 0 answers
756
756 views
CHïntän ÞäTël asked Dec 25, 2018
756 views
According To Me Answer Should Be 6… Anyone Please Try Once!!! Given Is 5 With No Explaination !!!!like 11-12-12 then for second square 4 times 13 so c(4,2) any two of the...
1 1 vote
0 0 answers
854
854 views