Newsgroups: comp.constraints
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!news.sprintlink.net!EU.net!julienas!news.fnet.fr!ilog!puget
From: puget@ilog.ilog.fr (Jean-Francois Puget)
Subject: Re: Solving a conjunction of X <= Y clauses
Message-ID: <1995Jan10.080339.28739@ilog.fr>
To: zeller@ips.cs.tu-bs.de (Andreas Zeller)
Sender: news@ilog.fr
Nntp-Posting-Host: laumiere
Organization: ILOG S.A., France
References:  <D25DLK.Jwo@ips.cs.tu-bs.de>
Date: Tue, 10 Jan 95 08:03:39 GMT
Lines: 63

In article <D25DLK.Jwo@ips.cs.tu-bs.de>, zeller@ips.cs.tu-bs.de (Andreas Zeller) writes:
|> I am looking for an efficient algorithm to solve the following problem.
|> 
|> Let n denote numerical constants, and x, y variables.  Let T be a
|> boolean conjunction of constraints where each constraint has one of
|> the forms
|> 
|>   1.  x OP n   with OP in { <, <=, =, >=, >, <> }
|>   2.  x OP y   with OP in { <, <=, =, >=, >, <> }
|> 
|> The problem is to find out whether T is satisfiable (i.e. there exists
|> a variable assignment such that all constraints are satisfied), or
|> not.  
|> 
|> If all constraints are of type 1, then T could be solved by interval
|> logic, narrowing the intervals for each variable as the constraints
|> are processed.  However, I'm not sure how to decide satisfiability
|> involving constraints of type 2.
|> 

If you exclude the <> constraint, i.e. when the constraints are:
   3.  x OP y   with OP in { <, <=, =, >=, >}
then a polynomial time algorithm is known.

This algorithm was developped independantly by Claude Le Pape in his Phd Thesis
[1], and Jaffar et Al. [2].

If you include the <> constraint, then the satisfiability is an NP-complete problem.
Thus no efficient (polynomial time algorithm) is known.
In practice, one of the most efficient approach combines interval propagation, 
arc-consistency for the <> constraint, and bactracking search. Such a combination
is implemented in good constraint programming tools such as Ilog Solver
(see the FAQ of this group to obtain more information about this tool and 
other good tools).

|> Pointers to literature discussing efficient algorithms for this
|> problem, more general problems or similar problems are welcome.
|> 

[1] 
Claude Le Pape.
Des syst\`emes d'ordonnancement flexibles et opportunistes.
PhD Thesis, University Paris XI, 1988 (in French).

[2] 
Joxan Jaffar, Michaeil J. Maher, Peter J. Stuckey, Roland C. Yap
Beyond Finite Domains
in Principles and Practice of Constraint Programming
Alan Borning (ed), pp 86-94
LNCS 874, Springer Verlag, 1994.

|> --
|>          ) Andreas Zeller
|>     __o    Technische Universitaet Braunschweig, Abt. Softwaretechnologie
|>   _`\<,_   Gaussstrasse 17       Tel: +49 531/391-7580  zeller@acm.org
|>  ( )/ ( )  D-38092 Braunschweig  Fax: +49 531/391-8111  zeller@ips.cs.tu-bs.de
|> --^----^-- WWW: http://www.cs.tu-bs.de/softech/

-- 
  Jean-Francois Puget		 net : puget@ilog.fr
  ILOG S.A.                      url : http://www.ilog.fr
  2 Avenue Gallieni - BP 85	 tel : +33 1 46 63 66 66
  F-94253 Gentilly Cedex FRANCE	 fax : +33 1 46 63 15 82
