1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
leonid [27]
3 years ago
8

The Subset Sum problem is a generalization of the Knapsack problem. Group of answer choices True False g

Computers and Technology
1 answer:
Katarina [22]3 years ago
4 0

Answer: True

Explanation:

Subset sum problem and Knapsack problem can be solved using dynamic programming.

In case of Knapsack problem there is a set of weights associative with objects and a set of profits associated with each object and a total capacity of knapsack let say C. With the help of dynamic programming we try to include object's weight such that total profit is maximized without fragmenting any weight of objects and without exceeding the capacity of knapsack, it is also called as 0/1 knapsack problem.

Similar to knapsack problem, in subset sum problem there is set of items and a set of weights associated with the items and a capacity let say C, task is to choose the subset of items such that total sum of weights associated with items of subset is maximized without exceeding the total capacity.

On the basis of above statements we can say that subset sum problem is generalization of knapsack problem.

You might be interested in
Sarah has entered data about football players from team A and team B in a worksheet. She enters names of players from team A wit
deff fn [24]
I believe the answer is freeze pane view

7 0
3 years ago
Read 2 more answers
What are the three parts of a Function
r-ruslan [8.4K]

Answer:

the 3 parts of a function are as follows

1. name

2. return

3.void

6 0
3 years ago
Which option is the primary means of communication for coauthors working on PowerPoint presentations?
nasty-shy [4]

Answer:

Comments

Explanation:

The fastest method of communication, and allows everyone that has access to the PowerPoint to see it.

4 0
3 years ago
Write a program with a loop that lets the user enter a series of positive integers. The user should enter −1 to signal the end o
Fiesta28 [93]

Answer:

import java.util.Scanner;

public class num2 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int count =0;

       int total = 0;

       System.out.println("Enter the numbers");

       int num = in.nextInt();

       while(num!=-1){

           total = total+num;

           count++;

           System.out.println("Enter the next number");

           num = in.nextInt();

       }

//Compute the average

       double average = (double) total/count;

//Outputs

       System.out.println("Total count of numbers entered "+(count));

       System.out.println("Sum of the numbers "+total);

       System.out.printf("Average is %.2f ",average);

   }

}

Explanation:

  • Using java programming language
  • Import scanner class to receive user input
  • declare variables count and total and initialize to zero
  • Prompt user to enter numbers
  • Use a while statement with the condition while(num!=-1)
  • Within the while body keep prompting user to enter a number, increase count and update total
  • when -1 is entered the loop breaks and average is calculated
  • Use printf() method to print average to 2 decimal places.
5 0
3 years ago
What is typeface
Mademuasel [1]
I’m so bored and hungry answer is c 3566
4 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following statements outputs the value of the gpa member of element 1 of the student array?
    5·1 answer
  • If you find yourself in a position where you need to restore an object or container within active directory that has been inadve
    6·1 answer
  • Which term refers to the technical structure of the software, how users interact with the software, and how the software is phys
    10·1 answer
  • ____ is a programming language used to view and manipulate data that is stored in a database.
    6·1 answer
  • What is information systems​
    5·1 answer
  • Difference between switch case and if else statement.​
    11·1 answer
  • What is the function of control unit? in computer. <br>​
    8·1 answer
  • What are the correct steps to find the system specifications such as the amount of RAM or system type?
    13·1 answer
  • Suppose that we are using PDDL to describe facts and actions in a certain world called JUNGLE. In the JUNGLE world there are 4 p
    7·1 answer
  • How to install an older version of prettier on yarn
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!