SlideShare a Scribd company logo
Analysis and Design of Algorithms
Introduction to Algorithms
Analysis and Design of Algorithms
Algorithms
Time Complexity & Space Complexity
Algorithm vs Pseudocode
Some Algorithm Types
Programming Languages
Python
Anaconda
Analysis and Design of Algorithms
An algorithm is a set of steps of operations to solve a
problem performing calculation, data processing,
and automated reasoning tasks.
An algorithm is the best way to represent the
solution of a particular problem in a very simple and
efficient way.
Analysis and Design of Algorithms
Algorithms
Analysis Design
Analysis and Design of Algorithms
Analysis: predict the cost of an algorithm in terms of
resources and performance
Design: creating an efficient algorithm to solve a
problem in an efficient way using minimum time and
space.
Analysis and Design of Algorithms
Analysis
Time Space
Analysis and Design of Algorithms
Time Complexity is a function describing the amount of time
required to run an algorithm in terms of the size of the input.
Space Complexity is a function describing the amount of
memory an algorithm takes in terms of the size of input to the
algorithm.
Analysis and Design of Algorithms
Time Complexity
What make algorithm “fast”?
Space Complexity
How much memory is used?
Analysis and Design of Algorithms
 Input: sequence <a1, a2, …, an> of numbers.
 Output: permutation <a'1, a'2, …, a'n> such that
a'1  a'2  …  a'n .
Example:
Input
Output
8 12 5 9 2
2 5 8 9 12
Analysis and Design of Algorithms
 An algorithm is a formal definition with some specific characteristics
that describes a process. Generally, the word "algorithm" can be
used to describe any high level task in computer science.
 Pseudocode is an informal and human readable description of an
algorithm leaving many details of it. Writing a pseudocode has no
restriction of styles and its only objective is to describe the high level
steps of algorithm.
Analysis and Design of Algorithms
 Algorithm: Selection Sort
Input: A list L of integers of length n
Output: A sorted list L1 containing those integers present in L
Step1: Find the minimum value in the list L
Step2: Swap it with the value in the current position
Step3: Repeat this process for all the elements until the entire list is sorted
Step 4: Return the sorted list L1
Step 5: Stop
Analysis and Design of Algorithms
 Pseudocode : Selection Sort
for j ← 1 to n-1
smallest ← j
for i ← j + 1 to n
if A[ i ] < A[ smallest ]
smallest ← i
Exchange A[ j ] ↔ A[ smallest ]
Analysis and Design of Algorithms
Sorting
Algorithms
Searching
Algorithms
Graph
Algorithms
Patterns
Algorithms
Numerical
Algorithms
Analysis and Design of Algorithms
Sorting Algorithms are to rearrange the items of a given
list in non decreasing order.
Searching Algorithms deal with finding a given value,
called a search key, in a given set.
Analysis and Design of Algorithms
Pattern (String) Algorithms deal with string which comprise
letters, numbers, and special characters; bit strings, which
comprise zeros and ones; and gene sequences
Numerical Algorithms deal with mathematical problems that
solving equations and systems of equations, computing
definite integrals ,evaluating functions, and so on.
Analysis and Design of Algorithms
Graph Algorithms deal with graphs. Graph can be thought of
as a collection of points called vertices, some of which are
connected by line segments called edges. Graphs can be used
for modeling a wide variety of applications, including
transportation, communication, social and economic
networks, project scheduling, and games.
Analysis and Design of Algorithms
 All algorithms can be coded using any programming language
such as ( Pyhton, C++, Java, PHP, JavaScript, C#, …)
 The most used programming language in this course is Python
 Why Python???
Analysis and Design of Algorithms
1) Easy to Understand:
Python is very high level language, Python reads like English.
Python is incredibly easy to learn and use.
2) Python Has Amazing Libraries
When you’re working on bigger projects, libraries can really help
you save time and cut down on the initial development cycle.
Analysis and Design of Algorithms
NumPy
SciPy
Matplotlib Pandas
Scikit Learn
Statsmodels Seaborn
Scrapy
Keras
Analysis and Design of Algorithms
3) Supportive community
Python has documentation, guides, tutorials and more. Plus, the
developer community is incredibly active.
4) Great Corporate Sponsor
C# has Microsoft, Java has Sun and PHP is used by Facebook.
Google adopted Python heavily back in 2006, and they’ve used it
for many platforms and applications since.
Analysis and Design of Algorithms
5) Python can do:
Analysis and Design of Algorithms
6) Python distribution:
 The best Python distribution, we will used in our course is Anaconda
Analysis and Design of Algorithms
Analysis and Design of Algorithms
 Jupyter
notebook
Analysis and Design of Algorithms
 Spyder
Analysis and Design of Algorithms
Analysis and Design of Algorithms
Analysis and Design of Algorithms
Algorithms
Lab
C++
JavaPython
Analysis and Design of Algorithms
Algorithms
Lab
Solve Problems
Python
Notebook
Analysis and Design of Algorithms
facebook.com/mloey
mohamedloey@gmail.com
twitter.com/mloey
linkedin.com/in/mloey
mloey@fci.bu.edu.eg
mloey.github.io
Analysis and Design of Algorithms
www.YourCompany.com
© 2020 Companyname PowerPoint Business Theme. All Rights Reserved.
THANKS FOR
YOUR TIME

More Related Content

What's hot (20)

PPT
chapter 1
yatheesha
 
PPT
Fundamentals of the Analysis of Algorithm Efficiency
Saranya Natarajan
 
PPTX
Introduction to pandas
Piyush rai
 
PDF
Token, Pattern and Lexeme
A. S. M. Shafi
 
PPT
Unit 1 chapter 1 Design and Analysis of Algorithms
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
PPT
Divide and conquer
Dr Shashikant Athawale
 
PPTX
Asymptotic notations
Nikhil Sharma
 
PPTX
Context free grammar
Mohammad Ilyas Malik
 
PPTX
Graph coloring using backtracking
shashidharPapishetty
 
PDF
Introduction to algorithms
subhashchandra197
 
PPT
Quick sort Algorithm Discussion And Analysis
SNJ Chaudhary
 
PPTX
Analysis and Design of Algorithms
Bulbul Agrawal
 
PPTX
LISP: Introduction to lisp
DataminingTools Inc
 
PPTX
Solving recurrences
Megha V
 
PPTX
Analysis of algorithm
Rajendra Dangwal
 
PPTX
Breadth First Search & Depth First Search
Kevin Jadiya
 
PPTX
Data Structure and Algorithms.pptx
Syed Zaid Irshad
 
PPT
Introduction to data structures and Algorithm
Dhaval Kaneria
 
PPTX
Merge Sort
Nikhil Sonkamble
 
PPTX
Lexical analysis - Compiler Design
Muhammed Afsal Villan
 
chapter 1
yatheesha
 
Fundamentals of the Analysis of Algorithm Efficiency
Saranya Natarajan
 
Introduction to pandas
Piyush rai
 
Token, Pattern and Lexeme
A. S. M. Shafi
 
Unit 1 chapter 1 Design and Analysis of Algorithms
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Divide and conquer
Dr Shashikant Athawale
 
Asymptotic notations
Nikhil Sharma
 
Context free grammar
Mohammad Ilyas Malik
 
Graph coloring using backtracking
shashidharPapishetty
 
Introduction to algorithms
subhashchandra197
 
Quick sort Algorithm Discussion And Analysis
SNJ Chaudhary
 
Analysis and Design of Algorithms
Bulbul Agrawal
 
LISP: Introduction to lisp
DataminingTools Inc
 
Solving recurrences
Megha V
 
Analysis of algorithm
Rajendra Dangwal
 
Breadth First Search & Depth First Search
Kevin Jadiya
 
Data Structure and Algorithms.pptx
Syed Zaid Irshad
 
Introduction to data structures and Algorithm
Dhaval Kaneria
 
Merge Sort
Nikhil Sonkamble
 
Lexical analysis - Compiler Design
Muhammed Afsal Villan
 

Similar to Algorithms Lecture 1: Introduction to Algorithms (20)

PPTX
Design and Analysis of Algorithm ppt for unit one
ssuserb7c8b8
 
PPTX
Lecture 1.pptx
ALIZAIB KHAN
 
PPT
Lec1.ppt
ssuser8bddb2
 
PPTX
Design and analysis of algorithm lec 1.pptx
AyeshaIftikhar67
 
PPTX
DAA Unit 1 Part 1.pptx
DrYogeshDeshmukh1
 
PDF
Introduction to Algorithms Complexity Analysis
Dr. Pankaj Agarwal
 
PPTX
Lesson 1 - Introduction to Algorithms.pptx
ZiaUrRehmanSafi
 
PPT
UnitI (1).ppt
DSirisha2
 
PPT
ANALYSIS-AND-DESIGN-OF-ALGORITHM.ppt
DaveCalapis3
 
PPT
l01-intro (3).ppt
ssuser15a62a
 
PDF
Introduction to analysis algorithm in computer Science
tissandavid
 
PDF
introduction to analysis of algorithm in computer science
tissandavid
 
PDF
Lecture 2 role of algorithms in computing
jayavignesh86
 
PPSX
Ds03 part i algorithms by jyoti lakhani
jyoti_lakhani
 
PPT
Lecture 01-2.ppt
RaoHamza24
 
PDF
Design and Analysis Algorithms.pdf
HarshNagda5
 
PPTX
L1_Welcome Lecture.pptx for introduction
RaviSharma633042
 
PPTX
AoA Lec Design of algorithm spresentation
HamzaSadaat
 
PPTX
Binary to hexadecimal algorithmic old.pptx
bulbul931579
 
PPTX
Algorithms : Introduction and Analysis
Dhrumil Patel
 
Design and Analysis of Algorithm ppt for unit one
ssuserb7c8b8
 
Lecture 1.pptx
ALIZAIB KHAN
 
Lec1.ppt
ssuser8bddb2
 
Design and analysis of algorithm lec 1.pptx
AyeshaIftikhar67
 
DAA Unit 1 Part 1.pptx
DrYogeshDeshmukh1
 
Introduction to Algorithms Complexity Analysis
Dr. Pankaj Agarwal
 
Lesson 1 - Introduction to Algorithms.pptx
ZiaUrRehmanSafi
 
UnitI (1).ppt
DSirisha2
 
ANALYSIS-AND-DESIGN-OF-ALGORITHM.ppt
DaveCalapis3
 
l01-intro (3).ppt
ssuser15a62a
 
Introduction to analysis algorithm in computer Science
tissandavid
 
introduction to analysis of algorithm in computer science
tissandavid
 
Lecture 2 role of algorithms in computing
jayavignesh86
 
Ds03 part i algorithms by jyoti lakhani
jyoti_lakhani
 
Lecture 01-2.ppt
RaoHamza24
 
Design and Analysis Algorithms.pdf
HarshNagda5
 
L1_Welcome Lecture.pptx for introduction
RaviSharma633042
 
AoA Lec Design of algorithm spresentation
HamzaSadaat
 
Binary to hexadecimal algorithmic old.pptx
bulbul931579
 
Algorithms : Introduction and Analysis
Dhrumil Patel
 
Ad

More from Mohamed Loey (20)

PDF
Lecture 6: Deep Learning Applications
Mohamed Loey
 
PDF
Lecture 5: Convolutional Neural Network Models
Mohamed Loey
 
PDF
Lecture 4: Deep Learning Frameworks
Mohamed Loey
 
PDF
Lecture 4: How it Works: Convolutional Neural Networks
Mohamed Loey
 
PPTX
Lecture 3: Convolutional Neural Networks
Mohamed Loey
 
PDF
Lecture 2: Artificial Neural Network
Mohamed Loey
 
PDF
Lecture 1: Deep Learning for Computer Vision
Mohamed Loey
 
PDF
Design of an Intelligent System for Improving Classification of Cancer Diseases
Mohamed Loey
 
PDF
Computer Security - CCNA Security - Lecture 2
Mohamed Loey
 
PDF
Computer Security - CCNA Security - Lecture 1
Mohamed Loey
 
PDF
Algorithms Lecture 8: Pattern Algorithms
Mohamed Loey
 
PDF
Algorithms Lecture 7: Graph Algorithms
Mohamed Loey
 
PDF
Algorithms Lecture 5: Sorting Algorithms II
Mohamed Loey
 
PDF
Convolutional Neural Network Models - Deep Learning
Mohamed Loey
 
PDF
Deep Learning - Overview of my work II
Mohamed Loey
 
PDF
Computer Security Lecture 7: RSA
Mohamed Loey
 
PDF
Computer Security Lecture 5: Simplified Advanced Encryption Standard
Mohamed Loey
 
PDF
Computer Security Lecture 4.1: DES Supplementary Material
Mohamed Loey
 
PDF
PMP Lecture 4: Project Integration Management
Mohamed Loey
 
PDF
Computer Security Lecture 4: Block Ciphers and the Data Encryption Standard
Mohamed Loey
 
Lecture 6: Deep Learning Applications
Mohamed Loey
 
Lecture 5: Convolutional Neural Network Models
Mohamed Loey
 
Lecture 4: Deep Learning Frameworks
Mohamed Loey
 
Lecture 4: How it Works: Convolutional Neural Networks
Mohamed Loey
 
Lecture 3: Convolutional Neural Networks
Mohamed Loey
 
Lecture 2: Artificial Neural Network
Mohamed Loey
 
Lecture 1: Deep Learning for Computer Vision
Mohamed Loey
 
Design of an Intelligent System for Improving Classification of Cancer Diseases
Mohamed Loey
 
Computer Security - CCNA Security - Lecture 2
Mohamed Loey
 
Computer Security - CCNA Security - Lecture 1
Mohamed Loey
 
Algorithms Lecture 8: Pattern Algorithms
Mohamed Loey
 
Algorithms Lecture 7: Graph Algorithms
Mohamed Loey
 
Algorithms Lecture 5: Sorting Algorithms II
Mohamed Loey
 
Convolutional Neural Network Models - Deep Learning
Mohamed Loey
 
Deep Learning - Overview of my work II
Mohamed Loey
 
Computer Security Lecture 7: RSA
Mohamed Loey
 
Computer Security Lecture 5: Simplified Advanced Encryption Standard
Mohamed Loey
 
Computer Security Lecture 4.1: DES Supplementary Material
Mohamed Loey
 
PMP Lecture 4: Project Integration Management
Mohamed Loey
 
Computer Security Lecture 4: Block Ciphers and the Data Encryption Standard
Mohamed Loey
 
Ad

Recently uploaded (20)

PDF
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
PPTX
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
PPTX
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
 
PDF
Genomics Proteomics and Vaccines 1st Edition Guido Grandi (Editor)
kboqcyuw976
 
PPTX
How to Create & Manage Stages in Odoo 18 Helpdesk
Celine George
 
PPTX
Ward Management: Patient Care, Personnel, Equipment, and Environment.pptx
PRADEEP ABOTHU
 
PPTX
Connecting Linear and Angular Quantities in Human Movement.pptx
AngeliqueTolentinoDe
 
PPTX
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
PDF
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
PPTX
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 
PPTX
Parsing HTML read and write operations and OS Module.pptx
Ramakrishna Reddy Bijjam
 
PDF
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
PDF
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
PDF
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
PDF
Wikinomics How Mass Collaboration Changes Everything Don Tapscott
wcsqyzf5909
 
PDF
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
PDF
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
PPTX
Urban Hierarchy and Service Provisions.pptx
Islamic University of Bangladesh
 
PPTX
How to Manage Wins & Losses in Odoo 18 CRM
Celine George
 
PPTX
How to Configure Refusal of Applicants in Odoo 18 Recruitment
Celine George
 
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
 
Genomics Proteomics and Vaccines 1st Edition Guido Grandi (Editor)
kboqcyuw976
 
How to Create & Manage Stages in Odoo 18 Helpdesk
Celine George
 
Ward Management: Patient Care, Personnel, Equipment, and Environment.pptx
PRADEEP ABOTHU
 
Connecting Linear and Angular Quantities in Human Movement.pptx
AngeliqueTolentinoDe
 
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 
Parsing HTML read and write operations and OS Module.pptx
Ramakrishna Reddy Bijjam
 
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
Wikinomics How Mass Collaboration Changes Everything Don Tapscott
wcsqyzf5909
 
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
Urban Hierarchy and Service Provisions.pptx
Islamic University of Bangladesh
 
How to Manage Wins & Losses in Odoo 18 CRM
Celine George
 
How to Configure Refusal of Applicants in Odoo 18 Recruitment
Celine George
 

Algorithms Lecture 1: Introduction to Algorithms

  • 1. Analysis and Design of Algorithms Introduction to Algorithms
  • 2. Analysis and Design of Algorithms Algorithms Time Complexity & Space Complexity Algorithm vs Pseudocode Some Algorithm Types Programming Languages Python Anaconda
  • 3. Analysis and Design of Algorithms An algorithm is a set of steps of operations to solve a problem performing calculation, data processing, and automated reasoning tasks. An algorithm is the best way to represent the solution of a particular problem in a very simple and efficient way.
  • 4. Analysis and Design of Algorithms Algorithms Analysis Design
  • 5. Analysis and Design of Algorithms Analysis: predict the cost of an algorithm in terms of resources and performance Design: creating an efficient algorithm to solve a problem in an efficient way using minimum time and space.
  • 6. Analysis and Design of Algorithms Analysis Time Space
  • 7. Analysis and Design of Algorithms Time Complexity is a function describing the amount of time required to run an algorithm in terms of the size of the input. Space Complexity is a function describing the amount of memory an algorithm takes in terms of the size of input to the algorithm.
  • 8. Analysis and Design of Algorithms Time Complexity What make algorithm “fast”? Space Complexity How much memory is used?
  • 9. Analysis and Design of Algorithms  Input: sequence <a1, a2, …, an> of numbers.  Output: permutation <a'1, a'2, …, a'n> such that a'1  a'2  …  a'n . Example: Input Output 8 12 5 9 2 2 5 8 9 12
  • 10. Analysis and Design of Algorithms  An algorithm is a formal definition with some specific characteristics that describes a process. Generally, the word "algorithm" can be used to describe any high level task in computer science.  Pseudocode is an informal and human readable description of an algorithm leaving many details of it. Writing a pseudocode has no restriction of styles and its only objective is to describe the high level steps of algorithm.
  • 11. Analysis and Design of Algorithms  Algorithm: Selection Sort Input: A list L of integers of length n Output: A sorted list L1 containing those integers present in L Step1: Find the minimum value in the list L Step2: Swap it with the value in the current position Step3: Repeat this process for all the elements until the entire list is sorted Step 4: Return the sorted list L1 Step 5: Stop
  • 12. Analysis and Design of Algorithms  Pseudocode : Selection Sort for j ← 1 to n-1 smallest ← j for i ← j + 1 to n if A[ i ] < A[ smallest ] smallest ← i Exchange A[ j ] ↔ A[ smallest ]
  • 13. Analysis and Design of Algorithms Sorting Algorithms Searching Algorithms Graph Algorithms Patterns Algorithms Numerical Algorithms
  • 14. Analysis and Design of Algorithms Sorting Algorithms are to rearrange the items of a given list in non decreasing order. Searching Algorithms deal with finding a given value, called a search key, in a given set.
  • 15. Analysis and Design of Algorithms Pattern (String) Algorithms deal with string which comprise letters, numbers, and special characters; bit strings, which comprise zeros and ones; and gene sequences Numerical Algorithms deal with mathematical problems that solving equations and systems of equations, computing definite integrals ,evaluating functions, and so on.
  • 16. Analysis and Design of Algorithms Graph Algorithms deal with graphs. Graph can be thought of as a collection of points called vertices, some of which are connected by line segments called edges. Graphs can be used for modeling a wide variety of applications, including transportation, communication, social and economic networks, project scheduling, and games.
  • 17. Analysis and Design of Algorithms  All algorithms can be coded using any programming language such as ( Pyhton, C++, Java, PHP, JavaScript, C#, …)  The most used programming language in this course is Python  Why Python???
  • 18. Analysis and Design of Algorithms 1) Easy to Understand: Python is very high level language, Python reads like English. Python is incredibly easy to learn and use. 2) Python Has Amazing Libraries When you’re working on bigger projects, libraries can really help you save time and cut down on the initial development cycle.
  • 19. Analysis and Design of Algorithms NumPy SciPy Matplotlib Pandas Scikit Learn Statsmodels Seaborn Scrapy Keras
  • 20. Analysis and Design of Algorithms 3) Supportive community Python has documentation, guides, tutorials and more. Plus, the developer community is incredibly active. 4) Great Corporate Sponsor C# has Microsoft, Java has Sun and PHP is used by Facebook. Google adopted Python heavily back in 2006, and they’ve used it for many platforms and applications since.
  • 21. Analysis and Design of Algorithms 5) Python can do:
  • 22. Analysis and Design of Algorithms 6) Python distribution:  The best Python distribution, we will used in our course is Anaconda
  • 23. Analysis and Design of Algorithms
  • 24. Analysis and Design of Algorithms  Jupyter notebook
  • 25. Analysis and Design of Algorithms  Spyder
  • 26. Analysis and Design of Algorithms
  • 27. Analysis and Design of Algorithms
  • 28. Analysis and Design of Algorithms Algorithms Lab C++ JavaPython
  • 29. Analysis and Design of Algorithms Algorithms Lab Solve Problems Python Notebook
  • 30. Analysis and Design of Algorithms facebook.com/mloey [email protected] twitter.com/mloey linkedin.com/in/mloey [email protected] mloey.github.io
  • 31. Analysis and Design of Algorithms www.YourCompany.com © 2020 Companyname PowerPoint Business Theme. All Rights Reserved. THANKS FOR YOUR TIME