CSCE350 Algorithms and Data Structure Lecture 21 Jianjun Hu Department of Computer Science and Engineering University of South Carolina 2009.12.

Slides:



Advertisements
Similar presentations
Traveling Salesperson Problem
Advertisements

Types of Algorithms.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
5-1 Chapter 5 Tree Searching Strategies. 5-2 Satisfiability problem Tree representation of 8 assignments. If there are n variables x 1, x 2, …,x n, then.
Branch & Bound Algorithms
Eight queens puzzle. The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard such that none of them are able to capture.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Artificial Intelligence Lecture
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Lecture 8 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
6 - 1 § 6 The Searching Strategies e.g. satisfiability problem x1x1 x2x2 x3x3 FFF FFT FTF FTT TFF TFT TTF TTT.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
Dealing with NP-Complete Problems
1 Tree Searching Strategies. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems becomes a tree.
MAE 552 – Heuristic Optimization Lecture 26 April 1, 2002 Topic:Branch and Bound.
1 Branch and Bound Searching Strategies 2 Branch-and-bound strategy 2 mechanisms: A mechanism to generate branches A mechanism to generate a bound so.
Ch 13 – Backtracking + Branch-and-Bound
1 Tree Searching Strategies. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems becomes a tree.
Backtracking Reading Material: Chapter 13, Sections 1, 2, 4, and 5.
Games & Adversarial Search Chapter 6 Section 1 – 4.
5-1 Chapter 5 Tree Searching Strategies. 5-2 Breadth-first search (BFS) 8-puzzle problem The breadth-first search uses a queue to hold all expanded nodes.
Jin Zheng, Central South University1 Branch-and-bound.
Chapter 12 Coping with the Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Backtracking.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
Busby, Dodge, Fleming, and Negrusa. Backtracking Algorithm Is used to solve problems for which a sequence of objects is to be selected from a set such.
Distributed Constraint Optimization Michal Jakob Agent Technology Center, Dept. of Computer Science and Engineering, FEE, Czech Technical University A4M33MAS.
CSCE350 Algorithms and Data Structure
Chapter 12 Coping with the Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Backtracking. N-Queens The object is to place queens on a chess board in such a way as no queen can capture another one in a single move –Recall that.
Design and Analysis of Algorithms - Chapter 111 How to tackle those difficult problems... There are two principal approaches to tackling NP-hard problems.
Chapter 12 Coping with the Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
BackTracking CS335. N-Queens The object is to place queens on a chess board in such as way as no queen can capture another one in a single move –Recall.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
1 Tackling Difficult Combinatorial Problems There are two principal approaches to tackling difficult combinatorial problems (NP-hard problems): b Use a.
Applications of Dynamic Programming and Heuristics to the Traveling Salesman Problem ERIC SALMON & JOSEPH SEWELL.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Divide and Conquer Optimization problem: z = max{cx : x  S}
Types of Algorithms. 2 Algorithm classification Algorithms that use a similar problem-solving approach can be grouped together We’ll talk about a classification.
Optimization Problems
Lecture 7 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
Analysis & Design of Algorithms (CSCE 321)
Chapter 13 Backtracking Introduction The 3-coloring problem
ICS 353: Design and Analysis of Algorithms Backtracking King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Branch and Bound Searching Strategies
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
Optimization Problems
Traveling Salesperson Problem
BackTracking CS255.
Signal processing and Networking for Big Data Applications: Lecture 9 Mix Integer Programming: Benders decomposition And Branch & Bound NOTE: To change.
Backtracking And Branch And Bound
Artificial Intelligence Problem solving by searching CSC 361
Analysis and design of algorithm
Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable.
Back Tracking.
Optimization Problems
Branch and Bound.
Analysis & Design of Algorithms (CSCE 321)
Applied Combinatorics, 4th Ed. Alan Tucker
Chapter 12 Coping with the Limitations of Algorithm Power
Branch and Bound Searching Strategies
Backtracking and Branch-and-Bound
Unit –VII Coping with limitations of algorithm power.
Major Design Strategies
Major Design Strategies
Lecture 4: Tree Search Strategies
Presentation transcript:

CSCE350 Algorithms and Data Structure Lecture 21 Jianjun Hu Department of Computer Science and Engineering University of South Carolina

Chapter 11: How to tackle NP-hard problems... There are two principal approaches to tackling NP-hard problems or other “intractable” problems: Use a strategy that guarantees solving the problem exactly but doesn’t guarantee to find a solution in polynomial time Use an approximation algorithm that can find an approximate (sub-optimal) solution in polynomial time E.g.Genetic Algorithm----for large optimization problem Newton gradient descent method

Exact solutions The exact solution approach includes the strategies: 1 exhaustive search (brute force) useful only for small instances 2 backtracking eliminates some cases from consideration 3 branch-and-bound further cuts down on the search fast solutions for most instances worst case is still exponential

Backtracking Construct the state space tree: nodes: partial solutions edges: choices in completing solutions Explore the state space tree using depth-first search (DFS) “Prune” non-promising nodes DFS stops exploring subtree rooted at nodes leading to no solutions and... “backtracks” to its parent node

Example: The n-Queen problem Place n queens on an n by n chess board so that no two of them are on the same row, column, or diagonal

State-space of the four-queens problem

Example: Hamiltonian Circuit Problem

Subset-Sum Problem Find a subset of a given set S={s 1,s 2,…,s n } of n positive integers whose sum is equal to a given positive integer d For example: S={3,5,6,7} and d=15  solutions {3,5,7}

Branch and Bound An enhancement of backtracking. Applicable to optimization problems Uses a lower bound for the value of the objective function for each node (partial solution) so as to: guide the search through state-space rule out certain branches as “unpromising” large subsets of fruitless candidates are discarded en masse, by using upper and lower estimated bounds of the quantity being optimized. The key idea of the BB algorithm is: if the lower bound for some tree node (set of candidates) A is greater than the upper bound for some other node B, then A may be safely discarded from the search. This step is called pruning, and is usually implemented by maintaining a global variable m (shared among all nodes of the tree) that records the minimum upper bound seen among all subregions examined so far. Any node whose lower bound is greater than m can be discarded.

Select one element in each row of the cost matrix C so that: no two selected elements are in the same column; and the sum is minimized For example: Job 1Job 2Job 3Job 4 Person a Person b Person c Person d Lower bound: Any solution to this problem will have total cost of at least: Example: The assignment problem

Assignment problem: lower bounds

State-space levels 0, 1, 2

Complete state-space

Traveling salesman example:

Approximation algorithm approximation algorithms are algorithms used to find approximate solutions to optimization problems Approximation algorithms are often associated with NP- hardproblems Unlike heuristics, which usually only find reasonably good solutions reasonably fast, Approximation algorithm wants provable solution quality and provable run time bounds. Ideally, the approximation is optimal up to a small constant factor (for instance within 5% of the optimal solution)