Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Consider 7 items along their respective weights and values
I = I1, I2, I3, I4, I5, I6, I7
W = 2,3,5,7,1,4,1
V = 10,5,15,7,6,18,3
The capacity of knapsack W=15. Find the optimal solution of the fractional knapsack
problem. What is the complexity of finding the solution of fractional knapsack problem?
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 9) Determine the cost and structure of an optimal binary search tree for a set of n = 7 keys with the following probabilities: i 0 1 2 3 4 5 6 7 Pi 0.04 0.06 0.08 0.02 0.10 0.12 0.14 qi 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05arrow_forwardFind an optimal solution to the fractional knapsack problem for an Instancewith number of items 3, Capacity of the sack W=15, profit associated with the items (p1,p2,p3)= (20,5,15,) and weight associated with eachitem (w1,w2,w3)= (2,3,5,).arrow_forwardSolve the 0/1 Knapsack problem given that: The Knapsack can only carry a maximum of 8 Kg. The items are 2 Kg with a value of Ksh 100, 3 Kg with a value of Ksh 120, 5 Kg with a a value of Ksh 140, 1 Kg with a value of Ksh 60, and 6 Kg with a value of Ksh 150.arrow_forward
- Please solve..arrow_forwardConsider the following version of Knapsack. Given are two weight limits W 1 and W 2 , whereW 1 ≤ W 2 . Given are also n items (w 1 , c 1 ), (w 2 , c 2 ), . . . , (w n , c n ), where w i is the weight and c ithe cost of the i-th item. We want to find a subset of these items of the highest cost, wherethe subset weights at least W 1 and at most W 2 . Give an O(nW 2 ) algorithm for this problem.(Recall that the cost (respectively weight) of a subset is the sum of the costs (respectivelyweights) of the items in the subset.)arrow_forwardFind an optimal Hoffman code for g:5, o:15, u:28, m:25, b:10, c:17. draw out steps so i can understandarrow_forward
- n For n distinct elements a₁,..., an with positive weights w₁,..., wn s.t. -1 W₁ = 1, design a linear-time algorithm returning the element ak, which satisfies the following: Σ w₁ ≤ 1/2 and Σ wi ≤ 1/2. ai ak Assume that such an ak always exists. You should also justify the time complexity.arrow_forwardUsing LDA, compute the optimal projection line in a single dimension, for two labelled sets of 2- dimensional points given below: Class 1 = { (1,0), (1,2), (3,0), (3,2)} Class 2 = { (2,4), (3,2), (5,4), (6,2)}arrow_forwardSolve By greedy algorithmarrow_forward
- Csearrow_forwardCorrect answer will be upvoted else downvoted. Computer science. Polycarp can cut any piece of paper w×h that he has in just two cases: On the off chance that w is even, he can slice the sheet down the middle and get two sheets of size w2×h; In the event that h is even, he can slice the sheet down the middle and get two sheets of size w×h2; On the off chance that w and h are even simultaneously, Polycarp can slice the sheet as indicated by any of the standards above. In the wake of cutting a piece of paper, the complete number of pieces of paper is expanded by 1. Assist Polycarp with seeing whether he can cut his sheet of size w×h at into n or more pieces, utilizing just the principles portrayed previously. Input The principal line contains one integer t (1≤t≤104) — the number of experiments. Then, at that point, t experiments follow. Each experiment comprises of one line containing three integers w, h, n (1≤w,h≤104,1≤n≤109) — the width and stature of the…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education