Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ALGORITHMS These are part of same problem. Please solve both properly. I dont need deatails. just make sure the right answer.. I just need the

ALGORITHMS

These are part of same problem. Please solve both properly. I dont need deatails. just make sure the right answer.. I just need the correct answer. You can use shorcuts but please give solve as fast as possible. I am running Out of time kindly do faster.

Question:

image text in transcribed

You are given n items sorted based on value ratio and the knapsack capacity is W. Now, what is the time complexity of fractional knapsack problem? On logn) O(n) Dn*n] O(n) value You are given 4 items as {value, weight} pairs in this format {{20,5}, {60,20}, {25, 10}, {X, 25}}. You can assume that the array is sorted based on the weight ratio. The capacity of knapsack is 39. The item no. 4 (whose weight is 25 ) is taken fractionally to fill upto the knapsack capacity. That fraction is represented in format. What is the lowest possible value of a? For the question above, assume the total value stored in the knapsack is 132 after you have filled upto the knapsack capacity. What is the value of X (in other words, the value of the item no. 4)? Give your answer to at least two decimal places

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

Draw a schematic diagram of I.C. engines and name the parts.

Answered: 1 week ago

Question

What lessons in intervention design, does this case represent?

Answered: 1 week ago