Design and Analysis of Algorithms
Design and Analysis of Algorithms
Course Number :
M.Madhavi
Associate Professor
SYLLABUS
2
Text Books
Fundamentals of computer algorithms,Ellis Horowitz,Satraj Sahni
1.
and Rajasekharam ,Galgotia publications pvt ltd
Design and Analysis of algorithms ,Aho,Ullman and Hopcroft,Pearson
2.
education
Suggested / Reference Books
Introduction to Design and Analysis of Algorithms A strategic
3.
approach ,R.C.T.Lee ,SS Tseng Mc GrawHill
Data structures and Algorithm Analysis in C++,Allen Weiss,second
4.
edition,Pearson education
5.
Websites References
https://parasol.tamu.edu
1.
https://cse.unl.edu
2.
http://engineeringppt.net
3.
https://nptel.iitm.ac.in
4.
4
5.
5
Time Table
Class 1 2 3 4 5 6 7
Hour
9:00 - 09.50 10:40 – 11:30 – 1:10 – 2:00 – 2:50 –
Time 09:50 –10:40 11:30 12: 20 2:00 2:50 3:40
MON III
CSE-C
DAA
LUNCH BREAK
12:20 – 1:10
WED III
CSE-D
DAA
III III
FRI
CSE-D CSE-C
DAA DAA
III III
SAT
CSE-C CSE-C
DAA DAA
6
Course Objectives:
Course Objectives:
Course Outcomes:
COURSE SCHEDULE
I Ch 1,2,3 - 15
Ch 2,4 -
II 10
Ch 5
III - 10
Ch 7,8
IV - 15
Ch 10,11
V - 15
The number of topic in every unit is not the same – because of the
variation, all the units have an unequal distribution of hours
Lecture Plan
Unit – 1
Date : __ / __ / __
Remarks:
________________________________________________________________________
________________________________________________________________________
Unit – 2
Date : __ / __ / __
Remarks:
________________________________________________________________________
________________________________________________________________________
Unit – 3
Date : __ / __ / __
Remarks:
________________________________________________________________________
________________________________________________________________________
Unit – 4
Date : __ / __ / __
Remarks:
________________________________________________________________________
________________________________________________________________________
13
Unit – 5
Date : __ / __ / __
Remarks:
________________________________________________________________________
________________________________________________________________________
Unit – 6
Date : __ / __ / __
Remarks:
________________________________________________________________________
________________________________________________________________________
Unit – 7
Date : __ / __ / __
Remarks:
________________________________________________________________________
________________________________________________________________________
Unit – 8
Date : __ / __ / __
Remarks:
14
_______________________________________________________________________
_
_______________________________________________________________________
Unit – 1
Unit – 2
1. Test the recursive and iterative versions of binary search and
compare times. (L4)
.
2. Write and explain the control abstraction for Divide and conquer
(L3)
4. Applying the greedy strategy find the solution for optimal storage
15
on tapes problem instance n = 3, (l1, l2, l3) = (5, 10, 3). (L3)
Unit – 3
1. Write an algorithm of matrix chain multiplication. (L3)
2. Design a three stage system with device types D1,D2 and D3. The
costs are Rs.30, Rs.15 and Rs.20 respectively. The cost of the
system is to be no more than Rs.105. the reliability of each device
type is 0.9, 0.8 and 0.5 respectively(L4).
Unit – 4
1. Discuss the relevance of backtracking technique to m-coloring graph.
Explain with an example. (L3)
5. Explain the satisfiability problem and write the algorithm for the
same. (L3)
6. Differentiate between NP-complete and NP-Hard (L4)
Unit – 1
Unit – 2
Unit – 5
1. Write about NP hard (L3)
Unit – 1
Define time complexity. Describe different notations used to
1.
represent these complexities L-1
What are best case, average case, and worst-case performance?
2.
Explain.L-2
Examine the differences between different time complexities of
3.
different notations L-3
Explain Divide and Conquer method with an example -2
4.
Demonstrate quick sort and merge sort with an example along
5.
with their time complexities L-4
Unit – 2
Compare divide and conquer method with greedy method L-4
1.
Describe spanning trees L-1
2.
18
Unit – 3
Explain optimal binary search tree . l-2
1.
Apply Dynamic method for travelling sales person problem? L-3
2.
Explain reliability design ? L-2
3.
Unit – 4
Describe approaches for solving 0/1 knapsack problem? L-2
1.
Explain graph coloring ? L-2
2.
List various applications of backtracking and Branch and bound
3.
method?l-4
Compare travelling sales person problem in branch and
4.
bound method and other methods?l-4
Unit – 5
What are comparison trees ? L-1
1.
Distinguish NP-Hard and NP-complete classes. L-3
2.
Explain non deterministic algorithms. L-2
3.
Explain node cover decision problem. L-2
4.
Explain Clique decision problem(CDP)
5
Reviews will be done to uncover mistakes in SDLC?JustifyL-5
6
Explain the quality concepts in detail?
7
Explain the FTR?
8
19
12. The indirect change of the values of a variable in one module by another
module is called
a. internal change
b. inter-module change
c. side effect
d. side-module update
21
13. Which of the following data structure is not linear data structure?
a. Arrays
b. Linked lists
c. Both of above
d. None of above
16. Finding the location of the element with a given value is:
a. Traversal
b. Search
c. Sort
d. None of above
19. Each array declaration need not give, implicitly or explicitly, the information
about
22
20. The elements of an array are stored successively in memory cells because
a. by this way computer can keep track only the address of the first element
and the addresses of other elements can be calculated
b. the architecture of computer memory does not allow arrays to store other
than serially
c. both of above
d. none of above
22. What are important problem types? (or) Enumerate some important types
of
problems.
1. Sorting 2. Searching
3. Numerical problems 4. Geometric problems
5. Combinatorial Problems 6. Graph Problems
7. String processing Problems
33. Which data structure allows deleting data elements from front and inserting
at rear?
a. Stacks
b. Queues
24
c. Deques
d. Binary search tree
34. Identify the data structure which allows deletions at both ends of the list
but insertion at only one end.
a. Input-restricted deque
b. Output-restricted deque
c. Priority queues
d. None of above
38. A binary tree whose every node has either zero or two children is called
a. Complete binary tree
b. Binary search tree
c. Extended binary tree
d. None of above
40. When representing any algebraic expression E which uses only binary
operations in a 2-tree,
a. the variable in E will appear as external nodes and operations in internal
nodes
25
42. When converting binary tree into extended binary tree, all the original
nodes in binary tree are
a. internal nodes on extended tree
b. external nodes on extended tree
c. vanished on extended tree
d. None of above
43. The post order traversal of a binary tree is DEBFCA. Find out the pre order
traversal
a. ABFCDE
b. ADBFEC
c. ABDECF
d. ABDCEF
46. In a binary tree, certain null entries are replaced by special pointers which
point to nodes higher in the tree for efficiency. These special pointers are called
a. Leaf
b. branch
c. path
d. thread
47. The in order traversal of tree will yield a sorted listing of elements of tree in
a. Binary trees
26
-
1. Define time complexity, Describe different
asymptotic notations used to represent the time complexities with suitable
examples. [15]
2. Develop algorithms for UNION and FIND using weighing rule and collapsing
rule respectively. [15]
3.a) Write and explain the control abstraction for Divide and
conquer and give the time complexity.
b) Discuss Strassen’s matrix multiplication and derive the time complexity.
[15]
4.a) What is the solution generated by the function Job sequencing when N=7,
(P1, P2, … …P7) = (3, 5, 20, 18, 1, 6, 30) and (d1, d2, … d7) = (1, 3, 4, 3, 2, 1,
2)
b) What is Greedy method and discuss its applications. [15]
5.a) Solve the following 0/1 Knapsack problem using dynamic programming
P= (11, 21, 31, 33), W= (2, 11, 22, 15), C=40, n=4.
b) Consider three stages of a system with r1=0.3, r2=0.5, r3=0.2 and c1=30,
c2=20,c3=30 Where the total cost of the system is C=80 and u1=2, u2=3,
u3=2 find the reliability design. [15]
7.a) Generate FIFO branch and bound on the traveling salesman problem and
find the solution space tree.
b) What is bounding? Explain the principles of bounding. [15]
8. State and explain cook’s theorem and also discuss about NP complete
classes.
[15]
Tutorial Sheet
Unit-I
28
Unit-II
29
Unit-III
Topics Revised Date:
30
Unit-IV
Topics Revised Date:
Unit-V
Topics Revised Date:
Unit-VI
32
Topics Revised
Unit-VII
Topics Revised
33
Unit-VIII
Topics Revised
Unit – 1
1.
2.
3.
4.
Unit – 2
1.
2.
3.
4.
Unit – 3
1.
2.
35
3.
4.
Unit – 4
1.
2.
3.
4.
Unit – 5
1.
2.
3.
4.
36
Blooms Taxonomy:
LEVEL 1 REMEMBERING Exhibit memory of previously learned
material by recalling facts, terms,
basic concepts, and answers
LEVEL 2 UNDERSTANDING Demonstrate understanding of facts
and ideas by organizing, comparing,
translating, interpreting, giving
descriptions, and stating main ideas.
LEVEL 3 APPLYING Solve problems to new situations by
applying acquired knowledge, facts,
techniques and rules in a different way
LEVEL 4 ANALYZING Examine and break information into
parts by identifying motives or causes.
Make inferences and find evidence to
support generalizations.
LEVEL 5 EVALUATING Present and defend opinions by
making judgments about information,
validity of ideas, or quality of work
based on a set of criteria.
LEVEL 6 CREATING Compile information together in a
different way by combining elements
in a new pattern or proposing
alternative solutions.
sment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
38
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Blooms Taxonomy:
LEVEL 1 REMEMBERING Exhibit memory of previously learned
material by recalling facts, terms,
basic concepts, and answers
LEVEL 2 UNDERSTANDING Demonstrate understanding of facts
and ideas by organizing, comparing,
translating, interpreting, giving
descriptions, and stating main ideas.
LEVEL 3 APPLYING Solve problems to new situations by
applying acquired knowledge, facts,
techniques and rules in a different way
LEVEL 4 ANALYZING Examine and break information into
parts by identifying motives or causes.
Make inferences and find evidence to
support generalizations.
LEVEL 5 EVALUATING Present and defend opinions by
making judgments about information,
validity of ideas, or quality of work
based on a set of criteria.
LEVEL 6 CREATING Compile information together in a
different way by combining elements
in a new pattern or proposing
alternative solutions.
39
CSP Rubric
S. Criteri LEVEL ( Level : 3-Excellent Level :2-Good Level : 1-
N0 a Poor
Student speaks in phase with the given topic confidently using
Communica
3
Audio-Visual aids. Vocabulary is good
Student speaking without proper planning, fair usage of Audio-Visual
Oral
tion
1 2
aids. Vocabulary is not good
Student speaks vaguely not in phase with the given topic. No
1
synchronization among the talk and Visual Aids
Proper structuring of the document with relevant subtitles,
Writing Skills
Student identifies the societal and ethical issues but fails to provide
3 2
any solutions discussing with peers
Student makes no attempt in identifying the societal and ethical
1
issues
3 Student uses appropriate methods, techniques to model and solve
Knowledg
Content
1 Student fails to model the problem and also fails to solve the
problem
Listens carefully to the class and tries to answer questions
Participatio
3
confidently
Student
questions
Student neither listens to the class nor attempts to answer the
1
questions
The program structure is well organized with appropriate use of
technologies and methodology. Code is easy to read and well
3
analytical Skills
accurate results
Program structure is well organized with appropriate use of
6 technologies and methodology. Code is quite difficult to read and not
2
properly documented. Student is able to implement the algorithm
providing accurate results.
Program structure is not well organized with mistakes in usage of
1 appropriate technologies and methodology. Code is difficult to read
and student is not able to execute the program
40
3
the problem accurately in the context of multidisciplinary projects
Student tries to model the problem but fails to solve the problem in
2
core
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Remedial Classes:
Unit-I
Unit-II
Unit-III
Unit-IV
Unit-V
Add-on Programmes:
1
Guest Lectures:
1.
2.
3.
4.