
Follow the steps 1 & 2 to complete the table.
The last cell value = 70 is the max profit for this problem for W = 13
Section 6.1 1. Use Algorithm 6.1 (The Breadth-First Search with Branch-and-Bound Pruning algorithm for the 0-1...
1) Use the Breadth-First-Search with Branch-and-Bound Pruning
algorithm for the 0–1 Knapsack problem to maximize the profit for
the following problem instance. Show the actions step by step.
2) Use the Best-First Search with Branch-and-Bound Pruning
algorithm for the 0–1 Knapsack problem to maximize the profit for
the following problem instance. Show the actions step by step.
i PiPi 1 $20 210 2 $30 5 6 3 $35 75 4 $12 3 4 5 $3 13 wi Wー13
Use the Best-First Search with Branch-and-Bound Pruning
algorithm for the 0–1 Knapsack problem to maximize the profit for
the following problem instance. Show the actions step by step.
i P 1 $20 2 10 2 $30 5 6 3 $35 75 4 $12 3 4 5 $3 13
(2) (15 points) Use the Best-First Search with Branch-and-Bound Pruning algorithm for the 0-1 Knapsack problem to maximize the profit for the following problem instance. Show the actions step by step. Pi wi 1 $20 2 10 2 $30 5 6 3 S35 7 5 4 $12 3 4 5 $3 3 wi W 13
Solve 01 Knapsack problem using 1) Backtracking 2) Breath first
search with branch and bound 3) Best fit search with branch
bound.
Find out maxprofit and solution vector X=(x1,x2,x3,x4,x5).
You need to show how you solve it using pruned state space
tree.
plw $20* $30» $35.» $12* $3. pi/wi- 10» 60 5» 4° 30 2» 5* 2» 30 4° 30 W=12(Knapsack capacity)-
Design a local search algorithm for the 0-1 knapsack problem. Assume there are n items x1 ... xn each with weight wi and value vi. The knapsack can have at most one of each item and the total weight cannot exceed W. You want to maximize the total value in the knapsack.Question 1: (7 points) Show the psuedocode/explanation for your algorithm.Question 2. (3 points) Is it guaranteed to find an optimal solution? Justify your answer.
Consider the following directed graph for each of the
problems:
1. Perform a breadth-first search on the graph assuming that the
vertices and adjacency lists
are listed in alphabetical order. Show the breadth-first search
tree that is generated.
2. Perform a depth-first search on the graph assuming that the
vertices and adjacency lists
are listed in alphabetical order. Classify each edge as tree, back
or cross edge. Label each
vertex with its start and finish time.
3. Remove all the...
Minimum Spanning Trees Networks & Graphs 1. Create a spanning tree using the breadth-first search algorithm. Start at A (i..0) and label cach vertex with the correct number after A and show your path. How many edges were used to create a spanning tree? 2. Create a spanning tree using the breadth-first search algorithm. Start at G (ie. O) and label each vertex with the correct number after A and show your path How many edges were used to create...
ADJACENCY LIST ( use Breadth-First Search algorithm) How to get the total number of paths of fixed length from vector of vector adjacency LIST. REMEMBER: the fixed length has to be the shortest length. So, const std::vector< std::vector<unsigned> > & adjList; and I'm supposed to get the number of paths for a given shortest path from the adjList. What I want: 1. To define the function countingGraphPathWays(const vector< vector > &adjVertex, unsigned source, vector & thPathLen, vector & numOfTheShortestPaths) 2....
Implement a method that uses insertion sort to sort numbers. Use the numbers provided in files (100.txt, 1000.txt, 5000.txt, 50000.txt, 100000.txt and 500000.txt) as input. Measure the time taken to sort these numbers (do not include the file IO time). Plot the time taken to sort the numbers [Programming, 35 points] .Files to submit. A report that briefly talks about your solution to each of the problem (the explanation should not exceed more than half pages each). Seperate file for...
All of the following questions are in relation to the following journal article which is available on Moodle: Parr CL, Magnus MC, Karlstad O, Holvik K, Lund-Blix NA, Jaugen M, et al. Vitamin A and D intake in pregnancy, infant supplementation and asthma development: the Norwegian Mother and Child Cohort. Am J Clin Nutr 2018:107:789-798 QUESTIONS: 1. State one hypothesis the author's proposed in the manuscript. 2. There is previous research that shows that adequate Vitamin A intake is required...