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
True [87]
3 years ago
14

The 0-1 knapsack problem is the following. A thief robbing a store finds n items. The ith item is worth vi dollars and weighs wi

pounds, where vi and wi are integers. The thief wants to take as valuable a load as possible, but he can carry at most W pounds in his knapsack, for some integer W . Which items should he take?
Computers and Technology
1 answer:
icang [17]3 years ago
3 0

Step by step Explanation:

Based on what we could deduce from the above statement, the items he should take are:

  • must either take one single item or must leave the other behind,
  • and only a whole amount of an item must be taken,
  • in which an item cannot be taken more than once into his knapsack.

Hence, the thief needs to carefully determine items with an optimal value which still falls within his specified weight (W).

You might be interested in
Which of the following contributes to your active digital footprint
VLD [36.1K]
Personal information intentionally put on a secure website
3 0
3 years ago
Read 2 more answers
The replacer parameter of the stringify method accepts a/an ______________ or an array.
Elina [12.6K]

Answer:

The answer is function

Explanation:

As a function, it accepts two parameters: the value and the key being stringified.  It can be used to change the value of the entries or eliminate them. As an array, it specifies by name which entries and names of the properties in the object to include in the resulting JSON string.

7 0
3 years ago
The ________ occurs when the user presses the enter key without typing a value for an input operation.
Morgarella [4.7K]

The empty input occurs when the user presses the enter key without typing a value for an input operation.

4 0
3 years ago
True or False: Changing a bid package's status to "Closed" removed it from the bidder's Planroom and the bidder will no longer b
Readme [11.4K]

Answer:

True

Explanation:

It's actually true because once a bidding page status changes to closed, it means that the timeframe for bidding has stopped, hence, no bidder will be able to bid again.

7 0
3 years ago
Write a function that accepts an argument for a persons name. The method should loop through the number of characters in the nam
MatroZZZ [7]

Answer:

#include <iostream>

#include<string.h>

using namespace std;

void printCharacter(string name){

   for(int i=0;name[i]!='\0';i++){

       cout<<name[i]<<endl;

   }

}

int main()

{

   string name;

   cout<<"enter the name: ";

   cin>>name;

   printCharacter(name);

}

Explanation:

first include the two libraries iostream for input/output and string library for using the string.

then, create the main function and declare the variable type string.

cout instruction is used o display the message on the screen.

cin is used to store the value in the name variable.

after that, call the function. The program control move to the the function. In the function for loop is used to print the character one by one until end of the name.

4 0
3 years ago
Other questions:
  • Help!!!!!!!!!!!!!!!!!!!
    12·1 answer
  • The material chosen for your study group
    11·1 answer
  • How many buttons does a gamecube controller have?
    7·1 answer
  • Select the correct answer. What has enabled engineers to design slim and sleek television sets? A. using Nipkow disks B. increas
    7·1 answer
  • how to answer the questions on brainly? I've typed my answer in the box but there's no submit button or whatever, and the only t
    14·2 answers
  • Read the scenario below and then answer the
    14·1 answer
  • All nuclear energy results in the rapid release of energy, such as in atomic bombs. true or false
    8·1 answer
  • Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te
    13·1 answer
  • How do you merge on excel?​
    5·1 answer
  • Hi All,
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!