In the name of ALLAH, the most beneficient, the most merciful

Advanced Algorithms Analysis and Design (CS702)

Subjective, Short Questions from Past Papers

 

Subjective Questions

Question

(Mid, 2015, Fall, Marks = 5, Lesson No. 19)

Write the pseudo code of 0-1 knapsack brute force algorithm.

Answer:

Question

(Mid, 2015, Fall, Marks = 5, Lesson No. 18)

Write the pseudo code of n-line assembly: dynamic programming for print stations.

Answer:

Question

(Mid, 2015, Fall, Marks = 10, Lesson No. 16)

Given a sequence [A1, A2, A3, A4]

  • Order of A1 = 10 x 100
  • Order of A2 = 100 x 5
  • Order of A3 = 5 x 50
  • Order of A4 = 20 x 50
Using the Brute force method compute the order of the product A1, A2, A3, A4 in such a way that minimizes the total number of scalar multiplications.

Answer:

Question

(Mid, 2015, Fall, Marks = 10, Lesson No. 19)

Write the Pseudo code of complete knapsack dynamic programming algorithm for 0-1 knapsack problem.

Answer: