Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
19 views

Introduction To Algorithms, Specification of Algorithm, Complexity

Uploaded by

Pratham Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Introduction To Algorithms, Specification of Algorithm, Complexity

Uploaded by

Pratham Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

B.

TECH V SEM CSE


ACADEMIC YEAR: 2023-2024

Course Name: Design and Analysis of Algorithm


Topic: Introduction to Algorithms, Specification of Algorithm

Course code : CS 3102


Credits : 4
Mode of delivery : Hybrid (Power point presentation)
Faculty : Mr. Sunil Kumar Patel
Email-id : sunil.patel@jaipur.manipal.edu
CS3102 (DAA), Dept. of CSE 1
Assignment
quiz Assessment
Mid term examination criteria’s
End term Examination

CS3102 (DAA), Dept. of CSE 2


Introduction to Algorithms,
Asymptotic Notations, Complexity

CS3102 (DAA), Dept. of CSE 3


Course Information
• Course Handout
• Communicate through eMail
• Office hours
• To be communicated
• Grading policy
• Will be communicated as per university guidelines

CS3102 (DAA), Dept. of CSE


4
Syllabus
• Introduction: Fundamentals of Algorithms, Important Problem Types, Analysis
of algorithm efficiency. Analysis Framework: Asymptotic Notations and Basic
Efficiency Classes. Mathematical Analysis of Nonrecursive and Recursive
Algorithms: Brute force Techniques, Divide and Conquer. Decrease and
Conquer: Insertion Sort, Depth First Search, Breadth First Search, Topological
Sorting. Transform and Conquer: Presorting, BST, Heapsort. Space and Time
tradeoffs: Input Enhancement in String Matching. Dynamic Programming:
Warshall's and Floyd's Algorithms, The Knapsack Problem. Greedy Techniques:
Prim's, Kruskal's and Dijkstra's Algorithm, Huffman Trees. Coping with
limitations of algorithmic power. Backtracking: nQueens problem, Hamiltonian
Circuit Problem, Subset Sum Problem. Branch and Bound: Assignment
Problem, Knapsack Problem, TSP. P, NP, and NP-complete Problems.

CS3102 (DAA), Dept. of CSE


5
More Information

• Textbook
•Introduction to Algorithms 3rd ,Cormen,
Leiserson, Rivest and Stein, The MIT Press,
• Fundamentals of Computer Algorithms,
2nd, Sartaj Sahni, Ellis Horowitz,
Sanguthevar Rajasekaran

• Others
• Introduction to Design & Analysis Computer Algorithm 3rd,
Sara Baase, Allen Van Gelder, Adison-Wesley, 2000.
• Algorithms, Richard Johnsonbaugh, Marcus Schaefer, Prentice
Hall, 2004.
• Introduction to The Design and Analysis of Algorithms 2nd
Edition, Anany Levitin, Adison-Wesley, 2007.

CS3102 (DAA), Dept. of CSE


6
Course Objectives
• CS1501.1 Analyse the running times of algorithms using asymptotic analysis.
• CS1501.2 Demonstrate and Design algorithms using divide-and-conquer
paradigm to solve business problems hence enhance skills.

• CS1501.3 Illustrate the concept of greedy and dynamic-programming approach


to solve real life problems to enhance entrepreneurship capabilities.
• CS1501.4 Demonstrate the concept of backtracking and branch & bound
algorithms.
• CS1501.5 Synthesize and analyse various advanced algorithms concept such as
graphs, string matching, approximation algorithms and complexity classes to
enhance employability.

CS3102 (DAA), Dept. of CSE


7
Why study algorithms and
performance?
• Algorithms help us to understand scalability.

• Performance often draws the line between what is feasible


and what is impossible.

• Algorithmic mathematics provides a language for talking


about program behavior.

• Performance is the currency of computing.

• The lessons of program performance generalize to other


computing resources.

CS3102 (DAA), Dept. of CSE


8
Two Distinct Choices

CS3102 (DAA), Dept. of CSE


9
Applications

CS3102 (DAA), Dept. of CSE


10
Asymptotic Performance
• In this course, we care most about
asymptotic performance
• How does the algorithm behave as the
problem size gets very large?
• Running time
• Memory/storage requirements
• Bandwidth/power requirements/logic gates/etc.

CS3102 (DAA), Dept. of CSE


11
Goal of the Course

• Learning to solve real problems that arise


frequently in computer application

• Learning the basic principles and techniques


used for answering the question: “How good,
or, how bad is the algorithm”

• Getting to know a group of “very difficult


problems” categorized as “NP-Complete”
CS3102 (DAA), Dept. of CSE
12
Design and Analysis, in general
Design Analysis
•Understanding the goal •How does it work?

•Select the tools •Breaking a system down


to known components
•What components are
needed •How the components
relate to each other
•How the components
should be put together •Breaking a process down
to known functions
•Composing functions to
form a process
CS3102 (DAA), Dept. of CSE
13
Problem Solving
In general: Using computer:

Understanding the problem Describing the problem:


Selecting the strategy Selecting the strategy:
Giving the steps Algorithm:
Proving the correctness Input / Output/Step:
Trying to improve Analysis:
Correct or wrong
“good”or “bad”
Implementation:
Verification:

CS3102 (DAA), Dept. of CSE


14
Probably the Oldest Algorithm

CS3102 (DAA), Dept. of CSE


15
Euclid Algorithm: Recursive Version

CS3102 (DAA), Dept. of CSE


16
Algorithmically Solvable Problem
• Informally speaking
• A problem for which a computer program
can be written that will produce the correct
answer for any valid input if we let it run
long enough and allow it as much storage
space as it needs.
• Unsolvable(or un-decidable) problem
• Problems for which no algorithms exist
• the Halting Problem for Turing Machine
CS3102 (DAA), Dept. of CSE
17
Criteria for Algorithm Analysis
• Correctness
• Amount of work done
• Amount of space used
• Simplicity, clarity
• Optimality

CS3102 (DAA), Dept. of CSE


18

You might also like