Question 8888 – ISRO CS 2020
January 7, 2024Question 10197 – Computer-Networks
January 8, 2024Question 5 – ISRO-2018
The following paradigm can be used to find the solution of the problem in minimum time: Given a set of non-negative integer, and a value K, determine if there is a subset of the given set with the sum equal to K:
Correct Answer: B
Question 4 Explanation:
The above problem clearly specifies that sum of subset problem. The sum of the subset problem using recursion will give exponential time. Using dynamic programming we can get pseudo-polynomial time.
Sum of subset problem:
Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with the sum equal to the given sum.
Sum of subset problem:
Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with the sum equal to the given sum.
Example:
Array set[ ]= {1,2,3,4,5} and sum=6
Here there are possible subsets (2,4),(1,2,3) and (5,1).
Divide and Conquer
Dynamic Programming
Greedy Algorithm
Branch and Bound
Subscribe
Login
0 Comments