Professional Documents
Culture Documents
Lecture No 1
Introduction of Algorithms
(What, Why and Where)
Expected Results
On successful completion, students will be able to
• Argue and prove correctness of algorithms
• Derive and solve mathematical models of problems
• Reasoning when an algorithm calls certain approach
• Analyze average and worst-case running times
• Integrating approaches in dynamic and greedy algos.
• Use of graph theory in problems solving
• Advanced topics such as
• Computational geometry, number theory etc.
• Several other algorithms such as
• String matching, NP completeness, approximate algorithms etc.
What is Algorithm?
• A computer algorithm is a detailed step-by-step method for solving a problem by using a
computer.
• An algorithm is a sequence of unambiguous instructions for solving a problem in a finite
amount of time.
• An Algorithm is well defined computational procedure that takes some value, or set of
values, as input and produces some value, or set of values as output.
• More generally, an Algorithm is any well defined computational procedure that takes
collection of elements as input and produces a collection of elements as output.
Problem
• The statement of the problem specifies, in general terms, the desired input/output
relationship.
Algorithm
• The algorithm describes a specific computational procedure for achieving input/output
relationship.
Example
• One might need to sort a sequence of numbers into non-decreasing order.
Algorithms
• Various algorithms e.g. merge sort, quick sort, heap sorts etc.