DAA Notes

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

Analysis of Algorithm Notes

Vision of the Department

To become renowned centre of excellence in Computer Science and Engineering and make
competent engineers & professionals with high ethical values prepared for lifelong learning.

Mission of the Department

Mission 1: To impart outcome based education for emerging technologies in the field of
Computer Science and Engineering.

Mission 2: To provide opportunities for interaction between academia and industry.

Mission 3: To provide platform for lifelong learning by accepting the change in technologies.

Mission 4: To develop aptitude of fulfilling social responsibilities.

Program Outcomes (PO)

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization to the solution of complex engineering
problems.
2. Problem analysis: Identify, formulate, research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems
and design system components or processes that meet the specified needs with
appropriate consideration for the public health and safety, and the cultural, societal, and
environmental considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and
research methods including design of experiments, analysis and interpretation of data,
and synthesis of the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give
and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change.

Program Educational Objectives (PEO)

The PEOs of the B.Tech. (CSE) program are:

PEO1: To provide students with the fundamentals of engineering sciences with more
emphasis in Computer Science and Engineering by way of analyzing and exploiting
engineering challenges.

PEO2: To train students with good scientific and engineering knowledge so as to


comprehend, analyze, design, and create novel products and solutions for the real life
problems in Computer Science and Engineering

PEO3: To inculcate professional and ethical attitude, effective communication skills,


teamwork skills, multidisciplinary approach, entrepreneurial thinking and an ability to
relate engineering issues with social issues for Computer Science and Engineering.

PEO4: To provide students with an academic environment aware of excellence,


leadership, written ethical codes and guidelines, and the self-motivated life-long learning
needed for a successful professional career in Computer Science and Engineering.
PEO5: To prepare students to excel in Industry and Higher education by Educating
Students along with high moral values and knowledge in Computer Science and
Engineering.

Program Specific Outcomes (PSO)

PSO1. Ability to interpret and analyze network specific and cyber security issues, automation
in real word environment.
PSO2. Ability to Design and Develop Mobile and Web-based applications under realistic
constraints.

Course Outcome of Analysis of Algorithms (5CS4-05)


Class: B. Tech - 5th semester
External Marks: 120 L T P
Internal marks: 30 3 0 0
Total marks: 150

CO1 Understand and analyzing the algorithms with different techniques

CO2 Discuss various design strategies for implementing algorithms

CO3 Implement various divide and conquer,greedy and dynamics statergies based algorithms

Classify the algorithms and problems in various categories like NP, NP-Hard & NP-
CO4
Complete
Mapping Between CO and PO:

Pos
1 2 3 4 5 6 7 8 9 10 11 12
Cos
3 3 2 2 1 1 1 1 1 2 1 3
1
3 3 3 2 1 1 1 2 1 1 2 3
2
3 3 2 2 1 1 1 1 1 1 1 3
3
3 3 3 3 2 1 1 1 1 2 1 3
4

Mapping Between CO and PSO:

Cos PSO1 PSO2

1 2 2
2 2 2
3 1 2
4 2 2
RTU Syllabus of Analysis of Algorithms (5CS4-05)
Lecture Plan of Analysis of Algorithms (5CS4-05)
Lect.
Units Topics
Req.
Objective Scope and Outcome of the subject 1

Introduction of design and analysis of algorithms 1


Complexity Analysis 1
Unit-1
(7) DIVIDE AND CONQUER METHOD: Binary Search, Linear Search
Merge Sort 4
Quick sort
Stassen’s matrix multiplication algorithms
Order Notations: definitions and calculating complexity
GREEDY METHOD: Knapsack Problem
Unit-2 Job Sequencing 6
(10)
Optimal Merge Patterns
Minimal Spanning Trees
DYNAMIC PROGRAMMING: Matrix Chain Multiplication
Longest Common Subsequence 4
0/1 Knapsack Problem
BRANCH AND BOUND: Traveling Salesman Problem and Lower Bound Theory
Backtracking Algorithms and queens problem 4
Mid Term Paper Discussion
PATTERN MATCHING ALGORITHMS: Naïve pattern matching
Unit-3 1
algorithms
(8) Rabin Karp string matching algorithms 1

1
KMP Matcher
1
Boyer Moore Algorithms

ASSIGNMENT PROBLEMS: Formulation of Assignment and Quadratic Assignment Problem. 3


RANDOMIZED ALGORITHMS: Las Vegas algorithms, Monte Carlo algorithms
Unit-4 2
randomized algorithm for Min-Cut, randomized algorithm for 2-SAT
(8)
Problem definition of Multicommodity flow, Flow shop scheduling 2

1
Network capacity assignment problems
PROBLEM CLASSES NP, NP-HARD AND NP-COMPLETE: Definitions of P, NP Hard and
NP-Complete Problems 3
Decision Problems
Unit-5
(8) Cook's Theorem
3
Proving NP Complete Problems - Satisfiability problem and Vertex Cover Problem
Approximation Algorithms for Vertex Cover and Set Cover Problem 2
Recommended books:
1. Rivest & Coremen, Introduction to Algorithms, II Edition, Prentice Hall of India
2. Sartaj Sahni and Ellis Horowitz, Fundamentals of Computer Algorithms, Edition 2006, Galgotia
Publications
Complexity Analysis
• There are often many different algorithms which can be used to solve the same problem.
Thus, it makes sense to develop techniques that allow us to:

o compare different algorithms with respect to their “efficiency”

o choose the most efficient algorithm for the problem

o The efficiency of any algorithmic solution to a problem is a measure of the:

o Time efficiency: the time it takes to execute.

o Space efficiency: the space (primary or secondary memory) it uses.

o We will focus on an algorithm’s efficiency with respect to time.

• We are usually interested in the worst case complexity: what are the most operations
that might be performed for a given problem size. We will not discuss the other cases --
best and average case

• Best case depends on the input

• Average case is difficult to compute

• So we usually focus on worst case analysis

o Easier to compute

o Usually close to the actual running time

o Crucial to real-time systems (e.g. air-traffic control)

• Example: Linear Search Complexity

• Best Case : Item found at the beginning: One comparison

• Worst Case : Item found at the end: n comparisons

• Average Case :Item may be found at index 0, or 1, or 2, . . . or n - 1

-Average number of comparisons is: (1 + 2 + . . . + n) / n = (n+1) / 2

Worst and Average complexities of common sorting algorithms

You might also like