ArticleslgStudy

computer science

Penalty method

Penalty method is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Penalty method rather than just read about it. In short: In mathematical optimization, penalty methods are a certain class of algorithms for solving constrained optimization problems. A penalty method replaces a constrained optimization problem by a series of unconstrained problems whose solutions ideally converge to the solution of the original constrained problem.

Key takeaways

  • Penalty method belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Penalty method to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Penalty method from memory before moving on to harder problems.

Reference excerpt

In mathematical optimization, penalty methods are a certain class of algorithms for solving constrained optimization problems. A penalty method replaces a constrained optimization problem by a series of unconstrained problems whose solutions ideally converge to the solution of the original constrained problem. The unconstrained problems are formed by adding a term, called a penalty function, to the objective function that consists of a penalty parameter multiplied by a measure of violation of the constraints. The measure of violation is nonzero when the constraints are violated and is zero in the region where constraints are not violated.

Description Let us say we are solving the following constrained problem:

min x f ( x ) {\displaystyle \min _{x}f(\mathbf {x} )}

subject to

c i ( x ) ≤ 0 ∀ i ∈ I . {\displaystyle c_{i}(\mathbf {x} )\leq 0~\forall i\in I.}

This problem can be solved as a series of unconstrained minimization problems

min f p ( x ) := f ( x ) + p ∑ i ∈ I g ( c i ( x ) ) {\displaystyle \min f_{p}(\mathbf {x} ):=f(\mathbf {x} )+p~\sum _{i\in I}~g(c_{i}(\mathbf {x} ))}

where

g ( c i ( x ) ) = max ( 0 , c i ( x ) ) 2 . {\displaystyle g(c_{i}(\mathbf {x} ))=\max(0,c_{i}(\mathbf {x} ))^{2}.}

In the above equations, g ( c i ( x ) ) {\displaystyle g(c_{i}(\mathbf {x} ))} is the exterior penalty function while p {\displaystyle p} is the penalty coefficient. When the penalty coefficient p {\displaystyle p} is 0, fp = f, meaning that we do not take the constraints into account. In each iteration of the method, we increase the penalty coefficient p {\displaystyle p} (e.g. by a factor of 10), solve the unconstrained problem and use the solution as the initial guess for the next iteration. Solutions of the successive unconstrained problems will asymptotically converge to the solution of the original constrained problem. Common penalty functions in constrained optimization are the quadratic penalty function and the deadzone-linear penalty function.

Convergence We first consider the set of global optimizers of the original problem, X*.Assume that the objective f has bounded level sets, and that the original problem is feasible. Then:

For every penalty coefficient p, the set of global optimizers of the penalized problem, Xp*, is non-empty. For every ε>0, there exists a penalty coefficient p such that the set Xp* is contained in an ε-neighborhood of the set X*. This theorem is helpful mostly when fp is convex, since in this case, we can find the global optimizers of fp. A second theorem considers local optimizers. Let x* be a non-degenerate local optimizer of the original problem ("nondegenerate" means that the gradients of the active constraints are linearly independent and the second-order sufficient optimality condition is satisfied). Then, there exists a neighborhood V* of x*, and some p0>0, such that for all p>p0, the penalized objective fp has exactly one critical point in V* (denoted by x*(p)), and x*(p) approaches x* as p→∞. Also, the objective value f(x*(p)) is weakly-increasing with p.

Practical applications Image compression optimization algorithms can make use of penalty functions for selecting how best to compress zones of colour to single representative values. The penalty method is often used in computational mechanics, especially in the Finite element method, to enforce conditions such as e.g. contact. The advantage of the penalty method is that, once we have a penalized objective with no constraints, we can use any unconstrained optimization method to solve it. The disadvantage is that, as the penalty coefficient p grows, the unconstrained problem becomes ill-conditioned - the coefficients are very large, and this may cause numeric errors and slow convergence of the unconstrained minimization.

See also Barrier methods constitute an alternative class of algorithms for constrained optimization. These methods also add a penalty-like term to the objective function, but in this case the iterates are forced to remain interior to the feasible domain and the barrier is in place to bias the iterates to remain away from the boundary of the feasible region. They are practically more efficient than penalty methods. Augmented Lagrangian methods are alternative penalty methods, which allow to get high-accuracy solutions without pushing the penalty coefficient to infinity. This makes the unconstrained penalized problems easier to solve. Other nonlinear programming algorithms:

Sequential quadratic programming Successive linear programming Sequential linear-quadratic programming Interior point method

References

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Penalty method

Start with the simplest possible case. Write down what Penalty method claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Penalty method before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Penalty method ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Penalty method

In research
Penalty method appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Penalty method in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Penalty method is common in secondary-school and first-year university syllabi. It links to neighbouring topics Optimization algorithms and methods, so understanding it makes those chapters shorter.
In everyday life
Look for Penalty method outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Penalty method in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Penalty method means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Penalty method out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Penalty method in simple terms?

In mathematical optimization, penalty methods are a certain class of algorithms for solving constrained optimization problems. A penalty method replaces a constrained optimization problem by a series of unconstrained problems whose solutions ideally converge to the solution of the original constrai…

Why does Penalty method matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Penalty method?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Penalty method.

Tags

  • Optimization algorithms and methods

Keep exploring