Part 1 · Chapter 1

Introduction to Optimization Techniques

Almost every engineering decision — the lightest beam that still holds the load, the cheapest schedule that still meets demand, the controller gains that settle fastest — is secretly a search for the best choice among many. Before any algorithm, we need the central idea: name the things you may choose, write down what "best" means, list what you must respect, and then hunt for the winner. This chapter builds that vocabulary — variables, objective, and constraints — and the standard form the rest of the course rests on.

Optimization Techniques Prof. Mithun Mondal Reading time ≈ 40 min
i What you'll learn
  • What an optimization problem is, and the three pieces inside every one: decision variables, an objective function, and constraints.
  • The standard form of a problem, \( \min f(x)\ \text{s.t.}\ g_i(x)\le 0,\ h_j(x)=0 \), and why every problem can be written this way.
  • Why maximizing \(f\) is the same as minimizing \(-f\), so one set of tools covers both.
  • The difference between a local and a global optimum, and why that difference is the hardest part of the subject.
  • What the feasible region is, and how to test whether a candidate point is feasible.
  • How optimization problems are classified: constrained/unconstrained, linear/nonlinear, continuous/discrete, single/multi-objective, deterministic/stochastic — and which chapters each class needs.
Section 1-1

What Is Optimization?

Optimization is the process of finding the best choice from a set of possible choices, where "best" is measured by a quantity we care about and the choices are limited by rules we must obey. Three ingredients appear every time. The decision variables \(x = (x_1, x_2, \dots, x_n)\) are the quantities we are free to set — dimensions, quantities to produce, gains to tune. The objective function \(f(x)\) is the single number that tells us how good a choice is — a cost to minimize or a profit to maximize. The constraints are the conditions any acceptable choice must satisfy — budgets, physical limits, demand, non-negativity.

Put together, optimization asks: which values of the decision variables make the objective as good as possible, without breaking any constraint? The winning choice is written \(x^\star\) and called the optimal solution (or optimizer); the value \(f(x^\star)\) is the optimal value.

The engineering goal is always the same: turn a fuzzy real-world wish ("make it cheap but strong") into three crisp mathematical objects — variables, an objective, and constraints — and then let a method find \(x^\star\). The rest of this book is a toolbox for building and solving exactly that.

🔑
Every optimization problem is these three things
\[ \text{choose } x \;\text{ to optimize } f(x) \;\text{ subject to constraints} \]

Name the variables, state the objective, list the constraints. If you cannot write down all three, the problem is not yet ready to solve — and getting them right is half the work.

Section 1-2

The Standard Form of an Optimization Problem

To let one set of algorithms attack many different problems, we agree on a single standard form. By convention we minimize, we push every inequality into the "\(\le 0\)" shape, and we write equalities as "\(=0\)":

Standard nonlinear program
\[ \min_{x\in\mathbb{R}^n} \; f(x) \quad\text{subject to}\quad \begin{cases} g_i(x) \le 0, & i = 1,\dots,m \\[2pt] h_j(x) = 0, & j = 1,\dots,p \end{cases} \]

Here \(f\) is the objective, the \(g_i\) are the inequality constraints, and the \(h_j\) are the equality constraints. The set of all points that satisfy every constraint is the feasible region \(\mathcal{F}\); the search for \(x^\star\) happens only inside it. A point outside \(\mathcal{F}\) is infeasible and is never a valid answer, no matter how good its objective value looks.

Maximization needs no separate theory. Because the location of the best point does not move if we flip the sign of the objective, maximizing \(f\) is identical to minimizing \(-f\) — the optimizer \(x^\star\) is the same and only the optimal value changes sign. Likewise a "\(\ge\)" constraint becomes "\(\le\)" by multiplying through by \(-1\). So the single standard form above covers every case.

x₁ x₂ feasible region 𝓕 f = const increasing f x★ (optimum)
The best feasible point of a linear objective sits at a corner of the feasible region
🔑
The feasible region and the max–min identity
\[ \mathcal{F} = \{\, x : g_i(x)\le 0,\ h_j(x)=0 \,\}, \qquad \max_x f(x) = -\min_x\big(-f(x)\big) \]

Optimization lives entirely inside \(\mathcal{F}\). Any method you learn for minimizing a cost also maximizes a profit — just minimize its negative. This is why textbooks state everything as a minimization and never lose generality.

Section 1-3

Local vs Global Optima

Not every "best nearby" point is the true best. A global minimum \(x^\star\) has the smallest objective value anywhere in the feasible region. A local minimum only has the smallest value within a small neighbourhood of itself — step far enough away and you may find something better. The gap between these two ideas is the single hardest fact in optimization: most algorithms are good at rolling downhill to a local optimum, but proving a point is global is generally hard.

x f(x) local min local max global min
Rolling downhill finds a local minimum; only comparing all of them finds the global one
🔑
Local versus global minimum
\[ \underbrace{f(x^\star)\le f(x)\ \ \forall\, x\in\mathcal{F}}_{\text{global}} \qquad\text{vs}\qquad \underbrace{f(x^\star)\le f(x)\ \ \forall\, x\in\mathcal{F},\ \|x-x^\star\|<\varepsilon}_{\text{local}} \]

A global optimum is always a local optimum, but not the reverse. There is one blessed case — a convex problem (Chapter 3) — where every local minimum is automatically global. Recognising convexity is worth a great deal, because it turns a hard search into a solvable one.

Section 1-4

Terminology & Notation

The words and symbols below recur on every page of this book. Learn them once here and the later chapters read smoothly.

SymbolNameMeaning
\(x=(x_1,\dots,x_n)\)Decision / design variablesThe quantities we are free to choose
\(f(x)\)Objective (cost) functionThe single number measuring "how good"
\(g_i(x)\le 0\)Inequality constraintsLimits that may or may not be tight
\(h_j(x)=0\)Equality constraintsBalances that must hold exactly
\(\mathcal{F}\)Feasible region / setAll points satisfying every constraint
\(x^\star\)Optimal solution (optimizer)The best feasible choice
\(f(x^\star)\)Optimal valueThe objective at the optimum
active / bindingActive constraintA \(g_i\) that holds with equality at \(x^\star\)
🔑
Feasibility is a yes/no test
\[ x\in\mathcal{F} \iff g_i(x)\le 0\ \ \forall i \ \text{ and }\ h_j(x)=0\ \ \forall j \]

Before you ever compare objective values, check feasibility. A point that violates even one constraint is disqualified, however attractive its cost. This simple filter settles a surprising number of exam questions.

Section 1-5

Optimization Around Us

Once you look for the three ingredients, optimization is everywhere in engineering. A structural engineer chooses member sizes to minimize weight subject to stress limits; a power engineer schedules generators for economic dispatch, minimizing fuel cost subject to meeting demand; a logistics planner routes vehicles to minimize distance subject to delivery windows; a machine-learning model tunes weights to minimize a loss; and a control engineer picks gains to minimize settling time while keeping the loop stable. Same three ingredients, different dress.

Turning any of these into a solvable problem follows one repeatable loop: understand the real situation, build a mathematical model of it, solve the model with a suitable algorithm, then interpret the answer and check it against reality — refining the model when it disagrees.

Real-world problem Build model vars · obj · constraints Solve algorithm Interpret & validate refine the model
Optimization in practice is a loop, not a one-shot calculation
Spotting the three ingredients. Faced with any real problem, ask three questions in order: What can I change? (the variables) — What am I trying to make best? (the objective) — What must I not violate? (the constraints). Answering them turns a vague goal into a formal model you can hand to an algorithm. Nine times out of ten, a "hard" optimization question is really a modelling question in disguise.
Section 1-6

Classification of Optimization Problems

Optimization problems are sorted along a few independent axes. Knowing where a problem sits tells you which method applies — and which chapters of this book you will need.

1 Constrained vs unconstrained

An unconstrained problem optimizes \(f(x)\) over all of \(\mathbb{R}^n\); a constrained one restricts \(x\) to \(\mathcal{F}\). Lagrange multipliers and the KKT conditions (Chapter 5) handle the constrained case.

2 Linear vs nonlinear

If \(f\) and all constraints are linear, it is a linear program (Part 2); otherwise it is a nonlinear program (Part 5). Linearity buys the simplex method and guaranteed global optima.

3 Continuous vs discrete

Continuous variables take any real value; discrete/integer variables take whole numbers (how many machines to buy). Integer problems (Part 4) are far harder than they look.

4 Single vs multi-objective

One objective gives a single best point; multiple, competing objectives (cost and weight) give a set of trade-off solutions — the Pareto front of Chapter 27.

5 Deterministic vs stochastic

Deterministic data are known exactly; stochastic problems involve randomness or uncertainty, calling for probabilistic formulations (Chapter 28).

6 Static vs dynamic

A static problem is solved once; a dynamic one chooses a sequence of decisions over stages, which is the domain of dynamic programming (Chapter 17).

Section 1-7

The Three Method Families

The thirty chapters ahead draw on three broad families of solution methods, and this course is organised around them. Knowing which family a problem belongs to is the first design decision you will make.

The classical (analytical) methods use calculus — setting derivatives to zero, Lagrange multipliers, and the KKT conditions — to characterise optima exactly. They are the foundation (Part 1) and are unbeatable when the problem is small and smooth. The mathematical-programming methods — the simplex method, transportation and assignment algorithms, branch-and-bound, and gradient-based nonlinear solvers (Parts 2–5) — are systematic procedures that scale to large, structured problems and often guarantee a global optimum. The metaheuristic (nature-inspired) methods — genetic algorithms, particle-swarm and ant-colony optimization, and simulated annealing (Part 6) — trade guarantees for reach: they search rugged, non-smooth, or combinatorial landscapes where gradients fail, returning very good (if not provably optimal) solutions.

Choosing a family. Small and smooth with a handful of variables? Reach for a classical method. Large but linear or nicely structured? A mathematical-programming method will solve it exactly. Huge, discrete, noisy, or with an objective you can only evaluate by simulation? A metaheuristic is often the only practical option. Much of an engineer's skill is matching the method to the landscape.
Section 1-8

Worked Examples

1 Formulate and solve a fencing problem

Problem. A farmer has \(100\) m of fencing to enclose a rectangular pen against a straight wall (so only three sides are fenced). What dimensions maximize the enclosed area?

Solution. Let the two sides perpendicular to the wall be \(x\) and the side parallel to it be \(y\). Variables: \(x,y\ge 0\). Objective: maximize area \(A = xy\). Constraint: the fence used is \(2x + y = 100\). Substitute \(y = 100 - 2x\):

Working
\[ A(x) = x(100 - 2x) = 100x - 2x^2, \qquad \frac{dA}{dx} = 100 - 4x = 0 \;\Rightarrow\; x = 25 \]

Then \(y = 100 - 50 = 50\) m and \(A = 25 \times 50 = 1250\ \text{m}^2\). Since \(A''(x) = -4 < 0\), this is a maximum. Notice all three ingredients were needed before any calculus began.

2 Turn a maximization into a minimization

Problem. A firm wants to maximize profit \(P = 5x_1 + 4x_2\). Rewrite this in standard (minimization) form and state what changes.

Solution. Minimize the negative objective:

Working
\[ \max\; (5x_1 + 4x_2) \quad\Longleftrightarrow\quad \min\; -(5x_1 + 4x_2) \]

The optimal point \(x^\star\) is exactly the same; only the reported optimal value flips sign. This is why every solver in the book can be written to minimize and still handle profit problems.

3 Test a point for feasibility

Problem. The feasible region is \(x_1 + x_2 \le 4,\ x_1 \ge 0,\ x_2 \ge 0\). Are the points \((3,2)\) and \((1,2)\) feasible?

Solution. Check every constraint. For \((3,2)\): \(3 + 2 = 5 \not\le 4\) — the first constraint is violated, so the point is infeasible. For \((1,2)\): \(1 + 2 = 3 \le 4\), and both coordinates are non-negative, so it is feasible. Feasibility is decided before objective values are ever compared.

4 Local vs global minima of a function

Problem. Find and classify the stationary points of \(f(x) = x^4 - 8x^2\).

Solution. Set the derivative to zero:

Working
\[ f'(x) = 4x^3 - 16x = 4x(x^2 - 4) = 0 \;\Rightarrow\; x = 0,\ \pm 2 \]

The second derivative is \(f''(x) = 12x^2 - 16\). At \(x = 0\), \(f'' = -16 < 0\) — a local maximum with \(f = 0\). At \(x = \pm 2\), \(f'' = 32 > 0\) — minima with \(f(\pm 2) = 16 - 32 = -16\). Both are global minima (the function is symmetric). A single function can thus have two global optima at once — a first hint that "the" optimum need not be unique.

5 Formulate a small linear program

Problem. A workshop makes tables (profit ₹60 each) and chairs (profit ₹30 each). Each table needs 4 h of carpentry and 2 units of wood; each chair needs 2 h and 4 units. There are 40 h of carpentry and 32 units of wood available. Write the optimization model.

Solution. Let \(x_1\) = tables, \(x_2\) = chairs.

Model (standard LP)
\[ \max_{x_1,x_2}\; 60x_1 + 30x_2 \quad\text{s.t.}\quad \begin{cases} 4x_1 + 2x_2 \le 40 & \text{(carpentry)} \\ 2x_1 + 4x_2 \le 32 & \text{(wood)} \\ x_1,\, x_2 \ge 0 \end{cases} \]

All expressions are linear, so this is a linear program; the graphical and simplex methods of Part 2 will find its optimum at a corner of the feasible region — exactly the picture in Section 1-2.

6 Classify a problem on every axis

Problem. A utility must decide how many of three generator units (whole numbers) to commit to minimize fuel cost, where cost rises with the square of each unit's output and total output must exactly meet a fixed demand. Classify it.

Solution. Quadratic cost ⇒ nonlinear; whole-number unit counts ⇒ integer / discrete; a demand-balance "\(=\)" ⇒ constrained with an equality; one cost to minimize ⇒ single-objective; fixed known data ⇒ deterministic; decided once ⇒ static. It is therefore a constrained, single-objective, deterministic integer nonlinear program — a genuinely hard class that often calls for the branch-and-bound (Part 4) or metaheuristic (Part 6) methods.

Review

Chapter Summary

Three ingredients

Every problem has decision variables, an objective function, and constraints.

Standard form

\(\min f(x)\) s.t. \(g_i(x)\le0,\ h_j(x)=0\); every problem can be cast this way.

Max = −min

Maximizing \(f\) equals minimizing \(-f\); the optimizer is unchanged, the value flips sign.

Feasible region

\(\mathcal{F}\) is the set of points satisfying all constraints; the search happens only inside it.

Local vs global

A local optimum is best only nearby; a global optimum is best everywhere. Convexity makes them coincide.

Classification

Constrained/unconstrained, linear/nonlinear, continuous/discrete, single/multi-objective, deterministic/stochastic.

Practice

Problems

For each item, first identify the decision variables, objective, and constraints, then answer what is asked. Difficulty rises down the list.

  1. State the three ingredients of an optimization problem and give a one-line real example of each for a smartphone battery design.
  2. Rewrite in standard minimization form: maximize \(f = 8x_1 + 3x_2\) subject to \(x_1 + x_2 \ge 5\), \(x_1,x_2 \ge 0\). (Flip both the objective and the "\(\ge\)".)
  3. A rectangular field of fixed area \(600\ \text{m}^2\) is to be fenced. Formulate the problem of minimizing the perimeter, and identify the objective and constraint.
  4. Given \(2x_1 + x_2 \le 10,\ x_1 + 3x_2 \le 15,\ x_1,x_2 \ge 0\), test whether \((4,3)\) and \((3,2)\) are feasible.
  5. Find and classify all stationary points of \(f(x) = x^3 - 3x\). Which, if any, is a global minimum over all real \(x\)?
  6. Classify each on every axis (constrained?, linear?, continuous?, single-objective?): (a) shortest route through 20 cities, (b) least-squares line fit, (c) choosing pipe diameters to minimize pumping cost with a pressure limit.
  7. Explain in words why a global optimum is always a local optimum but not the reverse, and draw a 1-D sketch that shows the difference.
  8. A factory maximizes profit \(40x_1 + 30x_2\) subject to \(x_1 + x_2 \le 12\), \(2x_1 + x_2 \le 16\), \(x_1,x_2\ge 0\). Write the model in standard form and state which method family (Section 1-7) you would use.
  9. For \(f(x,y) = (x-1)^2 + (y+2)^2\), find the unconstrained minimum by inspection and state its optimal value. Is the problem convex?
  10. A company must buy an integer number of trucks to meet a delivery target at minimum cost. Explain why rounding the answer to a continuous (LP) relaxation may give a wrong or infeasible solution.
  11. Give one engineering example each of a single-objective and a multi-objective problem, and describe what "the optimum" means in the multi-objective case.
  12. A wind-farm layout must place turbines to maximize annual energy while keeping wakes below a limit; the terrain makes the objective jagged and computable only by simulation. Classify the problem on every axis and argue which method family from Section 1-7 is most appropriate, and why the classical calculus approach fails.
Tip: when a problem says maximize or most, minimize the negative and proceed as usual. When it says a quantity must be a whole number, it is integer/discrete — expect it to be harder than its continuous cousin. And whenever it asks for "the best," pause to write the three ingredients first: the modelling step, not the arithmetic, is where most marks are won or lost.