What is Constraint: Definition and 184 Discussions

Constraint programming (CP) is a paradigm for solving combinatorial problems that draws on a wide range of techniques from artificial intelligence, computer science, and operations research. In constraint programming, users declaratively state the constraints on the feasible solutions for a set of decision variables. Constraints differ from the common primitives of imperative programming languages in that they do not specify a step or sequence of steps to execute, but rather the properties of a solution to be found. In addition to constraints, users also need to specify a method to solve these constraints. This typically draws upon standard methods like chronological backtracking and constraint propagation, but may use customized code like a problem specific branching heuristic.
Constraint programming takes its root from and can be expressed in the form of constraint logic programming, which embeds constraints into a logic program. This variant of logic programming is due to Jaffar and Lassez, who extended in 1987 a specific class of constraints that were introduced in Prolog II. The first implementations of constraint logic programming were Prolog III, CLP(R), and CHIP.
Instead of logic programming, constraints can be mixed with functional programming, term rewriting, and imperative languages.
Programming languages with built-in support for constraints include Oz (functional programming) and Kaleidoscope (imperative programming). Mostly, constraints are implemented in imperative languages via constraint solving toolkits, which are separate libraries for an existing imperative language.

View More On Wikipedia.org
  1. D

    Optimization problem with constraint

    PROBLEM STATEMENT: Determine if f(x,y) = x^2+y^2 has a maximum and a minimum when we have the constraint 2x^3+3x^{2}y+3xy^{2}+2y^3=1. (1) ATTEMPT TO SOLUTION: A standard way of solving these kinds of problems is by using the Lagrangian multiplier-method. It consists of comparing the gradient of...
  2. Q

    Quadratic equation solving with constraint.

    Homework Statement So I've worked this problem for awhile. Its a several page of math problem with optimization, legrangians, cramers rule, etc to get to this point. All I need to do now is by hand solve this equation for x and y with the constraint. Homework Equations -0.03x^2 + 40x...
  3. T

    Can anyone explain why there is a force constraint in the z direction

    Homework Statement The Attempt at a Solution Can anyone explain why there is a force constraint in the z direction. The pin force only affects the x and y... Also shouldn't there be a moment in the z since the pin prevents the block from rotating cw and ccw in the xy plane?
  4. L

    Formulation rigid body constraint

    Hello I need some help with formulating the constraint force for a sliding and rotating box. The scenario is: A box is sliding down a slanted table. The center of gravity has passed the edge of the table so the box receives a counter force and torque. I am solving the forces and moments...
  5. K

    Scleronomic constraint with explicit time dependence?

    Hi all, I was having a bit difficulty understanding the term scleronomic constraint. From what I have read, it is a type of holonomic system(which means there is time dependence). However, the difference between the two types(scleronomic and rheonomic), is that although scleronomic...
  6. J

    Visualising the Hamiltonian constraint in inhomogeneous LQC

    In this paper called "Stepping out of Homogeneity in Loop quantum Cosmology" - http://arxiv.org/pdf/0805.4585.pdf. On page 4 they say "where the sum is over the couples of distinct faces at each tetrahedron, U_{ff'} = U_f U_{f_1} U_{f_2} \dots U^{-1}_{f'} where l_{ff'} = \{ f , f_1; f_2; \dots...
  7. T

    Constraint Forces and Conservation of energy

    Suppose you are trying the solve the equation of motion of say a particle constrained to move on a surface f(x\vec{},t)=0. The equation of motion is: mx\ddot{} = F\vec{} + N\vec{}, where F is an known external force and N is the unknown constraint force. Now, when you assume that N always...
  8. B

    Maximizing a multivariate function under a constraint

    Homework Statement Consider f(x,y) = \frac{1}{x} - \frac{1}{y} You need to maximize f(x,y) given the constraint: x + y = 11 Homework Equations I have never solved a problem like this before. In fact I made up a problem a few minutes ago. The Attempt at a Solution I...
  9. M

    Finding extrema of a function subject to constraint

    Hello, I need to find (if there are) minimum and maximum values of the following function: z=\frac{1}{x}+\frac{1}{y} subject to constraint: \frac{1}{{x}^{2}}+\frac{1}{{y}^{2}}=\frac{1}{{a}^{2}} a\neq 0 I think there are no extrema, but I do not know how to show it.
  10. L

    A variational problem with the constraint that the function be decreasing

    The problem is in the attached document. Thanks for any suggestions! Lennart
  11. Y

    How can i find the acceleration for this constraint?

    Homework Statement What is the acceleration of the 2. kg block in the figure across the frictionless table? Homework Equations F=ma The Attempt at a Solution g = 9.8ms^2
  12. M

    Multivariable calculus: Maximization of volume of box with constraint

    Homework Statement What is the maximum possible volume of a rectangular box inscribed in a hemisphere of radius R? Assume that one face of the box lies in the planar base of the hemisphere. NOTE: For this problem, we're not allowed to use Lagrange multipliers, since we technically haven't...
  13. P

    Rolling Object on Curved Surface: Lagrangian Mechanics + Constraint

    Homework Statement I want to be able to plot a trajectory wrt time of a ball that rolls without slip on a curved surface. Known variables: -radius/mass/moment of inertia of the ball. -formula for the curvature of the path (quadratic) -formula relating path length and corresponding height...
  14. T

    Max Kinetic Energy of Object in Circular Path with Constraint

    Homework Statement An object is constrained by a cord to move in a circular path of radius 0.5m on a horizontal frictionless surface. The cord will break if tension exceeds 16N. The maximum kinetic energy the object can have is:Homework Equations KE=1/2mv^2 U=mgh The Attempt at a Solution...
  15. A

    Lagrange multiplier problem - function of two variables with one constraint

    Homework Statement Find the maximum and minimum values of f(x,y) = 2x^2+4y^2 - 4xy -4x on the circle defined by x^2+y^2 = 16. Homework Equations Lagrange's method, where f_x = lambda*g_x, f_y= lambda*g_y (where f is the given function and g(x,y) is the circle on which we are looking...
  16. tom.stoer

    Constraint Algebra & Gupta-Bleuler in LQG & SF Models | W. Wieland

    There's a new paper dealing with constraint algebra and Gupta-Bleuler quantization in LQG and SF models. http://arxiv.org/abs/1012.1738 Complex Ashtekar variables and reality conditions for Holst's action Authors: Wolfgang Wieland (Submitted on 8 Dec 2010) Abstract: From the Holst action...
  17. C

    Laws of motion question with constraint relations

    Homework Statement Find : a) acceleration of 1 kg, 2kg and 3 kg blocks and b) tensions T1 and T2 Note: In the figure, 1, 2 and 3 represent the masses of respective blocks in Kg. T1 and T2 represent tension in strings Homework Equations Newton's laws and constraint equations...
  18. A

    What Defines an Ideal Constraint in Physics?

    Hi, What exactly is the condition for a constraint to be ideal? Let's call the net force of constraint on particle i \bar{N_i}. Is the condition \sum_i\bar{N_i}\cdot\delta\bar{r_i}=0? Or is it \bar{N_i}\cdot\delta\bar{r_i}=0 for each i? (from which the first follows immediately) From the...
  19. V

    Solving 3 Coupled ODEs with a Constraint

    while solving Lagrangian of a system to derive equations of motion in presence of a constraint, I have finally landed down to a system of 3 coupled ODEs , where i have two variables(x and y) and 1 Lagrange multiplier. ODEs are of order 4,3 and 1 respectively. L1(x,y)=lambda L2(x,y)=0...
  20. K

    Optimization subject to inequality constraint

    For my economics/game theory thesis I need to optimize a function subject to an inequality constraint. maximize f(x1, x2) = 1/(x1+x2+y1+y2-w) subject to g(x1, x2) = x1+x2+y1+y2 < w This isn't particularly important, but the x and y variables are quantity of production by a firm. The objective...
  21. S

    Convex set for similarity constraint

    I am trying to ultimately find the projector onto a convex set defined in a non-explicit way, for a seismic processing application. The signals in question are members of some Hilbert Space H and the set membership requires that they must correlate with each other above some scalar \rho, given...
  22. A

    How do constraint equations in mechanics work?

    How do constraint equations in mechanics work? Hi, friends! I'm having some trouble understanding the constraint equations:- (1) How do they relate the length of the string to the position of the block attached to it? The position of the block must be a vector and it must be differentiated...
  23. P

    Constraint on Thevenin impedance

    Let's say we have a circuit composed of simple linear circuit elements (resistors, inductors and capacitors). Now we calculate the Thevenin equivalent circuit for some load within this circuit, and we determine the Thevenin impedance, Z_t. My question is this: Is it generally the case that...
  24. T

    How to solve constraint qualification failure

    I am currently solving a problem (similar to optimal control theory) involving optimization of an integral with mixed and pure constraints. eg: \int F(x,u,t) dt subject to x(t)\geq0 , u(t)\geq0. The problem can be solved by Pontryagin minimum principle by introducing the Hamiltonian function...
  25. M

    Solving a First Order Linear ODE System with a Constraint

    Hello all, I don't have much experience with ODEs. I have a simple system, which I believe is first order linear, similar to the following: dA/dt = 2A + 3B - C dB/dt = A + 2B - C dC/dt = -2A + 5B - 2C Now I would like to include the constraint that A + B + C = 1. How do I do this...
  26. fluidistic

    Classical Mechanics, constraint motion problem

    Homework Statement A particle of mass m moves under a uniform gravitational field along a rod which moves in a vertical plane with a constant angular velocity \vec \Omega. Write down the motion equations of the particle and calculate the constraint force. Is the energy conserved...
  27. O

    About the Analytical Physics constraint writing.

    About the Analytical Physics constraint writing... I have added a photo about my problem. My problem is why did we write while calculating constraint values as d/2. you will see on the picture what I am saying, I cannot see the reason of writing d/2
  28. M

    What is a nonholonomic constraint?

    Hey guys, What exactly does a nonholonomic constraint tell about a system. For instance I am working on a goldstein problem and it has raised the importance of interpreting what a constraint really does. I understand what a holonomic constraint is and what it tells me-for one the motion is...
  29. Saladsamurai

    Supermeshes and Dependent Current Sources: Determining the Constraint EQ

    Homework Statement I am doing some review and I though that I had this down pat, but I am getting confused a little. I am looking at the Wikipedia on Mesh Analysis. I do not understand the last equation of each section. How are they getting the signs of the currents? In the top image...
  30. D

    Maximize multiple linear equations under a single constraint

    Hi, I hope this is going in the proper place, its essentially maximizing a matrix so here goes: Given the independant variables a, b, c, d, and e, and the system [ 1 1 0 5 1 | A ] [ 0 3 0 1 1 | B ] [ 4 1 1 0 1 | C ] [ 1 0 3 1 0 | D ] I want to find the a, b, c, d, and e that will...
  31. V

    Sliding bar constraint equations

    Homework Statement A uniform rod of length l rests on a horizontal floor and leans against a vertical wall, making an angle \theta with the floor. It is initially held at rest. At t = 0, the rod is released and falls, sliding on the floor and the wall with no friction. The only forces acting on...
  32. R

    Variation of parameters and the constraint

    I have already read one thread on Lagrange's method of variation of parameters and it was very useful, but I am still confused about the use of the constraint. If the solution to the homogeneous second order equation contains two functions, with arbitrary constants: y= Ay1 + By2...
  33. I

    Dynamics holonomic nonholonomic constraint equations

    Homework Statement Please see the attached file for the problem and figure. Homework Equations The Attempt at a Solution This is what I have so far: The position vector of the block, pblock= xblock wx+ yblock wy pblock dot omegaz=0 holonomic constraint equation (dot product) n=3N-M...
  34. C

    How to define a constraint function for the adjoint method

    Homework Statement Let h be an observed value at a given time t t = 5, 10, 20, 30, 40, 50 h = 0.72, 0.49, 0.30, 0.20, 0.16, 0.12 Let h* be a modeled estimate of hHomework Equations h* = [ Q / 4*Pi*T*t ] * e [ - (d^2)*S / 4*T*t ] where the known constants are Pi, Q (= 50), and d (= 60)...
  35. E

    What Is the Acceleration Constraint in This Pulley System?

    Homework Statement Hello. I need help with a problem that deals with the acceleration constraint of a system (URL below is to an image of the system): http://s3.amazonaws.com/answer-board-image/e8ee7c74-664f-4220-a394-fc2b3d5bc269.jpeg The questions asked in the problem are as...
  36. D

    Newton's method with inequality constraint

    Dear all, Consider the system given by : http://www.freeimagehosting.net/image.php?53f7eed9ce.jpg where we are trying to solve for s and gamma using Newton's method. It turns out to be a simple implementation. Now, what if we need to impose an inequality constraint on the solution s : one...
  37. U

    What are the constraint forces on a circle with a particle?

    when a particle is constraint to move on a circle, what are the constraint forces
  38. D

    Minimizing a function with a minimum constraint

    Minimizing a function with a minimum constraint... Homework Statement A firm would like to produce q units of output at the lowest cost. It's cost structure is rk + wL. Minimize this function with respect to the constraint: min {sk, L/S} = q K = represents capital l = represents labor...
  39. W

    Differentiating a constraint equation

    Homework Statement z = cr^2 Homework Equations The Attempt at a Solution I have a pretty simple question. What is the second derivative of the z equation. I know that z' = 2crr'. Am I correct to say that z'' = 2cr'^2 or is it something else? Hopefully my question...
  40. L

    Proving Identity Using Constant Constraint r

    Homework Statement Let f(x,y,z)=0 and r=r(x,y,z) be another constraint. show that if r is held constant then (\partial x/\partial y)_r *(\partial y/\partial z)_r *(\partial z/\partial x)_r = 1 hint: consider dr and use the fact: (\partial x/\partial y)_z *(\partial y/\partial...
  41. G

    Simple Constraint Equation Question

    Homework Statement Could you write the constraint equation for this system by using the only coordinates given in the question. (x1 and y1 for the center of mass m and X is the x coordinate of wedge) http://img602.imageshack.us/img602/34/imagea.jpg...
  42. W

    Finding the force of constraint

    Homework Statement A simple pendulum has a mass M attached at the end of a massless rod of length L. Find the force of constraint the rod exerts on the bob. Homework Equations The Attempt at a Solution It seems easy enough that the mass is constrained by the tension the rod...
  43. Shackleford

    Determining Equations of Constraint for Natural Motion

    I assume you want to equate theta and phi somehow that would express the "natural" motion of the system. In this case, you could equate the length of the inside of the cylinder with some multiple of the circumference of the sphere as it travels along there. You could also equate the arc length...
  44. G

    Finite field is algebraically closed under constraint?

    A field K is called algebraically closed field if any no-zero polynomial has at least one root in K. Given finite field F_q, q=p^m, p is a prime and m is non-negative integer. A famous property of finite field is any element in F_q satisfies: x^q=x. Then I have such an assumption...
  45. D

    Lagrange constraint mechanics problem

    http://img221.imageshack.us/img221/3754/capturetp.png Just a simple question. I can see that for this to work I need: Trot = 1/5 ma2(thetaDOT + phiDOT)2 Just can't work out what phi has to do with rotational kinetic energy. I would have thought it would need to be simply the same thing but...
  46. N

    Solving Minimization Problem w/ Lagrange Multipliers

    Homework Statement Solve the following problems using Lagrange multipliers (a) Minimise J (x; y) = x^2 + y^2 subject to C (x; y) = 4x^2 + 3y^2 = 12: Homework Equations The Attempt at a Solution i got h(x,y)=x^2+y^2+\lambda(4x^2+3y^2-12) dh/dx=2x+8x\lambda=0 dh/dy=2y+6y\lambda=0 then i got...
  47. G

    Constraint Equations for Particle on Rotating Ring

    Homework Statement A particle of mass M is constrained to move on a ring of radius r which rotates about a vertical axis (Y) passing through the center at a constant angular speed (omega). I am to find the constraint equation(s) for this system. The origin of the system is at the...
  48. S

    Constraint Equations: Atwoods Machine

    Can questions like the one given in the following pic be solved by taking the reference frame answhere in the middle of the string and not on the fixed pulley?(http://cnx.org/content/m14731/latest/pq8.gif) A somewhat similar method has been given in http://cnx.org/content/m14783/latest/"...
Back
Top