Docsity

Algorithm Design analysis, Slides of Design and Analysis of Algorithms

Partial preview of the text

Download Algorithm Design analysis and more Slides Design and Analysis of Algorithms in PDF only on Docsity!

Algorithm Design and Analysis

Lecture 1

III B.TECH I- SEM Course code: C

COURSE OVERVIEW

  • Introduction to fundamental techniques for designing and

analyzing algorithms, including asymptotic analysis; divide-and-

conquer algorithms and disjoint set operations; graph

algorithms; backtracking algorithms; greedy algorithms;

dynamic programming; and branch and bound algorithms; NP-

Hard and NP-Complete problems.

COURSE OUTCOMES

  • Analyze algorithms and improve the efficiency of algorithm.
  • Apply different designing methods for development of

algorithms realistic problems, such as divide and conquer,

greedy and etc.

  • Understand how the choice of data structures and the algorithm

design methods and estimate the performance of algorithm.

UNIT – I

INTRODUCTION: Algorithm, Performance Analysis-Space complexity,

Time complexity, Asymptotic Notations- Big oh notation, Omega

notation, Theta notation and Little oh notation. Divide and conquer:

General method, applications-Binary search, Quick sort, Merge sort,

Stassen's matrix multiplication.

UNIT – II

Disjoint Sets: Disjoint set operations, union and find algorithms

Backtracking: General method, applications, n-queen’s problem, sum of

subsets problem, graph coloring, Hamiltonian cycles.

SYLLABUS

UNIT - V

Branch and Bound: General method, applications -

Travelling sales person problem, 0/1 knapsack problem - LC

Branch and Bound solution, FIFO Branch and Bound solution.

NP-Hard and NP-Complete problems: Basic concepts, non

deterministic algorithms, NP - Hard and NP-Complete classes,

Cook’s theorem.

TEXT BOOKS

  1. Fundamentals of Computer Algorithms, Ellis Horowitz,

Satraj Sahni and Rajasekharan,

rd Edition University Press.

REFERENCES

  • Design and Analysis of Algorithms, Aho, Ullman and,

Pearson education.

  • Introduction to Algorithms, second edition, T.H. Coremen,

C.E Leiserson, R.L.Rivest and C. Stien, PHI Pvt.

Ltd./Pearson Education.

  • Algorithm Design; Foundations, Analysis and Internet

Examples, M.T. Goodrich and R. Tamassia, John Wiley

and sons.

ALGORITHM

An Algorithm is any well-defined computational

procedure that takes some value or set of values

as Input and produces a set of values or some

value as output.

Thus, algorithm is a sequence of computational

steps that transforms the input into the output.

Design and Analysis of Algorithms

Analysis: predict the cost of an algorithm in

terms of resources and performance

Design: design algorithms which minimize the

cost

Areas of study of Algorithm:

How to device or design an algorithm

How to validate an algorithm

How to analysis an algorithm

How to test a program

Algorithm Specification:

Algorithm can be described in three ways.

  1. Natural language like English:
  2. Graphic representation called flowchart:
  3. Pseudo-code Method:

Algorithm Specification:

 An algorithm is a set of steps of operations to solve a problem

performing calculation, data processing, and automated

reasoning tasks.

 An algorithm is an efficient method that can be expressed

within finite amount of Time and space.

 The important aspects of algorithm design include creating an

efficient algorithm to solve a problem in an efficient way using

minimum time and space.

 To solve a problem, different approaches can be followed.

Some of them can be efficient with respect to time

consumption, whereas other approaches may be memory

efficient.

Differences

Algorithm Program

  1. At design phase 1.At Implementation phase
    1. Natural language 2.written in any

programming language

  1. Person should have 3.Programmer

Domain knowledge

  1. Analyze 4.Testing

Example of insertion sort

Example of insertion sort