SlideShare a Scribd company logo
Course Title: Design and Analysis of
Algorithms
CHAPTER 1: INTRODUCTION
• Algorithms
• Analyzing Algorithms
• Designing Algorithms
Algorithms?
Why Algorithms is needed?
computational problems in general and of the
algorithms needed to solve them
What is Algorithms?
An algorithm is any well-defined
computational procedure
With What?
It takes some value, or set of values, as input
and produces some value, or set of values, as
output
Definition: Algorithms
• An algorithm is thus a sequence of
computational steps that transform the input
into the output. And also view an algorithm as
a tool for solving a well-specified
computational problem.
Example:
• Input: A sequence of n numbers a1, a2, . . . , an .
• Output: A permutation (reordering)
of the input sequence such that
Ex:
Given an input sequence such as 31, 41, 59, 26,
41, 58 , a sorting algorithm returns as output
the sequence 26, 31, 41, 41, 58, 59
Law of Algorithms
• An algorithm is said to be correct if, for every
input instance, it halts with the correct
output. We say that a correct algorithm solves
the given computational problem.
• An incorrect algorithm might not halt at all on
some input instances, or it might halt with
other than the desired answer.
Steps to design the Algorithm
1. Under stand the problem
2. Decide about the way to solve the problem
3. Design the algorithm
4. Prove the correctness
5. Analysis the algorithm
6. Code the algorithm
Analyzing the Algorithms
Why is it Important?
It has come to mean predicting the resources
that the algorithm requires.
Occasionally, resources such as memory,
communication bandwidth, or logic gates are
of primary concern,
but most often it is computational time that
we want to measure
Analysis of Algorithms
• Analysis of Algorithms is the area of computer science that
provides tools to analyze the efficiency of different methods of
solutions.
• How do we compare the time efficiency of two algorithms that
solve the same problem?
Naïve Approach: implement these algorithms in a programming
language (C++), and run them to compare their time
requirements. Comparing the programs (instead of algorithms)
has difficulties.
– How are the algorithms coded?
• Comparing running times means comparing the implementations.
• We should not compare implementations, because they are sensitive to programming
style that may cloud the issue of which algorithm is inherently more efficient.
– What computer should we use?
• We should compare the efficiency of the algorithms independently of a particular
computer.
– What data should the program use?
• Any analysis must be independent of specific data.
CENG 213 Data Structures 10
Analysis of Algorithms
• When we analyze algorithms, we should employ
mathematical techniques that analyze algorithms
independently of specific implementations,
computers, or data.
• To analyze algorithms:
– First, we start to count the number of significant
operations in a particular solution to assess its
efficiency.
– Then, we will express the efficiency of algorithms using
growth functions.
Before Analyzing
• What to do?
have a model of the implementation technology
that will be used
it means, resources of that technology and their
costs and running time
Example:
random-access machine (RAM)
Requirement for Analayze
• mathematical tools required like, discrete
combinatorics, elementary probability theory,
algebraic dexterity, most significant terms in a
formula. (behavior of the algorithm may
change different I/P)
• find a means of expression that is simple to
write and manipulate, shows the important
characteristics of an algorithm's resource
requirements, and suppresses tedious details.
13
General Rules for Estimation
• Loops: The running time of a loop is at most the
running time of the statements inside of that loop
times the number of iterations.
• Nested Loops: Running time of a nested loop
containing a statement in the inner most loop is the
running time of statement multiplied by the product
of the sized of all loops.
• Consecutive Statements: Just add the running times
of those consecutive statements.
• If/Else: Never more than the running time of the test
plus the larger of running times of S1 and S2.
Importance of Analyze Algorithm
• Need to recognize limitations of various algorithms
for solving a problem
• Need to understand relationship between problem
size and running time
– When is a running program not good enough?
• Need to learn how to analyze an algorithm's running
time without coding it
• Need to learn techniques for writing more efficient
code
• Need to recognize bottlenecks in code as well as
which parts of code are easiest to optimize
Measuring Complexity Again
• The worst case running time of an algorithm is the function
defined by the maximum number of steps taken on any
instance of size n.
• The best case running time of an algorithm is the function
defined by the minimum number of steps taken on any
instance of size n.
• The average-case running time of an algorithm is the function
defined by an average number of steps taken on any instance
of size n.
• Which of these is the best to use?
Order of Growth
• It is the rate of growth, or order of growth, of
the running time
• we write that insertion sort, for example, has
a worst-case running time of θ (n2)
Best, Worst, and Average Case
Basic Common Growth Rates
1 constant
log n logarithmic
n linear
n log n n-log-n
n2 quadratic
n3 cubic
2n exponential
n! factorial
Running times for small inputs
• many ways to design algorithms.
• Learn general approaches to algorithm design
– Divide and conquer
– Greedy method
– Dynamic Programming
– Basic Search and Traversal Technique
– Graph Theory
– Linear Programming
– Approximation Algorithm
– NP Problem
Designing algorithms
Designing algorithms
• Two approaches:
1. incremental approach
2. Divide and conquer approach
The divide-and-conquer approach
recursive in structure
→to solve a given problem, they call
themselves recursively one or more times to
deal with closely related sub problems.
Three steps at each level of the
recursion:
• Divide
• Conquer (recurcively)
• Combine
Analyzing divide-and-conquer
algorithms
• When an algorithm contains a recursive call to
itself, its running time can often be described
by a recurrence equation or recurrence, which
describes the overall running time on a
problem of size n in terms of the running time
on smaller inputs.
A recurrence for the running time of a divide-
and-conquer algorithm is based on the three
steps of the basic paradigm
• Examine methods of analyzing algorithm
correctness and efficiency
– Recursion equations
– Lower bound techniques
– O,Omega and Theta notations for best/worst/average case analysis
• Decide whether some problems have no
solution in reasonable time
– List all permutations of n objects (takes n! steps)
– Travelling salesman problem
• Investigate memory usage as a different
measure of efficiency

More Related Content

PPTX
Types of algorithms
Amelita Martinez
 
PPTX
Regular expressions
Ratnakar Mikkili
 
PPTX
daa-unit-3-greedy method
hodcsencet
 
PPTX
Dynamic programming - fundamentals review
ElifTech
 
PPTX
Analysis and Design of Algorithms
Bulbul Agrawal
 
PPTX
Graph coloring using backtracking
shashidharPapishetty
 
PPTX
Message passing ( in computer science)
Computer_ at_home
 
PDF
COMPILER DESIGN Run-Time Environments
Jyothishmathi Institute of Technology and Science Karimnagar
 
Types of algorithms
Amelita Martinez
 
Regular expressions
Ratnakar Mikkili
 
daa-unit-3-greedy method
hodcsencet
 
Dynamic programming - fundamentals review
ElifTech
 
Analysis and Design of Algorithms
Bulbul Agrawal
 
Graph coloring using backtracking
shashidharPapishetty
 
Message passing ( in computer science)
Computer_ at_home
 

What's hot (20)

PPTX
Introduction to Dynamic Programming, Principle of Optimality
Bhavin Darji
 
PPTX
Breadth First Search & Depth First Search
Kevin Jadiya
 
PPTX
Greedy algorithms
sandeep54552
 
PPTX
Hashing Technique In Data Structures
SHAKOOR AB
 
PDF
Algorithms Lecture 2: Analysis of Algorithms I
Mohamed Loey
 
PDF
Formal Languages and Automata Theory Unit 1
Srimatre K
 
PDF
Logic programming (1)
Nitesh Singh
 
PPTX
Data Structure and Algorithm - Divide and Conquer
Laguna State Polytechnic University
 
PDF
Network security - OSI Security Architecture
BharathiKrishna6
 
PPTX
Problem reduction AND OR GRAPH & AO* algorithm.ppt
arunsingh660
 
PPT
Dinive conquer algorithm
Mohd Arif
 
PPTX
Activity selection problem
QAU ISLAMABAD,PAKISTAN
 
PPTX
sum of subset problem using Backtracking
Abhishek Singh
 
PPTX
Strassen's matrix multiplication
Megha V
 
PPTX
Code generation
Aparna Nayak
 
PPTX
Symbolic Mathematics
saadurrehman35
 
PPTX
knowledge representation in artificial intelligence
PriyadharshiniG41
 
PPTX
Asymptotic Notation
Protap Mondal
 
PPTX
Means End Analysis (MEA) in Artificial.pptx
suchita74
 
DOC
Branch and bound
Nv Thejaswini
 
Introduction to Dynamic Programming, Principle of Optimality
Bhavin Darji
 
Breadth First Search & Depth First Search
Kevin Jadiya
 
Greedy algorithms
sandeep54552
 
Hashing Technique In Data Structures
SHAKOOR AB
 
Algorithms Lecture 2: Analysis of Algorithms I
Mohamed Loey
 
Formal Languages and Automata Theory Unit 1
Srimatre K
 
Logic programming (1)
Nitesh Singh
 
Data Structure and Algorithm - Divide and Conquer
Laguna State Polytechnic University
 
Network security - OSI Security Architecture
BharathiKrishna6
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
arunsingh660
 
Dinive conquer algorithm
Mohd Arif
 
Activity selection problem
QAU ISLAMABAD,PAKISTAN
 
sum of subset problem using Backtracking
Abhishek Singh
 
Strassen's matrix multiplication
Megha V
 
Code generation
Aparna Nayak
 
Symbolic Mathematics
saadurrehman35
 
knowledge representation in artificial intelligence
PriyadharshiniG41
 
Asymptotic Notation
Protap Mondal
 
Means End Analysis (MEA) in Artificial.pptx
suchita74
 
Branch and bound
Nv Thejaswini
 
Ad

Similar to Chapter1.1 Introduction to design and analysis of algorithm.ppt (20)

PDF
introduction to analysis of algorithm in computer science
tissandavid
 
PDF
Introduction to analysis algorithm in computer Science
tissandavid
 
PPTX
Design and Analysis of Algorithms.pptx
Syed Zaid Irshad
 
PPTX
Binary to hexadecimal algorithmic old.pptx
bulbul931579
 
PPT
Lec1.ppt
ssuser8bddb2
 
PDF
Introduction to Algorithms Complexity Analysis
Dr. Pankaj Agarwal
 
PPTX
2. Introduction to Algorithm.pptx
RahikAhmed1
 
PPTX
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
PPTX
Unit 1, ADA.pptx
jinkhatima
 
PDF
Algorithm Analysis.pdf
NayanChandak1
 
PPTX
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
AntareepMajumder
 
PPTX
CH-1.1 Introduction (1).pptx
satvikkushwaha1
 
PPTX
ANALYSIS AND DESIGN OF ALGORITHMS -M1-PPT
AIET
 
PDF
Slides [DAA] Unit 2 Ch 2.pdf
Vijayraj799513
 
PPTX
Data Structures - Lecture 1 [introduction]
Muhammad Hammad Waseem
 
PPTX
DAA 1 ppt.pptx
RAJESH S
 
PPTX
DAA ppt.pptx
RAJESH S
 
PPTX
Design and Analysis of Algorithm for II year Computer science and Engineering...
Kalpana Devi M
 
PPTX
Design and Analysis of Algorithm ppt for unit one
ssuserb7c8b8
 
PPTX
Algorithm in data structure bca .pptx
SukhBanger
 
introduction to analysis of algorithm in computer science
tissandavid
 
Introduction to analysis algorithm in computer Science
tissandavid
 
Design and Analysis of Algorithms.pptx
Syed Zaid Irshad
 
Binary to hexadecimal algorithmic old.pptx
bulbul931579
 
Lec1.ppt
ssuser8bddb2
 
Introduction to Algorithms Complexity Analysis
Dr. Pankaj Agarwal
 
2. Introduction to Algorithm.pptx
RahikAhmed1
 
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Unit 1, ADA.pptx
jinkhatima
 
Algorithm Analysis.pdf
NayanChandak1
 
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
AntareepMajumder
 
CH-1.1 Introduction (1).pptx
satvikkushwaha1
 
ANALYSIS AND DESIGN OF ALGORITHMS -M1-PPT
AIET
 
Slides [DAA] Unit 2 Ch 2.pdf
Vijayraj799513
 
Data Structures - Lecture 1 [introduction]
Muhammad Hammad Waseem
 
DAA 1 ppt.pptx
RAJESH S
 
DAA ppt.pptx
RAJESH S
 
Design and Analysis of Algorithm for II year Computer science and Engineering...
Kalpana Devi M
 
Design and Analysis of Algorithm ppt for unit one
ssuserb7c8b8
 
Algorithm in data structure bca .pptx
SukhBanger
 
Ad

More from Tekle12 (20)

PPTX
MAD-4 (2).pptx mobile application development
Tekle12
 
PPTX
MAD-3 (2).pptx mobile application development
Tekle12
 
PPTX
MAD-2.pptx mobile application development
Tekle12
 
PPTX
MAD-1.pptx mobile application development
Tekle12
 
PPTX
MAD-4 (2).pptx mobile application development
Tekle12
 
PPTX
MAD-3 (2).pptx mobile application development
Tekle12
 
PPTX
MAD-2.pptx mobile application development
Tekle12
 
PPTX
Chapter 3 - EMTE.pptx artificial intelligence
Tekle12
 
PPTX
Chapter 2.pptx emerging technology data science
Tekle12
 
PPTX
Chapter 4 - EMTE.pptx internet of things
Tekle12
 
PPTX
This is Emerging Technology Power point shared here
Tekle12
 
PPTX
ch1introduction about android development.pptx
Tekle12
 
PPTX
Chapter 3 Naming in distributed system.pptx
Tekle12
 
PPTX
Chapter Introductionn to distributed system .pptx
Tekle12
 
PPTX
Chapter 6emerging technology - EMTE.pptx
Tekle12
 
PPTX
Chapter 4about internet of things IoT.pptx
Tekle12
 
PPTX
Design and analysis of algorithm chapter two.pptx
Tekle12
 
PPT
Chapter 6 WSN.ppt
Tekle12
 
PPTX
Chapter 2.1.pptx
Tekle12
 
PPT
CHAPTER-3a.ppt
Tekle12
 
MAD-4 (2).pptx mobile application development
Tekle12
 
MAD-3 (2).pptx mobile application development
Tekle12
 
MAD-2.pptx mobile application development
Tekle12
 
MAD-1.pptx mobile application development
Tekle12
 
MAD-4 (2).pptx mobile application development
Tekle12
 
MAD-3 (2).pptx mobile application development
Tekle12
 
MAD-2.pptx mobile application development
Tekle12
 
Chapter 3 - EMTE.pptx artificial intelligence
Tekle12
 
Chapter 2.pptx emerging technology data science
Tekle12
 
Chapter 4 - EMTE.pptx internet of things
Tekle12
 
This is Emerging Technology Power point shared here
Tekle12
 
ch1introduction about android development.pptx
Tekle12
 
Chapter 3 Naming in distributed system.pptx
Tekle12
 
Chapter Introductionn to distributed system .pptx
Tekle12
 
Chapter 6emerging technology - EMTE.pptx
Tekle12
 
Chapter 4about internet of things IoT.pptx
Tekle12
 
Design and analysis of algorithm chapter two.pptx
Tekle12
 
Chapter 6 WSN.ppt
Tekle12
 
Chapter 2.1.pptx
Tekle12
 
CHAPTER-3a.ppt
Tekle12
 

Recently uploaded (20)

PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Architecture of the Future (09152021)
EdwardMeyman
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
This slide provides an overview Technology
mineshkharadi333
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Beyond Automation: The Role of IoT Sensor Integration in Next-Gen Industries
Rejig Digital
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Architecture of the Future (09152021)
EdwardMeyman
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
This slide provides an overview Technology
mineshkharadi333
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Beyond Automation: The Role of IoT Sensor Integration in Next-Gen Industries
Rejig Digital
 

Chapter1.1 Introduction to design and analysis of algorithm.ppt

  • 1. Course Title: Design and Analysis of Algorithms
  • 2. CHAPTER 1: INTRODUCTION • Algorithms • Analyzing Algorithms • Designing Algorithms
  • 3. Algorithms? Why Algorithms is needed? computational problems in general and of the algorithms needed to solve them What is Algorithms? An algorithm is any well-defined computational procedure With What? It takes some value, or set of values, as input and produces some value, or set of values, as output
  • 4. Definition: Algorithms • An algorithm is thus a sequence of computational steps that transform the input into the output. And also view an algorithm as a tool for solving a well-specified computational problem.
  • 5. Example: • Input: A sequence of n numbers a1, a2, . . . , an . • Output: A permutation (reordering) of the input sequence such that Ex: Given an input sequence such as 31, 41, 59, 26, 41, 58 , a sorting algorithm returns as output the sequence 26, 31, 41, 41, 58, 59
  • 6. Law of Algorithms • An algorithm is said to be correct if, for every input instance, it halts with the correct output. We say that a correct algorithm solves the given computational problem. • An incorrect algorithm might not halt at all on some input instances, or it might halt with other than the desired answer.
  • 7. Steps to design the Algorithm 1. Under stand the problem 2. Decide about the way to solve the problem 3. Design the algorithm 4. Prove the correctness 5. Analysis the algorithm 6. Code the algorithm
  • 8. Analyzing the Algorithms Why is it Important? It has come to mean predicting the resources that the algorithm requires. Occasionally, resources such as memory, communication bandwidth, or logic gates are of primary concern, but most often it is computational time that we want to measure
  • 9. Analysis of Algorithms • Analysis of Algorithms is the area of computer science that provides tools to analyze the efficiency of different methods of solutions. • How do we compare the time efficiency of two algorithms that solve the same problem? Naïve Approach: implement these algorithms in a programming language (C++), and run them to compare their time requirements. Comparing the programs (instead of algorithms) has difficulties. – How are the algorithms coded? • Comparing running times means comparing the implementations. • We should not compare implementations, because they are sensitive to programming style that may cloud the issue of which algorithm is inherently more efficient. – What computer should we use? • We should compare the efficiency of the algorithms independently of a particular computer. – What data should the program use? • Any analysis must be independent of specific data.
  • 10. CENG 213 Data Structures 10 Analysis of Algorithms • When we analyze algorithms, we should employ mathematical techniques that analyze algorithms independently of specific implementations, computers, or data. • To analyze algorithms: – First, we start to count the number of significant operations in a particular solution to assess its efficiency. – Then, we will express the efficiency of algorithms using growth functions.
  • 11. Before Analyzing • What to do? have a model of the implementation technology that will be used it means, resources of that technology and their costs and running time Example: random-access machine (RAM)
  • 12. Requirement for Analayze • mathematical tools required like, discrete combinatorics, elementary probability theory, algebraic dexterity, most significant terms in a formula. (behavior of the algorithm may change different I/P) • find a means of expression that is simple to write and manipulate, shows the important characteristics of an algorithm's resource requirements, and suppresses tedious details.
  • 13. 13 General Rules for Estimation • Loops: The running time of a loop is at most the running time of the statements inside of that loop times the number of iterations. • Nested Loops: Running time of a nested loop containing a statement in the inner most loop is the running time of statement multiplied by the product of the sized of all loops. • Consecutive Statements: Just add the running times of those consecutive statements. • If/Else: Never more than the running time of the test plus the larger of running times of S1 and S2.
  • 14. Importance of Analyze Algorithm • Need to recognize limitations of various algorithms for solving a problem • Need to understand relationship between problem size and running time – When is a running program not good enough? • Need to learn how to analyze an algorithm's running time without coding it • Need to learn techniques for writing more efficient code • Need to recognize bottlenecks in code as well as which parts of code are easiest to optimize
  • 15. Measuring Complexity Again • The worst case running time of an algorithm is the function defined by the maximum number of steps taken on any instance of size n. • The best case running time of an algorithm is the function defined by the minimum number of steps taken on any instance of size n. • The average-case running time of an algorithm is the function defined by an average number of steps taken on any instance of size n. • Which of these is the best to use?
  • 16. Order of Growth • It is the rate of growth, or order of growth, of the running time • we write that insertion sort, for example, has a worst-case running time of θ (n2)
  • 17. Best, Worst, and Average Case
  • 18. Basic Common Growth Rates 1 constant log n logarithmic n linear n log n n-log-n n2 quadratic n3 cubic 2n exponential n! factorial
  • 19. Running times for small inputs
  • 20. • many ways to design algorithms. • Learn general approaches to algorithm design – Divide and conquer – Greedy method – Dynamic Programming – Basic Search and Traversal Technique – Graph Theory – Linear Programming – Approximation Algorithm – NP Problem Designing algorithms
  • 21. Designing algorithms • Two approaches: 1. incremental approach 2. Divide and conquer approach The divide-and-conquer approach recursive in structure →to solve a given problem, they call themselves recursively one or more times to deal with closely related sub problems.
  • 22. Three steps at each level of the recursion: • Divide • Conquer (recurcively) • Combine
  • 23. Analyzing divide-and-conquer algorithms • When an algorithm contains a recursive call to itself, its running time can often be described by a recurrence equation or recurrence, which describes the overall running time on a problem of size n in terms of the running time on smaller inputs.
  • 24. A recurrence for the running time of a divide- and-conquer algorithm is based on the three steps of the basic paradigm
  • 25. • Examine methods of analyzing algorithm correctness and efficiency – Recursion equations – Lower bound techniques – O,Omega and Theta notations for best/worst/average case analysis • Decide whether some problems have no solution in reasonable time – List all permutations of n objects (takes n! steps) – Travelling salesman problem • Investigate memory usage as a different measure of efficiency