0% found this document useful (0 votes)
70 views

Analysis of Algorithms: Dr. Muhammad Habib

This document provides an overview of the course "Analysis of Algorithms" (CSC-333) taught by Dr. Muhammad Habib. The course analyzes the performance and resource usage of computer programs through studying algorithms. It discusses what algorithms are, how they are specified, why they are important to study, and how algorithms relate to programs and technologies. The goal of analyzing algorithms is to determine the best algorithm to solve a given problem by considering factors like time and space complexity.

Uploaded by

sufyanmuzaffar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views

Analysis of Algorithms: Dr. Muhammad Habib

This document provides an overview of the course "Analysis of Algorithms" (CSC-333) taught by Dr. Muhammad Habib. The course analyzes the performance and resource usage of computer programs through studying algorithms. It discusses what algorithms are, how they are specified, why they are important to study, and how algorithms relate to programs and technologies. The goal of analyzing algorithms is to determine the best algorithm to solve a given problem by considering factors like time and space complexity.

Uploaded by

sufyanmuzaffar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Analysis of Algorithms

(CSC-333)

Instructor:
Dr. Muhammad Habib

Faculty of Engineering and Information Technology,


Department of Software Engineering,
Foundation University Islamabad
Foundations
1. The Role of Algorithms in Computing
Algorithms
• Informally, an algorithm is any well defined
computational procedure that takes some
value, or set of values, as input and
produces some value, or set of values, as
output.
• A sequence of computational steps that
transform the input into the output.
• A Tool for solving a well-specified
computational problem.
Algorithms

What kind of problems are solved by


algorithms?

– Sorting is by no means the only computational


problem for which algorithms have been
developed.
Algorithms

Which algorithm is best for a given


application?
– Depends upon other factors;
• No. of items to be sorted.
• The extent to which the items are already sorted.
• Possible restriction on the item values,
• and kinds of storage device to be used, i.e., main
memory, disks, or tapes.
Algorithms

Which algorithm is said to be correct?


– An algorithm is said to be correct, if for every
input instance, it halts with the correct output.

– Correct algorithm solves the given


computational problem.
Algorithms

Which algorithm is said to be incorrect?


– An incorrect algorithm might not halt at all on
some input instances, or it might halt with an
answer other than the desired one.

– Incorrect algorithms can sometimes be useful,


if their error rate can be controlled.
Algorithms

How an algorithm can be specified?


– An algorithm can be specified in English, as a
computer program, or even a hardware design.

– The only requirement is that the specification


must provide precise description of the
computational procedure to be followed.
Analysis of Algorithms
• Analysis
– Process of breaking down a complex topic into
smaller parts
– In order to gain a better understanding of it

Analysis of algorithms is the


theoretical study of
performance and resource usage of
the computer programs
Analysis of Algorithms
• What is more important than performance?
– Correctness
– Simplicity
– Scalability
– Modularity
– Reliability
– Maintainability
– User-friendliness
Why Study Algorithms?
• Algorithms
– Important for all other branches of computer science
• Routing, Cryptography, Graphics, Databases,
Bioinformatics, etc.
– Plays a key role in modern technological innovation
– Help us to understand scalability
– Language for talking about program behavior
• Performance
– Performance is the currency of computing
• Feasible vs. Impossible
– Speed is fun
• A real blend of precision and creativity
Why Study Algorithms?
• Different algorithms can be designed to solve
same problem
• Performance analysis of algorithm helps to
determine:
– Time required to produce the output Best?
– Space required to execute Algorithm
1
– Choose the best algorithm to solve the problem

Algorithm
Problem
2

Algorithm
3
Algorithms as a Technology?
• Suppose computers are ideally fast and
memory free
– Still need to study, design, learn, and use
algorithms?
• Yes, it is still desirable that the solution method
terminates and
• Produces the correct output
– Bounding resources for computing are:
• Computing time
• Space in memory
Algorithms as a Technology?
• Rapid advancement in technologies such as:
– Computer architectures and Graphical User Interfaces
– Integrated Web technologies and Wireless networking
• Applications rely heavily on algorithms
– Does the application rely on hardware?
• Hardware design use algorithms
– Does the application rely on GUI?
• GUI design relies on algorithms
– Does the application rely on networking?
• Routing in networks relies heavily on algorithms
Algorithm Vs Program
• Algorithm
• Defines specific steps required to solve a problem
• Program
• A computer program is the implementation of an
algorithm
Algorithm Program
Design Implementation
Domain Knowledge Programming Knowledge
Any language Programming language
Hardware/OS Independent Hardware/OS Dependent
Analysis Testing
Thank you

You might also like