{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

btrack - Backtracking All the algorithm design techniques...

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

View Full Document Right Arrow Icon
Data Structures &Algorithms II Backtracking box3 All the algorithm design techniques discussed so far rely on the problem to possess certain properties – Divide-and-Conquer rhombus4 The problem is decomposable into smaller ones rhombus4 Smaller problems can be solved independently rhombus4 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 Document Right Arrow Icon
Data Structures &Algorithms II – Greedy Method rhombus4 Optimality and feasibility criteria rhombus4 Criteria enable choices to be made rhombus4 E.g., put in a knapsack objects of the largest profit to weight ratio to maximize per unit volume profit – Dynamic Programming rhombus4 Principle of optimality rhombus4 Problem is decomposable (subproblems need not be independent) rhombus4 Optimal solutions can be reused
Background image of page 2
Data Structures &Algorithms II box3 Q: If a problem doesn’t have any of these special characteristics? box3 Example: playing chess – Divide-and-Conquer: rhombus4 Moves have to be provided step by step rhombus4 Moves are inter-related – Greedy method rhombus4 Locally good moves are not necessarily globally good – Dynamic Programming rhombus4 Large solution space rhombus4 Multiple optimal solutions rhombus4 Principle of optimality (?)
Background image of page 3

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

View Full Document Right Arrow Icon
Data Structures &Algorithms II box3 Generate-and-Test paradigm – Systematically generates possible solutions (mostly end up in a tree structure) rhombus4 Depth first (backtracking) rhombus4 Breadth first rhombus4 Best first (branch-and-bound) – Systematically eliminates implausible solutions as soon as identified rhombus4 Feasibility rhombus4 Optimality rhombus4 Bounding is important for large problem size
Background image of page 4
Data Structures &Algorithms II box3 Advantage – general principle (graph or tree traversal) – systematic enumeration & verification – 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 Document Right Arrow Icon
Data Structures &Algorithms II N Queens box3 Input: n queens and a chess board of size n by n box3 Output: a configuration where no two queens can attack each other
Background image of page 6
Data Structures &Algorithms II box3 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 Document Right Arrow Icon
Data Structures &Algorithms II box3 Generate phase : use explicit constraints to limit the size of the solution space ( , , , ) , !
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.

{[ snackBarMessage ]}