Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write brute force, greedy, dynamic algorithm and branch and bound algorithm for 0/1 knapsack problem. Find an optimal solution to the knapsack instance n=7,

1. Write brute force, greedy, dynamic algorithm and branch and bound algorithm for 0/1 knapsack problem. Find an optimal solution to the knapsack instance n=7, m=15,(p1,p2,.....p7)=(10,5,15,7,6,18,3) and (w1,w2,.....w7)=(2,3,5,7,1,4,1) using each of these approaches. Explain the time and space complexity of each approaches.

2. Given a chain of 4 matrices A1, A2, A3 and A4 with dimensions 5*4, 4*6, 6*2, and 2*7, respectively. Using Dynamic programming find the minimum number of scalar multiplications needed and also write the optimal multiplication order.

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

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

What is the content-level meaning?

Answered: 1 week ago