<s>
In	O
mathematical	O
optimization	O
,	O
constrained	B-Application
optimization	I-Application
(	O
in	O
some	O
contexts	O
called	O
constraint	B-Application
optimization	I-Application
)	O
is	O
the	O
process	O
of	O
optimizing	O
an	O
objective	O
function	O
with	O
respect	O
to	O
some	O
variables	O
in	O
the	O
presence	O
of	O
constraints	B-Application
on	O
those	O
variables	O
.	O
</s>
<s>
Constraints	B-Application
can	O
be	O
either	O
hard	B-Application
constraints	I-Application
,	O
which	O
set	O
conditions	O
for	O
the	O
variables	O
that	O
are	O
required	O
to	O
be	O
satisfied	O
,	O
or	O
soft	B-Application
constraints	I-Application
,	O
which	O
have	O
some	O
variable	O
values	O
that	O
are	O
penalized	O
in	O
the	O
objective	O
function	O
if	O
,	O
and	O
based	O
on	O
the	O
extent	O
that	O
,	O
the	O
conditions	O
on	O
the	O
variables	O
are	O
not	O
satisfied	O
.	O
</s>
<s>
The	O
constrained-optimization	O
problem	O
(	O
COP	O
)	O
is	O
a	O
significant	O
generalization	O
of	O
the	O
classic	O
constraint-satisfaction	B-Application
problem	I-Application
(	O
CSP	O
)	O
model	O
.	O
</s>
<s>
A	O
general	O
constrained	B-Application
minimization	I-Application
problem	O
may	O
be	O
written	O
as	O
follows	O
:	O
</s>
<s>
where	O
and	O
are	O
constraints	B-Application
that	O
are	O
required	O
to	O
be	O
satisfied	O
(	O
these	O
are	O
called	O
hard	B-Application
constraints	I-Application
)	O
,	O
and	O
is	O
the	O
objective	O
function	O
that	O
needs	O
to	O
be	O
optimized	O
subject	O
to	O
the	O
constraints	B-Application
.	O
</s>
<s>
In	O
some	O
problems	O
,	O
often	O
called	O
constraint	B-Application
optimization	I-Application
problems	O
,	O
the	O
objective	O
function	O
is	O
actually	O
the	O
sum	O
of	O
cost	O
functions	O
,	O
each	O
of	O
which	O
penalizes	O
the	O
extent	O
(	O
if	O
any	O
)	O
to	O
which	O
a	O
soft	B-Application
constraint	I-Application
(	O
a	O
constraint	B-Application
which	O
is	O
preferred	O
but	O
not	O
required	O
to	O
be	O
satisfied	O
)	O
is	O
violated	O
.	O
</s>
<s>
Many	O
constrained	B-Application
optimization	I-Application
algorithms	O
can	O
be	O
adapted	O
to	O
the	O
unconstrained	O
case	O
,	O
often	O
via	O
the	O
use	O
of	O
a	O
penalty	B-Algorithm
method	I-Algorithm
.	O
</s>
<s>
For	O
very	O
simple	O
problems	O
,	O
say	O
a	O
function	O
of	O
two	O
variables	O
subject	O
to	O
a	O
single	O
equality	O
constraint	B-Application
,	O
it	O
is	O
most	O
practical	O
to	O
apply	O
the	O
method	O
of	O
substitution	O
.	O
</s>
<s>
The	O
idea	O
is	O
to	O
substitute	O
the	O
constraint	B-Application
into	O
the	O
objective	O
function	O
to	O
create	O
a	O
composite	B-Application
function	I-Application
that	O
incorporates	O
the	O
effect	O
of	O
the	O
constraint	B-Application
.	O
</s>
<s>
The	O
constraint	B-Application
implies	O
,	O
which	O
can	O
be	O
substituted	O
into	O
the	O
objective	O
function	O
to	O
create	O
.	O
</s>
<s>
If	O
the	O
constrained	O
problem	O
has	O
only	O
equality	O
constraints	B-Application
,	O
the	O
method	O
of	O
Lagrange	O
multipliers	O
can	O
be	O
used	O
to	O
convert	O
it	O
into	O
an	O
unconstrained	O
problem	O
whose	O
number	O
of	O
variables	O
is	O
the	O
original	O
number	O
of	O
variables	O
minus	O
the	O
original	O
number	O
of	O
equality	O
constraints	B-Application
.	O
</s>
<s>
Alternatively	O
,	O
if	O
the	O
constraints	B-Application
are	O
all	O
equality	O
constraints	B-Application
and	O
are	O
all	O
linear	O
,	O
they	O
can	O
be	O
solved	O
for	O
some	O
of	O
the	O
variables	O
in	O
terms	O
of	O
the	O
others	O
,	O
and	O
the	O
former	O
can	O
be	O
substituted	O
out	O
of	O
the	O
objective	O
function	O
,	O
leaving	O
an	O
unconstrained	O
problem	O
in	O
a	O
smaller	O
number	O
of	O
variables	O
.	O
</s>
<s>
With	O
inequality	B-Application
constraints	I-Application
,	O
the	O
problem	O
can	O
be	O
characterized	O
in	O
terms	O
of	O
the	O
geometric	O
optimality	O
conditions	O
,	O
Fritz	O
John	O
conditions	O
and	O
Karush	O
–	O
Kuhn	O
–	O
Tucker	O
conditions	O
,	O
under	O
which	O
simple	O
problems	O
may	O
be	O
solvable	O
.	O
</s>
<s>
If	O
the	O
objective	O
function	O
and	O
all	O
of	O
the	O
hard	B-Application
constraints	I-Application
are	O
linear	O
and	O
some	O
hard	B-Application
constraints	I-Application
are	O
inequalities	O
,	O
then	O
the	O
problem	O
is	O
a	O
linear	B-Algorithm
programming	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
This	O
can	O
be	O
solved	O
by	O
the	O
simplex	B-Algorithm
method	I-Algorithm
,	O
which	O
usually	O
works	O
in	O
polynomial	O
time	O
in	O
the	O
problem	O
size	O
but	O
is	O
not	O
guaranteed	O
to	O
,	O
or	O
by	O
interior	B-Algorithm
point	I-Algorithm
methods	I-Algorithm
which	O
are	O
guaranteed	O
to	O
work	O
in	O
polynomial	O
time	O
.	O
</s>
<s>
If	O
the	O
objective	O
function	O
or	O
some	O
of	O
the	O
constraints	B-Application
are	O
nonlinear	O
,	O
and	O
some	O
constraints	B-Application
are	O
inequalities	O
,	O
then	O
the	O
problem	O
is	O
a	O
nonlinear	B-Algorithm
programming	I-Algorithm
problem	O
.	O
</s>
<s>
If	O
all	O
the	O
hard	B-Application
constraints	I-Application
are	O
linear	O
and	O
some	O
are	O
inequalities	O
,	O
but	O
the	O
objective	O
function	O
is	O
quadratic	O
,	O
the	O
problem	O
is	O
a	O
quadratic	B-Algorithm
programming	I-Algorithm
problem	O
.	O
</s>
<s>
It	O
is	O
one	O
type	O
of	O
nonlinear	B-Algorithm
programming	I-Algorithm
.	O
</s>
<s>
It	O
can	O
still	O
be	O
solved	O
in	O
polynomial	O
time	O
by	O
the	O
ellipsoid	B-Algorithm
method	I-Algorithm
if	O
the	O
objective	O
function	O
is	O
convex	O
;	O
otherwise	O
the	O
problem	O
may	O
be	O
NP	O
hard	O
.	O
</s>
<s>
Allowing	O
inequality	B-Application
constraints	I-Application
,	O
the	O
KKT	O
approach	O
to	O
nonlinear	B-Algorithm
programming	I-Algorithm
generalizes	O
the	O
method	O
of	O
Lagrange	O
multipliers	O
.	O
</s>
<s>
Constraint	B-Application
optimization	I-Application
can	O
be	O
solved	O
by	O
branch-and-bound	B-Algorithm
algorithms	I-Algorithm
.	O
</s>
<s>
It	O
inherently	O
implements	O
rectangular	O
constraints	B-Application
.	O
</s>
<s>
One	O
way	O
for	O
evaluating	O
this	O
upper	O
bound	O
for	O
a	O
partial	O
solution	O
is	O
to	O
consider	O
each	O
soft	B-Application
constraint	I-Application
separately	O
.	O
</s>
<s>
For	O
each	O
soft	B-Application
constraint	I-Application
,	O
the	O
maximal	O
possible	O
value	O
for	O
any	O
assignment	O
to	O
the	O
unassigned	O
variables	O
is	O
assumed	O
.	O
</s>
<s>
The	O
sum	O
of	O
these	O
values	O
is	O
an	O
upper	O
bound	O
because	O
the	O
soft	B-Application
constraints	I-Application
cannot	O
assume	O
a	O
higher	O
value	O
.	O
</s>
<s>
It	O
is	O
exact	O
because	O
the	O
maximal	O
values	O
of	O
soft	B-Application
constraints	I-Application
may	O
derive	O
from	O
different	O
evaluations	O
:	O
a	O
soft	B-Application
constraint	I-Application
may	O
be	O
maximal	O
for	O
while	O
another	O
constraint	B-Application
is	O
maximal	O
for	O
.	O
</s>
<s>
This	O
method	O
runs	O
a	O
branch-and-bound	B-Algorithm
algorithm	I-Algorithm
on	O
problems	O
,	O
where	O
is	O
the	O
number	O
of	O
variables	O
.	O
</s>
<s>
Each	O
such	O
problem	O
is	O
the	O
subproblem	O
obtained	O
by	O
dropping	O
a	O
sequence	O
of	O
variables	O
from	O
the	O
original	O
problem	O
,	O
along	O
with	O
the	O
constraints	B-Application
containing	O
them	O
.	O
</s>
<s>
More	O
precisely	O
,	O
the	O
cost	O
of	O
soft	B-Application
constraints	I-Application
containing	O
both	O
assigned	O
and	O
unassigned	O
variables	O
is	O
estimated	O
as	O
above	O
(	O
or	O
using	O
an	O
arbitrary	O
other	O
method	O
)	O
;	O
the	O
cost	O
of	O
soft	B-Application
constraints	I-Application
containing	O
only	O
unassigned	O
variables	O
is	O
instead	O
estimated	O
using	O
the	O
optimal	O
solution	O
of	O
the	O
corresponding	O
problem	O
,	O
which	O
is	O
already	O
known	O
at	O
this	O
point	O
.	O
</s>
<s>
There	O
is	O
similarity	O
between	O
the	O
Russian	O
Doll	O
Search	O
method	O
and	O
dynamic	B-Algorithm
programming	I-Algorithm
.	O
</s>
<s>
Like	O
dynamic	B-Algorithm
programming	I-Algorithm
,	O
Russian	O
Doll	O
Search	O
solves	O
sub-problems	O
in	O
order	O
to	O
solve	O
the	O
whole	O
problem	O
.	O
</s>
<s>
The	O
bucket	O
elimination	O
algorithm	O
can	O
be	O
adapted	O
for	O
constraint	B-Application
optimization	I-Application
.	O
</s>
<s>
A	O
given	O
variable	O
can	O
be	O
indeed	O
removed	O
from	O
the	O
problem	O
by	O
replacing	O
all	O
soft	B-Application
constraints	I-Application
containing	O
it	O
with	O
a	O
new	O
soft	B-Application
constraint	I-Application
.	O
</s>
<s>
The	O
cost	O
of	O
this	O
new	O
constraint	B-Application
is	O
computed	O
assuming	O
a	O
maximal	O
value	O
for	O
every	O
value	O
of	O
the	O
removed	O
variable	O
.	O
</s>
<s>
Formally	O
,	O
if	O
is	O
the	O
variable	O
to	O
be	O
removed	O
,	O
are	O
the	O
soft	B-Application
constraints	I-Application
containing	O
it	O
,	O
and	O
are	O
their	O
variables	O
except	O
,	O
the	O
new	O
soft	B-Application
constraint	I-Application
is	O
defined	O
by	O
:	O
</s>
<s>
Every	O
variable	O
is	O
associated	O
a	O
bucket	O
of	O
constraints	B-Application
;	O
the	O
bucket	O
of	O
a	O
variable	O
contains	O
all	O
constraints	B-Application
having	O
the	O
variable	O
has	O
the	O
highest	O
in	O
the	O
order	O
.	O
</s>
<s>
For	O
each	O
variable	O
,	O
all	O
constraints	B-Application
of	O
the	O
bucket	O
are	O
replaced	O
as	O
above	O
to	O
remove	O
the	O
variable	O
.	O
</s>
<s>
The	O
resulting	O
constraint	B-Application
is	O
then	O
placed	O
in	O
the	O
appropriate	O
bucket	O
.	O
</s>
