SlideShare a Scribd company logo
Algorithms. Basic course
Algorithms.
Basic course
Informal definition: a set of rules that precisely defines a
sequence of operations to accomplish a certain goal.
We create, follow and control the execution of
algorithms in our everyday life.
Everyday algorithms
Main properties of an algorithm:
Flexibility - an algorithm should be adaptable to solve a wide scope of problems.
Discreteness - the process should be divided into separate, well-described steps. One step at a
time.
Determinacy - the order of the steps of the algorithm and all actions inside each step must be
unambiguous.
Productivity - at the end of its execution, the algorithm must produce some result.
Stability - if an algorithm has correct input parameters, it must always produce the correct results.
Algorithm types
Randomized (stochastic) algorithm such algorithms make some choices randomly (or pseudo-randomly). This can be very useful in
finding approximate solutions to problems when finding exact solutions can be impractical (Monte Carlo, Las Vegas algorithms).
Heuristic algorithm can be used to find a solution close to the optimal solution in cases when finding the optimal solution is
impractical. These algorithms work by getting closer and closer to the optimal solution as they progress. In principle, if run for an infinite
period of time, they will find the optimal solution. Their advantage is that they can find a solution very close to the optimal solution in a
relatively short time.
Linear algorithm is a set of steps executed strictly one after another.
Branching algorithm uses at least one ‘if’-condition to make a decision in which of the two (or more) possible path programs its
execution should be continued.
Iterative algorithms use repetitive constructs like loops and sometimes additional data structures like stacks to solve the given
problems.
Recursive algorithm is one that invokes (makes reference to) itself repeatedly until a certain condition (also known as termination
condition) is met, which is a method common to functional programming.
Ways to describe an algorithm:
Verbal - an algorithm is verbally described in a human language;
Symbolic - an algorithm is written down using any algorithmic language;
Graphics - an algorithm is written down using block schemes.
Method to measure algorithm
To measure an algorithm, there is usually big O notation used.
In computer science, big O notation is used to classify algorithms according to
how their running time or memory space requirements grow as the input size
grows.
Advantages of Big O Notation
● Independent of computer architecture;
● Mostly independent of the interpreter or compiler;
● Easily understandable information.
Limitations of Big O Notation
There are numerous algorithms that are too difficult to analyze mathematically.
There may not be sufficient information to calculate the behaviour of the algorithm
in an average case.
The Big O notation sometimes ignores the important constants. For instance, if a
particular algorithm takes O(n3) time to run and another algorithm takes O(100n3)
time to run, then both algorithms would have equal time complexity according to
the Big O notation.
The Big O notation tells us how the algorithm grows with the size of the problem
and not the efficiency related to it.
Additional resources:
Books:
● Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson,
Ronald L. Rivest, and Clifford Stein
● Algorithm Design by Jon Kleinberg
Web resources:
● Algorithms. Course by Kevin Wayne

More Related Content

What's hot (20)

PPTX
Topic 1.4: Randomized Algorithms
KM Bappi
 
PPTX
Algorithms and Flowcharts
Lp Singh
 
PPSX
C programming language
Frijo Francis
 
PPTX
Introduction to algorithn class 1
Kumar
 
PPT
Daa presentation 97
Garima Verma
 
PPTX
Lecture 1-cs648
Anshul Yadav
 
PPTX
Algorithm Design & Implementation
Gaditek
 
PPTX
Algorithm and flowchart with pseudo code
hamza javed
 
PPT
Randomized Algorithms
Ketan Kamra
 
PPT
What is an algorithm?
Startup Product Academy, LLC
 
PPT
Problem solving using Computer
David Livingston J
 
PPTX
Lecture 6-cs648 Randomized Algorithms
Anshul Yadav
 
PPTX
Notion of an algorithm
Nisha Soms
 
PPT
L01 intro-daa - ppt1
sankaran L
 
PPTX
#1 designandanalysis of algo
Brijida Charizma Ardoña-Navarro
 
PPT
COMPUTER PROGRAMMING UNIT 1 Lecture 4
Vishal Patil
 
PPT
Aad introduction
Mr SMAK
 
PDF
Design & Analysis of Algorithms Lecture Notes
FellowBuddy.com
 
Topic 1.4: Randomized Algorithms
KM Bappi
 
Algorithms and Flowcharts
Lp Singh
 
C programming language
Frijo Francis
 
Introduction to algorithn class 1
Kumar
 
Daa presentation 97
Garima Verma
 
Lecture 1-cs648
Anshul Yadav
 
Algorithm Design & Implementation
Gaditek
 
Algorithm and flowchart with pseudo code
hamza javed
 
Randomized Algorithms
Ketan Kamra
 
What is an algorithm?
Startup Product Academy, LLC
 
Problem solving using Computer
David Livingston J
 
Lecture 6-cs648 Randomized Algorithms
Anshul Yadav
 
Notion of an algorithm
Nisha Soms
 
L01 intro-daa - ppt1
sankaran L
 
#1 designandanalysis of algo
Brijida Charizma Ardoña-Navarro
 
COMPUTER PROGRAMMING UNIT 1 Lecture 4
Vishal Patil
 
Aad introduction
Mr SMAK
 
Design & Analysis of Algorithms Lecture Notes
FellowBuddy.com
 

Similar to Algorithms. Basic course (20)

PPTX
Algorithm in data structure bca .pptx
SukhBanger
 
PDF
DAA INTRO.pdf of design analysis algorithms
VaishnaviDappu
 
PPT
Introduction to design and analysis of algorithm
DevaKumari Vijay
 
PPTX
Algorithm and Complexity-Lesson 1.pptx
Apasra R
 
PDF
Chapter 3 introduction to algorithms handouts (with notes)
mailund
 
PPTX
Introduction-to-Algorithms-Concepts-and-Analysis.pptx
ramalakshmikaliappan
 
PPT
Chapter1.1 Introduction.ppt
Tekle12
 
PPT
Chapter1.1 Introduction to design and analysis of algorithm.ppt
Tekle12
 
PDF
DSA
rrupa2
 
PPS
Data Structures and Algorithms Unit 01
Prashanth Shivakumar
 
PPTX
Algorithm analysis and design
Megha V
 
PPTX
Modile-1-PPT-1-BCAC0207-AlgorithmDesign.pptx
ryadavrohit26
 
DOCX
Algorithm - A set of rules for solving operations
Kumari99
 
PPTX
ANALYIS AND COMPLEXITY OF ALGORITHMS.pptx
Sumitku3
 
PPT
Design and analysis of algorithm in Computer Science
secularistpartyofind
 
PPTX
Algorithms & Complexity Calculation
Akhil Kaushik
 
PDF
Analysis of Algorithms
Amna Saeed
 
PDF
Design Analysis and Algorithm Module1.pdf
Shana799280
 
PPTX
Algo_Lecture01.pptx
ShaistaRiaz4
 
Algorithm in data structure bca .pptx
SukhBanger
 
DAA INTRO.pdf of design analysis algorithms
VaishnaviDappu
 
Introduction to design and analysis of algorithm
DevaKumari Vijay
 
Algorithm and Complexity-Lesson 1.pptx
Apasra R
 
Chapter 3 introduction to algorithms handouts (with notes)
mailund
 
Introduction-to-Algorithms-Concepts-and-Analysis.pptx
ramalakshmikaliappan
 
Chapter1.1 Introduction.ppt
Tekle12
 
Chapter1.1 Introduction to design and analysis of algorithm.ppt
Tekle12
 
DSA
rrupa2
 
Data Structures and Algorithms Unit 01
Prashanth Shivakumar
 
Algorithm analysis and design
Megha V
 
Modile-1-PPT-1-BCAC0207-AlgorithmDesign.pptx
ryadavrohit26
 
Algorithm - A set of rules for solving operations
Kumari99
 
ANALYIS AND COMPLEXITY OF ALGORITHMS.pptx
Sumitku3
 
Design and analysis of algorithm in Computer Science
secularistpartyofind
 
Algorithms & Complexity Calculation
Akhil Kaushik
 
Analysis of Algorithms
Amna Saeed
 
Design Analysis and Algorithm Module1.pdf
Shana799280
 
Algo_Lecture01.pptx
ShaistaRiaz4
 
Ad

More from ISS Art, LLC (6)

PDF
ISS Art. How to do IT. Kotlin Multiplatform
ISS Art, LLC
 
PPTX
Computer vision in neuropharmacology
ISS Art, LLC
 
PDF
ISS Art company presentation
ISS Art, LLC
 
PDF
Aggregation and Awareness or How to Reduce the Amount of your FrontEnd Code ...
ISS Art, LLC
 
PDF
Управление удаленной командой тестировщиков
ISS Art, LLC
 
PDF
Контроль над распределенной командой
ISS Art, LLC
 
ISS Art. How to do IT. Kotlin Multiplatform
ISS Art, LLC
 
Computer vision in neuropharmacology
ISS Art, LLC
 
ISS Art company presentation
ISS Art, LLC
 
Aggregation and Awareness or How to Reduce the Amount of your FrontEnd Code ...
ISS Art, LLC
 
Управление удаленной командой тестировщиков
ISS Art, LLC
 
Контроль над распределенной командой
ISS Art, LLC
 
Ad

Recently uploaded (20)

PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Tally software_Introduction_Presentation
AditiBansal54083
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 

Algorithms. Basic course

  • 3. Informal definition: a set of rules that precisely defines a sequence of operations to accomplish a certain goal. We create, follow and control the execution of algorithms in our everyday life.
  • 5. Main properties of an algorithm: Flexibility - an algorithm should be adaptable to solve a wide scope of problems. Discreteness - the process should be divided into separate, well-described steps. One step at a time. Determinacy - the order of the steps of the algorithm and all actions inside each step must be unambiguous. Productivity - at the end of its execution, the algorithm must produce some result. Stability - if an algorithm has correct input parameters, it must always produce the correct results.
  • 6. Algorithm types Randomized (stochastic) algorithm such algorithms make some choices randomly (or pseudo-randomly). This can be very useful in finding approximate solutions to problems when finding exact solutions can be impractical (Monte Carlo, Las Vegas algorithms). Heuristic algorithm can be used to find a solution close to the optimal solution in cases when finding the optimal solution is impractical. These algorithms work by getting closer and closer to the optimal solution as they progress. In principle, if run for an infinite period of time, they will find the optimal solution. Their advantage is that they can find a solution very close to the optimal solution in a relatively short time. Linear algorithm is a set of steps executed strictly one after another. Branching algorithm uses at least one ‘if’-condition to make a decision in which of the two (or more) possible path programs its execution should be continued. Iterative algorithms use repetitive constructs like loops and sometimes additional data structures like stacks to solve the given problems. Recursive algorithm is one that invokes (makes reference to) itself repeatedly until a certain condition (also known as termination condition) is met, which is a method common to functional programming.
  • 7. Ways to describe an algorithm: Verbal - an algorithm is verbally described in a human language; Symbolic - an algorithm is written down using any algorithmic language; Graphics - an algorithm is written down using block schemes.
  • 8. Method to measure algorithm To measure an algorithm, there is usually big O notation used. In computer science, big O notation is used to classify algorithms according to how their running time or memory space requirements grow as the input size grows.
  • 9. Advantages of Big O Notation ● Independent of computer architecture; ● Mostly independent of the interpreter or compiler; ● Easily understandable information.
  • 10. Limitations of Big O Notation There are numerous algorithms that are too difficult to analyze mathematically. There may not be sufficient information to calculate the behaviour of the algorithm in an average case. The Big O notation sometimes ignores the important constants. For instance, if a particular algorithm takes O(n3) time to run and another algorithm takes O(100n3) time to run, then both algorithms would have equal time complexity according to the Big O notation. The Big O notation tells us how the algorithm grows with the size of the problem and not the efficiency related to it.
  • 11. Additional resources: Books: ● Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein ● Algorithm Design by Jon Kleinberg Web resources: ● Algorithms. Course by Kevin Wayne