MCA Computer Based Optimization O
MCA Computer Based Optimization O
(MCA)
Self-Learning Material
(SEM II)
The early units introduce the fundamentals, classifications, and mathematical formulation of
optimization problems. Subsequent units delve into specific problem types, including single-
variable and multivariable problems, with and without constraints.
The course then guides readers through different methodologies for solving optimization
problems, including region elimination methods, one-dimensional search, and multivariable
optimization. Later units present alternative techniques like geometric, dynamic and integer
programming and genetic algorithms.
The final units apply these techniques to real-world problems, such as optimal shell-tube heat
exchanger design and optimal pipe diameter, demonstrating the broad applicability of
optimization techniques.
This course serves as a valuable resource for anyone interested in understanding optimization
techniques, and fostering the development of critical thinking skills essential for navigating
complex, real-world problems. It aspires to equip readers with robust knowledge of
optimization techniques and empower them to apply this knowledge effectively.
TABLE OF CONTENTS
1 Optimization Techniques 01 – 13
2 Categories of Optimization 14 – 37
3 Techniques in Optimisation 38 – 53
4 Optimization Problems 54 – 66
5 Method in Optimization 67 – 84
6 Mathematical Optimization 85 – 99
Optimization Techniques
Learning Objectives:
Structure:
1
1.1 Introduction to Optimization Techniques
Optimization, in the broadest sense, is the process of making something as effective, perfect,
or functional as possible. In computer science, this process implies the selection of the most
appropriate element from some set of available alternatives.
An optimization problem includes finding the "best" solution from the feasible set of
solutions based on some criterion. Such problems can come in a variety of forms, ranging
from finding the maximum or minimum of a function to identifying optimal strategies in
games or optimal routes in networks.
Decision Variables: These are the inputs that we can control in the problem.
Constraints: These define the set of feasible solutions by limiting the possible
values of the decision variables.
The field of computer science thrives on efficiency, and optimization is a crucial tool for
achieving it. Many areas, from algorithm design, data analysis, and machine learning to
network design, require optimization techniques to improve their performance, reduce cost,
or maximize throughput.
2
Machine Learning: Optimization is the heart of machine learning, where models are
trained to minimize or maximize a function representing prediction error or
likelihood.
Despite its importance, optimization does have its limitations and presents several challenges:
Noise and Uncertainty: Real-world data often contain noise and uncertainties, which
can lead to a misleading representation of the problem and hence to suboptimal
solutions.
Local Optima Problem: Many optimization techniques can get stuck in local optima,
i.e., solutions that are optimal within a neighbouring set of candidate solutions but not
optimal in the overall set.
3
involves the transformation of real-world problems into a mathematical form that can be
computed and solved, providing quantifiable and often optimal solutions.
They are capable of handling a variety of problems, from the simple (like linear
equations) to the highly complex (such as multi-objective optimization problems).
The objective function represents the goal of the optimization problem. In general, the
purpose of optimization is to maximize or minimize this function, depending on the
problem's specific requirements.
The function can represent anything from cost, profit, or time, depending on the
problem context.
The form of the objective function may vary from a simple linear expression to more
complicated non-linear or even multi-objective functions.
Constraints in Optimization
Constraints play a crucial role in optimization problems, limiting the set of feasible solutions
and often providing practical bounds to otherwise unbounded problems.
4
These constraints can represent physical limitations, financial restrictions, or other
boundary conditions imposed on the problem.
The feasible region, defined by the constraints, is the set of all possible solutions to
the problem that satisfy all the constraints.
A feasible solution is one that satisfies all the constraints of the problem. The set of all
feasible solutions is referred to as the feasible region or feasible set.
The process of optimization involves finding such optimal solutions within the
feasible region. The challenge is to balance the constraints while striving for
optimality.
Linear Programming (LP): This is a method used when both the objective function
and the constraints are linear. LP provides a means to find the best (optimal) solution
in situations described by linear relationships.
5
Integer Programming (IP): This is similar to linear programming, but in this case,
one or more of the decision variables must take integer values. This approach is often
used in situations where solutions involving fractions or decimals are not feasible,
such as in resource allocation or scheduling problems.
Modern optimization techniques, on the other hand, involve more complex and adaptable
approaches that often draw from concepts in computer science and machine learning.
6
to a given measure of quality inspired by the social behaviour of bird flocking
or fish schooling.
7
1.4 Choosing the Right Optimization Technique
The complexity of the problem at hand plays a pivotal role in the selection of an appropriate
optimization technique.
Simple problems can often be handled using classical methods such as gradient
descent or Newton's method. These methods have a robust theoretical foundation and
perform reliably on well-behaved problems.
On the other hand, more complex problems, particularly those with a high-
dimensional space, non-linear relationships, or a lack of derivative information, often
demand more advanced techniques. For instance, evolutionary algorithms, swarm
optimization, or simulated annealing might be used.
Also, combinatorial problems or those with discrete decision variables are best
addressed with techniques such as integer programming, dynamic programming, or
branch and bound methods.
Accuracy and precision play a significant role in the selection of optimization techniques.
Some problems necessitate highly accurate solutions, for which deterministic methods
such as linear programming or quadratic programming are suitable. These methods
guarantee global optimality under specific assumptions.
In other instances, a trade-off between precision and speed might be acceptable, and
thus, stochastic or heuristic methods such as genetic algorithms or particle swarm
8
optimization might be used. These methods do not always ensure the best possible
solution but can usually provide a good enough solution in a reasonable time frame.
The choice of optimization techniques also depends on the available computational resources
and the required speed of solution.
The nature of the computational resources also matters. For instance, some
optimization algorithms are more suited to parallel computation and can thus leverage
the power of modern multi-core processors or GPU-based systems.
Every optimization technique has its limitations and trade-offs, which should be considered
during selection.
Many classical methods, such as gradient descent or Newton's method, assume the
problem is smooth and convex, which is not always the case in real-world problems.
Evolutionary and swarm-based techniques do not make such assumptions and can
handle a broader range of problems. However, they are often slower and may require
more computational resources.
9
1.5 Summary:
❖ Optimization techniques are mathematical strategies or tools used to find the best
possible solution or 'optimum' for a problem or system, often under a set of
constraints.
❖ Constraints: These define the feasible region within which the solution can exist.
They limit and guide the optimization process to ensure the solution is practical and
applicable.
1.6 Keywords:
10
Objective Function: The function that you want to optimize in an optimization
problem. It could be either a cost function (which you aim to minimize) or a benefit
function (which you aim to maximize).
Constraints: In the context of optimization, constraints are the limits or restrictions
on the possible solutions for an optimization problem.
Feasibility: Feasibility refers to whether a potential solution to an optimization
problem meets the defined constraints.
Optimality: A feasible solution is said to be optimal if it is the best solution
according to the objective function and within the defined constraints.
Linear Programming: A method used for achieving the best outcome in a
mathematical model whose requirements are represented by linear relationships.
Non-linear Programming: A process of solving optimization problems where the
constraints or the objective function are non-linear.
Metaheuristic Algorithms: These are high-level, problem-independent algorithmic
frameworks that provide a set of guidelines or strategies to develop heuristic
optimization algorithms.
How would you apply the concept of linear programming in the optimization of a
database schema?
What are the main differences between a gradient descent and a stochastic
gradient descent optimization algorithm, and in which scenario would you prefer
one over the other?
How does the concept of 'feasibility' and 'optimality' factor into the selection of an
appropriate optimization technique for a given problem?
11
What are the key advantages and disadvantages of hybrid optimization techniques,
and in what types of scenarios would they be particularly useful?
Shop Genix, a fast-growing e-commerce platform, faced a major challenge. Their customer
base had exponentially grown, leading to an increase in daily orders. This rapid expansion
made their current distribution and delivery system inefficient, leading to delays and
customer dissatisfaction.
The company decided to implement an optimization technique to solve this problem. They
decided to apply the Vehicle Routing Problem (VRP), a classic problem in optimization
theory. The goal was to find the most cost-effective route for delivery vehicles, considering
various constraints such as vehicle capacity, distance, delivery time windows, and depot
locations.
They used a modern optimization technique known as the Genetic Algorithm (GA), inspired
by the process of natural selection. They developed a fitness function that considered key
factors such as the number of deliveries, total distance travelled, and customer satisfaction
levels. The GA was then used to find the most optimal solutions, effectively making the
delivery process more efficient.
The implementation of the Genetic Algorithm allowed ShopGenix to streamline its delivery
system. This led to reduced delivery times by 30%, increased customer satisfaction, and
decreased operational costs by 20%. The optimization technique was a key part in
maintaining their growth while ensuring high levels of customer satisfaction.
Questions:
How did the implementation of the Genetic Algorithm impact the overall customer
satisfaction in ShopGenix's case?
12
Discuss the factors that were considered in the fitness function developed for the
Genetic Algorithm by ShopGenix. Why do you think these factors were chosen?
Other areas in the e-commerce business where optimization techniques like Genetic
Algorithm can be implemented? Justify your answer.
1.9 References:
13
UNIT : 2
Categories of Optimization
Learning Objectives:
Structure:
14
2.1 Introduction to Optimization
For example, the system could be a manufacturing process in a factory, the routing of data
packets on the internet, or the pricing strategy of a product in the market. The goal is to
maximize or minimize certain aspects, such as profits, costs, or efficiency.
.
Basics of Optimization
Decision Variables: These are the variables that we can control and change in order
to find the best possible solution. For example, in a production environment, these
might be the quantities of different products to be produced.
Constraints: These are the limitations or restrictions within which the solution must
fit. These could be capacity constraints, budget constraints, time constraints, etc.
Optimal Solution: This is the best possible solution obtained by adjusting the
decision variables to achieve the highest or lowest possible value of the objective
function while satisfying all constraints.
Optimization plays a crucial role in many sectors. Here's why it's vital:
15
Resource Utilization: Optimization helps in the best and most efficient use of
available resources. It helps us achieve more with less.
Logistics and Supply Chain: Optimization helps in determining the most cost-
effective transportation and distribution routes.
Optimization plays a key role in a wide range of computational and mathematical problems,
with applications extending across various fields, from economics to engineering and from
16
data analysis to machine learning. The essence of optimization is finding the best or optimal
solution out of a set of possible alternatives.
The 'best' or 'optimal' is usually determined by the context of the problem, which is typically
a mathematical model of a real-world situation.
When we talk about optimization problems, there are several categories that arise depending
on the nature and constraints of the problem.
17
not a single optimal point but rather a set of optimal trade-off points, known as the
Pareto-optimal set. Techniques like Genetic Algorithms or Pareto-based evolutionary
algorithms are often employed in these cases.
Static Optimization: In these problems, all parameters and decision variables are
assumed to be time-independent. In other words, the problem does not change over
time. Many real-world problems, like resource allocation or production scheduling,
can be modelled as static optimization problems.
Mathematical methods called optimization techniques are employed to determine the optimal
course of action or result in a particular scenario. They are commonly employed in
18
disciplines like computer science, economics, and operations research to ascertain the most
practical and efficient means of accomplishing a certain objective.
These techniques can be classified into classical and non-classical techniques. Here, we will
focus on three of the most commonly used classical optimization techniques: the Simplex
Method, the Steepest Descent Method, and Newton's Method.
The Simplex Method is one of the most popular optimization techniques in the field of linear
programming. This method is used to solve optimization problems where the objective
function and the constraints are linear. The goal is to find the maximum or minimum value of
a linear function subject to linear equality and inequality constraints.
Initialize the solution at an extreme point (usually the origin or a corner of the feasible
region).
Move along the edge of the feasible region in the direction that increases (or
decreases) the objective function the most until no further improvement can be made.
A first-order iterative optimization approach called the Steepest Descent Method is used to
locate a function's local minimum. The idea is straightforward: at each step, go in the
19
direction of the function's negative gradient at the current point, or the direction of the
sharpest decline.
Continue the procedure until the maximum number of repetitions is achieved or the
change in function values is less than a predetermined threshold.
This method is easy to implement and understand but might not always be the fastest way to
reach the minimum, especially for complex functions.
Newton's Method
20
The advantage of Newton's Method is that it usually converges faster than other methods,
especially for functions that are well-approximated by a quadratic function near their root.
However, it requires the function to be differentiable, and it's not guaranteed to converge for
all functions or initial guesses.
Constraints: These are the limitations or requirements that the solution must meet. In
a business scenario, constraints could be limitations on resources like time, money, or
materials.
Decision Variables: These are the variables that decision-makers can control, such as
the number of units to produce or the number of hours to work.
Formulating a linear programming problem involves defining the decision variables, the
objective function, and the constraints. Let's consider a simple example to understand this:
A company manufactures two products, A and B. It earns a profit of 100 on each unit of
product A and 150 on each unit of product B. The company can manufacture a maximum of
200 units of product A and 300 units of product B due to its resource constraints. The
21
problem is to determine how many units of product A and B the company should
manufacture to maximize its profit.
In this case, the decision variables are the number of units of products A and B to
manufacture. The objective function is to maximize the profit, which is 100A + 150B. The
constraints are that A ≤ 200 and B ≤ 300.
The graphical method is a means of solving linear programming problems by graphing the
constraints and the objective function. The feasible region, or the area where all constraints
are satisfied, is identified, and the solution that maximizes or minimizes the objective
function is found within this region.
The Simplex Method is an iterative method used to solve linear programming problems when
there are more than two variables, which makes the graphical method impractical. This
method, developed by George Dantzig in 1947, systematically examines corner points in the
feasible region to find the optimal solution.
Find the pivot column (most negative number in the bottom row) and the pivot row
(smallest non-negative ratio on the right-hand side).
Repeat steps 4 and 5 until all the numbers in the bottom row (except the rightmost
one) are non-negative. The solution is then found.
22
Duality in Linear Programming
The primal problem seeks to minimize the objective function subject to constraints,
while the dual problem aims to maximize the objective function subject to constraints.
A minimization problem is a dual problem if the primal is a maximization problem,
and vice versa.
The constraints in the primal problem correspond to the decision variables in the dual
problem and vice versa.
The value of the objective function at the optimal solution for the primal problem
equals the value of the objective function at the optimal solution for the dual problem.
Key Points:
23
The objective function in non-linear programming can represent maximizing or
minimizing a particular outcome, such as profit or cost, under given constraints.
Key Techniques:
Gradient Descent: This iterative method starts from an initial point and moves
towards the minimum of the function using the negative gradient direction. It is
widely used in machine learning and artificial intelligence for minimizing loss
functions.
Newton's Method: This technique uses information about the second derivative (the
Hessian) of the function to achieve faster convergence to the minimum or maximum.
However, it assumes that the function is twice differentiable and the Hessian is non-
singular at the optimum.
24
Constrained Optimization Techniques
Key Techniques:
Sequential Quadratic Programming (SQP): SQP methods are iterative methods for
non-linear optimization. At each step, they solve a quadratic programming sub-
problem and update the solution based on this.
The significance of integer programming comes from its ability to model many real-life
situations accurately. These situations often involve discrete decision-making, where
decisions like "how many units to produce" or "how many routes to take" need to be integers.
25
Key Points:
In linear programming, variables can take any fractional value, which may not be
suitable for real-world applications where the decision variables require whole
numbers.
Integer programming allows for more realistic modelling, and while it comes with
additional computational complexity, it is essential for specific decision-making
processes, especially in the fields of operations research, logistics, scheduling, and
production management.
Branch and Bound is a systematic method for solving integer programming problems. This
technique is based on partitioning the original problem into a set of smaller problems
(branching), solving these smaller problems, and using the solutions to set boundaries on the
original problem's solution (bounding).
Key Steps:
Branch: The solution space is partitioned into smaller subspaces, each representing a
branch.
Bound: Upper and lower bounds are computed for each subspace. If a bound is found
that's better than the current solution; the current solution is updated.
Prune: Subspaces that do not contain an optimal solution (based on their bounds) are
eliminated (pruned).
Repeat: The process of branching, bounding, and pruning is repeated until the
optimal solution is found or all subspaces are pruned.
The branch and bound method is advantageous as it effectively reduces the solution space,
thus making the computation more tractable.
26
Cutting Plane Method
The Cutting Plane Method is another technique used to solve integer programming problems.
Unlike the Branch and Bound technique, which works with the original problem space, the
Cutting Plane method operates by iteratively refining the feasible region. This is done by
adding linear inequalities, known as cutting planes, to remove non-integer solutions,
gradually approaching the integer solution.
Key Steps:
1. Solve the Linear Programming relaxation: Start by ignoring the integer restrictions
and solve the problem as a linear programming problem.
2. Check for integer solution: If the solution is an integer, it is the optimal solution. If
not, proceed to the next step.
3. Add a cutting plane: Find a cutting plane that separates the current non-integer
solution from the feasible region and add it to the problem.
4. Repeat: Resolve the modified problem and repeat the process until an integer solution
is found.
The Cutting Plane Method is a powerful method, but it can become computationally
expensive for larger problems. It is best used for problems that are otherwise hard to solve
and where the advantages of more accurately representing the problem outweigh the
computational costs.
27
reduces computation time significantly, especially for problems with overlapping sub-
problems, by avoiding repetitive work.
Key components of dynamic programming:
Optimal Substructure: If an optimal solution to the main issue can be built from
optimal solutions to its subproblems, then the problem has an optimal substructure.
Memoization or Tabulation: These are the techniques used to store the results of
sub-problems. In memoization, the results of expensive function calls are stored and
reused when needed. Tabulation is a bottom-up approach where you solve all the sub-
problems first and use their solutions to solve larger problems.
28
Mathematics: The Bellman Equation, a fundamental concept of Mathematics, is
based on the principles of dynamic programming.
Principles of Optimality
In simpler terms, this means that within an optimal sequence of decisions or steps to solve a
problem, every sub-sequence must also be optimal. This property allows us to construct
solutions to larger problems by combining solutions to sub-problems. This is the core reason
why dynamic programming can be used to solve optimization problems efficiently.
This technique can handle various situations where decision-making processes need to
account for uncertainty. Applications span across diverse fields such as finance,
supply chain management, energy, healthcare, and more.
In these problems, the decision maker has to make decisions before knowing the
actual realizations of the random parameters, leading to solutions that are feasible for
all (or almost all) possible scenarios.
29
The goal is to find an optimal decision which would minimize the cost or maximize
the return, for instance, while keeping the risk under acceptable limits.
In the first stage, the decision maker chooses some variables before the outcome of
the random event is known. Hence it is referred to as 'here-and-now' decisions. The
cost of these decisions is calculated deterministically.
After these decisions are made, a random event occurs, which influences the
parameters of the second-stage problem.
In the second stage, additional ('recourse') decisions are made after the random event;
these are 'wait-and-see' decisions, which might be different for different scenarios.
The cost of second-stage decisions depends on the outcome of the random event and
the first-stage decisions.
The aim is to minimize the total expected cost (or maximize the total expected
reward) over the randomness.
While two-stage stochastic programming is useful for problems with a single period of
uncertainty followed by a decision, many real-world problems involve sequential decision-
making over multiple periods. That's where multi-stage stochastic programming comes into
play.
30
In the first stage, 'here-and-now' decisions are made, similar to the two-stage model.
Then a random event occurs, and the process continues over multiple stages.
In each subsequent stage, 'wait-and-see' decisions are made based on the outcomes of
all previous random events.
The objective remains to minimize the expected total cost (or maximize the total
expected reward) over the randomness, considering all stages of decision-making.
GAs are inspired by the principles of genetics and natural selection, like
reproduction, crossover (recombination), and mutation. They work by creating a
population of possible solutions and allowing them to 'evolve' over generations to
optimize towards the best solution.
GAs are robust search algorithms capable of navigating large, complex search
spaces to locate near-optimal solutions. This is especially useful in problems where
the search space is discontinuous, noisy, or has many local optima.
The annealing process, which involves heating and carefully cooling a material to
enlarge its crystals and decrease flaws, is the basis for the Simulated Annealing
algorithm in metallurgy.
It is a probabilistic technique used for finding an approximation to the global
optimum of a given function. Unlike gradient descent methods, which might get stuck
in local minima, SA has a probability of escaping local minima by allowing worse
solutions in the initial stages.
31
As the algorithm proceeds, the "temperature" (a parameter in SA) decreases, and the
probability of accepting worse solutions also decreases, allowing the algorithm to
converge to an optimal solution.
The social behaviors of fish schools and flocks of birds serve as inspiration for PSO.
Every solution in PSO represents a "particle" in the search space. Every particle has a
velocity that controls its flight path and a fitness value determined by the objective
function.
Particles follow the current optimal particles and fly through the issue space. PSO's
principal benefits are its quick convergence and ease of use.
PSO, however, tends to converge towards local minima, and solutions can depend on
the initial swarm distribution.
ACO can be computationally expensive and may require parameter tuning for the
pheromone update rules.
32
It creates trial vectors by combining a third vector with the weighted difference
between two population vectors. In theory, this aids in population evolution and
helps it reach the global optimum.
DE is relatively simple and efficient, but like many metaheuristics, it can suffer
from premature convergence and requires appropriate parameter settings.
2.10 Summary:
Optimization refers to the process of finding the best solution from all possible
solutions. It frequently entails determining the value of a real function by
methodically choosing input values from an acceptable set and maximizing or
minimizing the function.
One technique for resolving complicated issues is to divide them into smaller,
overlapping subproblems using dynamic programming. By storing the answers to
these subproblems, it enables the optimization of recursive computations when the
subproblems share sub-subproblems.
33
Stochastic programming is an approach to optimization under uncertainty. Unlike
deterministic optimization, it considers possible scenarios in the decision-making
process. It's used when the outcomes are partly or entirely subject to random events,
and it focuses on finding the optimal decisions in expectation.
2.11 Keywords: “
34
Static Optimization: This refers to optimization problems where all parameters are
constant and not dependent on time.
35
3. Which metaheuristic optimization algorithm would be most suitable for a large,
complex problem with many local optima and why?
4. What are the main differences between linear and non-linear programming? Provide
examples of problems that can be solved by each.
One of the leading E-commerce companies, E-Shop, based in Chicago, was facing issues
with inventory management. Their main problem was holding either too much inventory,
leading to high holding costs, or too little, causing stock-outs and missed sales opportunities.
They wanted to optimize their inventory to reduce costs and improve customer satisfaction.
E-Shop decided to implement an optimization technique using Linear Programming. The goal
was to minimize the total cost of inventory, including holding and shortage costs, while
ensuring that customer demand was met efficiently.
They developed a mathematical model to represent their inventory problem. The decision
variables were the quantities of different items to order at different times. The constraints
were the warehouse capacity and the demand that had to be met. The objective function was
the total cost to be minimized.
E-Shop used a widely available optimization software package to solve the model. After the
implementation of the model, E-Shop saw a remarkable reduction in their inventory costs.
The holding cost reduced by 20%, and the stock-out occurrences fell by 30%. Besides, the
system suggested optimal reorder points and quantities, making the replenishment process
more efficient. This led to improved customer satisfaction, reflected in the increased
customer review ratings.
36
By using optimization techniques, E-Shop managed to create a more efficient and cost-
effective inventory management system. This case demonstrates how optimization techniques
can be used in real-life scenarios to improve business operations and increase profitability.
Questions:
1. How did the implementation of the Linear Programming model lead to a reduction in
inventory costs at E-Shop?
2. What were the decision variables, constraints, and the objective function in the Linear
Programming model used by E-Shop?
3. Besides inventory management, what are some other areas in the E-commerce
business where optimization techniques could be applied?
2.14 References:
37
UNIT : 3
Techniques in Optimisation
Learning Objectives:
Structure:
3.1 Mathematical Formulation of Optimisation Problems
3.2 Classes of Optimisation Problems
3.3 Basic Techniques in Optimisation
3.4 Advanced Optimisation Techniques
3.5 Handling Constraints in Optimisation Problems
3.6 Summary
3.7 Keywords
3.8 Self-Assessment Questions
3.9 Case study
3.10 References
38
3.1 Mathematical Formulation of Optimisation Problems
Optimisation problems are at the core of many decision-making and modeling issues in
physical sciences, economics, engineering, and many other disciplines. The mathematical
formulation of an optimisation problem involves identifying the following key components:
Objective Function
The objective function serves as the mathematical representation of the goal that needs to be
achieved. This could be to either minimise or maximise a certain quantity.
For instance, a business may want to minimise costs or maximise profit, a machine
learning algorithm may aim to minimise error rates, or a logistics company might
want to minimise delivery time.
The choice of objective function is directly tied to the problem being solved, and is
arguably the most important component of an optimisation problem.
Decision Variables
Decision variables are the elements that we have control over and can adjust to meet our
objective. They represent the unknowns of the optimisation problem.
In a business scenario, these could be the quantity of goods to produce, price to set for
a product, amount of budget to allocate to different projects, and so on.
Mathematically, decision variables are often represented as a vector x = (x1, x2, ...,
xn).
The optimal values of these variables, that is, the values that optimise the objective
function, are the solution to the optimisation problem.
39
Constraints
Constraints are the conditions or limitations that must be satisfied in the problem. They can
restrict the feasible values of the decision variables.
Not every solution that optimises the objective function is feasible, and only those
solutions that satisfy all constraints are considered valid.
Optimal Solutions
The optimal solution in an optimisation problem is the set of decision variables that yield the
best possible value for the objective function while satisfying all constraints.
An optimal solution does not necessarily have to be unique. There can be multiple
sets of decision variables that yield the same optimum objective function value.
The search for the optimal solution is the main goal of solving an optimisation
problem.
Feasibility refers to the condition where all the constraints of the optimisation problem are
satisfied.
A feasible solution is not necessarily optimal, but any optimal solution must be
feasible.
40
If there's no possible solution that can satisfy all constraints, the problem is said to be
infeasible.
The terms unbounded and bounded refer to the possible range of the objective function's
values.
An optimisation problem is called bounded if there's a finite upper or lower limit
(depending on whether it's a maximisation or minimisation problem) that the
objective function cannot exceed.
On the contrary, if the objective function can take on arbitrarily large positive or
negative values, then the problem is unbounded.
An unbounded problem might not have an optimal solution if the objective function
can be improved indefinitely.
Linear and Non-linear optimisation represents the two primary classes of optimisation
problems that involve finding the best solution in mathematical modeling.
Linear Optimisation: In linear optimisation problems, the objective function and the
constraints are linear, which means they can be expressed as a linear combination of
the variables of interest. These types of problems can be efficiently solved using
various techniques, such as the Simplex Method or Interior-Point Method. For
example, linear programming problems often involve maximising or minimising
costs, resources, or profits subject to linear constraints.
41
problems are generally more complex and challenging to solve than their linear
counterparts. They often require iterative methods such as Newton's method, Gradient
Descent, or more complex techniques like Genetic Algorithms or Simulated
Annealing. These types of problems can model more complex scenarios, such as
machine learning parameter tuning, energy minimisation in physics, and many others.
Integer and Non-Integer optimisation deals with the types of variables considered in the
optimisation problem.
Non-Integer Optimization: These problems, on the other hand, allow the variables to
take any real values. Most linear and non-linear optimisation problems fall under this
category. These problems can often be solved more efficiently than integer
optimisation problems.
42
Multi-Objective Optimisation: Multi-objective optimisation problems involve
multiple conflicting objectives. For instance, a car manufacturer might want to
minimise cost, maximise safety, and maximise fuel efficiency simultaneously.
In these types of problems, there is typically not a single optimal solution, but rather a set of
trade-off solutions known as the Pareto-optimal front. Techniques for solving these problems
include weighted sum methods, evolutionary algorithms, or the use of game theory concepts.
Deterministic and Stochastic Optimisation relates to the type of data or uncertainty present in
the optimisation problem.
The solutions to these problems often involve risk measures and are more complex
than deterministic counterparts. Techniques to solve these problems often involve
simulation, scenario analysis, or robust optimisation.
43
descending algorithm, in which the next point is chosen by following the steepest direction of
descent.
Working: Gradient descent works by calculating the gradient (the vector of first-
order derivatives) of the cost function for the current point, and then updating the
point by subtracting the gradient times a learning rate. This process is repeated until
the algorithm converges to a minimum.
Applications: Gradient descent is used widely in machine learning and AI for training
models, particularly in linear regression, logistic regression, and neural networks.
Newton's Method
Working: Newton's method begins with an initial guess for the root. Then, it
computes the derivative of the function at this guess, and uses the value of the
function and its derivative to update the guess. This is repeated until the guess
converges to the true root.
Genetic Algorithms
Genetic algorithms are inspired by the process of natural selection and genetics. These are
used to find optimal or near-optimal solutions to difficult problems that would otherwise take
a lifetime to solve. They are used in search, optimisation, and machine learning.
44
Working: Genetic algorithms work by creating a population of possible solutions and
then evolving these solutions over time. This evolution happens through a process of
selection (choosing the best solutions), crossover, and mutation.
Simulated Annealing
45
The "Programming" in Linear Programming refers to the use of the method to
determine a program, not referring to computer programming.
Integer Programming problems often arise in scheduling, planning, and other logistics
problems where the decision variables must take discrete values.
This method can be more computationally intensive than LP because of the discrete
nature of the solution space. This can result in a large number of possible solutions
that the algorithm needs to evaluate.
QP problems often arise in the areas of machine learning, control systems, image
processing, and portfolio optimisation.
46
Unlike LP, IP, and QP, NLP problems do not require the objective function or
constraints to be linear or quadratic. They can take any form.
NLP has many practical applications, such as in machine learning, where parameters
in non-linear models are optimised.
Dynamic Programming is a method for solving complex problems by breaking them down
into simpler subproblems.
The idea is to solve the subproblems first and use their solutions to build up solutions
to bigger problems.
Examples include the knapsack problem, shortest path problem, and many sequence
alignment problems in bioinformatics.
Convex Optimisation
It's worth mentioning that LP, IP, QP, and some NLP can all be viewed as special
cases of convex optimisation problems.
47
The strength of convex optimisation comes from the fact that, if a problem is convex,
there is a wealth of theoretical results that can be used to understand the problem
better and a wide range of algorithms that can solve the problem efficiently.
In the world of optimisation problems, constraints play a vital role in defining the boundaries
or limits within which we seek optimal solutions. Broadly, these constraints can be
categorised into two types:
Equality Constraints: These are constraints that must hold exactly. For example, if
we are looking to maximise the volume of a box given a specific amount of material,
the amount of material could be an equality constraint, as it cannot change.
Inequality Constraints: These are constraints that set a boundary that can't be
exceeded, but it isn't necessary to meet it exactly. A common example of this is a
budget constraint. We can't exceed our budget, but we don't have to use all of it.
In the case of equality constraints, the penalty term is typically a squared function of
the constraints.
For inequality constraints, the penalty function often involves a step function that
penalises solutions that violate the constraints.
However, it's worth noting that this approach has some drawbacks. For instance, the choice of
penalty term and its weight can significantly impact the algorithm's performance.
48
The Barrier Method
The Barrier Method, also known as Interior Point Method, is another technique used for
solving constrained optimisation problems. Instead of penalising points outside the feasible
region like the Penalty Method, the Barrier Method discourages approaches to the boundary
of the feasible region.
Barrier functions are incorporated into the objective function and are designed such
that they go to infinity as one approaches the boundary of the feasible region. This
ensures that the resulting solutions remain within the feasible region.
The Barrier Method is known to be more efficient than the Penalty Method, as it generates a
better path towards the optimum, but it requires the initial point to be strictly feasible (inside
the constraint set).
Lagrange Multipliers
Lagrange Multipliers is a powerful method used to solve optimisation problems with equality
constraints. This approach involves the construction of a new function, called the Lagrangian,
which incorporates the original objective function and the constraints.
This method works by introducing a multiplier for each constraint, which adjusts the
objective function in a way that accounts for the constraints.
This approach is particularly effective in situations where the constraints can be easily
incorporated into the objective function and the conditions for the method's applicability are
met. However, it is not suitable for problems with inequality constraints or non-differentiable
functions.
49
Each of these techniques offers a unique approach to tackling constrained optimisation
problems, and the choice between them depends on the nature of the problem at hand, the
characteristics of the objective function, and the constraints.
3.6 Summary:
The objective function (or cost function or fitness function) is the function that needs
to be optimised. It defines the criterion that you want to minimise or maximise.
Decision variables are the variables that decision-makers control and adjust to achieve
the optimum solution. These variables represent the decisions to be made in an
optimisation problem.
Constraints are the restrictions or limits on the decision variables. They form a
feasible set within which an optimal solution must be found. If a potential solution
violates a constraint, it is infeasible and rejected.
An optimal solution is a feasible solution (i.e., a solution that satisfies all constraints)
that yields the best value of the objective function. In a minimisation problem, this is
the lowest possible value; in a maximisation problem, it is the highest possible value.
A feasible solution is one that satisfies all the constraints of the optimisation problem.
An infeasible solution is one that violates at least one constraint.
Linear optimisation problems involve linear objective functions and constraints, while
non-linear optimisation problems involve at least one non-linear function in the
objective function or constraints. Non-linear problems are generally more complex
and harder to solve than linear ones.
3.7 Keywords:
Objective Function: The objective function, also known as the cost function or loss
function, is the function that needs to be optimised in an optimisation problem. This
50
function represents the goal of the problem, which could be either to maximise or
minimise a certain quantity.
Lagrange Multipliers: Lagrange multipliers are a strategy for finding the local
maxima and minima of a function subject to equality constraints. The method
involves constructing a new function (the Lagrangian) which combines the objective
function and the constraints, and finding its stationary points.
51
3.8 Self-Assessment Questions:
1. How would you apply the Gradient Descent Method in an optimisation problem
where you need to minimise the error of a Machine Learning model?
3. Which constraints would you consider when formulating an optimisation problem for
a logistics company wanting to minimise their transportation costs?
4. What steps would you take to validate the mathematical model used in an
optimisation problem dealing with supply chain management?
Swift Logistics, a mid-sized delivery company, was experiencing increasing operational costs
due to inefficient routing. With a fleet of 50 vehicles and hundreds of deliveries across the
city daily, small inefficiencies were magnified, leading to higher fuel costs and longer
delivery times. Swift approached this issue as an optimisation problem, seeking to find the
most efficient routes for their drivers.
They modeled the problem as a variant of the Vehicle Routing Problem (VRP), a well-known
optimisation problem in logistics. The company's objective was to minimise total distance
traveled while ensuring that all customers received their deliveries within their specified time
windows. The decision variables were the routes assigned to each vehicle, with constraints
including the vehicle capacity and customers' delivery windows.
52
Swift Logistics employed a mixed-integer linear programming (MILP) approach to solve this
problem. Working with a team of data scientists, they utilised advanced algorithms and
developed a custom optimisation solution. The solution took into consideration not only
distance but also traffic data and road conditions, refining the delivery routes based on real-
time data.
The results were transformative. Swift Logistics saw a 15% reduction in fuel costs and a
significant improvement in delivery times. Their drivers were able to make more deliveries
per day, boosting productivity. Moreover, their customers reported higher satisfaction due to
timely deliveries, enhancing the company's reputation in the competitive logistics market.
Questions:
1. What type of optimisation problem was used by Swift Logistics to address their
issue, and why was it suitable for their situation?
2. How did the optimisation solution improve the operational efficiency and customer
satisfaction at Swift Logistics?
3. Besides reducing fuel costs and improving delivery times, what other potential
benefits might Swift Logistics realise from optimising their delivery routes?
3.10 References:
53
UNIT : 4
Optimization Problems
Learning Objectives:
Understand the concept, history, and applications of optimization techniques.
Recognize the different classifications of optimization problems.
Grasp the distinction between univariate and multivariate optimization problems.
Explore the concept and applications of single variable optimization problems.
Learn various analytical and numerical methods used for single-variable
optimization.
Gain insights into real-world applications and case studies of single variable
optimization.
Understand the concept, applications, and techniques of multivariable optimization
problems without constraints.
Learn about various techniques such as Gradient Descent, Newton's Method, and
Conjugate Gradient Method used for multivariable optimization.
Structure:
54
4.1 Introduction to Optimization Problems
The objective function measures the quality of a solution and is what you want to optimize.
Constraints are the restrictions or limitations on the decision variables. They define the set of
feasible solutions, that is, the solutions that satisfy all the constraints.
Optimization techniques have a rich history dating back to ancient times, and they have
evolved alongside the growth of mathematical theories and the advancement of
computational capabilities. Here are key highlights:
Early Beginnings: The simplest optimization problems can be traced back to the
ancient Greeks, such as the problem of finding the shortest path, known as the shortest
path problem.
55
Evolutionary and Metaheuristic Algorithms: From the 1970s onward, with the advent
of more advanced computing technologies, complex optimization techniques like
genetic algorithms, simulated annealing, and particle swarm optimization started
emerging. These techniques can handle large, complex, and non-differentiable
optimization problems.
Applications of Optimization
Supply Chain and Logistics: Optimization techniques help in minimizing the cost of
transportation, optimise routes for delivery trucks, managing inventory, and
production planning.
Energy and Environment: Optimization is used for planning and operation of power
systems, scheduling of power generation, and optimizing the use of renewable
resources.
56
Healthcare: In healthcare optimization can be used for hospital resource
management, treatment planning, and medical imaging.
Each classification provides insights into the structure of the problem, the difficulty in finding
an optimal solution, and the most suitable algorithms or methodologies for solving the
problem.
Univariate Optimization:
These types of problems involve a single decision variable. This simplifies the
optimization process since we are only concerned with finding the optimal value of
one variable. They often involve straightforward methods like derivative analysis or
bracketing methods for continuous functions or simply enumeration for discrete cases.
Multivariate Optimization:
On the other hand, multivariate optimization problems involve more than one decision
variable. These are more complex as the decision variables often interact with each
57
other, and a change in one variable can impact the optimal values of the others. This
makes the optimization process more complicated and requires the use of more
sophisticated methods like gradient-based methods, Newton's method, or genetic
algorithms for complex or non-linear functions.
Constrained Optimization:
These are problems where the decision variables are subject to one or more
constraints. These constraints can be equalities, inequalities, or a combination of both.
They limit the feasible region of the solution space. Constrained optimization
problems are generally harder to solve than unconstrained ones, and they often require
techniques such as the Lagrange multiplier method, KKT conditions, or algorithms
such as Sequential Quadratic Programming (SQP).
Unconstrained Optimization:
These problems, by contrast, don't have any restrictions on the decision variables.
This means that the decision variables can take any value within their defined
domains. These problems are typically easier to solve, and methods such as the
Steepest Descent, Newton's method, or the Quasi-Newton method are often
employed.
58
For instance, a business might wish to determine the price that maximizes revenue for a
single product, or an engineer might wish to determine the optimal length of a beam that
maximizes its strength while minimizing its weight. In these scenarios, we model the problem
as a single variable function and then use optimization techniques to find the optimal
solution.
o The Closed Interval Method: This method is applicable when the function is
continuous on a closed interval. The process involves finding the critical points and
evaluating the function at these points and at the endpoints of the interval.
o The First Derivative Test: Here, the sign of the first derivative is used to determine
where the function is increasing or decreasing and, thus to locate local maximums
and minimums.
o The Second Derivative Test: This test uses the second derivative to determine
whether a critical point is a local maximum, a local minimum, or a saddle point.
Numerical Methods:
Not all optimization problems can be solved analytically, especially when the function is
complex or does not have a derivative. In such cases, numerical methods can be used to
find an approximate solution. Numerical methods are computational techniques that use
59
iterative processes to converge to the optimal solution. Some popular numerical methods
for single variable optimization include:
o The Bisection Method: This method is used when the function is continuous on
an interval, and it involves repeatedly bisecting the interval and selecting the
subinterval in which the optimum lies.
o The Newton-Raphson Method: This method uses the derivative of the function
to find a better approximation to the optimum at each iteration.
o The Golden Section Search: This is a bracketing method that reduces the search
interval in each step but does not require the function to be differentiable.
Despite its apparent simplicity, single-variable optimization does present several challenges.
Some of the main challenges are as follows:
Multiple extrema: A function can have several local minimums or maximums, making
it challenging to determine which is the global optimum.
The precision of the solution: In numerical methods, the precision of the solution is
usually determined by the number of iterations and the tolerance level. Choosing an
appropriate stopping criterion can be a challenge, as a trade-off exists between the
precision of the solution and the computational time and resources.
60
4.4 Multivariable Optimization Problems without Constraints
Several techniques have been developed to solve multivariable optimization problems. The
choice of method usually depends on the specifics of the problem, such as the function's
continuity, convexity, and the presence of constraints.
61
Newton’s Method:
Despite the availability of multiple techniques, multivariable optimization is not a trivial task
and involves several challenges. Here are some common obstacles:
62
Complexity and Noise: Real-world problems often involve complex, non-linear, and
noisy functions, which can make the optimization process challenging. Noise, in
particular, can cause optimization algorithms to miss the true optimum.
4.5 Summary:
Optimization problems seek to find the best solution from all feasible solutions. This
involves identifying a decision variable, an objective function, and constraints that
define the feasible set of solutions.
Multivariable Optimization Problems involve more than one decision variable. The
objective is to find the set of values that optimize a function of multiple variables.
4.6 Keywords:
63
Multivariate Optimization: This refers to optimization problems that involve more
than one variable. The goal is to find the minimum or maximum of a function that
depends on several variables. Techniques used include gradient descent, Newton's
method, and the conjugate gradient method.
64
2. What are the key differences between single-variable and multivariable optimization
problems? Explain with an example where each type would be most effectively used.
5. What are some challenges that one might face when solving single-variable
optimization problems, and how might these differ from the challenges in
multivariable problems? Provide at least two examples for each.
Big Bazaar, one of India's leading supermarket chains, was grappling with an inventory
management challenge. They had a wide range of products sourced from hundreds of
suppliers to cater to a diverse clientele. However, managing such a large inventory efficiently
was becoming a problem. It was not uncommon to see stockouts for some popular items,
while there were also instances of excess inventory for certain less-demanded products.
To address this, Big Bazaar implemented an optimization algorithm that used past sales data
to predict future demand for different products. The algorithm utilized machine learning
techniques to account for factors like seasonality, promotional activities, and trends in
consumer behaviour.
The results were astonishing. The instances of stockouts reduced by 30% within the first
three months of implementation. Simultaneously, the excess inventory was curtailed by 25%,
leading to better cash flow management. The improved efficiency also led to a decrease in
storage space requirements, thereby reducing overhead costs. Overall, the optimization of
inventory management at Big Bazaar resulted in significant cost savings and improved
customer satisfaction.
65
Questions:
1. How do you think the optimization algorithm has helped Big Bazaar in managing
their inventory efficiently?
2. What are some potential challenges that Big Bazaar might have faced while
implementing this inventory optimization solution, and how might they have
overcome them?
3. If you were to further optimize this system, what other factors would you consider to
enhance its predictive accuracy and efficiency?
4.9 References:
66
UNIT : 5
Method in Optimization
Learning Objectives:
Understand the basic principles and applications of optimization techniques.
Gain knowledge of both univariate and multivariate optimization problems.
Learn to identify and deal with constraints in multivariable optimization problems.
Understand the nature of maximization and minimization problems and learn
various techniques to solve them.
Gain proficiency in solving single-variable optimization problems.
Understand the necessary and sufficient conditions for a function to be optimal.
Learn to apply the interpolation method in optimization, with a focus on quadratic
interpolation.
Structure:
67
5.1 Multivariable Optimization Problems
Direct Search Methods: This category of techniques does not require information
about the gradient of the objective function. It's particularly useful when the objective
function is not differentiable. Methods under this category include the Nelder-Mead
method and grid search.
68
o Gradient Descent/Ascent: It is the simplest form where we iteratively move
towards the steepest descent/ascent to reach the minima/maxima.
o Newton's Method: It uses both the first and second derivative (Hessian) to
find the optima. It generally converges faster than gradient descent/ascent but
is more computationally expensive.
Multivariable optimization refers to the process of determining the best possible solutions for
a function with several variables under certain conditions or constraints. This technique has
widespread applications in various fields, such as machine learning, economics, engineering,
and operations research.
Constraints, which can be thought of as restrictions or conditions, play a crucial role in real-
world optimization problems. They define the feasible region or set of all potential solutions
that satisfy these conditions. Without constraints, an optimization problem seeks to find a
global minimum or maximum, but with constraints, the solution lies within the feasible
region defined by these constraints.
69
Types of Constraints: Equality and Inequality
Equality constraints: These are conditions that should be strictly equal to some
value. They typically have the form of g(x) = c, where 'g' is a function, 'x' are the
variables, and 'c' is a constant.
Inequality constraints: These are conditions that can be greater than, less than, or
equal to a certain value. They usually take the form h(x) ≤ d or h(x) ≥ d, where 'h' is a
function, 'x' are the variables, and 'd' is a constant.
The method of Lagrange multipliers is a powerful tool used to solve optimization problems
subject to equality constraints. Introduced by Joseph Louis Lagrange, this approach extends
the idea of taking derivatives and setting them equal to zero (from univariate calculus) to
higher dimensions.
Here is a general procedure for solving a constrained optimization problem using Lagrange
multipliers:
Take the gradient of L with respect to 'x' and 'λ' and set them equal to zero.
Solve the equations obtained in step 2. If there are 'n' variables and 'm' constraints,
you'll have 'n + m' equations
70
KKT Conditions in Constrained Optimization
Stationarity condition: The gradient of the Lagrangian with respect to the decision
variables should be zero
Primal feasibility: All constraints (both equality and inequality) must be satisfied
Dual feasibility: The Lagrange multipliers associated with inequality constraints must
be greater than or equal to zero
Complementary slackness: The product of each Lagrange multiplier and its associated
inequality constraint should be zero.
71
These problems involve identifying the best outcome - in terms of maximum or minimum -
from a set of available choices. For instance, a business may want to maximize its profit or
minimize its cost, or an engineer may need to design a container that will carry the maximum
volume with the least amount of material.
In mathematical terms, these problems typically involve a function f(x), which we want to
maximize or minimize. The function f(x) is often referred to as the objective function or cost
function, and x are the decision variables that we control.
Maximization problems: These are problems where we aim to find the maximum
value of a function, often denoted as max f(x). An example could be maximizing the
profit function of a business given a certain production and demand curve.
Minimization problems: These problems are about finding the smallest value that a
function can take, often denoted as min f(x). A typical example is finding the shortest
path between two points on a map.
The appropriate technique for solving a maximization problem often depends on the nature of
the problem and the function involved. Here are some commonly used methods:
Calculus: This method is useful when the objective function and constraints are
differentiable. This technique involves finding the derivative of the function and
setting it to zero, then checking the second derivative to ensure its maximum.
Linear Programming (LP): If the problem is linear (both the objective function and
the constraints are linear), LP is an effective approach. Various algorithms, such as
the Simplex Method or Interior-Point Methods, can solve these problems.
72
Genetic Algorithms: These are often used in machine learning and artificial
intelligence to find approximate solutions to optimization problems. These algorithms
mimic the process of natural selection to generate better and better solutions over
time.
The following are some commonly used techniques for solving minimization problems:
Branch and Bound Algorithms: These are used for solving integer programming
problems, which often involve minimization. The technique is based on partitioning
the set of possible solutions into smaller subsets and creating a bounding function for
each subset.
Single variable optimization refers to the mathematical process of finding the best solution, or
optimal point, for a problem with only one variable. This is typically done by maximizing or
minimizing a certain objective function, which could represent a cost, profit, distance, or any
other quantity you'd like to optimize.
73
There are three types of optimal points:
Global minimum: This is the smallest value that a function takes on over its entire
domain.
Global maximum: Conversely, this is the greatest value that a function takes on over
its entire domain.
Local minimum or maximum: These are points where the function takes on a
minimum or maximum value within a certain range but not over the entire domain.
There are a few different techniques that can be employed to optimize a function with a
single variable:
Analytical Methods: This involves the use of calculus and, more specifically, taking
derivatives of the function. The derivative of a function gives us the slope of the
tangent line at a point, which can be used to determine where a function is increasing
or decreasing. In the context of optimization, where the derivative is zero or
undefined often corresponds to minima, maxima, or points of inflexion.
Graphical Methods: Plotting the function and visually inspecting the graph is a
simple yet powerful technique for finding optimal points. This can be especially
useful for understanding the general behaviour of the function and for validating the
solutions found through other methods.
74
5.5 Necessary and Sufficient Conditions for Optimum
The necessary and sufficient conditions form the basis of determining the optima - maxima,
minima or saddle points - of a function.
The first and second-order conditions are fundamental in optimization, as they help in
determining the nature of the critical points - whether they are local/global maxima or
minima, or saddle points.
First-order Conditions: The first derivative of a function gives its slope. When the first
derivative equals zero (f'(x) = 0), we have a stationary point. The function may be at a
maximum, a minimum or a point of inflexion at these stationary points.
Second-order Conditions: The second derivative provides information about the rate
of change of the function's slope. If the second derivative is positive at a stationary
point (f''(x) > 0), the function is concave up at that point, suggesting a minimum.
Conversely, if the second derivative is negative (f''(x) < 0), the function is concave
down, indicating a maximum. If the second derivative equals zero (f''(x) = 0), the test
75
is inconclusive, and other methods have to be employed to identify the nature of the
stationary point.
Derivatives play a crucial role in finding the extrema (maximum and minimum values) of a
function. The method involves calculating the first and second derivatives and applying the
first and second-order conditions.
First, find the critical points by setting the first derivative equal to zero and solving for
the variable.
Then use the second derivative to determine whether each critical point is a
maximum, minimum, or point of inflexion.
Convexity and concavity play a critical role in optimization problems, especially when
determining the nature of the optima.
Understanding the shape of the function (whether it's convex or concave) is crucial for
optimization because it can help provide insights into the nature of the solution and the
behaviour of the function at its optima.
76
5.6 Interpolation Method in Optimization
Interpolation is a popular mathematical tool used to estimate the value of a function from
known values at other points. In the context of optimization, interpolation is often used as
part of algorithms for finding the minimum or maximum of a function. It is a fundamental
aspect of a wide range of techniques, from basic numerical algorithms to complex machine
learning algorithms.
Linear interpolation is the simplest form of interpolation where we find a linear function that
passes through two known points. In optimization, this concept plays a crucial role in
algorithms designed to find function minima or maxima. It's used when we assume the
function to be optimized has a linear relationship within the interval of interest.
77
The basis for higher-order methods: Linear interpolation forms the basis for more
advanced interpolation methods such as quadratic and cubic interpolations.
Quadratic interpolation involves fitting a quadratic function through three known points. In
optimization, this is particularly useful when the function being optimized is expected to
behave like a quadratic function, i.e., has a single minimum or maximum.
78
Where:
Several methods exist for solving quadratic optimization problems. Here are a few common
techniques:
Active Set Methods: These iterative techniques identify and work with "active"
constraints. An active constraint is one where changing the variables will directly
affect the objective function.
Interior Point Methods: These approaches focus on searching within the feasible
region, which reduces the problem to a series of simpler problems.
Gradient Descent Methods: These are iterative techniques that move towards the
solution by taking steps proportional to the negative of gradient of the function at the
current point.
Let's consider an example where we are trying to minimize the following quadratic function
subject to a single constraint:
Minimize f(x, y) = x² + y²
Subject to:
x+y≤3
Here, we could use any of the methods above to find the solution. For instance, if we use the
Active Set Method, we would start at an initial feasible point (like (0,0)) and then proceed
79
towards the boundary of the constraint. The solution is the point on the line x + y = 3 that
minimizes x² + y², which can be found by differentiating and solving for (x, y).
Quadratic programming (QP) is a special type of quadratic optimization problem where all
the constraints are linear. In other words, QP involves the minimization of a quadratic
function subject to linear constraints.
Control Systems: In control theory, QP is often used to optimize the control actions
in order to balance performance against effort.
5.8 Summary:
80
minimization problems aim to find the minimum. These are two key types of
optimization problems in mathematical programming.
Necessary and Sufficient Conditions for Optimum: The necessary condition for a
point to be optimum (either maximum or minimum) is that the derivative of the
function at that point must be zero. The sufficient condition for a local minimum is
that the second derivative at that point is positive, and for a local maximum, the
second derivative at that point should be negative.
5.9 Keywords:
81
Maximization and Minimization Problems: These refer to the process of finding
the highest or lowest point, respectively, of a function. In the context of optimization,
maximization might involve finding the greatest profit or efficiency, while
minimization might involve finding the least cost or waste.
Necessary and Sufficient Conditions: These are conditions used to determine the
optimum points in an optimization problem. The first derivative test (necessary
condition) helps to locate potential minima or maxima, while the second derivative
test (sufficient condition) helps to confirm whether these points are indeed minima,
maxima, or neither.
Interpolation Method: This is a method used to estimate values between two known
values. In optimization, interpolation methods like linear and quadratic interpolation
can be used to approximate the function around the point of interest, helping to
converge to the optimal solution faster.
1. How does the method of Lagrange multipliers assist in finding local maxima and minima
in multivariable optimization problems with constraints? Explain with an example.
2. What are the necessary and sufficient conditions for an optimum in single variable
optimization? Discuss the role of the first and second derivative tests in this context.
82
3. Which method would you utilize to solve a quadratic optimization problem and why?
Detail the steps involved in this process.
4. What role does interpolation play in the optimization process? Discuss the differences
and potential applications of linear and quadratic interpolation methods.
5. How does the concept of convexity and concavity contribute to determining the optimal
solutions in a single variable optimization problem? Illustrate with suitable examples.
In the global e-commerce business, Amazon has emerged as a leader largely due to their
proficiency in managing inventories and providing exceptional customer service. One critical
problem they faced was optimizing their inventory management system to meet increasing
customer demand while minimizing storage and delivery costs.
To solve this problem, Amazon incorporated advanced optimization techniques. They started
by implementing a multivariable optimization technique to track and predict customer
demand for products across different geographical regions. By incorporating factors such as
historical data, seasonality, and promotional activities, they could predict demand with high
accuracy.
Amazon also introduced a constraint - the limited capacity of their warehouses. To address
this, they adopted a constrained optimization approach. Using the method of Lagrange
Multipliers, Amazon determined the optimal quantity of each product to be stored in different
warehouses to meet demand while not exceeding capacity.
Next, they tackled the minimization of delivery costs. Amazon introduced a single variable
optimization problem where the variable was the delivery route. They designed an algorithm
to find the route that would minimize the total distance travelled by their delivery trucks.
83
These optimization techniques significantly improved Amazon's inventory management,
leading to cost savings and improved customer satisfaction.
Questions:
2. How did Amazon handle the constraints in their optimization problems, and what
was the result?
3. How did Amazon apply single variable optimization to minimize delivery costs, and
what impact did it have on their overall operations?
5.12 References:
84
UNIT : 6
Mathematical Optimization
Learning Objectives:
Structure:
85
6.1 Region Elimination Methods: An Overview
The fundamental idea is simple yet powerful: instead of checking every possible solution
(which could be a gargantuan task), these methods iteratively shrink the search space (or
"region") where the optimum could potentially be. As the name suggests, these techniques
work by progressively "eliminating" regions of the search space that are unlikely to contain
an optimum solution. This is accomplished based on some criterion or rule, which depends on
the specific method being used.
The rationale behind region elimination methods is to make the process of finding the
optimum solution more efficient. These methods significantly reduce computational
complexity, particularly in high-dimensional problems, by making educated decisions about
which regions can be safely discarded and which require further exploration.
Region elimination methods find utility in a wide range of practical scenarios, including but
not limited to the following:
Machine Learning and Data Science: These fields often involve high-dimensional
optimization problems. For instance, tuning the hyperparameters of a machine
learning model can be seen as an optimization problem where the goal is to find the
hyperparameters that yield the best model performance. Region elimination methods
can help to efficiently search the hyperparameter space.
86
Pharmaceutical Industry: Drug discovery and development involve complex
optimization problems, such as determining the optimal composition of a drug for
maximum effectiveness and minimal side effects. Here, region elimination methods
can assist in reducing the experimental space, focusing on the most promising drug
compositions.
Energy Systems: In the design and operation of energy systems like power grids,
decision-makers need to balance numerous factors (e.g., generation capacity, energy
demand, cost, and environmental impact). Region elimination methods allow for the
effective narrowing down of possible system configurations to those most likely to
achieve the best balance.
Internal halving is an iterative method of optimization that draws its inspiration from the
classic binary search algorithm. The aim of optimization is to find the best solution from a set
of potential solutions. In terms of numerical computation, the internal halving method is a
zero-finding procedure applied to a strictly unimodal function. It does this by repeatedly
halving the interval of uncertainty, which contains the optimal solution.
The main idea of the method is to find the mid-point of the interval and evaluate the function
at that point. Then, based on the value of the function, the method decides whether to
continue searching in the left half or the right half of the interval.
87
Conceptual Explanation of Internal Halving
Initialization: The method starts by defining an interval of uncertainty [a, b], where a
and b are the lower and upper bounds, respectively. We assume that there exists an
optimal solution within this interval.
Halving Step: The midpoint of the interval, c, is calculated using the formula c =
(a+b)/2. The function value at the midpoint, f(c), is then computed.
Interval Update: If the function is unimodal and we are looking for a minimum, the
interval [a, b] is updated as follows:
o If f(c) < f(b), then the optimal solution must lie in the interval [a, c], so we
update b = c.
o If f(c) >= f(b), then the optimal solution must lie in the interval [c, b], so we
update a = c.
Convergence: The steps are repeated until the interval of uncertainty is reduced to the
desired precision.
To provide a more mathematical perspective, let's denote the function that we are trying to
optimize as f(x), and we are looking for the value x* that minimizes f(x) in the interval [a, b].
1. Initialize a and b.
2. Calculate c = (a+b)/2.
3. Evaluate f(c).
4. If f(c) < f(b), update b = c.
5. If f(c) >= f(b), update a = c.
6. If |b - a| <= ε, where ε is a small positive number, return c as the approximate
solution. Otherwise, go back to step 2.
88
Advantages and Limitations of Internal Halving
Advantages:
Limitations:
It assumes the function is unimodal, i.e., it has only one minimum/maximum. For
multi-modal functions, the method may converge to a local optimal solution instead
of the global optimum.
The convergence can be slow, especially for large intervals of uncertainty. The
method does not take into account the rate of change of the function.
It requires knowledge of an initial interval [a, b] where the solution lies.
The first step in using the Interval Halving method, which is one of the core techniques in
optimization, is to determine the initial search interval. This is an essential process as it sets
89
the domain in which we will find our optimal solution. It involves two boundary points [a, b]
within which we believe the optimum point lies.
Choose an interval [a, b] where the objective function is unimodal (one peak). This
implies that there is a single optimum (maximum or minimum) point within the
interval.
Ideally, the endpoints should be sufficiently close to ensure rapid convergence but not
too close to avoid missing the optimum point.
Once the initial interval is selected, the Interval Halving method can be implemented. This is
an iterative method that divides the interval into half at each step, steadily narrowing the
search space to pinpoint the optimum solution.
2. Choose two points, say x1 and x2, equidistant from 'c' within the interval.
For the Maximization problem: If f(x1) > f(x2), then our new interval is [a,
x2]. Else, the new interval becomes [x1, b].
For Minimization problem: If f(x1) > f(x2), then our new interval is [x1, b].
Else, the new interval becomes [a, x2].
90
The process of Interval Halving is a method of iteration and convergence. The idea is to
repeatedly halve the interval, and with each iteration, you inch closer to the optimal solution.
The rate of convergence for Interval Halving is linear, and the precision depends on
the number of iterations performed.
The process continues until the difference between the upper and lower bounds of the
interval is less than or equal to the predefined error threshold.
This iteration process saves computational power and time as it discards the non-
optimal parts of the initial interval at each step.
Once the iteration process stops, you have an interval [a, b] within which the optimal solution
resides. It's crucial to evaluate the results and ensure the accuracy of the method. This is often
done by:
Confirming the width of the final interval is less than the predefined error tolerance.
Checking if the objective function behaves as expected within this final interval.
Compare your results with those of other optimization methods for the same problem,
if available.
The Interval Halving method is a simple yet powerful optimization technique. However, it's
worth noting that it works best when your objective function is unimodal and smooth within
your chosen interval. In real-world situations, more complex optimization methods may be
needed. Nevertheless, understanding Interval Halving provides an excellent foundation for
learning these more advanced techniques.
91
6.4 Fibonacci in Optimization: An Introduction
The Fibonacci series is a sequence of numbers where each number is the sum of the two
preceding ones, usually starting with 0 and 1. Thus, the series goes: 0, 1, 1, 2, 3, 5, 8, 13, 21,
and so forth. This series bears immense significance in various fields, including computer
science, mathematics, and nature.
Mathematical optimization is a branch of applied mathematics that seeks to select the best
element from some set of available alternatives. In the simplest case, it involves maximizing
or minimizing a real function by systematically choosing input values from within an allowed
set and computing the function's value.
Search Algorithms: The Fibonacci series is used in optimization algorithms like the
Fibonacci Search, which is a method of function minimization in an interval for
unimodal functions. This method iteratively shrinks the interval of possible roots, and
the number of function evaluations needed decreases as per the Fibonacci numbers.
There are several unique properties of the Fibonacci series that make it suitable for
optimization, including:
Golden Ratio: The ratio of two successive Fibonacci numbers tends to the Golden
Ratio (approximately 1.6180339887) as they get larger. This property is used in
92
various optimization techniques, including search algorithms, where the golden ratio
can define the split of search intervals.
Fast Growth: Fibonacci numbers grow exponentially fast, which allows for
significant efficiency in optimization problems. For example, when used in binary
search algorithms, they can reduce the time complexity dramatically.
The Fibonacci Search method is an efficient search technique used in computer science and
mathematical optimization problems. It's derived from the Fibonacci sequence, a series of
numbers where each number is the sum of the two preceding ones, typically starting with 0
and 1.
The Fibonacci Search technique is primarily used for locating the maximum or minimum of a
unimodal function. In this context, a unimodal function is one that, over the interval being
searched, either consistently increases up to a single maximum point and then decreases or
decreases to a minimum point before increasing.
The technique works by dividing the search space into unequal parts using Fibonacci
numbers and then eliminating the unlikely parts of the search space. This process continues
iteratively, removing sections of the search space as the algorithm converges towards the
maximum or minimum of the function. The main advantage of this method is that it only
needs to keep track of function values at two points at a time, allowing for efficient use of
computational resources.
93
Mathematical Derivation of Fibonacci Search
Let's start with a sequence of Fibonacci numbers: F0, F1, F2, F3, ..., Fn, where F0=0, F1=1,
and Fn=F(n-1)+F(n-2) for n>1. For a unimodal function f(x) and an interval [a, b], we want to
find the maximum (or minimum) in this interval. The Fibonacci search method takes two
initial points x1 and x2 in the interval such that:
x1 = a + (F(n-2)/F(n))*(b - a)
x2 = a + (F(n-1)/F(n))*(b - a)
Here, n is chosen such that F(n) > (b-a)/epsilon, where epsilon is the desired level of
accuracy. The points x1 and x2 divide the initial interval [a, b] into three subintervals.
Then, the algorithm proceeds as follows:
If f(x1) < f(x2), the maximum cannot be in the interval [a, x1], and we set a = x1.
Then, we choose two new points, x1 and x2, in the remaining interval.
If f(x1) > f(x2), the maximum cannot be in the interval [x2, b], and we set b = x2.
Then, we choose two new points, x1 and x2, in the remaining interval.
We continue this process until n is reduced to 3. At that point, the remaining interval
[a, b] is our final interval of uncertainty, and we can select any point in this interval as
our estimate for the maximum (or minimum) of the function.
Merits:
Efficiency: The Fibonacci search method is very efficient, especially for large lists.
This is due to the fact that it makes use of the golden ratio properties inherent in the
Fibonacci sequence, which allows the search to quickly narrow down the potential
search space.
94
Low storage requirement: Unlike many other search methods, the Fibonacci search
only needs to keep track of two function values at a time, making it very memory-
efficient.
Works well with noisy data: The Fibonacci search method performs well even with
noisy data, as it can effectively ignore small local fluctuations in the function and
focus on the overall shape of the function.
Demerits:
Unimodal function assumption: The main limitation of the Fibonacci search method is
that it assumes the function to be unimodal on the given interval. If the function is not
unimodal, the method may not find the global maximum or minimum.
Mathematical computation: The requirement to compute Fibonacci numbers can make
the method computationally intensive for very high precision requirements.
Initial bracketing: The method requires a proper initial bracketing of the maximum or
minimum, which might be difficult to obtain for some complex functions.
6.6 Summary:
95
Fibonacci numbers, the method reduces the search space efficiently until the optimal
solution is found.
Fibonacci Sequence is a series of numbers in which each number is the sum of the
two preceding ones, usually starting with 0 and 1. The sequence has unique properties
and is used in various fields, including optimization techniques.
6.7 Keywords:
96
divide the search space and determine which part of the region to eliminate in each
iteration. This method is particularly efficient as it requires fewer function
evaluations compared to other methods.
1. How does the Fibonacci search method differ from the internal halving method in terms
of efficiency and accuracy? Provide a detailed comparison.
2. What are the unique properties of the Fibonacci series that make it useful in
optimization techniques? Explain with examples.
3. Which method, between internal halving and Fibonacci search, would you prefer for a
problem with a large search space? Justify your answer by discussing the merits and
limitations of your chosen method.
4. What are some of the real-world applications of the region elimination methods in
optimization? Provide at least two examples for both the internal halving method and
the Fibonacci search method.
5. How have advancements in artificial intelligence and machine learning influenced the
future of optimization techniques? Discuss with reference to region elimination
methods like internal halving and Fibonacci search.
Optimizing Digital Marketing Strategy for "Aussie Delight," an Australian Food Brand
97
"Aussie Delight," an Australian food brand, was established in Sydney in 2016. The company
offered a unique line of healthy snacks made from locally sourced, organic ingredients.
Despite their high-quality products and passionate team, they struggled to gain significant
market share or brand recognition in the first few years.
In 2020, they decided to revamp their digital marketing strategy to enhance their online
presence. They aimed to target health-conscious consumers aged 20-40 who are active on
social media platforms. The company implemented a combination of search engine
optimization (SEO), pay-per-click (PPC) advertising, and social media marketing, using
various optimization techniques.
During the implementation phase, they used the Fibonacci method for budget allocation
optimization among different digital marketing channels. They assigned the highest budget to
the most successful channels and lesser budgets to the next ones, following the Fibonacci
sequence. This strategy allowed the company to get the best results by concentrating on the
most successful channels while not entirely neglecting the others.
As a result of these efforts, their website's organic traffic increased by 35%, and their click-
through rate from PPC ads improved by 20%. The most significant improvement was a 50%
increase in engagement on social media platforms, leading to improved brand recognition.
Questions:
1. What were the primary challenges faced by "Aussie Delight" before implementing
their new digital marketing strategy?
2. How did the Fibonacci method help in optimizing the budget allocation for different
marketing channels?
98
3. Based on the success of "Aussie Delight," how can other businesses benefit from
similar optimization techniques in their digital marketing strategies?
6.10 References:
99
UNIT : 7
Learning Objectives:
Structure:
100
7.1 Basics of Optimization
Optimization, in the most basic sense, is a set of techniques used to find the best possible
solution (the optimal solution) for a problem. This involves making a system, design, or
decision as effective or functional as possible. The process relies heavily on mathematical
theories and models and has a wide array of applications, including business, engineering,
and computer science.
Deterministic optimization: Here, all the parameters of the model are known with
certainty. This category includes linear programming, integer programming, nonlinear
programming, etc.
Stochastic optimization: In this category, some parameters of the model are not
known with certainty but are given as probabilistic distributions. This category
includes stochastic programming, recourse models, etc.
Univariate Optimization
Univariate optimization is a subfield of optimization that deals with functions of just one
variable. The goal is to find the input (or inputs) that either maximizes or minimizes the
output of the function.
The Golden Section Search: This is a bracketing method that shrinks the range of
possible solutions while always maintaining a bracket around the minimum.
The Bisection Method: This method works by dividing the search interval in half
and replacing the interval where the function does not decrease.
101
Multivariate Optimization
Multivariate optimization, on the other hand, deals with functions of multiple variables. It
involves more complex mathematical methods because the functions can have multiple local
minima and maxima.
There are various methods for multivariate optimization, some of which include:
Gradient Descent: This method involves taking iterative steps in the direction of the
steepest descent, which is given by the negative of the gradient.
Optimization methods can also be classified as local or global based on the solutions they
find.
102
7.2 Mathematical Foundations for Optimization
The foundation of optimization lies in calculus, particularly the concepts of derivatives and
integrals. The principles derived from these concepts are fundamental to understanding the
behaviour of functions, which is at the heart of optimization problems.
The tools and techniques of linear algebra are critical in the study of optimization, especially
in high-dimensional settings. Vectors and matrices serve as primary mathematical structures
in these scenarios.
103
Concepts of Convexity in Optimization
Convexity is a central concept in the field of optimization. Convex sets, and functions have
properties that make optimization problems easier to solve.
Convex Sets: A set is convex if, for every pair of points within the set, every point on
the straight-line segment that joins them is also in the set. In optimization problems, if
the feasible region (the set of all possible solutions) is a convex set, the problem
becomes easier to solve.
Convex Functions: A function is convex if its epigraph, the set of points lying on or
above its graph, is a convex set. Convex functions have the property that the local
minimum is also the global minimum, making them desirable in optimization because
if we find a local minimum, we know it is the global minimum. If a function is not
convex, then it may have multiple local minima, and finding the global minimum is a
much more challenging problem.
First-Order Necessary Condition: This condition states that for a function to have a
local minimum at a point, the gradient of the function at that point must be zero.
Mathematically, if a function f(x) has a local minimum at a point x*, then ∇f(x*) = 0.
The reasoning behind this condition is that the derivative (or gradient, in multiple
dimensions) gives the rate of change of a function, and at a local minimum or
maximum, this rate of change should be zero.
104
Second-Order Sufficient Condition: If the Hessian matrix is positive definite at a
point where the gradient is zero, then the function has a local minimum at that point.
It's worth noting that these conditions are essential for a deep understanding of optimization
theory, but they can be less practical for very complex or high-dimensional functions where
calculating the Hessian matrix may be computationally expensive or even impossible.
Next, you take a step in the direction opposite to the gradient (as the gradient points in
the direction of the steepest ascent).
You repeat this process until the gradient is close to zero, which should mean you've
reached a local minimum.
Learning Rate: This is a hyperparameter that determines the step size during each
iteration while moving towards the minimum.
Convergence Criteria: The iteration stops when the improvement (decrease in the
objective function) is below a predefined threshold or after a fixed number of
iterations.
105
Newton and Quasi-Newton Methods
Newton's method and the Quasi-Newton methods are a set of iterative optimization
algorithms used to find the roots (zeros) of a real-valued function or local maxima and
minima of a function.
Newton's Method: Newton's method uses both the first and second derivatives to
find the roots of the function. It assumes the function can be approximated by a
quadratic near the optimum and, therefore can solve it directly. This leads to faster
convergence, especially for functions that are approximately quadratic near their
minimum. But it also requires calculating and inverting the Hessian matrix, which can
be computationally expensive for high-dimensional functions.
Equality constraints: This type of constraint implies that the solution must satisfy
certain conditions exactly. For instance, the function f(x, y, z) = x^2 + y^2 + z^2 is
subject to the equality constraint x + y + z = 1.
106
Inequality constraints: In this type of constraint, the solution must satisfy certain
conditions, but not exactly. It's a more flexible form of constraint. An example would
be the function g(x, y) = x^2 + y^2, subjected to the inequality constraint x + y ≤ 1.
The method of Lagrange multipliers is a strategy for finding the local maxima and minima
of a function subject to equality constraints. It is a powerful tool in optimization that
simplifies the problem to one of solving a system of equations.
The idea behind this method is to introduce a new variable, known as the Lagrange
multiplier, for each constraint.
It then forms a Lagrangian function which combines the objective function and the
constraint(s), weighed by the multiplier(s).
The extremum of the original function under the given constraint(s) corresponds to
the extremum of the Lagrangian. Solving for the critical points of this new function
gives us potential optimal points.
The KKT conditions are a system of equations that, when satisfied, indicate a
potentially optimal solution to a constrained optimization problem.
They comprise of three types of conditions: Primal feasibility, Dual feasibility, and
Complementary slackness.
107
o Dual feasibility requires that the gradient of the Lagrangian is zero.
7.5 Summary:
7.6 Keywords:
108
Lagrange Multipliers: A method for finding the local maxima and minima of a
function subject to equality constraints. It allows us to convert a constrained
optimization problem into an unconstrained optimization problem, making it easier to
solve.
How would you differentiate between local and global optimization? Give examples
of where each would be best applied in the field of computer applications.
What are the key differences between the Gradient Descent method and the Newton's
method for unconstrained multivariable optimization? Discuss the advantages and
disadvantages of each.
How would you utilize stochastic optimization techniques, like Genetic Algorithms
or Particle Swarm Optimization, in solving complex problems that traditional
optimization methods may struggle with? Give a practical example.
What role does optimization play in machine learning? Specifically, discuss the use
of Gradient Descent in training Neural Networks and the importance of
Regularization in Regression models.
109
7.9 Case study:
IKEA, a world-renowned Swedish home furnishings brand, has made a name for itself with
its efficient and cost-effective supply chain management. Their strong focus on optimization
techniques is central to their business model.
IKEA uses a unique system known as "Democratic Design," which incorporates form,
function, quality, sustainability, and low price. To balance these factors, the company
employs a highly effective multivariable optimization strategy. Each design element (material
type, design style, manufacturing process, logistics, etc.) is considered a variable. The
objective is to optimize these variables to offer customers high-quality products at affordable
prices.
For instance, IKEA uses innovative flat-pack design for its furniture. This design
significantly reduces shipping volume and, subsequently, transportation costs. Furthermore,
IKEA customers typically assemble the products themselves, which simplifies the
manufacturing process and reduces labour costs. Both of these aspects were optimized using
multivariable techniques.
The company's warehouses and distribution centres are also meticulously managed using
advanced optimization algorithms. IKEA stores often serve as their own warehouses, with
products stored on the sales floor. This eliminates the need for additional storage space and
optimizes the order fulfilment process.
A recent example of IKEA's continuous optimization efforts is its switch to electric vehicles
(EVs) for product deliveries. By 2025, the company aims to complete all customer deliveries
with EVs, optimizing their supply chain for sustainability.
110
Questions:
2. How has IKEA optimized its warehousing and distribution centres to increase
efficiency and reduce costs?
3. IKEA plans to switch to electric vehicles for all customer deliveries by 2025. Discuss
the optimization aspects in terms of cost and sustainability. How might this change
impact their overall supply chain?
7.10 References:
111
UNIT : 8
One-Dimensional Search
Learning Objectives:
Structure:
112
8.1 Introduction to One-Dimensional Search
Open methods: These methods do not necessarily require an interval for the search.
They function based on function evaluation and its derivative and include techniques
such as Newton's method, Secant method, and Brent's method.
One-dimensional search plays a crucial role in the field of optimization techniques due to the
following reasons:
113
Reliable Solutions: Bracketing methods in one-dimensional searches provide robust
and reliable solutions because they progressively reduce the search interval to
pinpoint the optimum point.
One-dimensional search methods are critical in optimization techniques, and they are widely
used in various areas such as engineering, economics, mathematics, and computer science.
These methods attempt to find the optimum value of a function. Typically, these methods are
classified into two categories: Analytical Methods and Numerical Methods.
Analytical Methods
Analytical methods, also known as exact methods, involve the direct manipulation of
mathematical functions to find the optimal point. They rely on calculus and algebraic
procedures. These methods offer precise solutions but often require the optimization problem
to meet certain mathematical conditions. Here are the key characteristics of analytical
methods:
Use of Derivatives: These methods often involve the calculation of first or second-
order derivatives. Solutions are found where the first derivative equals zero, and the
second derivative test determines if it is a maximum or minimum.
114
Assumptions: Analytical methods are dependent on assumptions such as the function
being differentiable and having a single optimum point. If these assumptions are
violated, the method may not provide the correct answer or any answer at all.
Numerical Methods
Numerical methods offer an iterative approach to finding the optimal point. They are applied
when the mathematical function is too complex or does not satisfy the conditions required by
the analytical methods. Below are key characteristics of numerical methods:
1. Bracketing Methods: These involve choosing two points such that the optimal
solution is within this range (bracket). Examples include the bisection method and the
golden section search.
2. Open Methods: In these methods, there's no bracket or range to limit the search.
They can provide faster convergence but may not always be reliable. Examples
include the Newton-Raphson method and the Secant method.
115
8.3 Exploring Analytical Methods
Precision: They provide an exact and optimal solution to a problem, assuming that
the problem has been accurately modelled and all relevant constraints have been
included.
116
Universality: These methods can be used across various fields like economics,
engineering, computer science, and more. This versatility underscores their critical
importance in problem-solving and decision-making processes.
Efficiency: They allow for efficient use of resources by finding solutions that
minimize cost, time, or other constraints and maximize efficiency or profit.
Solution Existence: Not all problems have a solution. Sometimes, the constraints can
be in conflict, or the objective function may not reach a maximum or minimum value.
Stationary points are a critical aspect of the study of optimization techniques. They are
defined as points where the derivative of a function is zero. In simpler terms, a stationary
117
point on a function's graph is a place where the function's slope is zero, indicating a "flat"
point or "turning" point.
Local minimum: This is a point where the function takes on a minimum value
compared to the neighbouring points. In other words, the function's value at this point
is less than the values at nearby points.
Local maximum: This is a point where the function takes on a maximum value
compared to the neighbouring points. In other words, the function's value at this point
is greater than the values at nearby points.
Saddle point: This is a stationary point that is neither a local maximum nor a local
minimum. The function's value at this point is not greater or less than the values at
nearby points, hence the name "saddle" point.
Stationary points play a vital role in both single-variable and multivariable optimization.
In single-variable optimization, the task is to find the local minima and maxima of a
function. These local extrema correspond to the stationary points of the function. The
process to find these points involves taking the derivative of the function, setting it
equal to zero, and solving for the variable. The resulting values are the x-coordinates
of the stationary points. The nature of these points (whether they're minima, maxima,
or neither) can be determined by applying the second derivative test.
In multivariable optimization, the task is to find the local minima, maxima, and
saddle points of a function of multiple variables. The process is similar to the single-
variable case, but now the gradient (a generalization of the derivative for functions of
multiple variables) is used. Points where the gradient is zero are potential stationary
118
points. The second derivative test is generalized to the Hessian matrix to determine
the nature of these points.
The concept of stationary points is not only theoretical but also highly practical in
optimization problems. The goal of many real-world optimization problems is to find the
minimum or maximum of a function. These extrema correspond to the stationary points of
the function. Therefore, understanding and finding stationary points is a crucial step in
solving these problems. These techniques are widely used in various fields, such as machine
learning, operations research, economics, and physics, to name just a few.
The direct substitution method is a numerical procedure used to find solutions to equations.
This method is often used in the field of optimization techniques, and it's a simple and
intuitive method that involves substituting an initial guess into an equation and then using the
result of that substitution as the next guess.
Initial Guess: The process begins with an initial guess, which can be an arbitrary
number or an educated estimate based on the nature of the equation or function under
consideration.
119
Substitution: This initial guess is then substituted into the equation or function. This
results in an output value.
Iterative Process: The output value then replaces the initial guess, and this new value
is substituted into the equation again. This forms an iterative cycle.
Solution: This final, converged value is the solution to the equation or function. It's
important to note, however, that this may only be a local solution rather than a global
one, especially if the equation or function has multiple solutions.
Define the Search Space: The search space is the range of values that the solution
could potentially take. For a one-dimensional search, this is a simple range of
numbers (e.g., all real numbers between 0 and 10).
Evaluate the Function: The initial guess is substituted into the function, and the
output value is calculated.
Iterative Substitution: The output value is then used as the new input, and the
function is evaluated again. This process is repeated iteratively.
120
Check for Convergence: After each iteration, check if the output value is
converging. This could be done, for example, by checking if the difference between
successive output values is less than a small, predefined tolerance level.
Termination: If the method converges, the output value is considered as the solution
to the function in the search space.
Optimization problems involve identifying the best outcome, usually the maximum or
minimum of a function, given a set of constraints. In many real-world scenarios, optimization
cannot be conducted in an unrestricted environment; instead, there are certain boundaries or
constraints that limit the range of solutions. These constraints could come from physical
limitations, business rules, regulations, or any other factors that could restrict the possible
values for variables.
Constrained variation, as the name suggests, refers to the variation within these restrictions.
In the realm of optimization, it is an important concept that helps identify optimal solutions
while respecting the limits set by constraints.
Here, the goal is to find the values of 'x' that minimize or maximize the objective function
f(x) while adhering to the constraint conditions defined by g_i(x).
121
provide valuable information about the rate at which the optimal value of the
objective function changes with respect to the constraints.
Penalty Methods: Penalty methods are another set of approaches for handling
constrained optimization problems. In these methods, a penalty function is introduced,
which penalizes solutions that violate the constraints. The goal is then to minimize the
original function augmented by the penalty function.
The Penalty Function Method is a sophisticated technique used in the field of mathematical
optimization. Essentially, this method helps in solving constrained optimization problems by
transforming them into a series of unconstrained problems, a process often simpler and more
manageable. It does this by adding a 'penalty' to the objective function for each violation of
the constraints.
The aim is to find a solution that minimizes the objective function while also minimizing the
penalty. The penalty, typically, is set to increase as the solution moves further away from
satisfying the constraints.
The original problem is converted into an auxiliary problem by adding a term to the
objective function. This additional term, known as the penalty term, punishes the
function for not adhering to the constraints.
The Penalty Function Method can be categorized into two types: interior penalty
methods and exterior penalty methods. Interior penalty methods penalize points
outside the feasible region, pushing the search towards feasible solutions. On the other
hand, exterior penalty methods penalize points inside the infeasible region and
122
solutions on the boundary of the feasible region, guiding the search towards the
interior of the feasible region.
In optimization, the Penalty Function Method is commonly applied to problems that contain
equality and/or inequality constraints. Here are a few examples of its use:
Machine Learning and Data Science: The method is also used in machine learning
and data science for problems like Support Vector Machines (SVM) and Lasso
Regression, where constraints are placed on the complexity of the model to avoid
overfitting.
To use the Penalty Function Method, one typically follows these steps:
Solving the Unconstrained Problem: Solve the unconstrained problem, which now
includes the penalty term.
123
Updating the Penalty Parameter: Update the penalty parameter. Generally, you'll
increase the penalty parameter if the constraints are not yet fully satisfied.
Iterating the Process: Continue this process iteratively, each time solving the
unconstrained problem with the updated penalty parameter, until the constraints are
sufficiently satisfied and an optimal solution is found.
The Basic Idea: The key idea behind the Lagrangian multiplier technique is to convert
a constrained optimization problem into an unconstrained one. This is done by
integrating the constraints into the objective function through the addition of a new
variable, the "Lagrangian Multiplier", denoted typically by λ (lambda).
The Formulation: If we are to optimize a function f(x) under the constraint g(x) = 0,
we create a new function called the Lagrangian: L(x, λ) = f(x) - λg(x).
The Solution: The optimal solution to the original problem can then be found by
taking the derivative of L with respect to both x and λ and setting these equal to zero.
This provides a system of equations which can be solved for the optimal values of x
and λ.
In one-dimensional search problems, Lagrangian multipliers play a crucial role. Suppose you
have a one-dimensional search problem where you want to optimize a function f(x) under
124
some constraint g(x) = 0. Here, the constraint g(x) = 0 essentially specifies a direction along
which to search for the optimal value of the function f(x).
Searching along the Constraint: The Lagrangian multiplier method allows you to
"encode" this constraint directly into the function you're trying to optimize, thus
guiding your search along the constraint line.
The Kuhn-Tucker Theorem is a key concept in the field of mathematical optimization and
pertains particularly to nonlinear programming. This theorem essentially provides the
necessary and sufficient conditions to solve optimization problems with inequality
constraints.
The basic idea behind the Kuhn-Tucker theorem is that it generalizes the method of
Lagrange multipliers to handle inequality constraints. The method of Lagrange
multipliers is a strategy for finding the local maxima and minima of a function subject
to equality constraints. But in real-world scenarios, we often encounter inequality
constraints. This is where the Kuhn-Tucker theorem comes into play.
The theorem introduces Kuhn-Tucker (KT) conditions, which are a set of first-order
necessary conditions for a solution in nonlinear programming to be optimal. These
125
conditions consist of feasibility, stationarity, and a complementary slackness
condition. If these conditions are satisfied, then we have an optimal solution.
Let's now consider how we can apply the Kuhn-Tucker theorem in a one-dimensional search
scenario.
It's important to note that the Kuhn-Tucker conditions are necessary conditions, which
means that if a solution is optimal, it must satisfy the conditions. However, satisfying
the conditions does not necessarily imply that a solution is optimal. To confirm that
we have indeed found an optimal solution, further checks (for example, second-order
conditions) may be necessary.
126
8.10 Summary:
Stationary points in a function where the derivative is zero. They are significant in
optimization as they can represent local or global minima or maxima or saddle points.
8.11 Keywords:
127
Stationary Points: These are points in a function where the derivative is zero,
meaning the function's slope is zero at these points. They are critical for optimization
as they often represent local maxima or minima and can even represent global
maxima or minima.
128
2. What role do stationary points play in the process of optimization, and why are they
important in the context of one-dimensional search?
3. Which optimization problem would you solve using the Direct Substitution method
and why? Discuss your reasoning and potential challenges that might arise.
O'Neills is a prominent Irish sportswear manufacturer known for its deep roots in Gaelic
games. Founded in 1918, it has established itself as the largest manufacturer of Gaelic sports
equipment, especially Gaelic football and hurling jerseys.
In the face of rising global competition in the sports apparel industry, O'Neills saw an
opportunity to differentiate itself by emphasizing its authenticity and cultural heritage. In the
early 2000s, they chose to embrace digital transformation to stay relevant and competitive.
The first step was revamping their online presence. They launched a new e-commerce
website, enabling them to serve customers around the world and beyond the physical
boundaries of their traditional brick-and-mortar stores. This online platform allowed for the
personalization of jerseys and gear, offering an interactive and unique shopping experience
for their customers.
Secondly, they utilized data analytics to understand customer behaviour and preferences.
Leveraging this data, O'Neills tailored their designs and marketing strategies to better appeal
to their customer base. They were also able to optimize their inventory, reducing waste and
improving efficiency.
129
The result of this digital transformation was a significant boost in international sales.
Moreover, the brand strengthened its unique position in the market, solidifying its reputation
as a premier provider of quality Irish sportswear.
Questions:
1. How did the digital transformation strategies employed by O'Neills help them to stay
competitive in the global market?
2. What role did data analytics play in enhancing O'Neills' understanding of their
customer base, and how might this influence their future product development and
marketing strategies?
3. Considering the emphasis O'Neills placed on its cultural heritage, how can other
brands with similar rich histories leverage this in the digital age to differentiate
themselves?
8.14 References:
130
UNIT : 9
Search Methods
Learning Objectives:
Structure:
131
9.1 Fundamental Principles of Numerical Search
Iteration plays a critical role in numerical search methods. It is the process of repetitively
applying a rule or procedure to successive results. This iterative approach allows the
algorithm to progressively refine the solution.
An initial guess or a set of initial values is selected. These initial values could be
random or based on some heuristic knowledge.
The function to be optimized is evaluated at this initial guess. Then, based on the
specific numerical search method being used, the function evaluation and possibly
other information (like derivative or gradient information) are used to generate a new,
hopefully better, guess.
This process is repeated, with each iteration refining the previous guess, until a
satisfactory solution is found or until a specified termination condition is met.
132
Error Considerations in Numerical Search
Truncation errors occur when an infinite process is approximated by a finite one. For
example, when a derivative is approximated by a finite difference or when an iterative
method is terminated after a finite number of steps.
Round-off errors are due to the finite precision of numerical calculations. In practice,
these errors can accumulate over many iterations and potentially lead to significant
inaccuracies.
By carefully choosing and controlling the parameters of the numerical search, such as the
step size in a gradient descent algorithm, or the tolerance in a root-finding algorithm, it's
possible to balance the need for accuracy with the constraints of computational resources.
To ensure a reliable numerical search, it's crucial to take these errors into account. Proper
error handling can involve techniques such as error propagation analysis, adaptive step sizing,
and sensitivity analysis.
The concept of the direction of search in optimization techniques is fundamental to the study
of machine learning and artificial intelligence. Optimization algorithms are designed to find
the best solution from a set of potential solutions.
133
Importance of Direction in Search Algorithms
The direction of search plays a significant role in optimization for the following reasons:
Efficiency: The direction of search can impact the efficiency of the search process.
An efficient direction of search can lead the algorithm towards the optimal solution
more quickly, reducing the computational resources required.
Avoiding Local Optima: The direction of search can help to avoid getting trapped in
local optima, which are suboptimal solutions that appear optimal in a limited region of
the search space.
Newton's Method: This method uses both the first and second derivatives (the
Hessian) of the objective function to determine the direction of search. It converges
more rapidly than simple gradient-based methods but requires more computation at
each step.
134
the search space by generating a population of points and iteratively improving them
according to some fitness criterion.
The final stage of the search involves two essential concepts: convergence and termination.
Understanding these elements is critical in assessing the efficacy and efficiency of any given
optimization technique.
When the optimization algorithm starts, it usually begins with a random or specified
starting point within the problem space. As the algorithm iterates over the problem
space, it uses a set of defined rules to gradually move towards better solutions.
The sequence of solutions generated by the algorithm ideally converges towards the
global optimum. However, there might be situations where the algorithm converges to
a local optimum, which is a point that is better than all its neighbours but not
necessarily the best solution in the entire problem space.
135
A convergence criterion is defined to assess the rate at which the algorithm
approaches the optimal solution. This might include how quickly the solution
improves or how the difference between successive solutions is decreasing. The rate
of convergence can be critical in real-world applications where computational
resources and time are constrained.
Termination criteria, on the other hand, are conditions that determine when the optimization
algorithm should stop. They play a vital role in controlling the balance between computation
time and the quality of the obtained solution. Consider the following aspects of termination
criteria:
Another approach is to stop the algorithm once the rate of improvement between
successive iterations falls below a defined threshold. This means that the algorithm
terminates once it appears to be making no significant progress towards the optimal
solution.
Sometimes, the nature of the problem or constraints of the situation dictate unique
termination criteria. For instance, in a real-time system, the algorithm may need to
terminate within a specified time frame.
Direct Search Methods are a class of optimization techniques that do not rely on any
derivative information. They are often referred to as "black-box" or "derivative-free"
136
methods. The term "direct" refers to the direct comparison of function values without
resorting to gradient calculations, hence making them ideal for problems where the derivative
may be difficult or expensive to compute, may not exist, or may be misleading due to noise.
These techniques evaluate the function to be optimized at different points in the search space
and use the results to determine new points to explore. The search process continues
iteratively until it meets a termination criterion, like a certain number of function evaluations
or a satisfactory solution.
There are several types of Direct Search Methods. Each one has its unique approach to
searching the solution space:
Pattern Search Methods: These methods propose a set of search directions and
search along these directions to find the best candidate. They then update the search
directions based on the success of the previous search.
Random Search Methods: As the name suggests, these methods generate random
solutions within a defined search space. Though not very efficient, they are robust and
can handle a wide range of problems.
137
the search space and are guided by their own and their companions' best-known
positions.
Versatility: As they don't require derivative information, they can handle non-
differentiable, discontinuous, and noisy functions.
Robustness: They are less likely to get trapped in local minima than gradient-based
methods, making them suitable for global optimization.
Simplicity: Direct search methods are conceptually simple and easy to implement,
making them widely applicable.
Convergence: Although they can often find a good solution, they may converge
slowly, and the quality of the solution can vary depending on the starting point and
other factors.
Scalability: Direct search methods can struggle with problems of high dimensionality
due to the "curse of dimensionality."
Pattern Search Methods, also known as direct search methods, are a class of numerical
optimization techniques that search through the problem space to identify optimal solutions
without relying on the gradient of the function being optimized. This makes them particularly
138
valuable in handling non-smooth, noisy, or discontinuous functions where traditional
gradient-based methods struggle.
The fundamental concept behind pattern search methods is the 'pattern'. A pattern, in this
context, is a set of vectors in the solution space.
The algorithm begins at a starting point and then generates a pattern of search directions
around this point. The function to be optimized is evaluated at each point in the pattern, and if
a better solution is found, the algorithm moves to this new point and generates a new pattern.
This process is repeated until a termination criterion is met.
Robustness: The algorithms are robust to noise and variations in the function because
they don't rely on exact values of the function but rather on relative comparisons of
function values.
Global versus Local Search: While pattern search methods can be efficient for local
optimization, finding a global optimum can be more challenging and may require
additional strategies such as multiple starting points or adaptive step sizes.
Initialization: Choose a starting point in the search space and a pattern around this
point.
139
Search: Evaluate the function at each point in the pattern. If a better solution (i.e., a
solution with a lower function value for minimization problems or a higher function
value for maximization problems) is found, move to this new point.
Update: Generate a new pattern around the new point. This can be done by simply
shifting the existing pattern or by applying some transformation to the pattern, such as
scaling or rotation.
Termination: If no better solution has been found after searching through the entire
pattern, then reduce the size of the pattern (this is often called "contracting" the
pattern). If the size of the pattern becomes smaller than a predetermined threshold or
if no improvement has been made after a certain number of iterations, then terminate
the algorithm.
Post-Optimization Analysis: Analyze the optimal solution and its properties. Also,
assess the performance of the algorithm, for example, by looking at the number of
function evaluations or the time taken.
When implementing pattern search methods, there are a few key points to keep in mind:
Pattern Design: The choice of pattern can significantly influence the performance of
the algorithm. Different types of patterns, such as geometric patterns or random
patterns, may be more suitable for different types of problems.
Step Size Adaptation: The step size, or the distance between points in the pattern, is
another important parameter. An adaptive step size strategy, where the step size is
reduced when no improvement is made, can often improve the efficiency of the
algorithm.
Multiple Starts: As with many optimization algorithms, pattern search methods can
get stuck in local optima. To mitigate this, multiple starting points can be used,
effectively performing a form of global optimization.
140
Parallelization: Given that the function evaluations at different points in the pattern
are independent of each other, pattern search methods are naturally suited for
parallelization. This can significantly speed up the optimization process in high-
dimensional problems or when the function evaluation is time-consuming.
9.6 Summary:
Optimization Techniques are mathematical methods used to find the best possible
solution or outcome for a given problem, typically subject to a set of constraints. They
are used in a wide range of disciplines, from economics to engineering to machine
learning.
Numerical search refers to a set of algorithms that are used to find numerical solutions
to mathematical problems. It's often used to identify optimal values of variables that
maximize or minimize a given function.
In optimization algorithms, the direction of search refers to the path or vector along
which the algorithm proceeds to seek a more optimal solution. For example, in
gradient descent, the direction of search is towards the steepest descent in the
function's landscape.
The final stage in an optimization search typically involves the algorithm converging
on a solution and terminating. This often occurs when the improvement in the solution
falls below a defined threshold or when a pre-defined number of iterations have been
completed.
Direct Search Methods are a type of optimization technique that does not require the
calculation of gradients or other derivative information. They are particularly useful
when dealing with non-differentiable, noisy, or discontinuous functions.
141
9.7 Keywords:
The direction of Search: The direction of search is the path or direction in which the
algorithm moves in the solution space to find the optimum. The correct choice of
direction can significantly improve the efficiency of the search. In gradient-based
methods, for instance, the direction of search is usually chosen as the negative of the
gradient.
Direct Search Methods: These are optimization methods that do not rely on any
derivative information. They are particularly useful when the objective function is not
differentiable or when its derivatives are difficult to compute. Examples include the
simplex method and the Nelder-Mead method.
Pattern Search Methods: Pattern search methods are a type of direct search method
that explores the solution space according to a specific pattern or strategy. This
pattern is often designed to exploit some known structure of the problem to improve
the efficiency of the search.
Termination Criteria: The termination criteria are conditions that, when met, cause
an optimization algorithm to stop. Common criteria include reaching a maximum
number of iterations, achieving a solution that is good enough according to some
measure, or finding a solution that is no longer improving significantly.
142
9.8 Self-Assessment Questions:
1. How would you differentiate between direct search methods and pattern search
methods in the context of optimization techniques? Provide at least two distinguishing
characteristics for each.
2. What criteria do you consider when deciding the direction of the search in an
optimization problem? Provide an example where the direction of the search
dramatically impacts the outcome.
4. What are some potential pitfalls or challenges when implementing numerical search
methods in optimization techniques? How might these challenges be mitigated?
5. How does the final stage in a numerical search, specifically convergence and
termination, influence the overall performance and effectiveness of the optimization
technique? Discuss with reference to a specific optimization technique you've studied.
Uniqlo, a subsidiary of Fast Retailing Co., Ltd, is a leading Japanese apparel brand. Uniqlo's
primary strength is its LifeWear concept, which promises high-quality, performance-
enhanced, and affordable clothing. While Uniqlo has experienced remarkable success in Asia,
its international expansion, particularly in the US market, has been challenging.
Uniqlo initially entered the US market in 2005, focusing on mall-based stores. However, the
brand struggled due to lack of brand recognition and cultural differences in shopping habits.
143
Realizing its shortcomings, Uniqlo revisited its strategies and adopted a two-pronged
optimization approach: geographical concentration and experiential retailing.
The geographical concentration involves focusing its presence in strategic urban locations
with high footfall. Uniqlo cut back on its mall-based stores and opened flagship stores in
prominent cities like New York, Chicago, and Los Angeles, following a similar successful
strategy in Tokyo and Paris. This not only helped them gain visibility but also connected
them with the trendsetting urban populace.
Experiential retailing involved turning Uniqlo stores into destinations rather than just
shopping venues. The brand invested in large, innovative, and interactive stores where
customers can engage with the brand and products in new ways. For instance, Uniqlo's Fifth
Avenue store in New York City is a multi-level store featuring a Starbucks, rotating
mannequins, and large LED screens displaying the latest trends and collections.
As of 2023, Uniqlo's revised optimization strategy seems to be paying off, with improved
brand recognition and steady growth in the US market. However, it is crucial for Uniqlo to
continually adapt and innovate to maintain its competitive advantage.
Questions:
1. Discuss the key challenges Uniqlo faced during its initial expansion into the US
market. How did cultural differences contribute to these challenges?
3. What further steps can Uniqlo take to enhance its brand recognition and maintain
steady growth in the US market? Consider factors like online presence, product
diversification, and marketing strategies in your response.
144
9.10 References:
145