You are on page 1of 11

INTRODUCTION TO ALOGORITHM

DESIGN STRATEGIES

SUBJECT: DESIGN & ANALYSIS OF ALGORITHM, CSE-5TH


SEM

Prepared By.
Prof. Saquib Ahmed
Anjuman College of Engineering & Technology
Department of Computer Science & Engineering
SYLLABUS
UNIT-I Mathematical foundations, summation of arithmetic and geometric series, n, n2 ,
bounding summations using integration, Recursion and Induction: recurrence relations, solutions
of recurrence relations using techniques of characteristic equation, generating functions, master
method and substitution method.Complexity calculation of various standard functions, principles
of designing algorithms.
UNIT-II Asymptotic notations of analysis of algorithms, analyzing control structures, worst case
and average case analysis, amortized analysis, application of amortized analysis, Sorting
networks, comparison networks, bio-tonic sorting network, advanced data structures like
Fibonacci heap, disjoint set representation UNIT-III Divide and conquer basic strategy, binary
search, quick sort, merge sort, matrix operations, Multiplication Algorithm Greedy method –
basic strategy, Knapsack Problem, application to job sequencing with deadlines problem,
minimum cost spanning trees, single source shortest path, Optimal Search Patterns.
UNIT-IV Dynamic Programming basic strategy, multistage graphs, all pairs shortest path, single
source shortest paths, optimal binary search trees, traveling salesman problem, Longest Common
Subsequence problem, 0/1 Knapsack Problem, Chained Matrix Multiplication
UNIT-V Basic Traversal and Search Techniques, breadth first search and depth first search,
connected components. Backtracking basic strategy, 8-Queen’s problem, graph coloring,
Hamiltonian cycles etc, Introduction to Approximation algorithm. UNIT-VI NP-hard and NP-
complete problems, basic concepts, non-deterministic algorithms, NP-hard and NP-complete,
decision and optimization problems, graph based problems on NP Principle
COUURSE OUTCOMES
SNO DESCRIPTION BLOOM’S
TAXONOMY
LEVEL
CO.1 Examine the correctness of algorithms using inductive
4
proofs and design the solutions to recursive relations.
CO.2 Explain Asymptotic Analysis and elaborate the methods of
2,5,6
Amortized Analysis.
CO.3 Explain different algorithm design techniques like Divide
and Conquer & Greedy strategy and make use of algorithms 2,5,3
that employ this paradigm.
CO.4 Determine the Dynamic Programming paradigm and solve
5,6
Dynamic Programming algorithms and simplify them.
CO.5 Design and illustrate the different traversal techniques and
2,3,6
build different graph computations.
CO.6 Explain Polynomial and Non polynomial time complexities
and elaborate the deterministic and non deterministic 2,5,6
algorithms.
CONTENTS

Strategies to Algorithm Design:


 Greedy Method

 Divide and Conquer Method

 Dynamic Programming Method


GREEDY
ALGORITHMS

Greedy algorithms are short sighted algorithms

Decision is based upon incomplete information.

The decision are made without bothering about its effect


on later part of generated information.

Greedy algorithms are most efficient algorithms if


executed.

Examples of Greedy Algorithms are Knapsack, Minimum


Cost Spanning Trees, Single Source Shortest Path (SSSP)
algorithms.
GREEDY ALGORITHMS ARE MOST EFFICIENT
ALGORITHMS IF EXECUTED.. JUSTIFY

B
5 10

Source Destination
A D

10
2
C

Figure 1: Greedy Algorithm Decision


JUSTIFICATION

As seen in figure 1, since the information generated is not


stored as well as no time is consumed in making the decision.

Therefore execution speed of algorithm will be much higher.

Due to this efficiency increases, hence statement is true.


DIVIDE AND CONQUER ALGORITHMS
In this method, the given problem is divided into sub-problems till the sub-
problem is easily solvable

The decision is continued until the sub-problems are solvable.

Each sub-problem is solved using the same principle

For every sub-problem there will be a single solution

Hence, in Divide and Conquer (DAC) the size of the input is reduced so as to
reduce the size of a problem.

p1 p2

P
p3 p4
DYNAMIC PROGRAMMING ALGORITHMS
Dynamic Programming operates on principle of Optimality

Shortest Path
A B
Optimal Path

Assume that the path between A & B is optimal. In this Path, there is another
path X-Y.

A X Y B

Optimal Path

Since the path between A-B is optimal, therefore path X-Y is also optimal.
DYNAMIC PROGRAMMING ALGORITHMS

In Dynamic Programming strategy, the decision making is


delayed till all the information is available.

This will require larger storage as well as the complexity of


decision making process will increase.
THANK YOU

You might also like