btrack

Btrack - Backtracking All the algorithm design techniques discussed so far rely on the problem to possess certain properties Divide-and-Conquer The

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Backtracking b All the algorithm design techniques discussed so far rely on the problem to possess certain properties – Divide-and-Conquer r The problem is decomposable into smaller ones r Smaller problems can be solved independently r Solution can be constructed by combining those of smaller problems r L R x=r x<r go left x<r go right
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
– Greedy Method r Optimality and feasibility criteria r Criteria enable choices to be made r E.g., put in a knapsack objects of the largest profit to weight ratio to maximize per unit volume profit – Dynamic Programming r Principle of optimality r Problem is decomposable (subproblems need not be independent) r Optimal solutions can be reused
Background image of page 2
b Q: If a problem doesn’t have any of these special characteristics? b Example: playing chess – Divide-and-Conquer: r Moves have to be provided step by step r Moves are inter-related – Greedy method r Locally good moves are not necessarily globally good – Dynamic Programming r Large solution space r Multiple optimal solutions r Principle of optimality (?)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
b Generate-and-Test paradigm – Systematically generates possible solutions (mostly end up in a tree structure) r Depth first (backtracking) r Breadth first r Best first (branch-and-bound) – Systematically eliminates implausible solutions as soon as identified r Feasibility r Optimality r Bounding is important for large problem size
Background image of page 4
b Advantage – general principle (graph or tree traversal) – handle LARGE problem instances
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
N Queens b Input: n queens and a chess board of size n by n b Output: a configuration where no two queens can attack each other
Background image of page 6
b Divide-and-Conquer: solutions are inter-dependent • Greedy: backtracking may be unavoidable • DP: principle of optimality?
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
b Generate phase : use explicit constraints to limit the size of the solution space ( , , , ) , ! x
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/06/2008 for the course CS 130B taught by Professor Suri during the Winter '08 term at UCSB.

Page1 / 33

Btrack - Backtracking All the algorithm design techniques discussed so far rely on the problem to possess certain properties Divide-and-Conquer The

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online