Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable.

Slides:



Advertisements
Similar presentations
Algorithm Design Methods Spring 2007 CSE, POSTECH.
Advertisements

Traveling Salesperson Problem
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.
Approximation Algorithms for TSP
Branch & Bound Algorithms
Vehicle Routing & Scheduling: Part 1
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.
Network Optimization Problems: Models and Algorithms This handout: Minimum Spanning Tree Problem.
Math443/543 Mathematical Modeling and Optimization
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
E.G.M. PetrakisAlgorithms and Complexity1 The sphere of algorithmic problems.
Vehicle Routing & Scheduling
Ch 13 – Backtracking + Branch-and-Bound
Network Optimization Problems: Models and Algorithms
Solution methods for Discrete Optimization Problems.
Algorithms for Network Optimization Problems This handout: Minimum Spanning Tree Problem Approximation Algorithms Traveling Salesman Problem.
Chapter 12 Coping with the Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Branch & Bound UPPER =  LOWER = 0.
IT 60101: Lecture #201 Foundation of Computing Systems Lecture 20 Classic Optimization Problems.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Integer Programming Key characteristic of an Integer Program (IP) or Mixed Integer Linear Program (MILP): One or more of the decision variable must be.
MODELING AND ANALYSIS OF MANUFACTURING SYSTEMS Session 12 MACHINE SETUP AND OPERATION SEQUENCING E. Gutierrez-Miravete Spring 2001.
Exact methods for ALB ALB problem can be considered as a shortest path problem The complete graph need not be developed since one can stop as soon as in.
5-1-1 CSC401 – Analysis of Algorithms Chapter 5--1 The Greedy Method Objectives Introduce the Brute Force method and the Greedy Method Compare the solutions.
1 Short Term Scheduling. 2  Planning horizon is short  Multiple unique jobs (tasks) with varying processing times and due dates  Multiple unique jobs.
Honors Track: Competitive Programming & Problem Solving Optimization Problems Kevin Verbeek.
Thursday, May 9 Heuristic Search: methods for solving difficult optimization problems Handouts: Lecture Notes See the introduction to the paper.
The Colorful Traveling Salesman Problem Yupei Xiong, Goldman, Sachs & Co. Bruce Golden, University of Maryland Edward Wasil, American University Presented.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Chapter 3 Brute Force. A straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved Examples:
December 14, 2015 Design and Analysis of Computer Algorithm Pradondet Nilagupta Department of Computer Engineering.
Approximation Algorithms for TSP Tsvi Kopelowitz 1.
Algorithm Design Methods 황승원 Fall 2011 CSE, POSTECH.
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
1 Job Shop Scheduling. 2 Job shop environment: m machines, n jobs objective function Each job follows a predetermined route Routes are not necessarily.
1 Ch18. The Greedy Methods. 2 BIRD’S-EYE VIEW Enter the world of algorithm-design methods In the remainder of this book, we study the methods for the.
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
Solving IPs – Implicit Enumeration Similar to Binary IP Branch and Bound General Idea: Fixed variables – those for which a value has been fixed. Free Variable.
Brute Force A straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved Examples: Computing.
Brute Force II.
School of Computer Science & Engineering
Traveling Salesperson Problem
BackTracking CS255.
Lecture on Design and Analysis of Computer Algorithm
Greedy Technique.
Routing Through Networks - 1
Algorithm Design Methods
School of Computing Clemson University Fall, 2012
Network Flow Problems – Shortest Path Problem
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Week 11 - Monday CS221.
Approximation Algorithms for TSP
Chapter 2: Business Efficiency Business Efficiency
Exam 2 LZW not on syllabus. 73% / 75%.
Heuristic Algorithms via VBA
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Approximation Algorithms
3. Brute Force Selection sort Brute-Force string matching
Artificial Intelligence
Minimum Spanning Trees
3. Brute Force Selection sort Brute-Force string matching
Algorithm Design Methods
ICS 353: Design and Analysis of Algorithms
Algorithm Design Methods
Heuristic Algorithms via VBA
Heuristic Algorithms via VBA
Unit –VII Coping with limitations of algorithm power.
Approximation Algorithms
Algorithm Design Methods
3. Brute Force Selection sort Brute-Force string matching
Presentation transcript:

Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable solutions for a given problem, but are not guaranteed to do so. Note: These slides adapted from Y. Fathi, North Carolina State University, lecture notes IE589D.

Heuristics Common characteristics among heuristic procedures: Speed: A heuristic procedure usually has a relatively small computational requirement. Feasible solutions: A heuristic procedure usually finds a feasible solution for the given problem. Common sense: Many heuristic procedures are based on common sense, or an adaptation of an exact method for simpler problems. Search: A heuristic procedure may or may no involve a “search” in the set of feasible solutions. No guarantee of optimality: A heuristic does not guarantee the solution it obtains is optimal for the given problem.

Heuristics Why use a heuristic method to solve a discrete optimization problem (integer problem)?: The problem is difficult (e.g. known to be NP-Hard), and we must solve relatively “large” instances of the problem. Needed in the branch and bound and implicit enumeration approaches for solving IPs. The better the heuristic, the faster the B&B or implicit enumeration will solve. When you don’t necessarily need an optimal solution, but need a good solution fast.

Heuristics Greedy Algorithms – also called single pass heuristics, constructive methods, myopic algorithms. Incremental Feature – construct a sequence, or subset, one item at a time. No backtracking – once item has been sequenced, no re-sequencing occurs. Greedy selection – most profitable selection made from among available alternatives.

Heuristics Greedy Algorithm Example – Knapsack Problem Max s.t. Greedy Method Sort items by pj/ wj Load sack until an item won’t fit. Skip that item and go to the next item that fits. Continue step 3 till done

Heuristics Greedy Algorithm Example – Knapsack Problem Max s.t. Greedy Method - II Sort items by pj/ wj Load sack until an item won’t fit. Once an item does not fit, compare the value of the item that doesn’t fit to the value of all items loaded so far, if the item is more valuable, throw out the previous items and put this item into the knapsack. Continue step 3 till done

Heuristics Greedy Algorithm Example – PDS1 Sequencing Problem Sequence a series of jobs to minimize the maximum lateness (Lmax) for a set of jobs to be processed on a single machine. Each job belongs to a given part family. A setup time occurs when changing between part families. Greedy Method - II Sequence all jobs within a family by earliest due date. Then, sequence families by choosing family with earliest due date first. Greedy Method - I Sequence all jobs by earliest due date.

Heuristics Greedy Algorithm Ex. – Traveling Salesman Problem Given a collection of cities, find the shortest/cheapest way to visit all cities, starting from a “home city” and returning home upon completion of the tour. What can be done to strengthen this greedy algorithm? Greedy Method – I Closest Unvisited City Algorithm, or Nearest Neighbor Algorithm Starting with any city, go to the nearest neighbor that has not been visited. Continue step 1 until all cities have been visited. Return to initial city to complete tour.

Example Closest Unvisited City Algorithm for TSP Heuristics Example Closest Unvisited City Algorithm for TSP City TO 1 2 3 4 5 6 FROM - 9 24 7 14 11 20 13 18 15

Heuristics Greedy Algorithm TSP – based on Minimum Spanning Tree Find the minimum spanning tree (MSP). Double up each edge of the MSP, this guarantees each node has an even number of edge. Known as a Euler path. Trace the Eulerean path. Skip each city already visited on the Eulerean path.

Minimal Spanning Tree Objective: Find the minimum distance such that all nodes are visited once (i.e. no cycles). 9 2 6 3 6 2 7 1 3 3 3 1 4 3   4 5

Minimal Spanning Tree One possible spanning tree, Z = 26 (note, no cycles). 9 2 6 3 7 1 3 4 3   4 5

Minimal Spanning Tree Algorithm: Step 1 – Select an arbitrary node initially. Identify a node that is closest and include the arc connecting these two nodes in the spanning tree. Step 2 – Out of the remaining nodes, determine the one that is closest to a node already selected in the spanning tree. Include the arc connecting these two nodes in the spanning tree. Whenever there is a tie for the closest node, it is broken arbitrarily.

Minimal Spanning Tree Start with node 1. Node 2 is closest. 9 2 6 3 6 7 1 3 3 3 1 4 3   4 5

Minimal Spanning Tree Node 3 is closest to partial spanning tree {(1,2)}. Remove any cycles. 9 2 6 3 6 2 1 3 3 3 1 4 3   4 5

Minimal Spanning Tree Node 4 is closest to partial spanning tree {(1,2), (2,3)}. Remove any cycles. 9 2 6 3 6 2 1 3 3 3 1 3   4 5

Minimal Spanning Tree Node 5 is closest to partial spanning tree {(1,2), (2,3), (3,4)}. Remove any cycles. 9 2 6 3 6 2 1 3 3 3 1   4 5

Minimal Spanning Tree Node 6 is only remaining node. Remove any cycles. 2 6 3 2 1 3 3 3 1   4 5 Minimal spanning tree is {(1,2), (2,3),(3,4),(3,5),(5,6)}. Z = 12.

TSP Heuristic 2. Double up each edge of the MSP, this guarantees each node has an even number of edge. Known as a Euler path. 2 6 3 2 1 3 3 3 1   4 5

TSP Heuristic 3. Trace the Eulerean path. 4. Skip each city already visited on the Eulerean path. 2 6 3 2 1 3 3 3 1   4 5

TSP Heuristic 3. Trace the Eulerean path. 4. Skip each city already visited on the Eulerean path. 2 6 3 2 1 3 3 3 1   4 5