# Constraint Satisfaction Problems

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Ch. 06 p.1/?? Constraint Satisfaction Problems Chapter 6

2 Ch. 06 p.2/?? Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs

3 Ch. 06 p.3/?? Constraint satisfaction problems (CSPs) Standard search problem: state is a black box any old data structure that supports goal test, eval, successor CSP: state is defined by variables X i with values from domain D i goal test is a set of constraints specifying allowable combinations of values for subsets of variables Simple example of a formal representation language Allows useful general-purpose algorithms with more power than standard search algorithms

4 Ch. 06 p.4/?? Example: Map-Coloring Western Australia Northern Territory South Australia Tasmania Queensland New South Wales Victoria Variables WA, NT, Q, NSW, V, SA, T Domains D i = {red, green, blue} Constraints: adjacent regions must have different colors e.g., WA NT (if the language allows this), or (WA, NT) {(red, green), (red, blue), (green, red), (green, blue),...}

5 Ch. 06 p.5/?? Example: Map-Coloring (cont d) Western Australia Northern Territory South Australia Tasmania Queensland New South Wales Victoria Solutions are assignments satisfying all constraints, e.g., {WA = red,nt = green,q = red,nsw = green, V = red,sa = blue,t = green}

6 Constraint graph Binary CSP: each constraint relates at most two variables Constraint graph: nodes are variables, arcs show constraints WA NT Q SA NSW V T General-purpose CSP algorithms use the graph structure to speed up search. E.g., Tasmania is an independent subproblem! Ch. 06 p.6/??

7 Ch. 06 p.7/?? CSPs with discrete variables finite domains; size d = O(d n ) complete assignments e.g., Boolean CSPs, incl. Boolean satisfiability (NP-complete) infinite domains (integers, strings, etc.) e.g., job scheduling, variables are start/end days for each job need a constraint language, e.g., StartJob StartJob 3 linear constraints solvable, nonlinear undecidable

8 Ch. 06 p.8/?? CSPs with continuous variables linear constraints solvable in polynomial time by linear programinf (LP) methods e.g., precise start/end times for Hubble Telescope observations with astronomical, precedence, and power constraints

9 Ch. 06 p.9/?? Varieties of constraints Unary constraints involve a single variable, e.g., SA green Binary constraints involve pairs of variables, e.g., SA WA Higher-order constraints involve 3 or more variables, e.g., cryptarithmetic column constraints Preferences (soft constraints), e.g., red is better than green often representable by a cost for each variable assignment constrained optimization problems

10 Ch. 06 p.10/?? Example: Cryptarithmetic + T T W W O O F T U W R O F O U R X 3 X 2 X 1 (a) (b) Variables: F T U W R O X 1 X 2 X 3 Domains: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Constraints alldiff(f,t,u,w,r,o) O + O = R + 10 X 1, etc.

11 Ch. 06 p.11/?? Real-world CSPs Assignment problems e.g., who teaches what class Timetabling problems e.g., which class is offered when and where? Hardware configuration Spreadsheets Transportation scheduling Factory scheduling Floorplanning Notice that many real-world problems involve real-valued variables

12 Ch. 06 p.12/?? Standard search formulation (incremental) Let s start with the straightforward, dumb approach, then fix it States are defined by the values assigned so far Initial state: the empty assignment, Successor function: assign a value to an unassigned variable that does not conflict with current assignment. = fail if no legal assignments (not fixable!) Goal test: the current assignment is complete

13 Ch. 06 p.13/?? Standard search formulation (incremental) This is the same for all CSPs! Every solution appears at depth n with n variables = use depth-first search Path is irrelevant, so can also use complete-state formulation b = (n l)d at depth l, hence n!d n leaves!!!!

14 Ch. 06 p.14/?? Backtracking search Variable assignments are commutative, i.e., [WA = red then NT = green] same as [NT = green then WA = red] Only need to consider assignments to a single variable at each node = b = d and there are d n leaves Depth-first search for CSPs with single-variable assignments is called backtracking search Backtracking search is the basic uninformed algorithm for CSPs Can solve n-queens for n 25

15 Ch. 06 p.15/?? Backtracking search function BACKTRACKING-SEARCH (csp) returns a solution, or failure return BACKTRACK({ }, csp)

16 Ch. 06 p.16/?? Backtracking search (cont d) function BACKTRACK (assignment, csp) returns a solution, or failure if assignment is complete then return assignment var SELECT-UNASSIGNED-VAR(csp) for each value in ORDER-DOMAIN-VALUES(var, assignment, csp) do if value is consistent with assignment then add { var = value } to assignment inferences INFERENCE(csp, var, value) if inferences failure then add inferences to assignment result BACKTRACK (assignment, csp) if result failure then return result remove { var = value } and inferences from assignment return failure

17 Backtracking example Ch. 06 p.17/??

18 Backtracking example Ch. 06 p.18/??

19 Backtracking example Ch. 06 p.19/??

20 Backtracking example Ch. 06 p.20/??

21 Ch. 06 p.21/?? Improving backtracking efficiency General-purpose methods can give huge gains in speed: 1. Which variable should be assigned next? 2. In what order should its values be tried? 3. Can we detect inevitable failure early? 4. Can we take advantage of problem structure?

22 Ch. 06 p.22/?? Most constrained variable Most constrained variable: choose the variable with the fewest legal values

23 Ch. 06 p.23/?? Most constraining variable Tie-breaker among most constrained variables Most constraining variable: choose the variable with the most constraints on remaining variables

24 Ch. 06 p.24/?? Least constraining value Given a variable, choose the least constraining value: the one that rules out the fewest values in the remaining variables Allows 1 value for SA Allows 0 value for SA Combining these heuristics makes 1000 queens feasible

25 Ch. 06 p.25/?? Forward checking Idea: Keep track of remaining legal values for unassigned variables Idea: Terminate search when any variable has no legal values WA NT Q NSW V SA T

26 Ch. 06 p.26/?? Forward checking Idea: Keep track of remaining legal values for unassigned variables Idea: Terminate search when any variable has no legal values WA NT Q NSW V SA T

27 Ch. 06 p.27/?? Forward checking Idea: Keep track of remaining legal values for unassigned variables Idea: Terminate search when any variable has no legal values WA NT Q NSW V SA T

28 Ch. 06 p.28/?? Forward checking Idea: Keep track of remaining legal values for unassigned variables Idea: Terminate search when any variable has no legal values WA NT Q NSW V SA T

29 Ch. 06 p.29/?? Constraint propagation Forward checking propagates information from assigned to unassigned variables, but doesn t provide early detection for all failures: WA NT Q NSW V SA T NT and SA cannot both be blue! Constraint propagation repeatedly enforces constraints locally

30 Ch. 06 p.30/?? Arc consistency Simplest form of propagation makes each arc consistent X Y is consistent iff for every value x of X there is some allowed y WA NT Q NSW V SA T

31 Ch. 06 p.31/?? Arc consistency Simplest form of propagation makes each arc consistent X Y is consistent iff for every value x of X there is some allowed y WA NT Q NSW V SA T

32 Ch. 06 p.32/?? Arc consistency Simplest form of propagation makes each arc consistent X Y is consistent iff for every value x of X there is some allowed y WA NT Q NSW V SA T If X loses a value, neighbors of X need to be rechecked

33 Ch. 06 p.33/?? Arc consistency Simplest form of propagation makes each arc consistent X Y is consistent iff for every value x of X there is some allowed y WA NT Q NSW V SA T If X loses a value, neighbors of X need to be rechecked Arc consistency detects failure earlier than forward checking Can be run as a preprocessor or after each assignment

34 Ch. 06 p.34/?? Arc consistency algorithm function AC-3 (csp) returns false if an inconsistency is found and true otherwise inputs: csp, a binary CSP with components (X, D, C) local variables: queue, a queue of arcs, initially all the arcs in csp while queue is not empty do (X i, X j ) REMOVE-FIRST(queue) if REVISE(csp, X i, X j ) then if size of D i = 0 then return false for each X k in X i.neighbors-{x j } do add (X k, X i ) to queue return true

35 Ch. 06 p.35/?? Arc consistency algorithm (cont d) function REVISE (csp, X i, X j ) returns true iff we revise the domain of X i revised false for each x in D i do if no value y in D j allows (x, y) to satisfy the constraint between X i and X j then delete x from D i then revised true return revised O(n 2 d 3 ), can be reduced to O(n 2 d 2 ) but cannot detect all failures in polynomial time.

36 Ch. 06 p.36/?? Problem structure WA NT Q SA NSW V Tasmania and mainland are independent subproblems Identifiable as connected components of constraint graph T

37 Ch. 06 p.37/?? Problem structure contd. Suppose each subproblem has c variables out of n total Worst-case solution cost is n/c d c, linear in n E.g., n = 80, d = 2, c = = 4 billion years at 10 million nodes/sec = 0.4 seconds at 10 million nodes/sec

38 Ch. 06 p.38/?? Tree-structured CSPs A E B D C F Theorem: if the constraint graph has no loops, the CSP can be solved in O(nd 2 ) time Compare to general CSPs, where worst-case time is O(d n ) This property also applies to logical and probabilistic reasoning: an important example of the relation between syntactic restrictions and the complexity of reasoning.

39 Ch. 06 p.39/?? Algorithm for tree-structured CSPs 1. Choose a variable as root, order variables from root to leaves such that every node s parent precedes it in the ordering A E B D A B C D E F C F 2. For j from n down to 2, apply MAKE-ARC-CONSISTENT(Parent(X j ),X j ) (will remove inconsistent values) 3. For i from 1 to n, assign X i consistently with Parent(X i )

40 Ch. 06 p.40/?? Algorithm for tree-structured CSPs (cont d) function TREE-CSP-SOLVER (csp) returns a solution, or failure inputs: csp, a binary CSP with components (X, D, C) n number of variables in X assignment an empty assignment root any variable in X X TOPOLOGICALSORT(X, root) for j = n down to 2 do MAKE-ARC-CONSISTENT(Parent(X j ), X j ) if it cannot be made consistent then return failure for i = 1 to n do assignment [X i ] any consistent value from D i if there is no consistent value then return failure return assignment

41 Ch. 06 p.41/?? Nearly tree-structured CSPs Conditioning: instantiate a variable, prune its neighbors domains NT NT WA Q WA Q SA NSW NSW V V T T

42 Ch. 06 p.42/?? Nearly tree-structured CSPs Cutset conditioning: instantiate (in all ways) a set of variables such that the remaining constraint graph is a tree Cutset size c = runtime O(d c (n c)d 2 ), very fast for small c

43 Ch. 06 p.43/?? Summary CSPs are a special kind of problem: states defined by values of a fixed set of variables goal test defined by constraints on variable values Backtracking = depth-first search with one variable assigned per node Variable ordering and value selection heuristics help significantly Forward checking prevents assignments that guarantee later failure

44 Ch. 06 p.44/?? Summary Constraint propagation (e.g., arc consistency) does additional work to constrain values and detect inconsistencies The CSP representation allows analysis of problem structure Tree-structured CSPs can be solved in linear time (Iterative min-conflicts is usually effective in practice)

### Smart Graphics: Methoden 3 Suche, Constraints

Smart Graphics: Methoden 3 Suche, Constraints Vorlesung Smart Graphics LMU München Medieninformatik Butz/Boring Smart Graphics SS2007 Methoden: Suche 2 Folie 1 Themen heute Suchverfahren Hillclimbing Simulated

### Satisfiability Checking

Satisfiability Checking SAT-Solving Prof. Dr. Erika Ábrahám Theory of Hybrid Systems Informatik 2 WS 10/11 Prof. Dr. Erika Ábrahám - Satisfiability Checking 1 / 40 A basic SAT algorithm Assume the CNF

### INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models

Integer Programming INTEGER PROGRAMMING In many problems the decision variables must have integer values. Example: assign people, machines, and vehicles to activities in integer quantities. If this is

### Binary Encodings of Non-binary Constraint Satisfaction Problems: Algorithms and Experimental Results

Journal of Artificial Intelligence Research 24 (2005) 641-684 Submitted 04/05; published 11/05 Binary Encodings of Non-binary Constraint Satisfaction Problems: Algorithms and Experimental Results Nikolaos

### Construction induction training - changes to regulations

Construction induction training - changes to regulations General information for industry The Occupational Safety and Health Regulations (1996) have changed to reflect the national approach to construction

### NP-Completeness I. Lecture 19. 19.1 Overview. 19.2 Introduction: Reduction and Expressiveness

Lecture 19 NP-Completeness I 19.1 Overview In the past few lectures we have looked at increasingly more expressive problems that we were able to solve using efficient algorithms. In this lecture we introduce

### Discrete Optimization

Discrete Optimization [Chen, Batson, Dang: Applied integer Programming] Chapter 3 and 4.1-4.3 by Johan Högdahl and Victoria Svedberg Seminar 2, 2015-03-31 Todays presentation Chapter 3 Transforms using

### Classification - Examples

Lecture 2 Scheduling 1 Classification - Examples 1 r j C max given: n jobs with processing times p 1,...,p n and release dates r 1,...,r n jobs have to be scheduled without preemption on one machine taking

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### Constraint Optimization for Highly Constrained Logistic Problems

Constraint Optimization for Highly Constrained Logistic Problems Maria Kinga Mochnacs Meang Akira Tanaka Anders Nyborg Rune Møller Jensen IT University Technical Report Series TR-2007-2008-104 ISSN 1600

### Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design Hongsik Choi and Hyeong-Ah Choi Department of Electrical Engineering and Computer Science George Washington University Washington,

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

### A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem

A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem John Karlof and Peter Hocking Mathematics and Statistics Department University of North Carolina Wilmington Wilmington,

Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

### Heuristics for Dynamically Adapting Constraint Propagation in Constraint Programming

Heuristics for Dynamically Adapting Constraint Propagation in Constraint Programming Kostas Stergiou AI Lab University of the Aegean Greece CPAIOR 09 Workshop on Bound reduction techniques for CP and MINLP

### A Constraint-Based Method for Project Scheduling with Time Windows

A Constraint-Based Method for Project Scheduling with Time Windows Amedeo Cesta 1 and Angelo Oddi 1 and Stephen F. Smith 2 1 ISTC-CNR, National Research Council of Italy Viale Marx 15, I-00137 Rome, Italy,

### Lecture 7: NP-Complete Problems

IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit

### Complexity Classes P and NP

Complexity Classes P and NP MATH 3220 Supplemental Presentation by John Aleshunas The cure for boredom is curiosity. There is no cure for curiosity Dorothy Parker Computational Complexity Theory In computer

### Binary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * *

Binary Heaps A binary heap is another data structure. It implements a priority queue. Priority Queue has the following operations: isempty add (with priority) remove (highest priority) peek (at highest

### Chapter 7: Termination Detection

Chapter 7: Termination Detection Ajay Kshemkalyani and Mukesh Singhal Distributed Computing: Principles, Algorithms, and Systems Cambridge University Press A. Kshemkalyani and M. Singhal (Distributed Computing)

### Local Search and Constraint Programming for the Post Enrolment-based Course Timetabling Problem

Local Search and Constraint Programming for the Post Enrolment-based Course Timetabling Problem Hadrien Cambazard, Emmanuel Hebrard, Barry O Sullivan and Alexandre Papadopoulos Cork Constraint Computation

### Ant Colony Optimization and Constraint Programming

Ant Colony Optimization and Constraint Programming Christine Solnon Series Editor Narendra Jussien WILEY Table of Contents Foreword Acknowledgements xi xiii Chapter 1. Introduction 1 1.1. Overview of the

### University of Potsdam Faculty of Computer Science. Clause Learning in SAT Seminar Automatic Problem Solving WS 2005/06

University of Potsdam Faculty of Computer Science Clause Learning in SAT Seminar Automatic Problem Solving WS 2005/06 Authors: Richard Tichy, Thomas Glase Date: 25th April 2006 Contents 1 Introduction

### Scheduling Algorithm with Optimization of Employee Satisfaction

Washington University in St. Louis Scheduling Algorithm with Optimization of Employee Satisfaction by Philip I. Thomas Senior Design Project http : //students.cec.wustl.edu/ pit1/ Advised By Associate

### Multi-layer MPLS Network Design: the Impact of Statistical Multiplexing

Multi-layer MPLS Network Design: the Impact of Statistical Multiplexing Pietro Belotti, Antonio Capone, Giuliana Carello, Federico Malucelli Tepper School of Business, Carnegie Mellon University, Pittsburgh

### Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

### Sorting revisited. Build the binary search tree: O(n^2) Traverse the binary tree: O(n) Total: O(n^2) + O(n) = O(n^2)

Sorting revisited How did we use a binary search tree to sort an array of elements? Tree Sort Algorithm Given: An array of elements to sort 1. Build a binary search tree out of the elements 2. Traverse

### Discuss the size of the instance for the minimum spanning tree problem.

3.1 Algorithm complexity The algorithms A, B are given. The former has complexity O(n 2 ), the latter O(2 n ), where n is the size of the instance. Let n A 0 be the size of the largest instance that can

### CHAPTER 7 GENERAL PROOF SYSTEMS

CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes

Load Balancing Backtracking, branch & bound and alpha-beta pruning: how to assign work to idle processes without much communication? Additionally for alpha-beta pruning: implementing the young-brothers-wait

### Council of Ambulance Authorities

Council of Ambulance Authorities National Patient Satisfaction Survey 2015 Prepared for: Mojca Bizjak-Mikic Manager, Data & Research The Council of Ambulance Authorities Prepared by: Dr Svetlana Bogomolova

### Dynamic programming formulation

1.24 Lecture 14 Dynamic programming: Job scheduling Dynamic programming formulation To formulate a problem as a dynamic program: Sort by a criterion that will allow infeasible combinations to be eli minated

### A Model-driven Approach to Predictive Non Functional Analysis of Component-based Systems

A Model-driven Approach to Predictive Non Functional Analysis of Component-based Systems Vincenzo Grassi Università di Roma Tor Vergata, Italy Raffaela Mirandola {vgrassi, mirandola}@info.uniroma2.it Abstract.

### Chapter 13: Binary and Mixed-Integer Programming

Chapter 3: Binary and Mixed-Integer Programming The general branch and bound approach described in the previous chapter can be customized for special situations. This chapter addresses two special situations:

### npsolver A SAT Based Solver for Optimization Problems

npsolver A SAT Based Solver for Optimization Problems Norbert Manthey and Peter Steinke Knowledge Representation and Reasoning Group Technische Universität Dresden, 01062 Dresden, Germany peter@janeway.inf.tu-dresden.de

### William E. Hart Carl Laird Jean-Paul Watson David L. Woodruff. Pyomo Optimization. Modeling in Python. ^ Springer

William E Hart Carl Laird Jean-Paul Watson David L Woodruff Pyomo Optimization Modeling in Python ^ Springer Contents 1 Introduction 1 11 Mathematical Modeling 1 12 Modeling Languages for Optimization

### COMMINSURE HOME INSURANCE PREMIUM, EXCESS AND DISCOUNT GUIDE.

COMMINSURE HOME INSURANCE PREMIUM, EXCESS AND DISCOUNT GUIDE. This document provides you with information to help you understand how your total premium has been calculated, discounts that are available

### Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max. structure of a schedule Q...

Lecture 4 Scheduling 1 Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max structure of a schedule 0 Q 1100 11 00 11 000 111 0 0 1 1 00 11 00 11 00

### Local Search and Constraint Programming for the Post Enrolment-based Course Timetabling Problem

Local Search and Constraint Programming for the Post Enrolment-based Course Timetabling Problem Hadrien Cambazard, Emmanuel Hebrard, Barry O Sullivan and Alexandre Papadopoulos Cork Constraint Computation

### SIMS 255 Foundations of Software Design. Complexity and NP-completeness

SIMS 255 Foundations of Software Design Complexity and NP-completeness Matt Welsh November 29, 2001 mdw@cs.berkeley.edu 1 Outline Complexity of algorithms Space and time complexity ``Big O'' notation Complexity

### National Training Funding Summary

National Training Funding Summary T R A I N I N G I R E D E F I N I N G P E R F O R M A N CE Federal and State Government Training Funding Summary The following table outlines the Government incentives,

### Search methods motivation 1

Suppose you are an independent software developer, and your software package Windows Defeater R, widely available on sourceforge under a GNU GPL license, is getting an international attention and acclaim.

### Optimizing Description Logic Subsumption

Topics in Knowledge Representation and Reasoning Optimizing Description Logic Subsumption Maryam Fazel-Zarandi Company Department of Computer Science University of Toronto Outline Introduction Optimization

### Disjunction of Non-Binary and Numeric Constraint Satisfaction Problems

Disjunction of Non-Binary and Numeric Constraint Satisfaction Problems Miguel A. Salido, Federico Barber Departamento de Sistemas Informáticos y Computación, Universidad Politécnica de Valencia Camino

### JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Scientiae Mathematicae Japonicae Online, Vol. 10, (2004), 431 437 431 JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS Ondřej Čepeka and Shao Chin Sung b Received December May 12, 2003; revised February

### Factoring & Primality

Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

### On the Efficiency of Backtracking Algorithms for Binary Constraint Satisfaction Problems

On the Efficiency of Backtracking Algorithms for Binary Constraint Satisfaction Problems Achref El Mouelhi and Philippe Jégou and Cyril Terrioux LSIS - UMR CNRS 6168 Aix-Marseille Université Avenue Escadrille

### Performance of Dynamic Load Balancing Algorithms for Unstructured Mesh Calculations

Performance of Dynamic Load Balancing Algorithms for Unstructured Mesh Calculations Roy D. Williams, 1990 Presented by Chris Eldred Outline Summary Finite Element Solver Load Balancing Results Types Conclusions

### Equilibrium computation: Part 1

Equilibrium computation: Part 1 Nicola Gatti 1 Troels Bjerre Sorensen 2 1 Politecnico di Milano, Italy 2 Duke University, USA Nicola Gatti and Troels Bjerre Sørensen ( Politecnico di Milano, Italy, Equilibrium

### Why Study NP- hardness. NP Hardness/Completeness Overview. P and NP. Scaling 9/3/13. Ron Parr CPS 570. NP hardness is not an AI topic

Why Study NP- hardness NP Hardness/Completeness Overview Ron Parr CPS 570 NP hardness is not an AI topic It s important for all computer scienhsts Understanding it will deepen your understanding of AI

### Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

### 24. The Branch and Bound Method

24. The Branch and Bound Method It has serious practical consequences if it is known that a combinatorial problem is NP-complete. Then one can conclude according to the present state of science that no

### Sudoku as a SAT Problem

Sudoku as a SAT Problem Inês Lynce IST/INESC-ID, Technical University of Lisbon, Portugal ines@sat.inesc-id.pt Joël Ouaknine Oxford University Computing Laboratory, UK joel@comlab.ox.ac.uk Abstract Sudoku

### AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS

TKK Reports in Information and Computer Science Espoo 2009 TKK-ICS-R26 AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS Kari Kähkönen ABTEKNILLINEN KORKEAKOULU TEKNISKA HÖGSKOLAN HELSINKI UNIVERSITY OF

### Automatic Configuration Generation for Service High Availability with Load Balancing

Automatic Configuration Generation for Service High Availability with Load Balancing A. Kanso 1, F. Khendek 1, M. Toeroe 2, A. Hamou-Lhadj 1 1 Electrical and Computer Engineering Department, Concordia

### Chapter 10: Network Flow Programming

Chapter 10: Network Flow Programming Linear programming, that amazingly useful technique, is about to resurface: many network problems are actually just special forms of linear programs! This includes,

### The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

### Integration of ACO in a Constraint Programming Language

Integration of ACO in a Constraint Programming Language Madjid Khichane 12, Patrick Albert 1, and Christine Solnon 2 1 ILOG 2 LIRIS, UMR 5205 CNRS / University of Lyon ANTS 08 Motivations Ant Colony Optimization

### Minimizing costs for transport buyers using integer programming and column generation. Eser Esirgen

MASTER STHESIS Minimizing costs for transport buyers using integer programming and column generation Eser Esirgen DepartmentofMathematicalSciences CHALMERS UNIVERSITY OF TECHNOLOGY UNIVERSITY OF GOTHENBURG

### DESIGN AND DEVELOPMENT OF CSP TECHNIQUES FOR FINDING ROBUST SOLUTIONS IN JOB-SHOP SCHEDULING PROBLEMS WITH OPERATORS

UNIVERSIDAD POLITÉCNICA DE VALENCIA DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN DESIGN AND DEVELOPMENT OF CSP TECHNIQUES FOR FINDING ROBUST SOLUTIONS IN JOB-SHOP SCHEDULING PROBLEMS WITH OPERATORS

### Backdoors to Combinatorial Optimization: Feasibility and Optimality

Backdoors to Combinatorial Optimization: Feasibility and Optimality Bistra Dilkina, Carla P. Gomes, Yuri Malitsky 2, Ashish Sabharwal, and Meinolf Sellmann 2 Department of Computer Science, Cornell University,

### Data Mining Practical Machine Learning Tools and Techniques

Ensemble learning Data Mining Practical Machine Learning Tools and Techniques Slides for Chapter 8 of Data Mining by I. H. Witten, E. Frank and M. A. Hall Combining multiple models Bagging The basic idea

### Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order

### CS510 Software Engineering

CS510 Software Engineering Propositional Logic Asst. Prof. Mathias Payer Department of Computer Science Purdue University TA: Scott A. Carr Slides inspired by Xiangyu Zhang http://nebelwelt.net/teaching/15-cs510-se

### Tables so far. set() get() delete() BST Average O(lg n) O(lg n) O(lg n) Worst O(n) O(n) O(n) RB Tree Average O(lg n) O(lg n) O(lg n)

Hash Tables Tables so far set() get() delete() BST Average O(lg n) O(lg n) O(lg n) Worst O(n) O(n) O(n) RB Tree Average O(lg n) O(lg n) O(lg n) Worst O(lg n) O(lg n) O(lg n) Table naïve array implementation

### Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

### Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

### A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called heap-order property

CmSc 250 Intro to Algorithms Chapter 6. Transform and Conquer Binary Heaps 1. Definition A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called

### Algorithms Chapter 12 Binary Search Trees

Algorithms Chapter 1 Binary Search Trees Outline Assistant Professor: Ching Chi Lin 林 清 池 助 理 教 授 chingchi.lin@gmail.com Department of Computer Science and Engineering National Taiwan Ocean University

### Study Manual. Probabilistic Reasoning. Silja Renooij. August 2015

Study Manual Probabilistic Reasoning 2015 2016 Silja Renooij August 2015 General information This study manual was designed to help guide your self studies. As such, it does not include material that is

### SIGMOD RWE Review Towards Proximity Pattern Mining in Large Graphs

SIGMOD RWE Review Towards Proximity Pattern Mining in Large Graphs Fabian Hueske, TU Berlin June 26, 21 1 Review This document is a review report on the paper Towards Proximity Pattern Mining in Large

### A Decision Support System for Crew Planning in Passenger Transportation using a Flexible Branch-and-Price Algorithm

A Decision Support System for Crew Planning in Passenger Transportation using a Flexible Branch-and-Price Algorithm RICHARD FRELING 1, 2*, RAMON M. LENTINK 1, 2 AND ALBERT P.M. WAGELMANS 1 1 Erasmus Center

### Cassandra. References:

Cassandra References: Becker, Moritz; Sewell, Peter. Cassandra: Flexible Trust Management, Applied to Electronic Health Records. 2004. Li, Ninghui; Mitchell, John. Datalog with Constraints: A Foundation

### This paper introduces a new method for shift scheduling in multiskill call centers. The method consists of

MANUFACTURING & SERVICE OPERATIONS MANAGEMENT Vol. 10, No. 3, Summer 2008, pp. 411 420 issn 1523-4614 eissn 1526-5498 08 1003 0411 informs doi 10.1287/msom.1070.0172 2008 INFORMS Simple Methods for Shift

### Creating a More Efficient Course Schedule at WPI Using Linear Optimization

Project Number: ACH1211 Creating a More Efficient Course Schedule at WPI Using Linear Optimization A Major Qualifying Project Report submitted to the Faculty of the WORCESTER POLYTECHNIC INSTITUTE in partial

### NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

NP-complete? NP-hard? Some Foundations of Complexity Prof. Sven Hartmann Clausthal University of Technology Department of Informatics Tractability of Problems Some problems are undecidable: no computer

### PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 4: LINEAR MODELS FOR CLASSIFICATION

PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 4: LINEAR MODELS FOR CLASSIFICATION Introduction In the previous chapter, we explored a class of regression models having particularly simple analytical

### Generating models of a matched formula with a polynomial delay

Generating models of a matched formula with a polynomial delay Petr Savicky Institute of Computer Science, Academy of Sciences of Czech Republic, Pod Vodárenskou Věží 2, 182 07 Praha 8, Czech Republic

### Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows

TECHNISCHE UNIVERSITEIT EINDHOVEN Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows Lloyd A. Fasting May 2014 Supervisors: dr. M. Firat dr.ir. M.A.A. Boon J. van Twist MSc. Contents

### 5. Binary objects labeling

Image Processing - Laboratory 5: Binary objects labeling 1 5. Binary objects labeling 5.1. Introduction In this laboratory an object labeling algorithm which allows you to label distinct objects from a

### Introduction to Algorithms. Part 3: P, NP Hard Problems

Introduction to Algorithms Part 3: P, NP Hard Problems 1) Polynomial Time: P and NP 2) NP-Completeness 3) Dealing with Hard Problems 4) Lower Bounds 5) Books c Wayne Goddard, Clemson University, 2004 Chapter

### Planning and Scheduling in the Digital Factory

Institute for Computer Science and Control Hungarian Academy of Sciences Berlin, May 7, 2014 1 Why "digital"? 2 Some Planning and Scheduling problems 3 Planning for "one-of-a-kind" products 4 Scheduling

### Efficiency of algorithms. Algorithms. Efficiency of algorithms. Binary search and linear search. Best, worst and average case.

Algorithms Efficiency of algorithms Computational resources: time and space Best, worst and average case performance How to compare algorithms: machine-independent measure of efficiency Growth rate Complexity

### Dantzig-Wolfe bound and Dantzig-Wolfe cookbook

Dantzig-Wolfe bound and Dantzig-Wolfe cookbook thst@man.dtu.dk DTU-Management Technical University of Denmark 1 Outline LP strength of the Dantzig-Wolfe The exercise from last week... The Dantzig-Wolfe

### An optimization model for aircraft maintenance scheduling and re-assignment

Transportation Research Part A 37 (2003) 29 48 www.elsevier.com/locate/tra An optimization model for aircraft maintenance scheduling and re-assignment Chellappan Sriram 1, Ali Haghani * Department of Civil

### The Bi-Objective Pareto Constraint

The Bi-Objective Pareto Constraint Renaud Hartert and Pierre Schaus UCLouvain, ICTEAM, Place Sainte Barbe 2, 1348 Louvain-la-Neuve, Belgium {renaud.hartert,pierre.schaus}@uclouvain.be Abstract. Multi-Objective

ExSched: Solving Constraint Satisfaction Problems with the Spreadsheet Paradigm Siddharth Chitnis, Madhu Yennamani, Gopal Gupta Department of Computer Science The University of Texas at Dallas Richardson,

### Constraint Programming for the Vehicle Routing Problem. Philip Kilby

Constraint Programming for the Vehicle Routing Problem Philip Kilby A bit about NICTA National Information and Communications Technology Australia (NICTA) Research in ICT since 24 Major Labs in Sydney,

### Single-Link Failure Detection in All-Optical Networks Using Monitoring Cycles and Paths

Single-Link Failure Detection in All-Optical Networks Using Monitoring Cycles and Paths Satyajeet S. Ahuja, Srinivasan Ramasubramanian, and Marwan Krunz Department of ECE, University of Arizona, Tucson,

### The Year of Living Dangerously

The Year of Living Dangerously January 2011 Suncorp Life Accident Series Disclaimer Suncorp Life s Year of Living Dangerously report examines data prepared, published and publicly available from the Australian

### Union-Find Algorithms. network connectivity quick find quick union improvements applications

Union-Find Algorithms network connectivity quick find quick union improvements applications 1 Subtext of today s lecture (and this course) Steps to developing a usable algorithm. Define the problem. Find

### CAD Algorithms. P and NP

CAD Algorithms The Classes P and NP Mohammad Tehranipoor ECE Department 6 September 2010 1 P and NP P and NP are two families of problems. P is a class which contains all of the problems we solve using

### Big Data Optimization at SAS

Big Data Optimization at SAS Imre Pólik et al. SAS Institute Cary, NC, USA Edinburgh, 2013 Outline 1 Optimization at SAS 2 Big Data Optimization at SAS The SAS HPA architecture Support vector machines

### Charles Fleurent Director - Optimization algorithms

Software Tools for Transit Scheduling and Routing at GIRO Charles Fleurent Director - Optimization algorithms Objectives Provide an overview of software tools and optimization algorithms offered by GIRO

### CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313]

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313] File Structures A file is a collection of data stored on mass storage (e.g., disk or tape) Why on mass storage? too big to fit

ExSched: Solving Constraint Satisfaction Problems with the Spreadsheet Paradigm Siddharth Chitnis, Madhu Yennamani, Gopal Gupta Department of Computer Science The University of Texas at Dallas Richardson,

### Updating Action Domain Descriptions

Updating Action Domain Descriptions Thomas Eiter, Esra Erdem, Michael Fink, and Ján Senko Institute of Information Systems, Vienna University of Technology, Vienna, Austria Email: (eiter esra michael jan)@kr.tuwien.ac.at