Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Fundamentals of Operations Research. A textbook

.pdf
Скачиваний:
0
Добавлен:
06.09.2026
Размер:
2 Мб
Скачать
Examples
11
Introduce boolean variables
yi“ 0
otherwise, and
xij(
yi(
i P I):yi“ 1
i P I,j P J):xij“ 1
, if siteiis chosen to locate a facility, and
, if a facility is opened at siteiand the facility
services clientj. The requirement to service all the customers can be expressed as follows:
ÿ
xij“ 1 @j P J.
iPI
To prevent service by unopened facilities, the following inequalities must be satised:
ÿ
The objective is
ÿ
iPIÿjPJ
xijď myi@i P I.
jPJ
ÿ
cijxij`
giyiÑ min
iPI
x,y
.
(1.1)
Note, that relations (1.1) can be replaced with more strict (but more numerous) conditions:
xijď yi@i P I, @j P J.
(1.2)
To state a combinatorial formulation of the problem, note, that if a set of opened facilities is given, each customer must be assigned to the closest facility. This observation leads to the formulation:
min
SĎI
#
ÿ
jPJ
min
iPS
cij`
ÿ
iPS
+
g
.
i
Example 1.4
(Production and Inventory Problem).A manufacturer makes a production plan for period ofntime units (days). The production facility can be set-up and producing or shut-down and idle. A xed cost is incurred whenever the facility is set up. The commodity produced during a day goes to customers or to inventory. For each momenttthe following parameters are known: the demand
ptě 0
, and per-unit storage cost
dtě 0
htě 0
, the set-up cost
ftě 0
, per-unit production cost
. Find a production plan that satises all the demands
and minimizes the incurred costs.
Denote the production output in daytas
as
st. We use boolean variables
of thet-th day (
yt“ 1
) or not (
ytto indicate whether the facility is started up at the beginning
yt“ 0
explicit constraints on production volumes. Thus, to express the relations between variables, we use a constant
M
large enough (e.g.,
xtand the inventory volume at the end of the day
). Note, that the formulation above does not involve
n
ř
M
dt) to satisfy the conditions:
t1
xtď M yt, t 1, . . . , n.
The demand fulllment condition is represented by the equalities:
s
` xt“ dt` st, t 1, . . . , n.
t´1
Here the initial inventory volume is assumed to be zero:
The objective is
n
ÿ
t1
ptxt`
n
ÿ
t1
htst`
n
ÿ
ftytÑ min
t1
xPR
s0“ 0
n`1
n
,sPR
`
`
.
,yPB
.
n
(1.3)
12
Mathematical Models of Decision-Making
Under the additional (but quite natural) assumption that
variables
Example 1.5
of sites involves expenses
stfrom the model:
s0“ sn“ 0, st“
(Set Cover Problem).Given a set of town districts
N “ t1, 2, . . . , nu
ci; the station opened at the site can monitor districts
t
ÿ
pxi´ diq, t “ 1, . . . , n ´ 1.
i1
where re-stations can be located. Opening a station at site
sn“ 0
, we can use (1.3) eliminate
M “ t1, 2, . . . , mu
SiĎ M
and a set
i P N
. Choose the sites to open the re stations in, so that all the districts are monitored and the total expenses are minimal.
The combinatorial formulation of the problem is quite straightforward:
#
ÿ
min
T ĎN
iPT
To give a mathematical programming formulation, we introduce a boolean matrixA: i
j P Si, and boolean variables
condition can be translated as
xi:
xi“ 1
ÿ
ď
ci:
Si“ M+.
iPT
aij“ 1
, i a station is opened at sitei. The coverage
aijxiě 1, j P M.
iPN
,
The expenses are
ÿ
cixiÑ min
iPN
Example 1.6.
sources
j
buying it at the price
resource
J “ t1, 2, . . . , mu
j P JisAj. The factory's capacity isM. Find the production plan that maximizes
A factory manufactures a given range of products
. To make a unit of producti, the factory uses
dij. The product is then sold at the price
the factory's prot.
Denote the amount ofi-th product in a plan as
m
ř
x
i
j1
dijaijand
xici, respectively. The prot is
n
ÿ
n
ÿ
m
ÿ
cixi´
i1
i1
j1
The resource constraints:
n
ÿ
aijxiď Aj, j P J;
i1
.
n
xPB
xi. Then the expenses and income are
dijaijxiÑ max
xPZ
I “ t1, 2, . . . , nu
aijunits of resource
ci. The available amount of
.
n
`
from re-
the capacity constraints:
n
ÿ
xiď M.
i1
Exercises
13
Thus the problem can be formulated as follows:
$ ’
’ ’ ’ ’ ’ ’ ’ &
’ ’ ’ ’ ’ ’ ’ ’ %
n
ř
i1
cixi´
n
ř
i1
m
ř
dijaijxiÑ max
j1
n
ř
aijxiď Aj, j P J,
i1
n
ř
xiď M,
i1
xiP Z`, i P I .
txiu
,
1.3. Exercises
State the following problems.
1.1.
Several (n) clients apply for a loan to a bank. The bank's reserves that can be used for loans equal toA. The sum clientiasks for equals equals
1.2.
ci. What requests should be granted to maximize the total prot?
A restaurant works from Wednesday to Sunday and has a supply ofNcloth napkins to serve its clients. Ati-th day the restaurant utilizes used napkins are sent to laundry, which can be of two types: regular (the napkins are being washed during the following day) and express (night-time, so the napkins are ready in the morning). Per-unit costs of regular and express laundry are given: many napkins should be sent to the express, and how many to the regular laundry each evening to satisfy the next day's demand and minimize the total laundry expenses?
ai, the bank's expected prot from the deal
sinapkins. At the end of the day, all the
cgand
ce, respectively. How
1.3.
A window frame is made of ve wood sections: two 1.5 meters long and three 1 meter long. A wood-working shop has 10 planks of length 2.7m and 20 planks of length 3.5m. Find the way to saw the planks to produce the maximum amount of window frames.
1.4.
A speleologist nds a treasure-chest in a cave. Each itemiin the chest has a value ( and a weight (
wi). The speleologist can carry a weight of at mostQ. What items should he
ci)
take to be able to carry them out of the cave and to maximize the total value of the taken?
1.5.
A diet consists of four types of food. A unit of food of typeicosts protein units, least
b1protein,
1.6.
Given a set of workers
ai2fats, and
b2fats, and
ai3carbohydrates. Find a diet of minimum cost that includes at
b3carbohydrates.
I “ t1, 2, . . . , nu
and a set of tasks
J “ t1, 2, . . . , mu(m ď n
worker can perform any task: the time workerineeds to perform taskjis this assignment is
cij. Assign worker to tasks so that: each task is performed by exactly one
ciand includes
). Each
tijand the cost of
a
worker, none of the workers performs more than one task, the total assignment cost does not exceed a given valueS, and the latest task is nished as soon as possible.
1.7.
A plane should change its ight height and velocity from
h0and
v0to
hkand
vk, respec-
tively. The process is performed step by step end involves additional fuel consumption. Flying at the height
h
and
c
to change the height to
ij
hiwith the velocity
vj, the plane uses
h
. Carry the plane into the required state with minimum
j`1
v
c
fuel units to change its velocity to
ij
v
i`1
fuel consumption.
i1
Chapter 2. Introduction to Computational Complexity
In this chapter, some formal aspects of computational complexity and are discussed. Historically, the complexity theory was designed to address i.e., the problems with yes-or-no answer, such as
Hamiltonian Cycle Problem (HC).
exist a cycle that passes through each node exactly once (a
Though most of the problems considered in this book are problems of nding an element of a feasible set that maximizes or minimizes a given function), they are closely related to decision problems. In fact, each optimization problem
is in correspondence with a series of decision problems
does an
for a given boundQ. We call such a problem a problem. For example, the decision version of the traveling salesman problem (example 1.2) is as follows.
Traveling Salesman Problem (TSP).
cijP Z`for each pair
circuit a simple circuit that passes each city exactly once) of total length at mostB?
pi, jq
of the cities, and a bound
x P D
Given an undirected graph
maxtfpxq : x P Du
exist such that
decision version
Given a nite set of cities
fpxq ě Q?
B P Z`. Is there a
hamiltonian
optimization
N P
-completeness theory
decision
G “ pV, Eq
cycle)?
problems (i.e., the
of the original maximization
t1, 2, . . . , nu
tour
(or a
problems,
. Does there
(2.1)
(2.2)
, distances
hamiltonian
It's quite obvious that if optimization problem (2.1) is simple in some sense, then the corresponding decision problem (2.2) is simple too: the answer is
no
for
Q ą max
so is the optimization problem: we are unable not only to pinpoint the optimum, but even to tell whether a feasible solution exists such that the objective is greater thenQ.
xPD
fpxq
. On the other hand, if the decision problem is hard for someQ, then
yes
for
Q ď max
xPD
fpxq
and
2.1. Computational Complexity
Now we give some denitions that are used in the following discussion.
Denition 2.1.AproblemΠis a general question to be given a yes-or-no answer, usually
possessing several parameters (free variables), whose values a left unspecied. A problem is described by giving:
Computational Complexity
1. a general description of all its parameters, and
2. a statement of what properties the answer (solution) should satisfy.
An
instance
I P Π
of a problem is obtained by specifying particular values for all the problem's
parameters.
Additionally, we call an instance question is
yes
, andno-instance
I P Πayes
-instance
if the correct answer to the problem's
if the correct answer isno.
15
Denition 2.2.
The
input length
LpIq
of an instanceIof a problemΠis the number of symbols
in the description ofIobtained from some encoding scheme forΠ.
Usually a binary encoding scheme with alphabet
I
of the traveling salesman problem can be encoded into the string
t0, 1, #u
is used. For example, an instance
rns###r1s#r2s#rc12s##r1s#r3s#rc13s## . . . ##ris#rjs#rcijs## . . .
. . . ##rns#rn ´ 1s#rc
where
rks
is binary representation of numberk. Thus the input length is
n
n
ÿ
ÿ
LpIq “ rlog2ns ` rlog2Bs ` 4 `
i1
j1,j i
rlog2ns ` rlog2Bs ` 2pn ´ 1q
Oprlog2ns ` rlog2Bs ` nrlog2ns ` n2max
Oplog2B ` n2log2pmax
i,j
cijqq.
prlog2is ` rlog2js ` rlog2cijs ` 4q
n
ÿ
n
ÿ
n
ÿ
rlog2is `
i1
i1
j1,j i
rlog2cijs ` n2q
i,j
rlog2cijs ` 4pnn ` 1q
n,n´1
s###rBs,
An algorithmAis said to
solve
a problemΠ, if it's applicable to any instance
I P Π
and is
guaranteed always to produce a solution for that instance.
We use the term algorithm in somewhat informal, intuitive sense here. The subject of what algorithms are and how they work is beyond the scope of this book. Let's just say that common Turing machine concept is implied. A more formal and detailed description can be found in [1].
LetAbe an algorithm solvingΠ. Denote as
tApIq
the number of elementary operations
(arithmetic operations, comparisons, read/write operations, etc.) performed byAwhen solving
I P Π
.
Denition 2.3.
Example 2.1.
The
time complexity
TApnq “ sup
of an algorithmAfor problemΠis a function
ttApIq : LpIq “ nu.
IPΠ
To illustrate the process of analyzing complexity of an algorithm, consider a
simple example: the Bubble sort algorithm.
16
Computational Complexity
Algorithm 2.1
1: 2:
3: 4: 5:
6:
Read
for for
for
n
i 1ton i 1ton ´ 1
for
if
i 1ton
Step 1 takes size. Steps 2 and 6 takes number of operations,
So, Steps 3-5 takes no more than
Bubble sort
do
Read
a
i
do
j 1ton ´ i
ają a
j`1
do
do
then
Write
temp :aj,
a
i
c1elementary operations, where
c2n
operations together for some constant
c3, each time it's executed, and the number of times is bounded by
n´1
c3npn ´ 1q{2
ÿ
i1
aj:“ a
n´i
ÿ
1
j1
,
a
j`1
:temp
j`1
c1is a constant independent on the input
c2. Step 5 takes a constant
npn ´ 1q
.
2
operations, and the total run-time is
npn ´ 1q
tpnq “ c1` c2n ` c
That is, if we accept that the numbers
3
aiare small enough to be processed in one (or in a
Opn2q,
2
xed number of) operation each. In case the input can contain arbitrarily large numbers, the run-time estimate should be increased to
tpnq “ Opn2log2maxiaiq
, that takes into account
operations required to bitwise number processing. Note that the input length of an instance is
Opn log2maxiaiq
Denition 2.4.
complexity is bounded by a polynomial in the input length: Otherwise the algorithm is called
, so the algorithm stops in time, which is quadratic in input length.
An algorithm
A
is said to be
polynomial
exponential(exponential-time
(or
polynomial-time
TApnq “ Opndq
).
), if it's time
for some
d P Z`.
To demonstrate the distinction between polynomial and exponential algorithms, consider the following example.
Example 2.2.
in polynomial time: both of them on a computer performing one million operations per second. For stops after approximately 13 minutes of work, whilst
Given two algorithms,
T
pnq “ n5, and the second in exponential time:
A
1
A1and
A2, for a problemΠ. The rst solves the problem
T
pnq “ 2n. Run
A
2
n 60,A
A2needs more than 300 centuries to nish
the calculations.
Note that increasing computer speed does not eliminate this dierence. Suppose an instance of length
D
in one hour. Then switching to a thousand times faster computer
A2solves
(performing one billion operations a second) increases the length of one-hour solvable instance only to
exponential-time as rithm having time-complexity than the one of complexity
D ` 9.97
.
This example indicates why polynomial-time algorithms are treated as
ineective
. It's quite obvious, though, that in practical sense an algo-
100
n
or
10
100
n
can hardly be called eective, or more eective
2n. Nevertheless, the question of existence (or non-existence) of a
eective
, and
polynomial-time algorithm solving a problem is one of the most important issues in the analysis of the problem. The
N P
-completeness theory was designed to answer this question.
1
Polynomial Reducibility.
N P
and
P
17
2.2. Polynomial Reducibility.
Denition 2.5.
each
yes
-instance
More formally, a decision problemΠbelongs to
p
andq, and a deterministic Turing-machineMsuch that:
1. for each
CIof length at most
2. for eachno-instance at most
For example, the Hamiltonian Cycle and the Traveling Salesman Problems are in a permutation on nodes (which serves as a certicate for a whether it denes a hamiltonian cycle and whether the length of this cycle does not exceed the bound. Also, decision versions of all the problems described in Chapter 1 lie in
Denition 2.6.
deterministic algorithm.
More formally, machine and declines it otherwise.
M
Dene class
I P Π
yes
-instance
ppLpIqq
s.t.
.
ClassPis a set of decision problems solvable in polynomial time by some
Π P P
M
stops in
N P
as a set of decision problemsΠsuch that the answer
can be veried in polynomial time.
I P Π
ppLpIqq
I P Π
if and only if there exist a polynomialpand a deterministic Turing-
(encoded using some encoding scheme) there is a certicate
, and
machineMdeclines the pair
ppLpIqq
N P
and
M
accepts the pair
time for each
P
N P
I P Π
yes
for
if and only if there exist polynomials
pI, CIq
yes
and acceptsI, if it is a
in time
pI, Cq
for any stringCof length
-instance), it is easy to verify
qpLpIqq
N P
yes
;
N P
: given
.
-instance,
It is easy to see that certicates ( for which the presence of eective algorithms seems unlikely. The Traveling Salesman Problem and the Hamiltonian Cycle Problem are among them.
Another aspect worth noticing when talking about the relation betweenPand the symmetry between
true
forI? is inP, then so is the complementary problem, GivenI, is This symmetry seems to vanish when we turn the gaze upon complement of the Traveling Salesman Problem: Is it true that there are no tours of length no more thanB?. As we saw above, the at mostBexists) can be easily veried, but there is no known way to check eectively if all the tours, exponential in their number, are no shorter thanB.
Denition 2.7.
reducibletoΨ(Π9Ψ
1. each instance
2.
I P Π
Denition 2.8.
mially reducible toΠ:
The set of
CI“ H
is a
yes
A problem
N P
LetΠand
I P Π
-instance
-complete problems is denoted as
P Ď N P
for
I P Π
yes
and
Ψ
), if
can be transformed into an instance
ô JIP Ψ
Π P N P
Ψ9Π
for any
: problems fromPare polynomially-veriable without
). At the same time,
no
answers. It's obvious that if the problem GivenI, is
yes
-answer to the original problem (if a tour of length
be problems in
is also a
is called
Ψ P NP
N P
yes
N P
.
N P
includes a great number of problems
N P
. Consider, for example, the
. ProblemΠis said to be
-instance.
-complete
N PC Ď N P
JIP Ψ
if any problem in
in polynomial time,
.
N P
X
false
polynomially
N P
is polyno-
concerns
X
forI?.
The class is non-empty: in 1971, Stephen Cook presented his pioneer work entitled The Complexity of Theorem Proving Procedures, where the concept of reducibility was elaborated and the completeness of one particular problem, the Satisability Problem, was demonstrated.
18
Computational Complexity
Satisfiability Problem (SAT).
assignment tof:
x˚P Bnsuch that
Or, in equivalent form, given a setNand Is there a vector
x P B
|N|
such that
ÿ
xj`
jPC
i
Theorem 2.1
(S. Cook, 1971).SAT P N P C
A year after, Richard Karp expanded the set of
Given a boolean function
fpx˚q “ 1
?
2m
of its subsets:
ÿ
p1 ´ xjq ě 1, i 1, 2, . . . , m?
jPD
i
.
N P
-complete problems to 21 (known as
fpxq : BB
Ci, DiP 2N(
. Is there a truth
i 1, 2, . . . , m
Karp's 21 problems). From that time on, many thousands of problems were proved to belong
N PC
. All of these results are based on a simple observation which we formulate as a lemma.
Lemma 2.1
(Reducibility Lemma).Given
P, Q P NP
, and
P 9Q
. The following statements
hold:
1. if
2. if
Proof.
from
N PC
Q P P
P P N P C
The rst statement is obvious. Prove the second one. LetRbe an arbitrary problem
N P
.
then
. Since
P P P
then
;
Q P N PC
.
P P N PC,R9P
, and since
P 9Q,R9Q
as well. So,
R9Q
. Thus
Q P
).
Corollary 1.IfP X N P C ‰ H
Proof.
P P N PC
statement gives us
N P Ď P
LetPbe a problem from
, the second statement of Lemma 2.1 yields that
Q P P
. So, each problem in
. As was stated above,
Lemma 2.1 provides us with a very useful tool to obtain a problemPis
N P
-complete, we just need to ensure it is in
then
P N P
P X N PC
P Ď N P
.
, andQbe an arbitrary problem from
Q9P
. Since
N P
can be solved in polinomial time. That is,
. Thus
P N P
.
N P
-completeness results. To prove
N P
and nd a problem
P P P
N P
. Since
, the rst
Q P N PC
polynomially reducible toP.
Example 2.3.
HC
to it.
Consider an instance of
T SP
withncities and distances
It is known that
HC
HC P N PC
. Show that
: given a graph
T SP
is also
G “ pV, Eq,|V | “ n
N P
-complete by reducing
. Construct the instance of
"
cij“
1, pi, jq P E 2, pi, jq R E.
The boundBon the tour's length is set to be equal ton.
If a tour of length at mostBexists, it must consist ofnedges of length1, which means the graphGpossesses a hamiltonian cycle. Otherwise, if there are no such cycles inG, the salesman's tour must include at least one edge of length 2, so the tour is no shorter than
B ` 1
. Obviously, this transformation can be performed in polynomial time. As we saw above,
T SP P N P
. So the problem is
N P
-complete.
Number Problems. Strong
N P
Completeness
At the end of the section, we list ve problems, which, together with the Hamiltonian Cycle Problem, form the collection called the six basic Johnson [1]. These problems are often used to prove that some other problem is
N P
-complete problems by Garey and
N P
-complete.
19
3-Satisfiability Problem (3SAT).
that
|Ci| ` |Di| ď 3(i “ 1, 2, . . . , m
ÿ
xj`
jPC
i
jPD
3-Dimensional Matching Problem (3DM).
Given a set
N
). Is there a vector
ÿ
p1 ´ xjq ě 1, i 1, 2, . . . , m?
i
Given a set
andZare disjoint sets of the same cardinalityq. Does
M1Ď M
Vertex Cover Problem (VC).
K P Z`. DoesGcontain a
at least one ofuandvbelongs to
Clique Problem.
contain a
Partition Problem.
there a subset
such that
clique
(complete subgraph) of size at leastK?
S Ă A
|M1| “ q
and any two distinct triplets in
Given an undirected graph
vertex cover
(that is a subset
V1) of size at mostK?
Given an undirected graph
Given a set
:
A “ ta1, a2, . . . , anu Ă Z`such that
ÿ
a
aPS
G “ pV, Eq
ÿ
a B{2?
AzS
and
2m
x P B
M
of its subsets:
|N|
:
M Ď X ˆ Y ˆ Z
contain a
matching
Ci, DiP 2Nso
, whereX,Y, , i.e. a subset
M1do not share any coordinate?
V1Ď V
such that for each
and a number
G “ pV, Eq
and a number
K P Z`. Does
n
ř
B
i1
pu, vq P E
G
aiis even. Is
2.3. Number Problems. Strong
Consider the Partition Problem. Though it is known to be
N P
Completeness
N P
-complete, it admits quite simple
algorithm described below. Introduce the boolean function
The value of
tpi, jq “
tpn, B{2q
#
1,
if there exists a subset
0,
otherwise
.
SiĎ Ai“ ta1, . . . , aiu :
equals 1 if and only if the partition exists. The function can be calculated
ř
aPS
a j,
i
using the following procedure.
Algorithm 2.2
for all if for
i 1 . . . n,j 0 . . . B{2
j 0orj a1then
i 2ton
for
j 0toB{2
if
It is convenient to store the function's values in a table where rows are indexed with
t1, 2, . . . , nu
Partition algorithm
do
tpi, jq :“ 0
tp1, jq :“ 1
do
do
tpi ´ 1, jq “ 1ortpi, j ´ aiq “ 1
and columns with
j P t0, 1, . . . , B{2u
then
tpi, jq :“ 1
i P
. The table is being lled row-by-row from left to right during the procedure, and its bottom-right cell contains the answer to the problem's question. Moreover, the table can be used to restore the partition.
20
Computational Complexity
Example 2.4.
B 26
. The table below contains the values of
Consider the instance of the Partition Problem:
tpi, jq
.
izj
0 1 2 3 4 5 6 7 8 9 10 11 12 13
A “ t1, 9, 5, 3, 8u,n 5
1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 2 1 1 0 0 0 0 0 0 0 1 1 0 0 0 3 1 1 0 0 0 1 1 0 0 1 1 0 0 0 4 1 1 0 1 1 1 1 0 1 1 1 0 1 1 5 1 1 0 1 1 1 1 0 1 1 1 1 1 1
Since Therefore,
B{2 ´ a4“ 10
the sum of the remaining elements is implies
a
the problem, but in fact the complexity is exponential. Indeed, an instanceIof the problem is completely dened by valuesnand
Opn log2a
tp5, 13q “ 1
a4P S
S “ ta1, a2, a4u
, a required subsetSexists. Note that , all the other elements ofSare among
. From column 10 we see
tp3, 10q “ tp2, 10q “ 1
10 ´ a2“ 1
.
tp5, 13q “ tp4, 13q “ 1
ta1, a2, a3u
, and these elements belong to
It is easy to see that time complexity of Algorithm 2.2 is
maxiai. It seems polynomial and it's quite surprising in view of
max
ai(
i 1, . . . , n
q
, and the algorithm's complexity is not bounded by any polynomial in it.
max
Nevertheless, this example demonstrates that
). Hence input length
N P
-completeness of some problems (and their
and
tp3, 13q “ 0
, and their sum is equal to
and
tp1, 10q “ 0
. Hence
ta1u
OpnBq “ Opn2a
N P
max
-completeness of
n
ř
LpIq “ Op
i1
a2P S
. That
q
, where
log2aiq “
supposed intractability) relies crucially on the fact that input data may include extremely large numbers.
,
.
,
Denition 2.9.
numeric parameter ofIas polynomialpthat
LetΠbe a decision problem and
NpI q
. ProblemΠis called a
NpI q ď ppLpIqq
for each
I P Π
I P Π
.
be its instance. Denote the maximum
number
problem, if there is no such
The Partition Problem, the Traveling Salesman Problem, and the decision version of Knap- sack Problem (example 1.1) can serve as good examples of number problems. SAT, 3SAT or HC are not number problems, for they, obviously, do not involve numbers (except for subscripts for variables, clauses or vertices, the values of which are within a polynomial in input length). The Clique Problem and the Vertex Cover Problem are not number problems either: though they have such numeric parameter as the bound on the clique's or the cover's size, its value, apparently, does not exceed the number of vertices of the graph.
Denition 2.10.
pseudopolynomial-time
and maximum numeric parameter:
An algorithm
A
for a problem
Π
is called a
pseudopolynomial
) algorithm, if its time complexity is polynomial in both input length
tApIq “ ppLpIq, NpIqq @I P Π
(for some polynomialp).
(or
Note that a pseudopolynomial algorithm solving a problem which is not a number problem, in fact, works in polynomial time. Moreover, if a problem is problem, it admits no pseudopolynomial algorithm, unless
N P
-complete and is not a number
P N P
. Remarkably, some number
problems are also unlikely to be solvable in pseudopolynomial time.