DESIGN AND ANALYSIS OF
ALGORITHMS 5
[BACKTRACKING, GRAPH
COLORING, HAMILTONIAN
CYCLES]
Subhansu Bandyopadhyay, Professor, CSE, CU
6
Backtracking
SB
2/13/16
Backtracking
8
Backtracking is a general algorithmic
technique which must be customized for each
i

DESIGN AND ANALYSIS OF
ALGORITHMS 6B
[GREEDY ALGORITHMS]
Subhansu Bandyopadhyay, Professor CSE, CU
Greedy Algorithms
SB
2/13/16
Greedy
9
A greedy algorithm always makes the choice
that looks best at the moment without thinking
about the whole problem in g

SB
1
DESIGN AND ANALYSIS OF
ALGORITHMS 4
[DYNAMIC PROGRAMMING
CONCEPTS: OBST]
2/13/16
Subhansu Bandyopadhyay, Professor, CSE, CU
3
Optimal Binary Search Tree (OBST)
SB
2/13/16
Optimal Binary Search Tree
5
Given a sequence K = k1 < k2 < < kn of n sorted

SB
1
DESIGN AND ANALYSIS
OF ALGORITHMS 6A
[ GRAPH TRAVERSAL ]
2/13/16
Subhansu Bandyopadhyay, Professor, CSE, CU
6
Graph: Some Basic
Definitions
SB
2/13/16
Graph: Different Views
7
Graphs can be viewed in three ways (trees, too,
since they are special kin

DESIGN AND ANALYSIS OF
ALGORITHMS 4A
[DYNAMIC PROGRAMMING
CONCEPTS]
Subhansu Bandyopadhyay, Professor, CSE, CU
7
The General Dynamic Programming Technique
Those who cannot remember the past are
doomed to repeat it.
George Santayana, The Life of Reason, B

DESIGN AND ANALYSIS OF
ALGORITHMS 4B
[DYNAMIC PROGRAMMING
CONCEPTS -2]
Subhansu Bandyopadhyay,
Professor, CSE, CU
Shortest Path Problems
Ashortest path problemis the
problem of finding apathbetween
twovertices(or nodes) in
agraphsuch that the sum of
thewe

There are two Latin phrases,divide et impera
anddivide et regna. One means "divide and
conquer", the second, "divide and rule."
DESIGN AND ANALYSIS OF
ALGORITHMS 3
[DIVIDE AND CONQUER]
Subhansu Bandyopadhyay, Professor CSE, CU
DIVIDE & CONQUER
2
The phras

SB
1
DESIGN AND ANALYSIS OF
ALGORITHMS 2B
[RECURSION & RECURRENCES]
2/13/16
Subhansu Bandyopadhyay, Professor CSE, CU
7
More About Recursion
Systems have sub-systems and subsystems have sub-systems and so on ad
infinitum which is why were always
starting

SB
1
Recursion is the root of computation
since it trades description for time.
Alan J. Perlis
DESIGN AND ANALYSIS OF
ALGORITHMS 2A
[RECURSION & RECURRENCES]
2/13/16
Subhansu Bandyopadhyay, Professor CSE, CU
SB
To understand recursion,
you must understa

It is easier to write an incorrect
program than understand a correct
one.
Epigrams of Programming, Alan J.
Perlis.
DESIGN AND ANALYSIS OF
ALGORITHMS 1
[BASIC CONCEPTS AND
ASYMPTOTIC NOTATIONS]
Subhansu Bandyopadhyay, Professor CSE, CU
Points to Ponder
3