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
Ad

More Related Content

What's hot (20)

Topic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsTopic 1.4: Randomized Algorithms
Topic 1.4: Randomized Algorithms
KM Bappi
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
Lp Singh
 
C programming language
C programming languageC programming language
C programming language
Frijo Francis
 
Empirical analysis
Empirical analysisEmpirical analysis
Empirical analysis
Kongunadu College of Engineering and Technology
 
Introduction to algorithn class 1
Introduction to algorithn class 1Introduction to algorithn class 1
Introduction to algorithn class 1
Kumar
 
Daa presentation 97
Daa presentation 97Daa presentation 97
Daa presentation 97
Garima Verma
 
Lecture 1-cs648
Lecture 1-cs648Lecture 1-cs648
Lecture 1-cs648
Anshul Yadav
 
Algorithm Design & Implementation
Algorithm Design & ImplementationAlgorithm Design & Implementation
Algorithm Design & Implementation
Gaditek
 
Unit 1 dsa
Unit 1 dsaUnit 1 dsa
Unit 1 dsa
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
hamza javed
 
Randomized Algorithms
Randomized AlgorithmsRandomized Algorithms
Randomized Algorithms
Ketan Kamra
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
Startup Product Academy, LLC
 
Problem solving using Computer
Problem solving using ComputerProblem solving using Computer
Problem solving using Computer
David Livingston J
 
Lecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized AlgorithmsLecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized Algorithms
Anshul Yadav
 
Notion of an algorithm
Notion of an algorithmNotion of an algorithm
Notion of an algorithm
Nisha Soms
 
L01 intro-daa - ppt1
L01 intro-daa - ppt1L01 intro-daa - ppt1
L01 intro-daa - ppt1
sankaran L
 
#1 designandanalysis of algo
#1 designandanalysis of algo#1 designandanalysis of algo
#1 designandanalysis of algo
Brijida Charizma Ardoña-Navarro
 
COMPUTER PROGRAMMING UNIT 1 Lecture 4
COMPUTER PROGRAMMING UNIT 1 Lecture 4COMPUTER PROGRAMMING UNIT 1 Lecture 4
COMPUTER PROGRAMMING UNIT 1 Lecture 4
Vishal Patil
 
Aad introduction
Aad introductionAad introduction
Aad introduction
Mr SMAK
 
Design & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture NotesDesign & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture Notes
FellowBuddy.com
 

Similar to Algorithms. Basic course (20)

DAA INTRO.pdf of design analysis algorithms
DAA INTRO.pdf of design analysis algorithmsDAA INTRO.pdf of design analysis algorithms
DAA INTRO.pdf of design analysis algorithms
VaishnaviDappu
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis
Dr. Pankaj Agarwal
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
NayanChandak1
 
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDFFDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
AlthimeseAnderson
 
Introduction to Algorithms Introduction to Algorithms.pptx
Introduction to Algorithms Introduction to Algorithms.pptxIntroduction to Algorithms Introduction to Algorithms.pptx
Introduction to Algorithms Introduction to Algorithms.pptx
ArjayBalberan1
 
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
Mohammed khaja Jamaluddin
 
Algorithm - A set of rules for solving operations
Algorithm - A set of rules  for solving operationsAlgorithm - A set of rules  for solving operations
Algorithm - A set of rules for solving operations
Kumari99
 
Chapter 1 - Introduction to data structure.pptx
Chapter 1 - Introduction to data structure.pptxChapter 1 - Introduction to data structure.pptx
Chapter 1 - Introduction to data structure.pptx
gadisaAdamu
 
Algorithm - Introduction
Algorithm - IntroductionAlgorithm - Introduction
Algorithm - Introduction
Madhu Bala
 
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdfADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
RGPV De Bunkers
 
Intruction to Algorithms.pptx
Intruction to Algorithms.pptxIntruction to Algorithms.pptx
Intruction to Algorithms.pptx
SayantamalHalder
 
Data Abstraction (Chapter 1)
Data Abstraction (Chapter 1)Data Abstraction (Chapter 1)
Data Abstraction (Chapter 1)
LeulTewolde
 
2. Introduction to Algorithm.pptx
2. Introduction to Algorithm.pptx2. Introduction to Algorithm.pptx
2. Introduction to Algorithm.pptx
RahikAhmed1
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptx
satvikkushwaha1
 
Algorithm in data structure bca .pptx
Algorithm  in  data  structure bca .pptxAlgorithm  in  data  structure bca .pptx
Algorithm in data structure bca .pptx
SukhBanger
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
Madishetty Prathibha
 
Cuckoo Search: Recent Advances and Applications
Cuckoo Search: Recent Advances and ApplicationsCuckoo Search: Recent Advances and Applications
Cuckoo Search: Recent Advances and Applications
Xin-She Yang
 
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
ssuserb7c8b8
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of Algorithms
Bulbul Agrawal
 
GE8151 notes pdf.pdf
GE8151 notes pdf.pdfGE8151 notes pdf.pdf
GE8151 notes pdf.pdf
payalkarmarkar1
 
DAA INTRO.pdf of design analysis algorithms
DAA INTRO.pdf of design analysis algorithmsDAA INTRO.pdf of design analysis algorithms
DAA INTRO.pdf of design analysis algorithms
VaishnaviDappu
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis
Dr. Pankaj Agarwal
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
NayanChandak1
 
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDFFDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
AlthimeseAnderson
 
Introduction to Algorithms Introduction to Algorithms.pptx
Introduction to Algorithms Introduction to Algorithms.pptxIntroduction to Algorithms Introduction to Algorithms.pptx
Introduction to Algorithms Introduction to Algorithms.pptx
ArjayBalberan1
 
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
Mohammed khaja Jamaluddin
 
Algorithm - A set of rules for solving operations
Algorithm - A set of rules  for solving operationsAlgorithm - A set of rules  for solving operations
Algorithm - A set of rules for solving operations
Kumari99
 
Chapter 1 - Introduction to data structure.pptx
Chapter 1 - Introduction to data structure.pptxChapter 1 - Introduction to data structure.pptx
Chapter 1 - Introduction to data structure.pptx
gadisaAdamu
 
Algorithm - Introduction
Algorithm - IntroductionAlgorithm - Introduction
Algorithm - Introduction
Madhu Bala
 
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdfADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
ADA Unit-1 Algorithmic Foundations Analysis, Design, and Efficiency.pdf
RGPV De Bunkers
 
Intruction to Algorithms.pptx
Intruction to Algorithms.pptxIntruction to Algorithms.pptx
Intruction to Algorithms.pptx
SayantamalHalder
 
Data Abstraction (Chapter 1)
Data Abstraction (Chapter 1)Data Abstraction (Chapter 1)
Data Abstraction (Chapter 1)
LeulTewolde
 
2. Introduction to Algorithm.pptx
2. Introduction to Algorithm.pptx2. Introduction to Algorithm.pptx
2. Introduction to Algorithm.pptx
RahikAhmed1
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptx
satvikkushwaha1
 
Algorithm in data structure bca .pptx
Algorithm  in  data  structure bca .pptxAlgorithm  in  data  structure bca .pptx
Algorithm in data structure bca .pptx
SukhBanger
 
Cuckoo Search: Recent Advances and Applications
Cuckoo Search: Recent Advances and ApplicationsCuckoo Search: Recent Advances and Applications
Cuckoo Search: Recent Advances and Applications
Xin-She Yang
 
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
ssuserb7c8b8
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of Algorithms
Bulbul Agrawal
 
Ad

More from ISS Art, LLC (6)

ISS Art. How to do IT. Kotlin Multiplatform
ISS Art. How to do IT. Kotlin MultiplatformISS Art. How to do IT. Kotlin Multiplatform
ISS Art. How to do IT. Kotlin Multiplatform
ISS Art, LLC
 
Computer vision in neuropharmacology
Computer vision in neuropharmacologyComputer vision in neuropharmacology
Computer vision in neuropharmacology
ISS Art, LLC
 
ISS Art company presentation
ISS Art company presentationISS Art company presentation
ISS Art company presentation
ISS Art, LLC
 
Aggregation and Awareness or How to Reduce the Amount of your FrontEnd Code ...
Aggregation and Awareness or How to Reduce the Amount of  your FrontEnd Code ...Aggregation and Awareness or How to Reduce the Amount of  your FrontEnd Code ...
Aggregation and Awareness or How to Reduce the Amount of your FrontEnd Code ...
ISS Art, LLC
 
Управление удаленной командой тестировщиков
Управление удаленной командой тестировщиковУправление удаленной командой тестировщиков
Управление удаленной командой тестировщиков
ISS Art, LLC
 
Контроль над распределенной командой
Контроль над распределенной командойКонтроль над распределенной командой
Контроль над распределенной командой
ISS Art, LLC
 
ISS Art. How to do IT. Kotlin Multiplatform
ISS Art. How to do IT. Kotlin MultiplatformISS Art. How to do IT. Kotlin Multiplatform
ISS Art. How to do IT. Kotlin Multiplatform
ISS Art, LLC
 
Computer vision in neuropharmacology
Computer vision in neuropharmacologyComputer vision in neuropharmacology
Computer vision in neuropharmacology
ISS Art, LLC
 
ISS Art company presentation
ISS Art company presentationISS Art company presentation
ISS Art company presentation
ISS Art, LLC
 
Aggregation and Awareness or How to Reduce the Amount of your FrontEnd Code ...
Aggregation and Awareness or How to Reduce the Amount of  your FrontEnd Code ...Aggregation and Awareness or How to Reduce the Amount of  your FrontEnd Code ...
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)

Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Innovative Approaches to Software Dev no good at all
Innovative Approaches to Software Dev no good at allInnovative Approaches to Software Dev no good at all
Innovative Approaches to Software Dev no good at all
ayeshakanwal75
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Cryptocurrency Exchange Script like Binance.pptx
Cryptocurrency Exchange Script like Binance.pptxCryptocurrency Exchange Script like Binance.pptx
Cryptocurrency Exchange Script like Binance.pptx
riyageorge2024
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Full Cracked Resolume Arena Latest Version
Full Cracked Resolume Arena Latest VersionFull Cracked Resolume Arena Latest Version
Full Cracked Resolume Arena Latest Version
jonesmichealj2
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Top 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdfTop 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdf
AffinityCore
 
PRTG Network Monitor Crack Latest Version & Serial Key 2025 [100% Working]
PRTG Network Monitor Crack Latest Version & Serial Key 2025 [100% Working]PRTG Network Monitor Crack Latest Version & Serial Key 2025 [100% Working]
PRTG Network Monitor Crack Latest Version & Serial Key 2025 [100% Working]
saimabibi60507
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Innovative Approaches to Software Dev no good at all
Innovative Approaches to Software Dev no good at allInnovative Approaches to Software Dev no good at all
Innovative Approaches to Software Dev no good at all
ayeshakanwal75
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Cryptocurrency Exchange Script like Binance.pptx
Cryptocurrency Exchange Script like Binance.pptxCryptocurrency Exchange Script like Binance.pptx
Cryptocurrency Exchange Script like Binance.pptx
riyageorge2024
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Full Cracked Resolume Arena Latest Version
Full Cracked Resolume Arena Latest VersionFull Cracked Resolume Arena Latest Version
Full Cracked Resolume Arena Latest Version
jonesmichealj2
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Top 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdfTop 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdf
AffinityCore
 
PRTG Network Monitor Crack Latest Version & Serial Key 2025 [100% Working]
PRTG Network Monitor Crack Latest Version & Serial Key 2025 [100% Working]PRTG Network Monitor Crack Latest Version & Serial Key 2025 [100% Working]
PRTG Network Monitor Crack Latest Version & Serial Key 2025 [100% Working]
saimabibi60507
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 

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