3 3 votes Consider the following steps: $S_1$: Characterize the structure of an optimal solution $S_2$: Compute the value of an optimal solution in bottom-up fashion Which of the following step(s) is/are common to both dynamic programming and greedy algorithms? Only $S_1$ Only $S_2$ Both $S_1$ and $S_2$ Neither $S_1$ nor $S_2$ Algorithms ugcnetcse-june2019-paper2 optimal-solution dynamic-programming greedy-algorithms + – Arjun 7.0k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
2 2 votes Ans. A Both Dp and greedy algorithms find optimal substructure in the problem but only DP uses the bottom up approach. Arman Gupta answered Jul 26, 2019 Arman Gupta comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Opton (A): only S1 Because both greedy algo and dynamic programming finds the optimal solution for their problems but , only dynamic programming uses bottom-up approach whereas,greedy algo uses top-bottom approach Shagun Singh answered Oct 15, 2019 Shagun Singh comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes option A) Only S1 , because both dynamic and greedy finds optimal solution but only dynamic programming computes the value by following a Bottom up approach. Sanandan answered Sep 11, 2020 Sanandan comment Share Follow 0 reply Please log in or register to add a comment.