Download presentation
Presentation is loading. Please wait.
Published bySharon Bridges Modified over 8 years ago
1
CONSTRAINT PROGRAMMING Computer Science Seminar April 9 th, 2004 Kerem Kacel
2
OUTLINE Introduction History The Method Constraint Logic Programming Applications Pros/Cons Discussion
3
What is Constraint Programming? Software technology Describe and solve large, combinatorial problems 2 steps State the constraints of the problem Find a solution satisfying all of the constraints
4
What is a Constraint? Defined on a set of variables A relation on their domains e.g. “The circle is inside the square” Does NOT necessarily specify values Does restrict values
5
Properties of Constraints Express partial information X > 0 Heterogeneous Y = ABS(X) Non-directional X = Y+1 also means Y = X-1
6
Properties of Constraints (2) Additive X 1 also means X>1, X<4 Declarative “The pen is on the table” Usually dependent X + Y = 5, X * Y = 6
7
OUTLINE Introduction History The Method Constraint Logic Programming Applications Pros/Cons Discussion
8
Some History Constraint Satisfaction Problems (CSPs) were formalized in early 70s Constraint Logic Programming (CLP) emerged in early 80s, named by IBM Prolog II was the first Later CHIP (Constraints Handling in Prolog) Prolog III
9
Some History Cosytec Founder of “Global Constraints” Helped solve a large class of problems Planning, scheduling, sequencing ILOG SOLVER Constraint programming classes for C++, Java
10
OUTLINE Introduction History The Method Constraint Logic Programming Applications Pros/Cons Discussion
11
METHOD Define the problem as a CSP (Constraint Satisfaction Problem) Solve the CSP
12
What is a CSP? Constraint Satisfaction Problem Set of variables X = {x 1,…,x n } Domains D i for each variable Set of constraints An example CSP A::{1,2}, B::{1,2}, C::{1,2} A = B, A ≠ C, B > C
13
Solving a CSP Example CSP A::{1,2}, B::{1,2}, C::{1,2} A = B, A ≠ C, B > C Generate & Test For every value assignment in the domains, check if constraint is met e.g. A = 2, B = 2, C = 1
14
Solving a CSP Example CSP A::{1,2}, B::{1,2}, C::{1,2} A = B, A ≠ C, B > C Back-Tracking Start with a specific assignment Change values one by one until a solution is reached
15
Solving a CSP Problem: These methods are inefficient Other methods are being researched to optimize
16
OUTLINE Introduction History The Method Constraint Logic Programming Applications Pros/Cons Discussion
17
Constraint Logic Programming Constraints + LP = CLP Platforms: CHIP ECLiPSe
18
OUTLINE Introduction History The Method Constraint Logic Programming Applications Pros/Cons Discussion
19
APPLICATIONS Assignment problems Personnel assignment Scheduling problems Class schedules in schools Production planning Database Systems Ensure consistency of data
20
APPLICATIONS Natural Language Processing Construction of efficient parsers Electrical Engineering Locating faults in circuits Molecular Biology DNA sequences
21
PROS/CONS + Declarative Describe the problem, not solution + Semantics Clean, elegant languages - Unpredictable We don’t know how efficient
22
DISCUSSION “Were you to ask me which programming paradigm is likely to gain most in commercial significance over the next 5 years I’d have to pick Constraint Logic Programming, even though it’s perhaps currently one of the least known and understood.” Dick Pountain, BYTE, February 1995
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.