Professional Documents
Culture Documents
FOR
FOR
UNIT I:
Introduction: Algorithm, Pseudo code for expressing algorithms, Performance
Analysis-Space complexity, Time complexity, Asymptotic Notation- Big oh notation,
Omega notation, Theta notation and Little oh notation, Probabilistic analysis,
Amortized analysis.
Objectives:
At the end of this unit the student understands the importance of an algorithm, its
complexity, and different measures to judge the efficiency of such algorithms.
UNIT II:
Divide and conquer: General method, applications-Binary search, Quick sort, Merge
sort, Strassen’s matrix multiplication.
Objectives:
At the end of this unit the student will understand the divide and conquer technique
and will be able apply that technique to various problems in the real life applications.
UNIT III:
Greedy method: General method, applications-Job sequencing with dead lines, 0/1
knapsack problem, Minimum cost spanning trees, Single source shortest path
problem.
Objectives:
At the end of this unit the student will understand the greedy method and will be able
apply that technique to various problems in the real life applications.
UNIT IV:
Dynamic Programming: General method, applications-Matrix chain multiplication,
Optimal binary search trees, 0/1 knapsack problem, All pairs shortest path problem,
Travelling sales person problem, Reliability design.
Objectives:
At the end of this unit the student will understand the dynamic programming
technique and will be able apply that technique to various problems in the real life
applications.
UNIT V:
Backtracking: General method, applications-n-queen problem, sum of subsets
problem, graph coloring, Hamiltonian cycles.
Branch and Bound: General method, applications - Travelling sales person
problem,0/1 knapsack problem- LC Branch and Bound solution, FIFO Branch and
Bound solution.
Objectives:
At the end of this unit the student will understand the backtracking, branch and bound
techniques and will be able apply that technique to various problems in the real life
applications.
UNIT VI:
NP-Hard and NP-Complete problems: Basic concepts, non deterministic algorithms,
NP-Hard and NP-Complete classes, Cook’s theorem.
Objectives:
At the end of this unit the student will understand the classification of problems in
view of polynomial time complexity in an abstract way.
TEXT BOOKS :
1. Fundamentals of Computer Algorithms, Ellis Horowitz,Satraj Sahni and
Rajasekharam,Galgotia publications pvt. Ltd.
2. Algorithm Design: Foundations, Analysis and Internet examples,
M.T.Goodrich and R.Tomassia,John wiley and sons.
REFERENCES :
1. Introduction to Algorithms, secondedition,T.H.Cormen,C.E.Leiserson,
R.L.Rivest,and C.Stein,PHI Pvt. Ltd./ Pearson Education
2. Introduction to Design and Analysis of Algorithms A strategic approach,
R.C.T.Lee, S.S.Tseng, R.C.Chang and T.Tsai, Mc Graw Hill.
3. Data structures and Algorithm Analysis in C++, Allen Weiss, Second
edition, Pearson education.
4. Design and Analysis of algorithms, Aho, Ullman and Hopcroft,Pearson education.
5. Algorithms – Richard Johnson baugh and Marcus Schaefer, Pearson Education
Design and Analysis of Algorithms
Objective of the Subject
System Analysis and Design is one of the important phases of system life cycle. In
this phase, the system analyst designs various modules, algorithms, data structures
and the interaction between them. Design of appropriate algorithm and analysis of
algorithms play a vital role in the ever conflicting time and space domains of
computer system.
This course provides the techniques to implement the Algorithms and provides the
methodology for finding the Time Complexity and Space Complexity of these
Algorithms using various Notations.
The Divide-and-Conquer Techniques shows us how a problem can be solved by
dividing it into similar sub-problems and conquer them so as to get the final solutions.
The Design of different searching & sorting Techniques helps us for arranging the
data to easily search for a data item, which is very important in the Data Base
Management system. Greedy Method describes how we can get an optimize solution
among several feasible solutions.
Sets are useful when we view our data in the form of a tree and Union & Find
algorithms are used to provide an optimized way of formation of these Trees so that
one can easily find the required data from the Tree with less Time Complexity.
Dynamic Problem approach is a powerful technique which shows how to solve the
given problem stage wise. This is useful for the problems related to the Operating
systems, Compiler Design, Computer Networks, and Database Management etc.
The Searching & Traversal techniques are also used to locate the data arranged in the
form of a Tree or Graph and are very much helpful in Computer Networks.
Backtracking technique is another powerful design Technique provides a way to find
the solutions which considers some constraints and to reach the solution very quickly.
The Branch and Bound Algorithms are used when dealing with tree like formations of
data and provide a way to avoid the unnecessary growing of Trees so as to reduce the
cost of searching. Finally, the Modular Arithmetic gives an interpolation can be
solved with suitable Algorithmic approaches and are very much helpful in the field of
Computer Graphics.
LECTURE SCHEDULE
1. What is an Algorithm?
2. What is space complexity of an Algorithm?
3. Define Time complexity of an Algorithm?
4. Compare two function n2 and 2n/4 for various values of n. Determine when
the second becomes larger than the first?
5. Show that the following equalities are correct.
a) 5n2 - 6n = (n2)
b) n! = 0( nn)
c) 2 n2 2n + n log n = (n2 2n )
n
d) I=0 = (n3)
e) 6 n3 / (logn+1) = O(n3)
6. Determine the frequency of counts for all statements in the following two
algorithm segments.
for i :=1 to n do I: = 1;
for j :=1 to I do while (I <= n) do
for k :=1 to j do {
x: = x+1; x: = x+I;
I: = I+1;
}
7. Write a recursive algorithm for Towers of Hanoi. Trace algorithm for 6
disks. Derive its time and space complexity.
8. Write an algorithm to evaluate a polynomial using Horner’s rule.
occurs, then return a position in the array; else return zero. Evaluate it’s time
complexity.
10. A polynomial of degree n>0 has n derivatives, each one obtained by taking the
derivative of the previous one. Devise an algorithm which produces the values of a
polynomial and its n derivatives.
11. Define time complexity. Describe different notations used to represent these
complexities. Illustrate.
13. Write the non – recursive algorithm for finding the Fibonacci sequence and derive
and B contain real values. Write an algorithm that computes the product of two
complex valued matrices (A,B) and (C,D) where (A,B) * ( C,D) = (A+iB) *
1)+F(n-2).
UNIT-II
b). Give an instance, where the Quick Sort algorithm has worst case time complexity.
18.a)Compare Merge sort & Quick sort for the given data sets .
10,30,15,45,25,30,35,20,30,40,50
19.a) Design a Divide and Conquer algorithm for computing the number of levels in a
binary tree.
20.a)The worst –case time of procedure MERGESOR is O( n log n). What is its time
in the best case? Can we say that the time for merge sort is θ( n log n)?
GREEDY METHOD
2. What is the criterion for obtaining optimal solution for greedy knopsack
problem?
3. Find the optimal solution for the following instance of the knapsack
problem n=3, m=20,
( p1, p2, p3) = (25, 24, 15), and (W1, W2, W3) = (18, 15, 10 )
9. Compute the minimum spanning tree for the above graph using
Let n=3, (l1, l2,l3) = (5,10,13). What is the optimal ordering for storing
them on tapes.
11. Give the prim's algorithm and explain, discuss about the time complexity.
12. Give the kruskal's algorithm and explain . Discuss the time complexity.
13. Find an optimal placement for 13 programs on three tapes T0, T1 and T2,
where the programs are of the length 12,5,8,32,7,5,18,26,4,3,11,10,6.
UNIT – IV
DYNAMIC PROGRAMMING
0 10 15 20
5 0 9 10
6 13 0 12
8 8 9 0
UNIT –V
BACKTRACKING
a. Problem States
b. State Space.
c. Solution States.
d. Answer States.
12. What is a Static Tree.
13. What is a Dynamic Tree.
14. Solve the 8-Queens problem using Back Tracking and draw the variable-
15. Write an algorithm for solving 8-Queens problem using Backtracking.
tuple size state space tree.
16. State the Graph Coloring problem, solve using Back Tracking and
draw the variable-tuple size state space tree.
17. Write the algorithm for solving the Graph Coloring problem using
Backtracking.
18. Solve the Traveling Sales Person problem using Back Tracking for the
following instance using static & Dynamic state space tree.
7 3 12 8
3
5 8
9 3 5 11
18 14 9 8
Short Answer and Essay Type Questions:
Branch-And-Bound Techniques
19. What is the Mathematical symbol manipulation system. What does it do.
20. State the Algebraic Transformation Technique. Why does inverse
transformation is performed
21. Give the graphical representation for the transformations.
22. What is algebraic simplification?
23. What is the differencing between Evaluation and Interpolation?
24. Give the difference between straight forward and sparse representation of a
polynomial.
29. Give the algorithm for implanting the Horner’s rule for a polynomial in
sparse representation.
31. Give the analysis for computing the time for the Lagrange’s Interpolation.
33. Give the analysis for computing the time for the Newtonian Interpolation.
34. Give a brief note on Fast Fourier Transform, specify its applications.
4. Given two sets S1 and S2 , the disjoint sets problem is to check whether the sets
have a common element. Present an O(1) time nondeterministic algorithm for
this problem.
6. Show how to encode the following instructions as CNF formulas : a) for and
b) while