Question: Need all answers in algorithm. 1. Find the topological ordering for the following graph using (i) DFS based approach and (ii) indegree based approach. 2.
Need all answers in algorithm.

1. Find the topological ordering for the following graph using (i) DFS based approach and (ii) indegree based approach. 2. We want to perform matrix chain multiplication where the dimensions of the matrices are d={4,5,3,6,4,7}. What is the minimum number of scalar multiplications that are required to perform the matrix chain multiplication? Also show the optimal parenthesization of the solution. Show all the tables that are used to find the solution. 3. Using dynamic programming, find the optimal solution of a 0/1 knapsack problem where the items are given in the following table, number of items =4 and knapsack capacity =5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
