Programming with Constraints Jia-Huai You. Subject of Study Constraint Programming (CP) studies the computational models, languages, and systems for solving.

Slides:



Advertisements
Similar presentations
Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Advertisements

Heuristic Search techniques
Big Ideas in Cmput366. Search Blind Search State space representation Iterative deepening Heuristic Search A*, f(n)=g(n)+h(n), admissible heuristics Local.
Constraint Satisfaction Problems Russell and Norvig: Parts of Chapter 5 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
Interactive Configuration
1 CMSC 471 Fall 2002 Class #6 – Wednesday, September 18.
Introduction. IC-Parc2 ECLiPSe Components Constraint Logic Programming system, consisting of  A runtime core Data-driven computation, backtracking, garbage.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
G53CLP Constraint Logic Programming Modeling CSPs – Case Study I Dr Rong Qu.
The Theory of NP-Completeness
Constraint Processing and Programming Introductory Exemple Javier Larrosa.
Great Theoretical Ideas in Computer Science for Some.
Knowledge Representation and Reasoning (KR): A vibrant subfield of AI Jia You.
Properties of SLUR Formulae Ondřej Čepek, Petr Kučera, Václav Vlček Charles University in Prague SOFSEM 2012 January 23, 2012.
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
Answer Set Programming vs CSP: Power of Constraint Propagation Compared Jia-Huai You ( 犹嘉槐 ) University of Alberta Canada.
1 Programming with Constraints Jia-Huai You Constraint programming languages - based on non-monotonic logic - Answer set programming (ASP) Knowledge Representation.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Solving Partial Order Constraints for LPO termination.
Constraint Satisfaction Problems
The Theory of NP-Completeness
Analysis of Algorithms CS 477/677
Chapter 5 Outline Formal definition of CSP CSP Examples
GRASP: A Search Algorithm for Propositional Satisfiability EE878C Homework #2 2002/11/1 KAIST, EECS ICS Lab Lee, Dongsoo.
ECE Synthesis & Verification, Lecture 17 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Technology.
Constraint Satisfaction Problems
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Ontologies Reasoning Components Agents Simulations Belief Update, Planning and the Fluent Calculus Jacques Robin.
CONSTRAINT PROGRAMMING Computer Science Seminar April 9 th, 2004 Kerem Kacel.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
© J. Christopher Beck Lecture 13: Modeling in Constraint Programming.
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems by Carla P. Gomes, Bart Selman, Nuno Crato and henry Kautz Presented by Yunho.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Solving Constraint Satisfaction Problems (CSPs) using Search CPSC 322 – CSP 2 Textbook § January 31, 2011.
Solving Constraint Satisfaction Problems (CSPs) using Search
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Chapter 5 Constraint Satisfaction Problems
Constraints and Search Toby Walsh Cork Constraint Computation Centre (4C) Logic & AR Summer School, 2002.
Quality of LP-based Approximations for Highly Combinatorial Problems Lucian Leahu and Carla Gomes Computer Science Department Cornell University.
CPSC 322, Lecture 19Slide 1 (finish Planning) Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt – 5.2) Oct,
Some Thoughts to Consider 8 How difficult is it to get a group of people, or a group of companies, or a group of nations to agree on a particular ontology?
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Put a different number in each circle (1 to 8) such that adjacent circles cannot take consecutive numbers.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 9: Test Generation from Models.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Knowledge Representation Fall 2013 COMP3710 Artificial Intelligence Computing Science Thompson Rivers University.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Roman Barták (Charles University in Prague, Czech Republic) ACAT 2010.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
What is ASP? CSCE 330 Programming Language Presentation JANICE NEIGHBOR, MICHAEL RICKABAUGH, DAVID THOMAS
1 Intro to AI Local Search. 2 Intro to AI Local search and optimization Local search: –use single current state & move to neighboring states Idea: –start.
© 2012 IBM Corporation Perfect Hashing and CNF Encodings of Cardinality Constraints Yael Ben-Haim Alexander Ivrii Oded Margalit Arie Matsliah SAT 2012.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Automatic Test Generation
Knowledge Representation
Constraint Satisfaction Problem
Planning in Answer Set Programming
DLL Algorithm.
Knowledge Representation
Constraint Satisfaction
Constraint Satisfaction Problems
Presentation transcript:

Programming with Constraints Jia-Huai You

Subject of Study Constraint Programming (CP) studies the computational models, languages, and systems for solving problems that can be characterized by constraints Any solution of a problem must satisfy all the constraints that represent the given problem.

Typical Problems Almost all computationally hard problems fall into it: Scheduling: airline, sports, … Planning: logistics, networking, robots, … Optimization NP-hard problems: combinatorial, graph- theoretic problems, bio informatics, puzzles, etc.

Before CP Given a problem develop an algorithm for it prove the properties of the algorithm implement it in a computer language perhaps try to improve it

The CP Approach One of the closest approaches computer science has yet made to the Holy Grail of programming: the user states the problem, the computer solves it. Related to Declarative Programming

Example: Graph Coloring Represented by nodes and arcs, the user states: Every node must be colored with one and exactly one color; If two nodes A and B are connected by an arc, then their colors must be distinct The encoding of the above differs in different approaches to CP.

Planning Represented by constraints that express: Action choice which action(s) should be chosen at each state Affected objects the affected objects by an action Effects if affected, what are the effects Frame axioms if not affected by any action at a state, the fluents that hold at the current state remain to hold in the next state.

Some Approaches to CP Constraint Satisfaction Problem (CSP) SAT/Answer Set Programming Integer Programming Pseudo-Boolean constraint solvers

CSP A problem specified by variables, domains, and constraints. Convenient to solve many combinatorial, optimization problems ILOG: A commercial product Constraint Logic Programming -Efficient solvers embedded in Prolog, 30+ systems -Global constraints

SAT Check whether a collection of propositional clauses has a model Successfully employed in large-scaled circuit verification, design automation, etc. Modern SAT solvers are quite efficient (best known: zChaff)

Answer Set Programming (ASP) A variant of SAT with a non-monotonic semantics, enhanced by a number of programming constructs; e.g. cardinality constraints Example: 3-coloring 1 {colored(A,red),colored(A,yellow),colored(A,blue)} 1 :- node(A). :- node(A), node(B), color(C), colored(A,C), colored(B,C), arc(A,B).

Features of ASP Capable of solving problems harder than NP-complete ones. Capable of representing and reasoning with default A suitable framework for Knowledge Representation? Efficient implementations (Smodels, DLV)

General Research Issues General Research Issues Representation -languages, semantics, complexity, power of representation, properties, solution methods, …… Solvers -Complete solvers; random approaches -Constraint propagation: pruning power vs. overhead -Heuristics -Backtrack strategies Programming environment Relationships among competing approaches What if a problem doesn’t have a solution Benchmarks/Applications

Representative publications J You and G Liu. Loop formulas for logic programs with arbitrary constraint atoms. AAAI-08. F Lin and J You. Abduction in logic programming by nonground rewrite systems. AAAI-08.Abduction in logic programming by nonground rewrite systems. Y Shen and J You. A generalized Gelfond-Lifschitz transformation for logic programs with abstract constraints. AAAI '07A generalized Gelfond-Lifschitz transformation for logic programs with abstract constraints. G Wu, J You, G Lin. Quartet based phylogeny reconstruction with answer set programming. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 2007.Quartet based phylogeny reconstruction with answer set programming. Janhunen, I. Niemela, D. Seipel, P. Simons, J. You. Unfolding partiality and disjunctions in stable model semantics. ACM Transactions on Computational Logic ’06Unfolding partiality and disjunctions in stable model semantics.