Mcs-031: Design and Analysis of Algorithm: Downloaded From

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

MCS-031 : DESIGN AND ANALYSIS OF ALGORITHM

IMPORTANT QUESTIONS FOR TERM END EXAM by


www.ignousolvedassignment.co.in

Question 1. Show that the partition problem is NP.

Question 2. For the functions f(x) = 2x 3 + 3x2 + 1 and h(x) = 2x3 — 3x2 + 2, prove that :

(i) f(x) = 0(h(x)) flx) O(x2)

Question 3. Show that the state entry problem is undecidable.

Question 4. If S = {a, aa, aaa}, T = {bb, bbb}, then prove that ST = {abb, abbb, aabb,
aabbb, aaabb, aaabbb}.

Question 5. Differentiate between NP-Complete and NP-Hard problems. Give one


example for each.

Question 6. Analyze the time complexity of binary search in worst case.

Question 7. Construct a Deterministic Finite Automata (DFA) over = {a, b}, which accepts
all strings over that start and end with the same letter.

Question 8. Explain Strassen's Matrix Multiplication Algorithm and apply the same to
multiply the following two matrices :

A= 5 6 B= -7 6

-4 3 5 9

Question 9. Solve the following 0/1 knapsack problem using dynamic programming :
Number of objects n = 6
Weights of objects w i = (1,2,5,6,8,10)
Profit of objects p i = (1,6,18,22,30,43)
Capacity of knapsack, M = 12

Downloaded from : http://www.ignousolvedassignment.co.in/


Question 10. Multiply the following two numbers using Karatsuba's method :
1026732 and 732912

Question 11. Define Context-Free Grammar (CFG). Find CFG for the language L =
fanbmcn I m, n 11.

Question 12. Write Kruskal's Algorithm and apply the same to find a minimum spanning
tree for the following graph

Question 13. Solve the following recurrence relation : to = 2tn _ 1 + 1, such that to
= 1.

Question 14. Write short notes on any three of the following :

(i) Chomsky's Classification of Grammar

(ii) Push-Down Automata (PDA)

(iii) Depth-First Search (DFS)

(iv) Asymptotic Notation (0, Q and 0)

Question 15. Design a Push Down Automata that accepts the language of odd
palindromes.

Question 16. Design a Turing Machine that accepts the following language :
fanbn n 11

Question 17. Write an algorithm for Quick Sort. Sort the following sequence of numbers
using Quick Sort :15, 10, 13, 9, 12, 7 Analyze the time complexity of Quick Sort in best
and worst cases.

Downloaded from : http://www.ignousolvedassignment.co.in/

You might also like