Design and analysis of algorithm course. It contain a thorough introduction of computational algorithms with respect to time and space complexity. In these slides an introduction to to the course is stated. what are the major fields in this subject also discussed and a history is also added. Algorithm design refers to a method or process of solving a problem. It is the design of algorithms that is part of many solution theories. In short, your design is what you use to solve the problem. Algorithms get you to the solution you desire. Your design techniques are the algorithms you use.This core course covers good principles of algorithm design, elementary analysis of algorithms, and fundamental data structures. The emphasis is on choosing appropriate data structures and designing correct and efficient algorithms to operate on these data structures. This is a first course in data structures and algorithm design.
2. Why we need to study this subject?
This course introduces the design and analysis of algorithms.
Perhaps it is meaningful to discuss a very important question first: Why should we
study algorithms?
It is commonly believed that in order to obtain high speed computation, it suffices
to have a very high speed computer.
This, however, is not entirely true. We illustrate this with an experiment whose
results make it clear that a good algorithm implemented on a slow computer may
perform much better than a bad algorithm implemented on a fast computer.
3. Design and analysis of algorithm
Problem
Data structure
Algorithm
Program
Computer
+
Input Output
4. What is algorithm
The word algorithm comes from name of Persian author “Abu Jaffar Mohammad” in
825AD.
Def
An algorithm is a sequence of computational steps that transform the input into
the output.
Another def.
Finite set of steps to solve a problem.
5. What is analysis
Analysis is process of comparing two algorithms w.r.t time and space.
Analysis can be of two types
1:Prior
Analysis before execution
Independent of hardware just focus on iterations
Give approx. value
2:Posterior
Analysis after execution
Always depend on hardware
Give exact value
6. Fundamentals for algorithm
Input (zero input or more input)
Output (at least one)
Definiteness ( no confusion for computer, unambigious)
Finiteness (always terminate)
Effectiveness
8. Fields in this course
How to device algorithm?
How to validate?
How to analyse ?
How to test?
9. Difference between algorithm, pseudo
code and program
Algorithm
A step by step method to
solve a problem .
Its written in natural
language.
For example a recipe for
preparing a dish.
Program
It is exact code in
any particular
programming
language.
Pseudo code
It is simple version of
programing code that does
not require any strict
programming language
syntax.