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. S

    I Lagrange Multiplier where constraint is a rectangle

    Hello, How can I use Lagrange Multipliers to get the Extrema of a curve f(x,y) = x2+4y2-2x2y+4 over a rectangular region -1<=x<=1 and -1<=y<=1 ? Thanks
  2. J

    Projectile trajectory problem with constraint

    Homework Statement http://imgur.com/RDMG4Pj Link to drawn out problem^ The ball goes through the hoop NOT at the peak, but rather on it's downward path. It's asking for the total x-displacement, launch angle (theta), and the total flight time. It must me solved WITHOUT using the range...
  3. G

    Constraint of moment about an axis

    Homework Statement why there is no constraint of plate about a axis ? for moment about z -axis , i can have -2Bx +3By = 0 , where By and Bx = 0 which is shown in the top part of solution... Homework EquationsThe Attempt at a Solution
  4. perplexabot

    Constraint on M to keep M^T * A * M positive semidefinite?

    Hey all! Let me get right to it! It is given that $$A \succeq 0$$ I need the following to hold for M: $$M^TAM\succeq 0$$ What are the constraints or conditions on M for M^TAM\succeq 0 to hold? Anything would help at this point... I am open to discussion. Note: It may be worth mentioning that...
  5. C

    I Lagrangian with constraint forces

    I am now reading Lagrange's equations part in Taylor's Classical Mechanics text. It says: When a system of interest involves constraint forces, F_cstr, and all the nonconstraint forces are derivable from a potential energy(U), then the Lagrangian for the system L is L = T - U, where U is the...
  6. Molar

    Constraint Equation of a rolling of cylinder

    I was going through this example from by book, where a cylinder of radius 'r' is rolling inside of another cylinder of radius 'R' without slipping.It says the constraint equation should be rθ = (R-r)φ where θ = angle of rotation of cylinder of radius 'r' φ = angle subtended at the...
  7. H

    What is VigLink and How Does it Affect Links on Physicsforums?

    I am failing to understand Dirac's constraint dynamics. Can anyone suggest a useful resource? Thanks
  8. Titan97

    Constraint Equations Homework: v0, v1, v2

    Homework Statement Block C is moving with a velocity v0 and block A and B are moving with velocities v1 and v2 with respect to block C. Find the relation between v0, v1 and v2 Homework Equations none The Attempt at a Solution Since the string is in-extensible, its velocity at both ends...
  9. Georges Simenon

    Linear simplicity constraint in Loop Quantum Gravity

    Homework Statement Hi, I am studying covariant LQG from the recent book by Rovelli & Vidotto, and i am struggling with the linear simplicity constraint. My problems are not with its proof, that i understand, but rather with the physical interpretation in terms of boost generators. I will try to...
  10. FOIWATER

    Rewriting a constraint as a standard SOC constraint.

    I am trying to rewrite this constraint as a second order cone constraint of the form $$||Ax+b|| \leq C^Tx+d$$ $$x^2-(x-5)y-yz+3(z-5)^2 \leq 1+x$$ I am having a hard time of knowing where to start.. any information appreciated.
  11. amjad-sh

    Constraint Forces: Definition & Distinction

    what is meant by constraint forces? do they refer to the forces that are considered non conservative? how can I distinguish them from other forces?
  12. R

    The derivative of function under constraint

    Homework Statement If f(x+y) = f(x)f(y) for all x and y and f(5) = 2, f'(0)=3, then f'(5) is a) 5 b) 6 C) 0 d) None of these Homework Equations Don't know which equation to apply. I was thinking of Rolle's Theorem and mean value theorem here but it is not helping. The Attempt at a Solution...
  13. X

    Seeking a example of noholonomic constraint

    I was reading up classical mechanics in Goldstein but needed some clarifications. I looked online and saw something that bothers me qutie a bit. In the online pdf below, on page 69 (or 74th screen scrolls), it states that Dot Cancellation does not work if the position vector is a function of...
  14. kostoglotov

    Discontinuity of a constraint in Lagrange Method

    Homework Statement My question is quite specific, but I will include the entire question as laid out in the text Consider the problem of minimizing the function f(x,y) = x on the curve y^2 + x^4 -x^3 = 0 (a piriform). (a) Try using Lagrange Multipliers to solve the problem (b) Show that the...
  15. gulfcoastfella

    Point of application of generalized forces of constraint

    In Lagrangian Dynamics, I assume that generalized forces of constraint are applied at the location of the corresponding generalized coordinate. I don't recall seeing anything explicit about the point of application in the text.
  16. P

    Lagrange multipliers open constraint

    Homework Statement Find the maximum and minimum values of the function f(x, y) =49 − x^2 − y^2 subject to the constraint x + 3y = 10. The Attempt at a Solution ∇f = <2x,2y> ∇g = <1,3> ∇f =λ∇g 2x = λ 2y = 3λ 2x = 2y/3 x = y/3 y/3 + 3y = 10 y = 3 x = 1 f(1,3) = 39 Now that is the only...
  17. I

    Force of Constraint for Particle in a Paraboloid

    Homework Statement A particle is sliding inside a frictionless paraboloid defined by r^2 = az with no gravity. We must show that the force of constraint is proportional to (1+4r^2/a^2)^{-3/2} Homework Equations f(r,z) = r^2-az = 0 F_r = \lambda \frac{\partial f}{\partial r} (and similarly for...
  18. X

    Express Langrange constraint that an expression*cannot* equal a value

    I have an optimization where I'd like to express the idea that some of my parameters cannot equal a certain value e.g... max \ f(x) = ... s.t. x_3 \neq 1 Is there a standard method to solve this using lagrangian optimization? Thanks.
  19. maverick280857

    Constraint on conformal transformation (Ketov)

    Hi, First of all, I'm not sure if this thread belongs to the BSM forum because the question I'm posing here is a simple CFT question which could well be posed in the forum on GR or Particle Physics/QFT. I will defer to the judgment of the moderator to put this in the right place if it already...
  20. B

    On constraint forces and d'Alembert's Principle

    According to d'Alembert's Principle, the virtual work done by constraint forces must be zero. I have a few things needing to be clarified. First, as we know from friction, d'Alembert's Principle is not always true (friction usually does work, and is not normal to the constraint surface). On the...
  21. Greg Bernhardt

    Rolling: Definition, Constraint, Mass, and More

    Definition/Summary "Rolling" means moving along a surface without sliding. The (instantaneous) point of contact is stationary relative to the surface. In other words: it is the instantaneous centre of rotation (if that surface is stationary). Friction at the point of contact of a...
  22. W

    Linear Programming - satisfaction only at least one constraint

    Linear Programming - satisfaction of only at least one constraint Hi Is there a form of relaxation/modification of an LP of the form \text{min }\;\;f^\mathsf{T}x\\\mathbf{A}x\leq b such that if only anyone of the constraints is satisfied, then the solution ##x## is regarded as feasible...
  23. M

    Calculus of variations with isoparametric constraint

    We seek stationary solutions to \int_{x_0}^{x_1} F(x, y, y')dx subject to the constraint \int_{x_0}^{x_1} G(x, y, y')dx = c where c is some constant. I have read that this can be solved by applying the Euler Lagrange equations to F(x, y, y') + \lambda G(x, y, y') and then finding the...
  24. D

    MHB Constraint optimization without using Calculus

    A student in hs I tutor was giving the following problem: Maximizes the volume of a cylinder inscribe in a sphere of radius 6. We worked through it and had: \begin{align} h &= 2(6 - x)\\ r_{\text{cylinder}}^2 &= x(12 - x) \end{align} Now the volume of a right cylinder is \(V = \pi r^2h\) so \[...
  25. MarkFL

    MHB Scott's question at Yahoo Answers regarding optimization with constraint

    Here is the question: I have posted a link there to this thread so the OP can view my work.
  26. Q

    Non Polynomial Hamiltonian Constraint

    1. Is the root(det(q)) term in the Hamiltonian Constraint what makes it non polynomial 2. Is the motivation for Ashtekar Variables to remove the non polynomial terms by replacing the Hamiltonian with a densitised Hamiltonian
  27. anemone

    MHB Maximizing $a+b$ given Quadratic Constraint

    Find the maximum of $a+b$, given $a^2-1+b^2-3b=0$.
  28. N

    Odd constraint problem: Reflected and Transmitted Power of String

    Homework Statement Given that a string is constrained such that dy/dx = 0 at x = 0 and unconstrained otherwise, what is the reflected and transmitted power? y is the deflection of the string from the x-axis. y_1 is incident wave, y_r is reflected and y_t is transmitted. Homework Equations...
  29. A

    Minimize function subject to constraint

    Suppose given a function of the form: f(x,y,z) = ax + by + cz with the constrain x+y=k My book minimizes this function by a way I am not completely familiar with: dF = adx + bdy + cdz 0 and since dy=-dx we can write: dF = (a-b)dx + cdz = 0 => a-b = c dz/dx (1) How I would...
  30. MarkFL

    MHB Glamour's questions at Yahoo Answers regarding optimization with constraint

    Here are the questions: I have posted a link there to this thread so the OP can view my work.
  31. N

    What Is the Maximum Value of f(x, y) = x + y Given the Constraint xy = 16?

    Homework Statement Find the maximum value of the function f(x, y) = x + y subject to the con- straint xy = 16, x > 0, y > 0. Homework Equations f(x, y) = x + y xy = 16 The Attempt at a Solution I attempted this first using substitution, then using LaGrange multipliers. Both...
  32. G

    Why Do SO(n) & SU(n) Have Different Dimensions Despite Same Constraint?

    Qhy does SO(n) have the same number of dimensions of O(n), whereas SU(n) reduces the dimensions of U(n)? Isn't the constraint the same for both cases, i.e. detM=1?
  33. B

    Total derivative with a constraint

    Hi there, I have what I suspect is a straightforward question. I wish to take the total derivative of the following function: W(q,x) = q \cdot u(x) + c(q,x) Subject to the constraint: \frac{q}{x}=\bar{m}, where \bar{m} is some constant > 0, and c(q,x) is additively separable...
  34. J

    How Does Acceleration Relate Between Two Blocks in a Frictionless Pulley System?

    Homework Statement In the system shown, the strings and the pulleys are ideal. There is no friction anywhere in the system. As the system is released, block m1 moves downward. If the magnitude of the acceleration of block m1 is a, what is the magnitude of the acceleration of block m2?Homework...
  35. S

    Lagrangian with one constraint

    Hello, I have the functional J = ∫ L(ψ, r, r') dψ, where r'=dr/dψ. L is written in polar coordinates (r,ψ). Now I want to constrain the motion to take place on the polar curve r = r(ψ). Can I write the constrained lagrangian as Lc=L(ψ, r, r') - λ(r - r(ψ)) and then solve the...
  36. H

    Horizontal velocity constraint in Engineering applications

    Case 1: An airplane should not exceed upper limit horizontal velocity while on takeoff roll(or even during taxiing on certain roads).V-Rotation(VR)is an indication of the maximum horizontal velocity,a nose-wheel can handle.Some people claim that nose-wheel has an upper limit to normal reaction...
  37. caffeinemachine

    MHB Show that a rational function under some constraint is actually a polynomial.

    Let $r(x)\in\mathbb Q(x)$ be a rational function over $\mathbb Q$. Assume $r(n)$ is an integer for infinitely many integers $n$. Then show that $r(x)$ is a polynomial in $\mathbb Q[x]$.
  38. T

    Virtual work of constraint forces

    On a rigid body we usually use the formula δL=F*δP to calculate virtual work. My problem is about the force. This kind of force exists only before the contact. If I imagine a movement δP of the constrained body outside ,in the free space, I will have δL≥0 but as soon as P moves the force F...
  39. R

    Constraint Matrix Role in Global Matrix Assembly

    Dear All, I'm very familiar with the composition of finite element local stiffness, mass matrices as per any arbitrary element rod, beam, plate, shell and integration of it into a global stiffness matrix. But I find it but of an obscure on how to integrate the constraint matrix into the...
  40. MarkFL

    MHB Zhina's question at Yahoo Answers regarding optimization subject to constraint

    Here is the question: Here is a link to the question: CALCULUS needHELP WITH THIS PLEASE! APPRECIAT EIT -? - Yahoo! Answers I have posted a link there to this topic so the OP can find my response.
  41. T

    Small oscillations on a constraint curve

    Homework Statement From Goldstein Classical Mechanics, 6.16: A mass particle moves in a constant vertical gravitational field along the curve defined by y=ax4 , where y is the vertical direction. Find the equation of motion for small oscillations about the position of equilibrium. The...
  42. MarkFL

    MHB Eggy's question at Yahoo Answers regarding optimization with constraint

    Here is the question: Here is a link to the question: Calculus Max Min problem help? - Yahoo! Answers I have posted a link there to this topic so the OP can find my response.
  43. Petrus

    MHB Multivariable optimization with constraint

    Calculate biggest and lowest value to function f(x,y)=x^5y^4e^{-3x-3y} In the triangle has vertices in points \left(0,0 \right),\left(6,0 \right) and \left(0,6 \right) Before I start I want to warn that I used google translate in the text 'In the triangle has vertices in points' Progress: I...
  44. skate_nerd

    MHB Lagrange multipliers with a summation function and constraint

    Problem stated: Let \(a_1, a_2, ... , a_n\) be \(n\) positive numbers. Find the maximum of $$\sum_{i=1}^{n}a_ix_i$$ subject to the constraint $$\sum_{i=1}^{n}x_i^2=1$$. I honestly have not much of an idea of how to go about solving this. If I use lagrange multipliers which I think I am supposed...
  45. MarkFL

    MHB Travis Henderson's Question: Optimizing f(x,y,z) with Constraint

    Here is the question: Here is a link to the question: Find the maximum and minimum values of f(x,y,z)=x^4+y^4+z^4 subject to the constraint x^2+y^2+z^2=1.? - Yahoo! Answers I have posted a link there to this topic so the OP can find my response.
  46. A

    Gravitation as a Constraint Force

    Can gravitation be a constraint force?
  47. P

    Karush Kuhn Tucker problem (minimizing a function subject to a constraint)

    Homework Statement Find the minimum of f(x,y)= 3x2+y2, subject to the constraints 1<=xy. Homework Equations I thought I would use Karush Kuhn Tucker's theorem to solve this. ∇f=(6x, 2y) and ∇h=(-y,-x) The general equation according to KKT is ∇f=λ∇h. First case: h<0. According to...
  48. R

    Maximizing problem with an inequality constraint.

    Hello I have a worked example where I have to maximize a function with an inequality constraint. The problem is worked out below. https://zgqqmw.sn2.livefilestore.com/y1pLc13HVWpA9dATZEzikySeSMBN2hn1mJCw71rJ5vvUJcr9W7KBPFkOz7HQEppa6EPbLi5yyAwDagh3ezF_7eyVL6tBK7q6ise/maxProbem.png?psid=1 I...
  49. B

    Constraint on a linear system?

    The question goes like this. Among all solutions that satisfy the homogeneous system x + 2y + z = 0 2x + 4y + z = 0 x + 2y − z = 0 determine those that also satisfy the nonlinear constraint y − xy = 2z I know that one of the solutions [0,0,0] but I'm not sure how to find the others. I row...
  50. B

    Euler-Lagrange Equations with constraint depend on 2nd derivative?

    I am reading the book of Neuenschwander about Noether's Theorem. He explains the Euler-Lagrange equations by starting with J=\int_a^b L(t,x^\mu,\dot x^\mu) dt From this he derives the Euler-Lagrange equations \frac{\partial L}{\partial x^\mu} = \frac{d}{dt}\frac{\partial L}{\partial...
Back
Top