GATEverse Practice, past papers & mock tests
GATE 2015 · Set-1
AlgorithmsDynamic ProgrammingmediumMCQ2 marks
Consider the problem of finding a maximum weight independent set in a path graph G = (V, E), where V = {v1, v2, ..., vn} and edges connect vi to vi+1 for each 1 <= i < n. Let w(vi) denote the non-negative weight of vertex vi. Which of the following recurrence relations correctly computes the maximum weight M(i) of an independent set in the prefix path {v1, ..., vi}?
Save your progress

Related Algorithms PYQs