topics for this week
play

Topics for this week Backtracking: - a brute-force technique that - PowerPoint PPT Presentation

[Week 3] Topics for this week Backtracking: - a brute-force technique that finds a solution by trying all possibilities - related data structures - pruning to eliminate certain possibilities from the search - time complexity: usually really


  1. [Week 3] Topics for this week Backtracking: - a brute-force technique that finds a solution by trying all possibilities - related data structures - pruning to eliminate certain possibilities from the search - time complexity: usually really bad (exponential)

  2. Problem: Map Coloring How to color a map so that no two neighboring states have the same color ? Want: the smallest number of colors (to minimize costs)

  3. Problem: Map Coloring Idea (brute-force):

  4. Backtracking Brute-force via backtracking:

  5. Backtracking Brute-force via backtracking with pruning:

  6. Backtracking Testing: Time complexity:

Recommend


More recommend