26 April 2013Lecture 6: Problem Solving1 Problem Solving Jorge Cruz DI/FCT/UNL April 2013.

Slides:



Advertisements
Similar presentations
Introduction. IC-Parc2 ECLiPSe Components Constraint Logic Programming system, consisting of  A runtime core Data-driven computation, backtracking, garbage.
Advertisements

Kinematic Synthesis of Robotic Manipulators from Task Descriptions June 2003 By: Tarek Sobh, Daniel Toundykov.
1 DAE Optimization towards real-time trajectory generation for flat nonlinear control systems Sachin Kansal, Fraser Forbes University of Alberta Martin.
Solutions for Scheduling Assays. Why do we use laboratory automation? Improve quality control (QC) Free resources Reduce sa fety risks Automatic data.
1 Backdoor Sets in SAT Instances Ryan Williams Carnegie Mellon University Joint work in IJCAI03 with: Carla Gomes and Bart Selman Cornell University.
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
/425 Declarative Methods - J. Eisner1 Constraint Programming.
MATH 685/ CSI 700/ OR 682 Lecture Notes
19 April 2013Lecture 4: Associating Narrowing Functions to Constraints1 Associating Narrowing Functions to Constraints Jorge Cruz DI/FCT/UNL April 2013.
458 Interlude (Optimization and other Numerical Methods) Fish 458, Lecture 8.
1 Optimisation Although Constraint Logic Programming is somehow focussed in constraint satisfaction (closer to a “logical” view), constraint optimisation.
12 April 2013Lecture 2: Intervals, Interval Arithmetic and Interval Functions1 Intervals, Interval Arithmetic and Interval Functions Jorge Cruz DI/FCT/UNL.
12 April 2013Lecture 1: Interval Constraints Overview1 Interval Constraints Overview Jorge Cruz DI/FCT/UNL April 2013.
Development of Empirical Models From Process Data
1 Backdoors To Typical Case Complexity Ryan Williams Carnegie Mellon University Joint work with: Carla Gomes and Bart Selman Cornell University.
Lecture outline Support vector machines. Support Vector Machines Find a linear hyperplane (decision boundary) that will separate the data.
26 April 2013Lecture 5: Constraint Propagation and Consistency Enforcement1 Constraint Propagation and Consistency Enforcement Jorge Cruz DI/FCT/UNL April.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
BUS 557 Mathematical Programming. What will this class be about? Modeling of Optimization Problems – Linear Programming – Transportation Problems – Network.
Polynomial Chaos For Dynamical Systems Anatoly Zlotnik, Case Western Reserve University Mohamed Jardak, Florida State University.
Chapter 17 Boundary Value Problems. Standard Form of Two-Point Boundary Value Problem In total, there are n 1 +n 2 =N boundary conditions.
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
3x – 5y = 11 x = 3y + 1 Do Now. Homework Solutions 2)2x – 2y = – 6 y = – 2x 2x – 2(– 2x) = – 6 2x + 4x = – 6 6x = – 6 x = – 1y = – 2x y = – 2(– 1) y =
GAMS Anwendung Nutzeroberfläche eigene Programme Modellierungs- System GAMS AMPL ILOG Studio … Solver CPLEX, CONOPT, MINOS, COIN, BARON,...
4.4 Equations as Relations
CONSTRAINT PROGRAMMING Computer Science Seminar April 9 th, 2004 Kerem Kacel.
MTH 104 Calculus and Analytical Geometry Lecture No. 2.
Table of Contents Solving Linear Systems of Equations - Dependent Systems The goal in solving a linear system of equations is to find the values of the.
Exploiting Automatically Inferred Constraint-Models for Building Identification in Satellite Imagery Research funded by the AFSOR, grant numbers FA
Module 1: Statistical Issues in Micro simulation Paul Sousa.
Appendix B A BRIEF TOUR OF SOLVER Prescriptive Analytics
P, NP, and Exponential Problems Should have had all this in CS 252 – Quick review Many problems have an exponential number of possibilities and we can.
The LC-3 – Chapter 7 COMP 2620 Dr. James Money COMP
Chapter 1 - Fundamentals Equations. Definitions Equation An equation is a statement that two mathematical statements are equal. Solutions The values.
Solving Linear Systems of Equations - Substitution Method Recall that to solve the linear system of equations in two variables... we need to find the value.
SOLVING SYSTEMS ALGEBRAICALLY SECTION 3-2. SOLVING BY SUBSTITUTION 1) 3x + 4y = 12 STEP 1 : SOLVE ONE EQUATION FOR ONE OF THE VARIABLES 2) 2x + y = 10.
Monté Carlo Simulation  Understand the concept of Monté Carlo Simulation  Learn how to use Monté Carlo Simulation to make good decisions  Learn how.
Comp763: Modern Computer Games Using Constraint Logic Programming to Analyze the Chronology in a William Faulkner Story Jennifer BurgSheau-Dong Lang Irwin.
1 Building The Ultimate Consistent Reader. 2 Introduction We’ve already built a consistent reader (cube-Vs.-point)... Except it had variables ranging.
1 Constraint Reasoning for Differential Models Jorge Cruz CENTRIA - Centre for Artificial Intelligence DI/FCT/UNL June 2009.
Solving Linear Systems by Substitution
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
Unit 2: Systems Day 1: Solving Systems with tables and graphing.
System To Generate Test Data: The Analysis Program Syed Nabeel.
Integer Programming, Branch & Bound Method
Custom Computing Machines for the Set Covering Problem Paper Written By: Christian Plessl and Marco Platzner Swiss Federal Institute of Technology, 2002.
Midterm Notes ABI101. Simultaneous Equations Simultaneous Equations are a set of equations containing multiple variables.equations This set is often referred.
Notes 6.5, Date__________ (Substitution). To solve using Substitution: 1.Solve one equation for one variable (choose the variable with a coefficient of.
Ch. Eick: Num. Optimization with GAs Numerical Optimization General Framework: objective function f(x 1,...,x n ) to be minimized or maximized constraints:
Solving a System of 3 Equations with 3 Unknowns. Breakdown Step 1 Labeling Step 2 Reduce to a 2 by 2 Step 3 Substitute Back In Step 4 Check Solution.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
STROUD Worked examples and exercises are in the text 1 STROUD Worked examples and exercises are in the text Programme F5: Linear equations PROGRAMME F5.
Computation of the solutions of nonlinear polynomial systems
Optimization Problems
Chapter 12 Section 1.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
INVERSE MANIPULATOR KINEMATICS
Morgan Kaufmann Publishers
Solving Systems – Choose Your Method
Solve a system of linear equation in two variables
Part 3 - Chapter 9.
Solving Systems of Equations using Substitution
Math I Quarter I Standards
5.3 Higher-Order Taylor Methods
Solving systems using substitution
Warm Up 12/3/2018 Solve by substitution.
PROGRAMME F5 LINEAR EQUATIONS and SIMULTANEOUS LINEAR EQUATIONS.
Solving systems of equations by substitution
Presentation transcript:

26 April 2013Lecture 6: Problem Solving1 Problem Solving Jorge Cruz DI/FCT/UNL April 2013

Lecture 6: Problem Solving2 Problem Solving Variable Elimination Dependency Reduction Modelling Techniques System Scaling Constraint Solving Systems Interval Libraries Some Languages and Tools Some Common Benchmarks Some Problems 26 April 2013 Final Project

Lecture 6: Problem Solving3 Modelling Techniques Frequently a single problem may be modelled by several equivalent CCSPs The behaviour of a constraint solver may change drastically even with equivalent CCSPs To choose the best model for a particular problem is important to understand the underlying constraint propagation algorithms Some modelling techniques are commonly adopted for improving the accuracy and efficiency of the continuous constraint solvers 26 April 2013

Lecture 6: Problem Solving4 Modelling Techniques A fundamental problem of interval arithmetic is the dependency problem (see lecture 2). Dependency Reduction Some expressions may be rewritten into equivalents that minimize the dependency problem Factorize as much as possible polynomial expressions: Instead of using constraint x 2 y 2 +xy 2 +xy=0 use constraint xy(y(x+1)+1)=0 Use better interval extensions (mean value form, Taylor form,…): Instead of using constraint x  x 2 =0 use constraint 0.25  (x  0.5) 2 =0 Examples: 26 April 2013

Lecture 6: Problem Solving5 Modelling Techniques Precision and efficiency may be improved if the number of variables is reduced Variable Elimination Sometimes a set of constraints may be rewritten into an equivalent set with less variables Example: Continuous constraint solvers rely on the efficiency of branch and prune algorithms for enforcing consistency on the CCSP variables Instead of using the constraint system: x 1 + x 2 + x 3 =  1 (x 1 + x 1 x 2 + x 2 x 3 ) x 4 = c 1 (x 2 + x 1 x 3 ) x 4 = c 2 x 3 x 4 = c 3 Consider x 4 = c 3 /x 3 and use the constraint system: x 1 + x 2 + x 3 =  1 (x 1 + x 1 x 2 + x 2 x 3 )c 3 = c 1 x 3 (x 2 + x 1 x 3 )c 3 = c 2 x 3 26 April 2013

Lecture 6: Problem Solving6 Modelling Techniques A consequence of numerical errors is the amplification of the variable domains and poor pruning results System Scaling Two major sources of numerical errors are: operations with large numbers (lower density of F-Numbers at this ranges) operands with different magnitudes Scaling the system and making some variable substitutions may avoid such situations as much as possible Continuous constraint solvers rely on interval techniques for dealing with numerical errors. Consider x = y and use the constraint: y 2 +3y+2=0 Example: Instead of using constraint: x 2 +3x+2×10 20 =0 26 April 2013

Lecture 6: Problem Solving7 Some Languages and Tools PROFIL/BIAS (Programmer's Runtime Optimized Fast Interval Library) Interval Libraries GAOL: NOT Just Another Interval Library smath (routines for interval arithmetic and constraint narrowing) C FILIB (Fast Interval LIBrary) FILIB++ (Fast Interval LIBrary in C++) C++ 26 April 2013

Lecture 6: Problem Solving8 Some Languages and Tools ILOG Solver (C++) Constraint Solving Systems Elisa (C++) RealPaver (C++) Academic CLIP (Prolog) Commercial 26 April 2013

Lecture 6: Problem Solving9 Some Problems Many continuous problems may be modelled and solved as CCSPs. Some Common Benchmarks Several benchmarks are commonly used to address the quality of the constraint solvers. The following problems illustrate some common benchmarks in interval constraints. For each benchmark we would like to know where are the solutions (if any) satisfying the constraints within the specified ranges 26 April 2013

Lecture 6: Problem Solving10 Some Problems 2x 1 =2 2x 2 =1 2x 3 =2 2x 4 =1 2x 5 =x 6 x 5 +2x 6 =2 (x 1 -x 7 ) 2 +x 8 2 -x 7 2 =(x 8 -x 2 ) 2 (x 1 -x 7 ) 2 +x 8 2 -(x 3 -x 7 ) 2 =(x 4 -x 8 ) 2 x 1 2 +x x 1 x 7 +2x 2 x 8 =0 x 1 2 -x 3 3 -x x 7 (x 1 -x 3 )+2x 4 x 8 =0 Appolonius Ranges: Constraints: x 1, x 2, x 3, x 4, x 5, x 6, x 7, x 8  [-10 8,10 8 ] 26 April 2013

Lecture 6: Problem Solving11 Some Problems x 2 + y 2 + z 2 = 36 x + y = z xy + z 2 = 1 Bronstein Ranges: Constraints: x, y, z  [-10 8,10 8 ] 26 April 2013

Lecture 6: Problem Solving12 Some Problems Brown Ranges: Constraints: n = 5 x 1, x 2, x 3, x 4, x 5  [-10 8,10 8 ] 26 April 2013

Lecture 6: Problem Solving13 Some Problems R = 10 R 5 = R 6 = /  40 R 7 = /  40 R 8 = /40 R 9 = /  40 R 10 = /40 3x 5 =x 1 (x 2 +1) x 2 (2x 1 +x 3 2 +R 8 +2R 10 x 2 +R 7 x 3 +R 9 x 4 )+x 1 =Rx 5 x 3 (2x 2 x 3 +2R 5 x 3 +R 6 +R 7 x 2 )=8x 5 x 4 (R 9 x 2 +2x 4 )=4Rx 5 x 2 (x 1 +R 10 x 2 +x 3 2 +R 8 +R 7 x 3 +R 9 x 4 )+x 1 +x 3 (R 5 x 3 +R 6 )+x 4 2 =1 Chem Ranges: Constraints: x 1, x 2, x 3, x 4, x 5  [0,10 8 ] 26 April 2013

Lecture 6: Problem Solving14 Some Problems x 1 2 = x 2 x 4 2 = x e 7 x x 1 x x 1 = x e 7 x 2 x ×10 14 x 2 x ×10 7 x 1 x ×10 7 x 3 x x 4 = 8.282×10 6 x 1 x ×10 7 x Chemk Ranges: Constraints: x 1, x 2, x 3, x 4  [0,1] 26 April 2013

Lecture 6: Problem Solving15 Some Problems y 2 z 2 + y 2 + z = 24yz x 2 z 2 + x 2 + z = 24xz x 2 y 2 + x 2 + y = 24xy Cyclo Ranges: Constraints: x, y, z  [0,10 5 ] 26 April 2013

Lecture 6: Problem Solving16 Some Problems x 2 + 2x 6 + x 9 +2x 10 = x 3 + x 8 = 3×10 -5 x 1 + x 3 +2x 5 + 2x 8 + x 9 + x 10 = 5×10 -5 x 4 + 2x 7 = ×10 -7 x 5 = x ×10 -6 x 6 = 2x × x 7 = x ×10 -6 x 8 = x 1 x ×10 -7 x 9 = x 1 x × x 10 = x 1 x 2 2 Combustion Ranges: Constraints: x 1, x 2, x 3, x 4, x 5, x 6, x 7, x 8, x 9, x 10  [-10 8,10 8 ] 26 April 2013

Lecture 6: Problem Solving17 Some Problems x 1 +5x 2 2 = x x x 1 + x x 2 2 = 14x Freudenstein Ranges: Constraints: x 1, x 2  [-10 8,10 8 ] 26 April 2013

Lecture 6: Problem Solving18 Some Problems 2x x 1 x 2 + 4x 1 3 = 42x x x 1 x 2 + 4x 2 3 = 26x Himmelblau Ranges: Constraints: x 1, x 2  [-10 8,10 8 ] 26 April 2013

Lecture 6: Problem Solving19 Some Problems x 1 = x 4 x 3 x 9 x 2 = x 1 x 10 x 6 x 3 = x 1 x 2 x 10 x 4 = x 7 x 1 x 6 x 5 = x 7 x 6 x 3 x 6 = x 8 x 5 x 10 x 7 = x 2 x 5 x 8 x 8 = x 1 x 7 x 6 x 9 = x 10 x 6 x 8 x 10 = x 4 x 8 x 1 I1 Ranges: Constraints: x 1, x 2, x 3, x 4, x 5, x 6, x 7, x 8, x 9, x 10  [-2,2] 26 April 2013

Lecture 6: Problem Solving20 Some Problems 6(x 1 x 2 - x 3 x 4 ) + 10 x 1 = 1 6(x 1 x 4 + x 2 x 3 ) + 10 x 3 = 4 x x 3 2 = 1 x x 4 2 = 1 Kincox Ranges: Constraints: x 1, x 2, x 3, x 4  [-1,1] 26 April 2013

Lecture 6: Problem Solving21 Some Problems eg + 2dh = 0 9e + 4b = 0 4ch + 2ef + 3dg = 0 7c + 8f = 9a 4df + 5cg + 6h + 3e = 0 5d + 6cf + 7g - 9b = 0 9d + 6a = 5b 7a = 9c + 8 Nauheim Ranges: Constraints: a, b, c, d, e, f, g, h  [-10 8,10 8 ] 26 April 2013

Lecture 6: Problem Solving22 Some Problems x x 3 2 =1 x x 4 2 =1 x 5 x x 6 x 4 3 = 5 x 5 x x 6 x 2 3 = 4 x 5 x 1 x x 6 x 4 2 x 2 = 3 x 5 x 1 2 x 3 + x 6 x 2 2 x 4 = 2 x 2  x 1 Neuro Ranges: Constraints: x 1, x 2, x 3, x 4, x 5, x 6  [-10,10] 26 April 2013

Lecture 6: Problem Solving23 Some Problems x - lt 3 - Lw =0 y - Lt - lw 3 =0 L = 1 l = 2 x = a 2a = 3 y = b b = rt w 2 + t 2 = 1 Piano Ranges: Constraints: x, y, a, b, r, t, l, L  [-10 5,10 5 ] w  [0,10 5 ] 26 April 2013

Lecture 6: Problem Solving24 Some Problems x x 2 2 =1 x x 4 2 =1 x x 6 2 =1 x x 8 2 = x 1 x 3 + x 7 = x 2 x x x x x 1 x x 2 x x 1 = x x x 7 x 6 x x x 2 = x = x 1 Robot Kinematics Ranges: Constraints: x 1, x 2, x 3, x 4, x 5, x 6, x 7, x 8  [-1,1] 26 April 2013

Lecture 6: Problem Solving25 Project Use interval constraint techniques to solve systems of nonlinear equations that models Social Argumentation Networks [1]. The problem These are systems with n equations and n unknowns of the form: with 1  i  n, x i  [0,1], a i  (0,1) and m ji  {0,1} [1] J. Leite and J. Martins. Social abstract argumentation. In Proceedings of IJCAI'11, volume 3, April 2013

Lecture 6: Problem Solving26 Project Solve the following systems: a) b) c) Task 1 26 April 2013

Lecture 6: Problem Solving27 Project Solve the systems represented in the files: a) example1example1 b) example2example2 c) example3example3 d) example4example4 e) example5example5 f) example6example6 g) example7example7 h) example8example8 with the following format: the first line contains an integer representing the number of variables n; the next n lines represent the values of a i ; the next n lines represent the matrix m. Task 2 26 April 2013

Lecture 6: Problem Solving28 Project a)Implement na application to generate and solve a random system of n variables. b)Solve random systems of 5, 10, 15, 20, 25, … variables (10 instances of each) and produce a table with statistical information of its performance (execution time, number of splits, …) Task 3 26 April 2013