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]
2 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]2 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
One of the ways to create a horizontal navigation menu from an unordered list is to a. set the display property of the element w
Gennadij [26K]

Answer: a. set the display property of the element within each li element to inline

Explanation: In an unordered list, <em>ul</em> signifies the list and <em>li</em> signifies the elements in the list. When you want to display the elements in a list in a horizontal form, for example if you need a horizontal menu, a quick way of doing this is setting the display of li to inline by writing it as follows in css:

<em>li { </em>

<em>Display: inline; </em>

<em>} </em>

This will order the elements in the list into the form of a horizontal menu .

8 0
3 years ago
Rita wants to know the size of each image in a folder. Which view will help her find this information quickly?
vaieri [72.5K]
The correct answer would be details.

8 0
2 years ago
Write a program that asks the user to provide a word, validate that it is a word, and print the word.
natta225 [31]

Answer:

be clearer. your question doesn't seem to be presented well

8 0
3 years ago
2.24 Write the relevant Python expression or statement, involving a list of numbers lst and using list operators and methods for
miskamm [114]

Answer:

lst = [11, 603, 99, 7, 582, 1];

print("The index of the middle element: " + str(int(len(lst)/2)))

print("The middle element: " + str(lst[int(len(lst)/2)]))

lst.sort()

sorted_lst = lst.reverse()

print("The list in descending order: " + str(lst))

first_number = lst.pop(0)

lst.append(first_number)

print("New lst: "+ str(lst))

Explanation:

- Initialize a list

- Find the middle index, int(len(lst)/2)

- Find the middle element, lst[int(len(lst)/2)]

- Sort the list in descending order (First sort the list in ascending order than reverse it)

- Get the first element using <em>pop</em> method, and append it to the end using <em>append</em> method

- - - - -

a) 0 == 1 == 2 --> Always evaluates false

b) 2 + (3 == 4) + 5 == 7 --> Evaluates true

c) 1 < -1 == 3 > 4 --> Always evaluates false

3 0
3 years ago
Find the mean median mode and range of the data set <br> 11, 13,11,12 10 ,12,11,8
denpristay [2]

Answer:

Mean: 11

Mode: 11

Median: 11

Explanation:

7 0
2 years ago
Other questions:
  • Select the correct answer.
    7·2 answers
  • Derek has an interest in designing video games. What requirements should he fulfill to be a game designer?
    13·1 answer
  • This was not a "true" operating system, but rather an operating environment.
    5·1 answer
  • Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)int[] a = {1, 3, 7, 0, 0,
    6·1 answer
  • What is an effective way to display calculations in a Word document
    7·2 answers
  • In the ______ stage of the systems development life cycle, the design specifications are translated into computer code.
    11·1 answer
  • Grace is the editor of her school newspaper. Which feature of a word processing program would she use to make her changes visibl
    7·2 answers
  • Complete the statement below using the correct term.<br>Website managers use<br>every day​
    11·2 answers
  • Is spin to win paying or is a scam app​
    6·2 answers
  • Instructions
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!