Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

CS 702 Current Mid Term Papers Spring 2016

Today 702 paper (29-05-16)


N assembly line algo
Chain matrix multiplication algo
Closest pair improved version for 2-d
Prove by mathematical induction To(N)=nlgn

Q1) Write down the Brute Force Chain Matrix Multiplication Algorithm and its complexity (5
marks)
Q2) Prove that n^2 belongs to O(n^2) (5 marks)
Q3) Write a pseudo Code of algorithm of finding closest pair in 2-D using divide and conquer
approach. (10 marks)
Q4) Solve the recurrence using substitution method
T(n)=T(n-1)+c (10 marks)

Total 4 questions
1.pseudo code for n line assembly
2.devide and conquer
3.n(sqr)+n=O(n power 3)
4.f(n)=o(g(n)=g(n)=omega.f(n)

My paper of CS702

1. Pseudo code of n line assembly

2. Print station n line assembly

3. From asymptotic notation prove theta function.

4. Algorithm of chain matrix multiplication.

CS702

total 4 questions of 10 marks i think


Qs1 prove that f(n) = Og(n) g(n) = f(n)

Qs2 write psuedo code using bruit force 3d closest node finding

Qs3 write pseudo code for assembly line using dynamic programming

Qs4 write pseudo code for 0/1 knapscak problem using dynamic programming

CS702

Adeel Hamid MS150200311

1. 1. Consider the problem of a chain < A1, A2, A3> of three matrices. Suppose the
dimensions of the matrices are 10×100, 100×5 and 5×50. For the sequence of matrices,
given above, compute the order of the product, A1.A2.A3, in such a way that minimizes
the total number of scalar multiplications.

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

1. Show that the sum of cubes of any three consecutive positive integers is divisible by 9.

That is, for any integer n, n3 + (n + 1)3 + (n + 2)3 is divisible by 9.

1. 4. Solve the recurrence relation given below

1. We have to compute the set of maximal points from following points, using Brute Force
Approach,

(2, 8), (6, 16), (8, 8), (10, 20), (12, 6), (16, 14), (18, 18), (20, 2), (24, 8)
1. Write the pseudo code of assembly line scheduling algorithm using dynamic
programming.

1. Write the pseudo code of complete knapsack dynamic programming algorithm for 0-1
knapsack problem.
2. Prove by mathematical induction that the sum of odd number is equal to the square of its
nth term.

1. Write down the Brute Force Chain Matrix Multiplication Algorithm and its complexity.
2. Write the pseudo code of n-line assembly: dynamic programming algorithm for print
stations.
3. 3. Prove the following by induction.

1. Consider the recurrence given below. Find its general solution.

tn – 4tn-1 = (n + 3)5n

1. Show that

1. Write the pseudo code of assembly line scheduling algorithm using dynamic
programming.
2. Write the pseudo code of n-line assembly algorithm using dynamic programming.

8. Write Merge sort algorithm.

9. Write algorithm of Chain Matrix Multiplication by Bruit Force solution.

10. Prove that this is a tautology.

(r V p)à(p V q) (r V (pàq))

You might also like