25
1 30 September 2 003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles and Practice of Constraint Programming

130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

130 September 2003

Tractability by Approximating Constraint Languages

Martin Green and David Cohen

CP 2003Ninth International Conference on

Principles and Practice of Constraint Programming

Page 2: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

230 September 2003 Tractability by Approximating Constraint Languages

Outline of the Talk

Background information (4 minutes) Approximating tractable languages

(8 minutes) Applications of this new theory (6 minutes) Remarks and directions for future research

(2 minutes)

Page 3: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

330 September 2003 Tractability by Approximating Constraint Languages

Question

What do the following problems have in common? Stable Marriage Problem Renamable HORN Row Convexity

Page 4: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

430 September 2003 Tractability by Approximating Constraint Languages

Answer

We search for and apply domain permutations (approximations) to each problem variable

We can use this technique to approximate: SMP instance ) Max-Closed Renamable HORN ) HORN-SAT Permutably Row Convex ) Row Convex

… and the approximations are tractable

Page 5: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

530 September 2003 Tractability by Approximating Constraint Languages

Constraint Satisfaction Problem Instances

A Constraint Satisfaction Problem instance (CSP), P, is a triple hV,D,Ci where: V is a set of variables D is any set, called the

domain of the instance C is a set of constraints

Each constraint c 2 C is a pair h,i where is a list of distinct variables of V and is a ||-ary relation over D

A solution to P is a mapping

such that

Informally: We describe V as a set of

questions that need to be answered

D is the set of all possible answers that can be given to these questions

A constraint in C is a rationality condition that limits the answers that may be simultaneously assigned to some groups of questions

A solution is then a satisfactory set of answers to all of the questions

Page 6: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

630 September 2003 Tractability by Approximating Constraint Languages

Complexity of Constraint Satisfaction

The decision problem for the general constraint satisfaction problem is: Given a CSP, P, does P have a solution?

For general CSPs this is NP-complete However, there are restrictions to the set of

allowed instances that make the constraint satisfaction problem tractable It turns out that there are many tractable subproblems

of the general constraint satisfaction problem

Page 7: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

730 September 2003 Tractability by Approximating Constraint Languages

Reasons for Tractability

Structural Actually there is just the acyclic structure … and approximations

Relational or Language-based There are many known examples of language-based

tractable subproblems (for example, max-closed) Here we give an approximation technique which, for

instance, allows us to extend the maximal tractable binary max-closed language

This is a maximal class of binarybinary

relations

Page 8: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

830 September 2003 Tractability by Approximating Constraint Languages

Definition of Max-Closure

An n-ary relation, , over ordered domain 1, …, k is said to be max-closed if whenever hd1,…,dni, he1,…,eni are in then so is their pointwise maximum hmax(d1,e1),…,max(dn,en)i

The set of all max-closed relations forms a tractable constraint language

We can display relations diagrammatically Consider the ordered domain 1,2 where

1<2 This relation is not max-closed However, this relation is max-closed

2 2

1 1

Page 9: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

930 September 2003

Approximating Tractable Languages

Page 10: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1030 September 2003 Tractability by Approximating Constraint Languages

Permuting the Domain Suppose we have a tractable language and that P is a

CSP not in CSP(), that is, some relation is not in If we can find permutations of the domain

(independently) for each variable, that make P into an instance of CSP(), then we can solve the instance P using the algorithm for We first permute the domains Then we apply the algorithm for on the permuted instance Finally we permute the domains back again for any discovered

solution It is this approximation technique for (tractable)

constraint languages that we will discuss in the remainder of this talk

Page 11: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1130 September 2003 Tractability by Approximating Constraint Languages

Permuting the Domain (2)

We can see whether a relation can be permuted into a relation in by testing combinations of permutations

This gives rise to a lifted relation Example:

There are only two permutations over 1,2 1!1,2!2 (keep) and 1!2,2!1 (swap)

We can independently apply these permutations to both sides of the relation

2 2

1 1

We might obtain a max-closed relation by applying one of the permutations to each domain, e.g., swap to both sides

The lifted relation is: hkeep,swapihswap,keepi,hswap,swapi

Page 12: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1230 September 2003 Tractability by Approximating Constraint Languages

Approximating Tractable Languages

Let be a constraint language, P = hV,D,Ci a CSP and G a set of permutations of D If there exists a permutation of the domain, from G,

for each variable of P, such that the permuted CSP has constraint relations all in then we say that P is G-approximately over

For a given and G the problem of determining whether an instance is G-approximately over is called the approximation problem for and G

For any set of CSP instances over D, we may ask whether the approximation problem (for and G) is tractable

Page 13: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1330 September 2003 Tractability by Approximating Constraint Languages

Approximating Tractable Languages (2)

We can determine whether an approximation exists for a given instance by considering a lifted CSP with the same structure but whose domains are permutations

Domain:1,2

2 2

1 1

2 2

1 1

2 2

1 1

V1 V2

V3

2 2

1 1

2 2

1 1

2 2

1 1

If I swap one sideI must also swapthe other

I must swapone side only

I must swap atleast one side

hkeep,keepi, hswap,swapi

hkeep,swapi, hswap,keepi

hkeep,swapi, hswap,keepi, hswap,swapi

hkeep,keepi

hkeep,swapi hswap,keepi

keep keep

swap2

22

1

2 2

1 1

2 2

1 1

2 2

1 1

keep,swap

A CSPThe LiftedCSP

PermutedCSP

Page 14: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1430 September 2003

Applications

… of the new theory

Page 15: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1530 September 2003 Tractability by Approximating Constraint Languages

Is Approximating Tractable?

It may be hoped that tractable languages have tractable approximations Clearly approximating const-0 is not tractable Is approximating the binary max-closed language

tractable? Consider all binary relations over a domain of size three

(there are 512) We wish to lift them into the binary max-closed language The lifted language has 458 distinct relations We can use Polyanna to determine tractability They are intractable!

It is rarely tractable to approximate even tractable languages

Luckily there are useful Luckily there are useful tractable approximationstractable approximations

Page 16: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1630 September 2003 Tractability by Approximating Constraint Languages

Novel Classes of Tractable CSPs

Theorem Let be any constraint language over D, G

be a set of two permutations of D, and R be the set of all binary relations

Then the G-approximation problem for is tractable

Proof Any lifted relation is binary two valued The approximation problem for R is 2-SAT

Page 17: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1730 September 2003 Tractability by Approximating Constraint Languages

Novel Classes of Tractable CSPs (Example)

Let D be the ordered domain 1,…,k, be the set of binary max-closed relations and Gkeep,swap

This approximation problem is tractable This tractable class includes

all binary max-closed CSPs all binary min-closed CSPs … and some others

This class is clearly hybrid

Page 18: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1830 September 2003 Tractability by Approximating Constraint Languages

Stable Marriage Problem

We have a set W of n women, and a set M of n men

Each woman w has a preference order for all the men given by w

Similarly, each man m has a preference ordering, m, that ranks the women

We are to form n marriages such that every pair of marriages is stable

Page 19: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

1930 September 2003 Tractability by Approximating Constraint Languages

Variables:

Domain Values:

We deduce Binary constraints

Page 20: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

2030 September 2003 Tractability by Approximating Constraint Languages

Stable Marriage Problem (2)

It turns out that every SMP instance is approximately max-closed

We order the men (domain) according to the preference list for each woman

This completely explains the known solution algorithm

Page 21: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

2130 September 2003 Tractability by Approximating Constraint Languages

Renamable HORN

A set of clauses is Renamable HORN if there is a replacement of some literals, uniformly in all clauses, with their negated versions, which makes all clauses into HORN-clauses

This approximation problem is tractable (because the lifted language is majority closed)

Page 22: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

2230 September 2003 Tractability by Approximating Constraint Languages

Row Convexity

A CSP instance is said to be Row Convex if, after some permutation of each domain, each relation is Row Convex

This approximation problem is tractable (because the lifted language has only unary relations)

Page 23: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

2330 September 2003

Closing Remarks

Page 24: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

2430 September 2003 Tractability by Approximating Constraint Languages

Conclusions

We have identified a novel, hybrid, class of tractable subproblems of the general constraint satisfaction problem

The theory also gives a unifying explanation for the tractability of: the constraint approach to the Stable Marriage

Problem; recognising instances of Renamable HORN; finding domain permutations for Row Convex CSP

instances

Page 25: 130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles

2530 September 2003 Tractability by Approximating Constraint Languages

Future Research

We want to determine whether we can tractably find the domain permutations for instances of the Stable Marriage Problem for which we do not know the preference orderings

We wish to discover if it is tractable to identify approximately Connected Row Convex instances

We hope to discover or explain other tractable classes for which the approximation problem is tractable

Any Questions?