SlideShare a Scribd company logo
1 of 13
Subject
Design and Analysis of Algorithms
BS(CS) 4th
Lecture#01
Introduction to Design and Analysis of
Algorithms
What Is an Algorithm?
 “An algorithm is a well-defined procedure that allows a computer
to solve a problem.”
A sequence of unambiguous instructions.
The use of the term 'unambiguous' indicates that there is no room
for subjective interpretation.
 Every time you ask your computer to carry out the same
algorithm, it will do it in exactly the same manner with the exact
same result.
. For example, you start working on a report.
How Do Algorithms Work?
A very simple example of an algorithm would be to find
the largest number in an unsorted list of numbers L.
 If you were given a list of five different numbers.
L1 is first element and L2 second and so on.
The algorithm would look something like this:
Step 1: Let Largest = L1
This means you start by assuming that the first number is the largest
number.
Step 2: For each item in the list:
This means you will go through the list of numbers one by one.
Step 3: If the item > Largest:
If you find a new largest number, move to step four. If not, go back to
step two, which means you move on to the next number in the list.
Step 4: Then Largest = the item
This replaces the old largest number with the new largest number you
just found. Once this is completed, return to step two until there are no
more numbers left in the list.
Step 5: Return Largest
 Algorithm is described as a series of logical steps in a language
that is easily understood.
 For a computer to actually use these instructions, they need to be
written in a language that a computer can understand, known as
a programming language
Notice
What is the use of algorithm in computer system?
An algorithm is a sequence of instructions for a computer system
like a recipe for cooking
Tells the computer what to do and how to do it
Algorithms are expressed in a programming language like C++or
Assembler
Why We use Algorithm ?
Algorithm helps to solve computational problems.
Solid Algorithmic knowledge & technique separates the
truly skilled programmer from the novices
Algorithmic analysis will clear your vision about a
computational problem & will let you go farther with it
Algorithms are the core of most technologies that we see
in modern electronic devices
And many more...
What is Algorithm Design?
 Since computer-processed algorithms can tackle much larger
problems than a human, much more quickly.
Since modern computing uses algorithms much more frequently
than at any other point in human history.
Field has grown up around their design, analysis, and refinement.
The field of algorithm design requires a strong mathematical .
Designing algorithm is necessary before writing the program code .
Explains the logic even before the code is developed.
What is Algorithm Analysis?
The process of analyzing the problem-solving capability of the
algorithm in terms of the time and size required.
How to choose a better algorithm for a particular problem as one
computational problem can be solved by different algorithms.
Algorithms are often quite different from one another, though the
objective of these algorithms are the same.
Time Complexity
Space Complexity
Bubble sort
Merge Sort
Why Algorithms Analysis is Needed?
Why is design and analysis of algorithm important to study?
Problem Development Steps
Characteristics of Algorithms
Pseudocode
Difference between Algorithm and Pseudocode
Lecture 1.pptx
Lecture 1.pptx

More Related Content

Similar to Lecture 1.pptx

Csallner algorithms1
Csallner algorithms1Csallner algorithms1
Csallner algorithms1seshagiri rao
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
 
AOA Week 01.ppt
AOA Week 01.pptAOA Week 01.ppt
AOA Week 01.pptINAM352782
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.pptALIZAIB KHAN
 
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxChallenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxRusherGamer1
 
Unit 1 Introduction Part 3.pptx
Unit 1 Introduction Part 3.pptxUnit 1 Introduction Part 3.pptx
Unit 1 Introduction Part 3.pptxNishaRohit6
 
9 big o-notation
9 big o-notation9 big o-notation
9 big o-notationirdginfo
 
compatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptcompatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptMuhammadAbdullah311866
 
ALGORITHM.pptx
ALGORITHM.pptxALGORITHM.pptx
ALGORITHM.pptxMdAkram73
 
Algorithms Explained
Algorithms Explained Algorithms Explained
Algorithms Explained Sparkster
 
Design and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit oneDesign and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit onessuserb7c8b8
 
Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01Prashanth Shivakumar
 
1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithmMohammed khaja Jamaluddin
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sitSaurabh846965
 

Similar to Lecture 1.pptx (20)

Csallner algorithms1
Csallner algorithms1Csallner algorithms1
Csallner algorithms1
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
 
AOA Week 01.ppt
AOA Week 01.pptAOA Week 01.ppt
AOA Week 01.ppt
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.ppt
 
251 - Alogarithms Lects.pdf
251 - Alogarithms Lects.pdf251 - Alogarithms Lects.pdf
251 - Alogarithms Lects.pdf
 
Algorithm itabq
Algorithm itabqAlgorithm itabq
Algorithm itabq
 
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxChallenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
 
Unit 1 Introduction Part 3.pptx
Unit 1 Introduction Part 3.pptxUnit 1 Introduction Part 3.pptx
Unit 1 Introduction Part 3.pptx
 
9 big o-notation
9 big o-notation9 big o-notation
9 big o-notation
 
phases of algorithm
phases of algorithmphases of algorithm
phases of algorithm
 
compatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptcompatibility and complexity in the IS.ppt
compatibility and complexity in the IS.ppt
 
ALGORITHM.pptx
ALGORITHM.pptxALGORITHM.pptx
ALGORITHM.pptx
 
Algorithms Explained
Algorithms Explained Algorithms Explained
Algorithms Explained
 
Design and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit oneDesign and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit one
 
Algoritmos
AlgoritmosAlgoritmos
Algoritmos
 
Algo and flowchart
Algo and flowchartAlgo and flowchart
Algo and flowchart
 
Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01
 
1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
 

More from ALIZAIB KHAN

Ants coony optimiztion problem in Advance analysis of algorithms
Ants coony optimiztion problem in Advance analysis of algorithmsAnts coony optimiztion problem in Advance analysis of algorithms
Ants coony optimiztion problem in Advance analysis of algorithmsALIZAIB KHAN
 
Ant Colony Optimization algorithms in ADSA
Ant Colony Optimization algorithms in ADSAAnt Colony Optimization algorithms in ADSA
Ant Colony Optimization algorithms in ADSAALIZAIB KHAN
 
decison tree and rules in data mining techniques
decison tree and rules in data mining techniquesdecison tree and rules in data mining techniques
decison tree and rules in data mining techniquesALIZAIB KHAN
 
Artificial Neural Networks for data mining
Artificial Neural Networks for data miningArtificial Neural Networks for data mining
Artificial Neural Networks for data miningALIZAIB KHAN
 
CS911-Lecture-19_40235.pptx
CS911-Lecture-19_40235.pptxCS911-Lecture-19_40235.pptx
CS911-Lecture-19_40235.pptxALIZAIB KHAN
 
CS911-Lecture-13_34826.pptx
CS911-Lecture-13_34826.pptxCS911-Lecture-13_34826.pptx
CS911-Lecture-13_34826.pptxALIZAIB KHAN
 

More from ALIZAIB KHAN (8)

Ants coony optimiztion problem in Advance analysis of algorithms
Ants coony optimiztion problem in Advance analysis of algorithmsAnts coony optimiztion problem in Advance analysis of algorithms
Ants coony optimiztion problem in Advance analysis of algorithms
 
Ant Colony Optimization algorithms in ADSA
Ant Colony Optimization algorithms in ADSAAnt Colony Optimization algorithms in ADSA
Ant Colony Optimization algorithms in ADSA
 
decison tree and rules in data mining techniques
decison tree and rules in data mining techniquesdecison tree and rules in data mining techniques
decison tree and rules in data mining techniques
 
Artificial Neural Networks for data mining
Artificial Neural Networks for data miningArtificial Neural Networks for data mining
Artificial Neural Networks for data mining
 
Chapter01.ppt
Chapter01.pptChapter01.ppt
Chapter01.ppt
 
CS911-Lecture-19_40235.pptx
CS911-Lecture-19_40235.pptxCS911-Lecture-19_40235.pptx
CS911-Lecture-19_40235.pptx
 
CS911-Lecture-13_34826.pptx
CS911-Lecture-13_34826.pptxCS911-Lecture-13_34826.pptx
CS911-Lecture-13_34826.pptx
 
10994479.ppt
10994479.ppt10994479.ppt
10994479.ppt
 

Recently uploaded

Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...shambhavirathore45
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 

Recently uploaded (20)

Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 

Lecture 1.pptx

  • 1. Subject Design and Analysis of Algorithms BS(CS) 4th
  • 2. Lecture#01 Introduction to Design and Analysis of Algorithms
  • 3. What Is an Algorithm?  “An algorithm is a well-defined procedure that allows a computer to solve a problem.” A sequence of unambiguous instructions. The use of the term 'unambiguous' indicates that there is no room for subjective interpretation.  Every time you ask your computer to carry out the same algorithm, it will do it in exactly the same manner with the exact same result. . For example, you start working on a report.
  • 4. How Do Algorithms Work? A very simple example of an algorithm would be to find the largest number in an unsorted list of numbers L.  If you were given a list of five different numbers. L1 is first element and L2 second and so on.
  • 5. The algorithm would look something like this: Step 1: Let Largest = L1 This means you start by assuming that the first number is the largest number. Step 2: For each item in the list: This means you will go through the list of numbers one by one. Step 3: If the item > Largest: If you find a new largest number, move to step four. If not, go back to step two, which means you move on to the next number in the list. Step 4: Then Largest = the item This replaces the old largest number with the new largest number you just found. Once this is completed, return to step two until there are no more numbers left in the list. Step 5: Return Largest
  • 6.  Algorithm is described as a series of logical steps in a language that is easily understood.  For a computer to actually use these instructions, they need to be written in a language that a computer can understand, known as a programming language Notice
  • 7. What is the use of algorithm in computer system? An algorithm is a sequence of instructions for a computer system like a recipe for cooking Tells the computer what to do and how to do it Algorithms are expressed in a programming language like C++or Assembler
  • 8. Why We use Algorithm ? Algorithm helps to solve computational problems. Solid Algorithmic knowledge & technique separates the truly skilled programmer from the novices Algorithmic analysis will clear your vision about a computational problem & will let you go farther with it Algorithms are the core of most technologies that we see in modern electronic devices And many more...
  • 9. What is Algorithm Design?  Since computer-processed algorithms can tackle much larger problems than a human, much more quickly. Since modern computing uses algorithms much more frequently than at any other point in human history. Field has grown up around their design, analysis, and refinement. The field of algorithm design requires a strong mathematical . Designing algorithm is necessary before writing the program code . Explains the logic even before the code is developed.
  • 10. What is Algorithm Analysis? The process of analyzing the problem-solving capability of the algorithm in terms of the time and size required. How to choose a better algorithm for a particular problem as one computational problem can be solved by different algorithms. Algorithms are often quite different from one another, though the objective of these algorithms are the same. Time Complexity Space Complexity Bubble sort Merge Sort
  • 11. Why Algorithms Analysis is Needed? Why is design and analysis of algorithm important to study? Problem Development Steps Characteristics of Algorithms Pseudocode Difference between Algorithm and Pseudocode