Introduction to Algorithms, Third Edition


Difference constraints and shortest paths



Download 4,84 Mb.
Pdf ko'rish
bet441/618
Sana07.04.2022
Hajmi4,84 Mb.
#534272
1   ...   437   438   439   440   441   442   443   444   ...   618
Bog'liq
Introduction-to-algorithms-3rd-edition

24.4
Difference constraints and shortest paths
Chapter 29 studies the general linear-programming problem, in which we wish to
optimize a linear function subject to a set of linear inequalities. In this section, we
investigate a special case of linear programming that we reduce to finding shortest
paths from a single source. We can then solve the single-source shortest-paths
problem that results by running the Bellman-Ford algorithm, thereby also solving
the linear-programming problem.
Linear programming
In the general
linear-programming problem
, we are given an
m
n
matrix
A
,
an
m
-vector
b
, and an
n
-vector
c
. We wish to find a vector
x
of
n
elements that
maximizes the
objective function
P
n
i
D
1
c
i
x
i
subject to the
m
constraints given by
Ax
b
.
Although the simplex algorithm, which is the focus of Chapter 29, does not
always run in time polynomial in the size of its input, there are other linear-
programming algorithms that do run in polynomial time. We offer here two reasons
to understand the setup of linear-programming problems. First, if we know that we


24.4
Difference constraints and shortest paths
665
can cast a given problem as a polynomial-sized linear-programming problem, then
we immediately have a polynomial-time algorithm to solve the problem. Second,
faster algorithms exist for many special cases of linear programming. For exam-
ple, the single-pair shortest-path problem (Exercise 24.4-4) and the maximum-flow
problem (Exercise 26.1-5) are special cases of linear programming.
Sometimes we don’t really care about the objective function; we just wish to find
any

Download 4,84 Mb.

Do'stlaringiz bilan baham:
1   ...   437   438   439   440   441   442   443   444   ...   618




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish