SlideShare a Scribd company logo
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
B.TECH V SEM CSE
ACADEMIC YEAR: 2023-2024
1
CS3102 (DAA), Dept. of CSE
Assessment
criteria’s
Assignment
quiz
Mid term examination
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
•Understanding the goal
•Select the tools
•What components are
needed
•How the components
should be put together
•Composing functions to
form a process
Analysis
•How does it work?
•Breaking a system down
to known components
•How the components
relate to each other
•Breaking a process down
to known functions
CS3102 (DAA), Dept. of CSE
13
Problem Solving
In general:
Understanding the problem
Selecting the strategy
Giving the steps
Proving the correctness
Trying to improve
Using computer:
Describing the problem:
Selecting the strategy:
Algorithm:
Input / Output/Step:
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: RecursiveVersion
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

More Related Content

PDF
1. Introduction to Algorithms, Specification of Algorithm, Complexity.pdf
PDF
Syllabus for Bachelors in Engineering Information Science
PDF
Introduction to Data Structures on C++ Language
DOCX
Coursework Assignment Design of a taxi meter .docx
PPTX
Course Outline System Analysis and Design
PPTX
EE-232-LEC-01 Data_structures.pptx
PPSX
Wk1 - L1.ppsx
PPTX
ACC presentation for QA Club Kiev
1. Introduction to Algorithms, Specification of Algorithm, Complexity.pdf
Syllabus for Bachelors in Engineering Information Science
Introduction to Data Structures on C++ Language
Coursework Assignment Design of a taxi meter .docx
Course Outline System Analysis and Design
EE-232-LEC-01 Data_structures.pptx
Wk1 - L1.ppsx
ACC presentation for QA Club Kiev

Similar to 1. Introduction to Algorithms, Specification of Algorithm, Complexity.pdf (20)

PPTX
CAD & CAM introduction
PDF
Expection Setting-1st ppt-Reshma.pdfjjkk
PPTX
313 IDS _Course_Introduction_PPT.pptx
PPTX
Analysis of social interactions and prediction of assignment grades in a Mass...
PDF
Machine Learning: How to Tackle Complex Assignments with Ease
PPTX
Project presentation model students.pptx
PDF
EE1K.pdf/////////////////////////////////////////////
PPTX
MachineLearning Seminar PPT.pptx
PPTX
BCA Fundamentals of computers semester one
PDF
Amet University- B.Sc Data Science Syllabus
PPTX
EffectiveAssessmentofEngineeringDesigninanExamEnvironment.pptx
PDF
M.tech.(cse) (regular) part i(semester i & ii)
PDF
Course Syllabus For Operations Management
PDF
Lecture 1 (bce-7)
PPTX
Db presn(1)
PPTX
Computational Thinking in the Workforce and Next Generation Science Standards...
PPTX
Engineering Knowledge, Skills, and Abilities
PPTX
Structured Problem Solving & Coding Standards
PPTX
Data Analysis – Technical learnings
DOCX
Ece 1322 programming_for_engineers_s1_201213(1)
CAD & CAM introduction
Expection Setting-1st ppt-Reshma.pdfjjkk
313 IDS _Course_Introduction_PPT.pptx
Analysis of social interactions and prediction of assignment grades in a Mass...
Machine Learning: How to Tackle Complex Assignments with Ease
Project presentation model students.pptx
EE1K.pdf/////////////////////////////////////////////
MachineLearning Seminar PPT.pptx
BCA Fundamentals of computers semester one
Amet University- B.Sc Data Science Syllabus
EffectiveAssessmentofEngineeringDesigninanExamEnvironment.pptx
M.tech.(cse) (regular) part i(semester i & ii)
Course Syllabus For Operations Management
Lecture 1 (bce-7)
Db presn(1)
Computational Thinking in the Workforce and Next Generation Science Standards...
Engineering Knowledge, Skills, and Abilities
Structured Problem Solving & Coding Standards
Data Analysis – Technical learnings
Ece 1322 programming_for_engineers_s1_201213(1)
Ad

Recently uploaded (20)

PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Basic Mud Logging Guide for educational purpose
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Pre independence Education in Inndia.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
102 student loan defaulters named and shamed – Is someone you know on the list?
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Basic Mud Logging Guide for educational purpose
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
human mycosis Human fungal infections are called human mycosis..pptx
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Anesthesia in Laparoscopic Surgery in India
Pre independence Education in Inndia.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
01-Introduction-to-Information-Management.pdf
Open Quiz Monsoon Mind Game Final Set.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
GDM (1) (1).pptx small presentation for students
Abdominal Access Techniques with Prof. Dr. R K Mishra
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPH.pptx obstetrics and gynecology in nursing
Microbial disease of the cardiovascular and lymphatic systems
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Ad

1. Introduction to Algorithms, Specification of Algorithm, Complexity.pdf

  • 1. 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 : [email protected] B.TECH V SEM CSE ACADEMIC YEAR: 2023-2024 1 CS3102 (DAA), Dept. of CSE
  • 2. Assessment criteria’s Assignment quiz Mid term examination End term Examination CS3102 (DAA), Dept. of CSE 2
  • 3. Introduction to Algorithms, Asymptotic Notations, Complexity CS3102 (DAA), Dept. of CSE 3
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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
  • 9. Two Distinct Choices CS3102 (DAA), Dept. of CSE 9
  • 11. 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
  • 12. 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
  • 13. Design and Analysis, in general Design •Understanding the goal •Select the tools •What components are needed •How the components should be put together •Composing functions to form a process Analysis •How does it work? •Breaking a system down to known components •How the components relate to each other •Breaking a process down to known functions CS3102 (DAA), Dept. of CSE 13
  • 14. Problem Solving In general: Understanding the problem Selecting the strategy Giving the steps Proving the correctness Trying to improve Using computer: Describing the problem: Selecting the strategy: Algorithm: Input / Output/Step: Analysis: Correct or wrong “good”or “bad” Implementation: Verification: CS3102 (DAA), Dept. of CSE 14
  • 15. Probably the Oldest Algorithm CS3102 (DAA), Dept. of CSE 15
  • 17. 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
  • 18. Criteria for Algorithm Analysis • Correctness • Amount of work done • Amount of space used • Simplicity, clarity • Optimality CS3102 (DAA), Dept. of CSE 18