A Study of 0/1 Encodings Prosser & Selensky A Study of 0/1 Encodings Prosser & Selensky.

Slides:



Advertisements
Similar presentations
One-to-One Functions; Inverse Function
Advertisements

Problem Reformulation and Search
Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path.
Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
An empirical study of the stable marriage problem with ties and incomplete lists (SMTI) Ian Gent & Patrick Prosser.
Maximal Independent Subsets of Linear Spaces. Whats a linear space? Given a set of points V a set of lines where a line is a k-set of points each pair.
Constraint Satisfaction Patrick Prosser. An Example, Exam Timetabling Someone timetables the exams We have a number of courses to examine how many? Dept.
Maximal Independent Sets of a Hypergraph IJCAI01.
The Stable Marriage Problem and Constraint Programming.
Symmetry Definitions for Constraint Satisfaction Problems Dave Cohen, Peter Jeavons, Chris Jefferson, Karen Petrie and Barbara Smith.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSci 4011 INHERENT LIMITATIONS OF COMPUTER PROGRAMS.
On / By / With The building blocks of the Mplus language.
Geometric Interpretation of Linear Programs
Constraint Satisfaction Problems Russell and Norvig: Chapter
30S Applied Math Mr. Knight – Killarney School Slide 1 Unit: Linear Programming Lesson 5: Problem Solving Problem Solving with Linear Programming Learning.
University of Toronto Mechanical & Industrial Engineering An Introduction to Constraint Programming J. Christopher Beck Dept. of Mechanical & Industrial.
Global Constraints Toby Walsh NICTA and University of New South Wales
NP-Hard Nattee Niparnan.
Inapproximability of Hypergraph Vertex-Cover. A k-uniform hypergraph H= : V – a set of vertices E - a collection of k-element subsets of V Example: k=3.
Time-Space Tradeoffs in Resolution: Superpolynomial Lower Bounds for Superlinear Space Chris Beck Princeton University Joint work with Paul Beame & Russell.
Constraint Satisfaction Problems
Simplex (quick recap). Replace all the inequality constraints by equalities, using slack variables.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Bayesian Networks, Winter Yoav Haimovitch & Ariel Raviv 1.
Optimal Rectangle Packing: A Meta-CSP Approach Chris Reeson Advanced Constraint Processing Fall 2009 By Michael D. Moffitt and Martha E. Pollack, AAAI.
Ch 2. 6 – Solving Systems of Linear Inequalities & Ch 2
A Fairy Tale of Greedy Algorithms Yuli Ye Joint work with Allan Borodin, University of Toronto.
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
Maths of Constraint Satisfaction, Oxford, March 2006 Constraint Programming Models for Graceful Graphs Barbara Smith.
“IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
What is the next line of the proof? a). Assume the theorem holds for all graphs with k edges. b). Let G be a graph with k edges. c). Assume the theorem.
Optimization of Linear Problems: Linear Programming (LP) © 2011 Daniel Kirschen and University of Washington 1.
Non-Linear Simultaneous Equations
Pebble games for rigidity Overview. The game of pebbling was first suggested by Lagarias and Saks, as a tool for solving a particular problem in number.
Combining Exact and Metaheuristic Techniques For Learning Extended Finite-State Machines From Test Scenarios and Temporal Properties ICMLA ’14 December.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
1 Algebraic Structure in Almost-Symmetries Igor Markov, Univ. of Michigan Presented by Ian Gent, St. Andrews.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Graph Colouring Various Models. an obvious model SAT sets demo random graphs chromatic number maxCol phase transition.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
ANALYSIS AND IMPLEMENTATION OF GRAPH COLORING ALGORITHMS FOR REGISTER ALLOCATION By, Sumeeth K. C Vasanth K.
Functions Section 1.4. Relation The value of one variable is related to the value of a second variable A correspondence between two sets If x and y are.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
1 Constraint Symmetry and Solution Symmetry Presented by Beau M. Christ Symmetry in CSP’s Spring 2010 Presented by Beau M. Christ Symmetry in CSP’s Spring.
Constraints and Search Toby Walsh Cork Constraint Computation Centre (4C) Logic & AR Summer School, 2002.
1.1 Chapter 3: Proving NP-completeness Results Six Basic NP-Complete Problems Some Techniques for Proving NP-Completeness Some Suggested Exercises.
Warm-up Solve each system of equations:
Solve by Factoring Zero Product Property.
Algorithms For Solving History Sensitive Cascade in Diffusion Networks Research Proposal Georgi Smilyanov, Maksim Tsikhanovich Advisor Dr Yu Zhang Trinity.
Great Theoretical Ideas in Computer Science for Some.
Domain: a set of first elements in a relation (all of the x values). These are also called the independent variable. Range: The second elements in a relation.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Functions and relations
CS162 Week 5 Kyle Dewey.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Proof Techniques and Chessboard Problems
Functions and relations
Identifying functions and using function notation
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
3x 2x -5 x + 11 (4x + 7)° 90° (8x - 1)°.
Linear Systems Chapter 3.
Incorporating Constraint Checking Costs in Constraint Satisfaction Problem Suryakant Sansare.
Alegebra 2A Function Lesson 1 Objective: Relations, and Functions.
Instructor: Aaron Roth
Presentation transcript:

A Study of 0/1 Encodings Prosser & Selensky

A Study of 0/1 Encodings Prosser & Selensky

You can encode a constraint satisfaction problem in a number of different, but logically equivalent ways. That is, each encoding explores the same search space, but they take different times. If you encode in a different constraint programming language you again get different relative performance for those encodings This is bad news Paper in a nutshell

You can encode a constraint satisfaction problem (with n variables) as a problem of finding an independent set of size n That independent set is also maximal. Will the maximality constraint improve performance? Conclusion: maybe, maybe not. It depends on your toolkit! Presentation in a nutshell

A HypergraphEncode CSP as independent set of size n

Independent set of a hypergraph G = (V,E) - a set I of vertices such that no edge in E is totally subsumed by I

An Independent Set You could add vertex 3 or vertex 8! Encode CSP as independent set of size n

The Largest Independent Set Just so you know. There is only one for this graph

Represent a CSP with n variables as an independent set as follows each vertex of the graph corresponds to an assignment of a value to a variable if n variables each of domain size m, we have n.m vertices there is an m-clique for each variable therefore a variable can only take one value constraints are explicitly represented as nogoods a nogood is a hyper edge select n vertices of the graph corresponds to instantiation of all n variables

X + Y + Z = 8 where X, Y and Z are in {2,3} An Example We have n.m 0/1 vertices A hyper edge for each nogood An m-clique for each variables domain Give me an independent set of size n

X2X2 X3X3 Y2Y2 Y3Y3 Z2Z2 Z3Z3

Encode CSP as independent set of size n Constraints 3 and 4 can be implemented in two ways sum of variables equals some value (r or k) the number of occurrences of 1 equals some value (r or k) Could this make a difference?

A Maximal Independent Set An independent set (as before), but we cannot add an element to the set without loss of the independence property. Note: the largest independent set is maximal … obviously

A Maximal Independent Set There are 11 maximal independent sets of size 6 Remember, there is one largest independent set, size 7

CP encoding Encoding Maximality That is, we state when a variable MUST be selected and when it MUST NOT be selected An example, vertex 2

CP encoding Example, vertices 1,2, and 3

More Generally

Actual Encoding of Maximality Example, vertice 3 We have a sum implement using sumVars or implement using occurs We have the biconditional. This can be implemented in (at least) 3 ways Therefore 6 ways to implement maximality!

CSP Independent Set of Hypergraph Add redundant maximality constraint Solve How it might go So?

So, does maximality help? This IS exciting.

An experiment Encode independence using sumVars (rather than occurs) Encode biconditional using ifOnlyIf Given a hypergraph find an independent set of size k using just independence constraint using redundant maximality constraint Carry out experiments using Choco 1.07 ILOG Solver 5.0 Is run time reduced when we use maximality? Does maximality help?

Choco 1.07 Conclusion: Use maximality! Run time in milliseconds Note: As largest indSet is size 14 Bs largest indSet is size 15 both encodings look for same thing About 3 times faster A & B are regular degree hypergraphs

Solver 5.0 Conclusion: Avoid maximality! About 8 times slower

The paper has other confounding results such as summation is faster than occurrence in Solver occurrence is faster than summation in Choco ((p & q) or (¬p & ¬q)) is fastest implementation of in Solver ifOnlyIf is the fastest implementation of in Choco maximality helps in Choco, and does not help in Solver Confused?

So? Why the differences, between Solver and Choco? Read the paper What does this mean? What lesson can I learn? Be paranoid

… and maximality is interesting!

Any questions?