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
Ilya [14]
3 years ago
8

Suppose that in a 00-11 knapsack problem, the order of the items when sorted by increasing weight is the same as their order whe

n sorted by decreasing value. Give an efficient algorithm to find an optimal solution to this variant of the knapsack problem, and argue that your algorithm is correct.
Computers and Technology
1 answer:
frosja888 [35]3 years ago
8 0

Answer:

Following are the response to the given question:

Explanation:

The glamorous objective is to examine the items (as being the most valuable and "cheapest" items are chosen) while no item is selectable - in other words, the loading can be reached.

Assume that such a strategy also isn't optimum, this is that there is the set of items not including one of the selfish strategy items (say, i-th item), but instead a heavy, less valuable item j, with j > i and is optimal.

As W_i < w_j, the i-th item may be substituted by the j-th item, as well as the overall load is still sustainable. Moreover, because v_i>v_j and this strategy is better, our total profit has dropped. Contradiction.

You might be interested in
Anyone know this awnser computer science
jolli1 [7]

Answer:

Smartphones, Satellite internet providers, smart speakers, and bluetooth headphones

Explanation:

6 0
3 years ago
Read 2 more answers
Write the definition of a class Phone containing: 1. A data member named model of type string. 2. A data member named partNumber
Nady [450]

Answer:

class Phone(object):

   def __init__(self, model, partNumber, retailPrice):

       self.model = model

       self.part_number = partNumber

       self.retail_price = retailPrice

   def phone_specs(self):

       print( "Phone model: {}\nPart number: {}\nRetail price: {}".format( self.model, self.part_number, self.retail_price))

phone1 = Phone("Nokia", "asd234", 200.0)

phone1.phone_specs()

Explanation:

A class is a blueprint of a data structure used to create objects of the same data types and methods. The Phone class is an object that creates an instance of the phone1 object. The phone_specs method is used to display the details of the phone1 object.

4 0
3 years ago
Complete the sentence.<br> The IP protocol creates and addresses packets at the _____ layer.
brilliants [131]
Addresses packets at the internet layer
4 0
3 years ago
Read 2 more answers
Assume you're using a three button mouse. to access shortcut menus, you would
Likurg_2 [28]
<span>Normally you would click the right hand/secondary mouse button but you may configure any of the buttons to work within the Keyboard and Mouse section of System Preferences.
Hope this helps:)</span>
6 0
3 years ago
Read 2 more answers
What is a router?
DIA [1.3K]

Answer:

A) a device that sends data to the receiving device

Explanation:

3 0
3 years ago
Other questions:
  • The brainly home page uses about 112% of my cpu. (On chromebook) any ideas to help increase performance?
    7·2 answers
  • __________ involves determining what qualities are to beused to perform project activities.
    9·1 answer
  • ____ is the process of drawing a series of increasingly detailed DFDs, until all functional primitives are identified.
    7·1 answer
  • Henry conducted a survey on an ad done by his company. In the survey, he asked people to evaluate the ad and state whether they
    8·1 answer
  • Write code using the range function to add up the series 99, 98, 97,...
    11·1 answer
  • Match each proofreading mark to the expected result.
    10·1 answer
  • A device that filters data traffic at a network boundary​
    14·1 answer
  • What are the benefits and risks of a client-server network?
    5·1 answer
  • I need help <br> with a question<br> what can i write for ex when he mad
    13·2 answers
  • a 2x4 line decoder with enable is implemented using nand gate only. how many nand gate is needed to construct this line decoder?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!