Presentation is loading. Please wait.

Presentation is loading. Please wait.

Foundations of Constraint Processing

Similar presentations


Presentation on theme: "Foundations of Constraint Processing"— Presentation transcript:

1 Foundations of Constraint Processing
CSCE421/821, Fall 2003: Berthe Y. Choueiry (Shu-we-ri) Ferguson Hall, Room 104 Tel: +1(402) 7/1/2019 Lecture slides 2

2 Constraint Satisfaction 101
Motivating example, application areas Application examples Definition, representation, & formal characterization Solving techniques Issues & research directions 7/1/2019 Lecture slides 2

3 How to solve a CSP? Search 1. Constructive, systematic
2. Iterative repair 7/1/2019 Lecture slides 2

4 Systematic search Starting from a root node
Consider all values for a variable V1 For every value for V1, consider all values for V2 etc.. For n variables, each of domain size d Maximum depth? fixed! Maximum number of paths? size of search space, size of CSP 7/1/2019 Lecture slides 2

5 Systematic search Before starting search, consider
Importance of modeling/formulation: to control the size of the search space Preprocessing (i.e., constraint filtering/propagation, consistency checking) to reduce size of search space 7/1/2019 Lecture slides 2

6 Importance of modeling
N-queen: formulation 1 Variables? Domains? Size of CSP? N-queens: formulation 2 4 Column positions 4 Rows V1 V2 V3 V4 16 Cells V11 V12 V13 V14 V21 V22 V23 V24 V31 V32 V33 V34 V41 V42 V43 V44 {0,1} 7/1/2019 Lecture slides 2

7 Constraint checking Arc-consistency B 1- B: [ 5 .. 14 ] A < B A
13 1- B: [ ] A < B 14 A [ ] C: [ ] 2 2- A: [ ] B < C [ ] C: [ ] 2 < C - A < 5 3- B: [ ] 6 14 [ ] C 7/1/2019 Lecture slides 2

8 Constraint checking Arc-consistency: every combination of two adjacent variables 3-consistency, k-consistency (k  n) Constraint filtering, constraint checking, etc.. Eliminate non-acceptable tuples prior to search Warning: arc-consistency does not solve the problem still is not a solution! 7/1/2019 Lecture slides 2

9 Systematic search (I) Back-checking
Systematic search generates dn possibilities Are all possibilities acceptable? Expand a partial solution only when it is consistent This yields early pruning of inconsistent paths 7/1/2019 Lecture slides 2

10 Systematic search (II) Chronological backtracking
What if only one solution is needed? Depth-first search & Chronological backtracking DFS: Soundness? Completeness? 7/1/2019 Lecture slides 2

11 Systematic search (III) Intelligent backtracking
What if the reason for failure was higher up in the tree? Backtrack to source of conflict !! Backjumping, conflict-directed backjumping, etc. 7/1/2019 Lecture slides 2

12 Systematic search (IV) Ordering heuristics
Which variable to expand first? Heuristics: most constrained variable first (reduce branching factor) most promising value first (find quickly first solution) 7/1/2019 Lecture slides 2

13 Systematic search (V) Back-checking
Search tree with only backtrack search? Root node Backtrack 2 Q Q 1 3 Q 4 Q Backtrack 1 2 4 Q 1 2 3 2 Q 3 Backtrack 4 1 2 3 4 1 1 Q Q 3 Solution! 26 nodes Visited 1 2 3 4 1 2 7/1/2019 Lecture slides 2

14 Systematic search (VI) Forward checking
Search Tree with domains filter by Forward Check Root Node Q 1 2 Domain Wipe out V4 Q Q 3 Domain Wipe Out V3 4 Q Q 4 2 Q Q 1 3 Q Solution! 8 nodes visited 7/1/2019 Lecture slides 2

15 Summary of backtrack search
Constructive, systematic, exhaustive In general sound and complete Back-checking: expands nodes consistent with past Backtracking: Chronological vs. intelligent Ordering heuristics: Static Dynamic variable Dynamic variable-value pairs Looking ahead: Partial look-ahead Forward checking (FC) Directional arc-consistency (DAC) Full (a.k.a. Maintaining Arc-consistency or MAC) 7/1/2019 Lecture slides 2

16 CSP: a decision problem (NP-complete)
Modeling: abstraction and reformulation Preprocessing techniques: eliminate non-acceptable tuples prior to search Systematic search: potentially dn paths of fixed lengths chronological backtracking intelligent backtracking variable/value ordering heuristics Search ‘hybrids:’ Mixing consistency checking with search: look-ahead strategies 7/1/2019 Lecture slides 2

17 Non-systematic search
Iterative repair, local search: modifies a global but inconsistent solution to decrease the number of violated constraints Examples: Hill climbing, taboo search, simulated annealing, GSAT, WalkSAT, Genetic Algorithms, Swarm intelligence, etc. Features: Incomplete & not sound Advantage: anytime algorithm Shortcoming: cannot tell that no solution exists 7/1/2019 Lecture slides 2

18 Decomposition Decomposition Conjunctive Disjunctive
Partition constraints (DB) Decomposition Conjunctive Disjunctive Properties of disjunctive decompositions 7/1/2019 Lecture slides 2

19 Properties of disjunctive decompositions
Conjunctive or disjunctive? Consistent: No constraint is removed Simplifying: Size(Pi) < Size( P) Semi-complete: At least one solution is kept Complete: No solution is lost Redundant: Solutions replicated in { Pi} Reducible: may be < Size( P) 7/1/2019 Lecture slides 2

20 Deep analysis Uncover particular properties, e.g.
bound the required level of consistency (islands of tractability) predict ease/difficulty of solving a given instance Structure, topology of the constraint graph tree, DAGs, chordal, etc. Types, semantics of the constraints subsets of Allen's relations, all-diffs, functional, monotonic, row-convex, linear inequalities, etc. Order parameter (phase transition) 7/1/2019 Lecture slides 2

21 Multi agents 1. Computational tasks: problem decomposed, replicated
2. Types of agent: broker, solver, problem, solver+problem 3. Architecture and authority: hierarchical, egalitarian, priority-based (e.g., vote) 4. Nature of communication: agent-to-agent, group, broadcast 5. Interaction strategies: cooperating vs. competing transparent vs. secretive negotiation + alliance/coalition formation 7/1/2019 Lecture slides 2

22 Computational tasks At one end of the spectrum, agents may be involved in solving heterogeneous, distinct and completely independent problems and request other agents to supply specific functionalities for the completion of the individual tasks. At the other end of the spectrum, the same problem could be replicated and assigned to all agents, which can then share their individual results with other agents incrementally in order to speed up the execution of the global computational task. 7/1/2019 Lecture slides 2

23 Types of agent An agent in the system can be any of the following:
an agent that collects data from the environment and formulates the CSP a reasoning module with specific computational characteristics (e.g., various search algorithms) brokers that facilitate matching between a service seeker and a number of service providers (e.g., CORBA brokers). 7/1/2019 Lecture slides 2

24 Agent architecture and how is authority granted
Agents could be organized in a strict hierarchy in which a given agent has full control over the activities of the agents that lie underneath it in the hierarchy. It decides how the lower level agents may cooperate while ensuring coordination with the higher-level agent. Agents could be in a strictly flat structure competing for services and rewards, either chaotically or according to some strict priority policy, for example, based on voting or time-responsiveness. 7/1/2019 Lecture slides 2

25 Communication environment
Communications among agents may be conducted according to: a one-to-one schema multi-cast (i.e., one-to-group), or broadcast, where all agents in the environment have access to the content of the communicated information. 7/1/2019 Lecture slides 2

26 Type of supported interactions
Agents may be cooperative, pooling their resources and capabilities to achieve a common, global objective, or they could be competitive trying to win rewards and optimize their individual gain. They could also adopt a midway strategy, dynamically forming coalitions and gathering support to acquire more resources and realize greater gains. Also, agents may be transparent about their intentions, resources, needs, and constraints or may be secretive, hiding one or the other of their strengths or weaknesses. 7/1/2019 Lecture slides 2

27 Research Directions Preceding (i.e., search, backtrack, iterative repair, V/V/ordering, consistency checking, decomposition, symmetries & interchangeability, deep analysis) Evaluation of algorithms worst-case analysis vs. empirical studies random problems vs. real-world problems Cross-fertilization: DB, SAT & theoretical computer science (TCS), mathematical programming, interval mathematics, logical inference, applications, etc. Modeling & Reformulation Multi agents Distribution and negotiation decomposition & alliance formation 7/1/2019 Lecture slides 2

28 CSP in a nutshell (I) Definition: P = (V, D, C )
Constraint graph, constraint network Finite domains Binary constraints, universal constraints Examples: map coloring, puzzles, resource allocation, temporal reasoning, product configuration, databases, spreadsheets, graphical layouts, graphical user-interfaces, bioinformatics, etc. 7/1/2019 Lecture slides 2

29 CSP in a nutshell (II) Solution technique: Search constructive
Enhancing search: constructive iterative repair Intelligent backtrack Variable/value ordering Consistency checking Hybrid search  Symmetries  Decomposition 7/1/2019 Lecture slides 2

30 CSP in a nutshell (III) Deep analysis:  Graph topology
exploit problem structure Research  Graph topology  Constraint semantics Phase transition - k-ary constraints, soft constraints - continuous vs. finite domains - evaluation of algorithms (empirical) - cross-fertilization (mathematical program.)  reformulation and approximation  architectures (multi-agent, negotiation) 7/1/2019 Lecture slides 2

31 Constraint Logic Programming (CLP)
A merger of  Constraint solving  Logic Programming, mostly Horn clauses e.g., Prolog) Building blocks Constraint: primitives but also user-defined cumulative/capacity (linear ineq), MUTEX, cycle, etc. domain: Booleans, natural/rational/real numbers, finite Rules (declarative): a statement is a conjunction of constraints and is tested for satisfiability before execution proceeds further Mechanisms: satisfiability, entailment, delaying constraints 7/1/2019 Lecture slides 2

32 Constraint Processing Techniques
Were you to ask me which programming paradigm is likely to gain most in commercial significance over the next 5 years, I would have to pick Constraint Logic Programming (CLP), even though it is perhaps currently one of the least known and understood. That’s because CLP has the power to tackle those difficult combinational problems encountered for instance in job scheduling, timetabling, and routing which stretch conventional programming techniques beyond their breaking point. Though CLP is still the subject of intensive research, it is already being used by large corporation such as manufacturers Michelin and Dassault, the French railway authority SNCF, airlines Swissair and SAS and Cathay Pacific, and Hong Kong International Terminals, the world’s largest privately-owned container terminal Byte, Dick Powntain 7/1/2019 Lecture slides 2


Download ppt "Foundations of Constraint Processing"

Similar presentations


Ads by Google