0% found this document useful (0 votes)
144 views22 pages

Best of The 20th Century: Editors Name Top 10 Algorithms SIAM News, Volume 33, Number 4

The document discusses the top ten algorithms of the 20th century as identified by guest editors Jack Dongarra and Francis Sullivan, highlighting their significance in science and engineering. It provides a chronological list of these algorithms, detailing their development and impact, from the Metropolis algorithm in 1946 to the fast multipole algorithm in 1987. The article emphasizes the ongoing evolution of algorithms and their importance in computational methods.

Uploaded by

Srinivasa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views22 pages

Best of The 20th Century: Editors Name Top 10 Algorithms SIAM News, Volume 33, Number 4

The document discusses the top ten algorithms of the 20th century as identified by guest editors Jack Dongarra and Francis Sullivan, highlighting their significance in science and engineering. It provides a chronological list of these algorithms, detailing their development and impact, from the Metropolis algorithm in 1946 to the fast multipole algorithm in 1987. The article emphasizes the ongoing evolution of algorithms and their importance in computational methods.

Uploaded by

Srinivasa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

from SIAM News, Volume 33, Number 4

The Best of the 20th Century: Editors Name Top 10 Algorithms


By Barry A. Cipra
Algos is the Greek word for pain. Algor is Latin, to be cold. Neither is the root for algorithm, which stems instead from al-
Khwarizmi, the name of the ninth-century Arab scholar whose book al-jabr wa’l muqabalah devolved into today’s high school
algebra textbooks. Al-Khwarizmi stressed the importance of methodical procedures for solving problems. Were he around today,
he’d no doubt be impressed by the advances in his eponymous approach.
Some of the very best algorithms of the computer age are highlighted in the January/February 2000 issue of Computing in Science
& Engineering, a joint publication of the American Institute of Physics and the IEEE Computer Society. Guest editors Jack Don-garra of the
University of Tennessee and Oak Ridge National Laboratory and Fran-cis Sullivan of the Center for Comput-ing Sciences at the Institute for
Defense Analyses put togeth-er a list they call the “Top Ten Algorithms of the Century.”
“We tried to assemble the 10 al-gorithms with the greatest influence on the development and practice of science and engineering
in the 20th century,” Dongarra and Sullivan write. As with any top-10 list, their selections—and non-selections—are bound to be
controversial, they acknowledge. When it comes to picking the algorithmic best, there seems to be no best algorithm.
Without further ado, here’s the CiSE top-10 list, in chronological order. (Dates and names associated with the algorithms should be read
as first-order approximations. Most algorithms take shape over time, with many contributors.)

1946: John von Neumann, Stan Ulam, and Nick Metropolis, all at the Los Alamos Scientific Laboratory, cook up the Metropolis
algorithm, also known as the Monte Carlo method.
The Metropolis algorithm aims to obtain approximate solutions to numerical problems with unmanageably many degrees of freedom
and to combinatorial problems of factorial size, by mimicking a random process. Given the digital computer’s reputation for
deterministic calculation, it’s fitting that one of its earliest applications was the generation of random numbers.

1947: George Dantzig, at the RAND Corporation, creates the simplex method for linear programming.
In terms of widespread application, Dantzig’s algorithm is one of the most successful of all time: Linear
programming dominates the world of industry, where economic survival depends on the ability to optimize
within budgetary and other constraints. (Of course, the “real” problems of industry are often nonlinear; the use
of linear programming is sometimes dictated by the computational budget.) The simplex method is an elegant
way of arriving at optimal answers. Although theoretically susceptible to exponential delays, the algorithm
in practice is highly efficient—which in itself says something interesting about the nature of computation.
In terms of wide-
spread use, George
Dantzig’s simplex 1950: Magnus Hestenes, Eduard Stiefel, and Cornelius Lanczos, all from the Institute for Numerical Analysis
method is among the at the National Bureau of Standards, initiate the development of Krylov subspace iteration methods.
most successful al- These algorithms address the seemingly simple task of solving equations of the form Ax = b. The catch,
gorithms of all time.
of course, is that A is a huge n ´ n matrix, so that the algebraic answer x = b/A is not so easy to compute.
(Indeed, matrix “division” is not a particularly useful concept.) Iterative methods—such as solving equations of
the form Kxi + 1 = Kxi + b – Axi with a simpler matrix K that’s ideally “close” to A—lead to the study of Krylov subspaces. Named
for the Russian mathematician Nikolai Krylov, Krylov subspaces are spanned by powers of a matrix applied to an initial
“remainder” vector r0 = b – Ax0. Lanczos found a nifty way to generate an orthogonal basis for such a subspace when the matrix
is symmetric. Hestenes and Stiefel proposed an even niftier method, known as the conjugate gradient method, for systems that are
both symmetric and positive definite. Over the last 50 years, numerous researchers have improved and extended these algorithms.
The current suite includes techniques for non-symmetric systems, with acronyms like GMRES and Bi-CGSTAB. (GMRES and
Bi-CGSTAB premiered in SIAM Journal on Scientific and Statistical Computing, in 1986 and 1992,
respectively.)

1951: Alston Householder of Oak Ridge National Laboratory formalizes the decompositional approach
to matrix computations.
The ability to factor matrices into triangular, diagonal, orthogonal, and other special forms has turned
out to be extremely useful. The decompositional approach has enabled software developers to produce
flexible and efficient matrix packages. It also facilitates the analysis of rounding errors, one of the big
bugbears of numerical linear algebra. (In 1961, James Wilkinson of the National Physical Laboratory in
London published a seminal paper in the Journal of the ACM, titled “Error Analysis of Direct Methods
of Matrix Inversion,” based on the LU decomposition of a matrix as a product of lower and upper
triangular factors.)
Alston Householder
1957: John Backus leads a team at IBM in developing the Fortran optimizing compiler.
The creation of Fortran may rank as the single most important event in the history of computer programming: Finally, scientists
1
(and others) could tell the computer what they wanted it to do, without having to descend into the netherworld of machine code.
Although modest by modern compiler standards—Fortran I consisted of a mere 23,500 assembly-language instructions—the early
compiler was nonetheless capable of surprisingly sophisticated computations. As Backus himself recalls in a recent history of
Fortran I, II, and III, published in 1998 in the IEEE Annals of the History of Computing, the compiler “produced code of such
efficiency that its output would startle the programmers who studied it.”

1959–61: J.G.F. Francis of Ferranti Ltd., London, finds a stable method for computing eigenvalues, known as the QR algorithm.
Eigenvalues are arguably the most important numbers associated with matrices—and they can be the trickiest to compute. It’s
relatively easy to transform a square matrix into a matrix that’s “almost” upper triangular, meaning one with a single extra set of
nonzero entries just below the main diagonal. But chipping away those final nonzeros, without launching an avalanche of error,
is nontrivial. The QR algorithm is just the ticket. Based on the QR decomposition, which writes A as the product of an orthogonal
matrix Q and an upper triangular matrix R, this approach iteratively changes Ai = QR into Ai + 1 = RQ, with a few bells and whistles
for accelerating convergence to upper triangular form. By the mid-1960s, the QR algorithm had turned once-formidable eigenvalue
problems into routine calculations.

1962: Tony Hoare of Elliott Brothers, Ltd., London, presents Quicksort.


Putting N things in numerical or alphabetical order is mind-numbingly mundane. The intellectual challenge lies in devising ways
of doing so quickly. Hoare’s algorithm uses the age-old recursive strategy of divide and conquer to solve the problem: Pick one
element as a “pivot,” separate the rest into piles of “big” and “small” elements (as compared with the pivot), and then repeat this
procedure on each pile. Although it’s possible to get stuck doing all N(N – 1)/2 comparisons (especially if you use as your pivot the first
item on a list that’s already sorted!), Quicksort runs on average with O(N log N) efficiency. Its elegant simplicity has made Quicksort
the pos-terchild of computational complexity.

1965: James Cooley of the IBM T.J. Watson Research Center and John Tukey of Princeton
University and AT&T Bell Laboratories unveil the fast Fourier transform.
Easily the most far-reaching algo-rithm in applied mathematics, the FFT revolutionized
signal processing. The underlying idea goes back to Gauss (who needed to calculate orbits
of asteroids), but it was the Cooley–Tukey paper that made it clear how easily Fourier
transforms can be computed. Like Quicksort, the FFT relies on a divide-and-conquer
strategy to reduce an ostensibly O(N 2) chore to an O(N log N) frolic. But unlike Quick- sort,
the implementation is (at first sight) nonintuitive and less than straightforward. This in itself
James Cooley
gave computer science an impetus to investigate the inherent complexity of computational John Tukey
problems and algorithms.

1977: Helaman Ferguson and Rodney Forcade of Brigham Young University advance an integer relation detection algorithm.
The problem is an old one: Given a bunch of real numbers, say x1, x2, . . . , xn, are there integers a1, a2, . . . , an (not all 0) for which
a1x1 + a2x2 + . . . + anxn = 0? For n = 2, the venerable Euclidean algorithm does the job, computing terms in the continued-fraction
expansion of x1/x2. If x1/x2 is rational, the expansion terminates and, with proper unraveling, gives the “smallest” integers a1 and a2.
If the Euclidean algorithm doesn’t terminate—or if you simply get tired of computing it—then the unraveling procedure at least
provides lower bounds on the size of the smallest integer relation. Ferguson and Forcade’s generalization, although much more
difficult to implement (and to understand), is also more powerful. Their detection algorithm, for example, has been used to find
the precise coefficients of the polynomials satisfied by the third and fourth bifurcation points, B3 = 3.544090 and B4 = 3.564407,
of the logistic map. (The latter polynomial is of degree 120; its largest coefficient is 25730.) It has also proved useful in simplifying
calculations with Feynman diagrams in quantum field theory.

1987: Leslie Greengard and Vladimir Rokhlin of Yale University invent the fast multipole algorithm.
This algorithm overcomes one of the biggest headaches of N-body simulations: the fact that accurate calculations of the motions
of N particles interacting via gravitational or electrostatic forces (think stars in a galaxy, or atoms in a protein) would seem to require
O(N 2) computations—one for each pair of particles. The fast multipole algorithm gets by with O(N) computations. It does so by
using multipole expansions (net charge or mass, dipole moment, quadrupole, and so forth) to approximate the effects of a distant
group of particles on a local group. A hierarchical decomposition of space is used to define ever-larger groups as distances increase.
One of the distinct advantages of the fast multipole algorithm is that it comes equipped with rigorous error estimates, a feature that
many methods lack.

What new insights and algorithms will the 21st century bring? The complete answer obviously won’t be known for another
hundred years. One thing seems certain, however. As Sullivan writes in the introduction to the top-10 list, “The new century is not
going to be very restful for us, but it is not going to be dull either!”

Barry A. Cipra is a mathematician and writer based in Northfield, Minnesota.

2
Solving LP problems [Zionts, 1974] [4:]1

“An intuitive algebraic approach for solving


Linear Programming problems”
Source: Zionts [1974] (or many others).

[max]z = 0,56 x1 + 0,42 x2


s. to x1 + 2 x2 ≤ 240
{1}
1,5 x1 + x2 ≤ 180
x1 ≤ 110

[max]z = 0,56 x1 + 0,42 x 2


1
x1 + 2 x2 + {x3 } = 240
A {2}
1,5 x1 + x2 + {x 4 } = 180
x1 + {x5 } = 110
This has (always) an obvious, sure solution. Let
x1 , x2 = 0 {3}
Then
 x3  240
 x  = 180 
 4   {4}
 x5  110 

240
z = [0 0 0]180  = 0 {5}
110 

Is this optimal ? How to improve ?

There does not appear (Dantzig) to be a systematic way of setting all the
nonbasic variables simultaneously to optimal values —hence, an iterative2 method.
Choose the variable that increases the objective function most per unit (this
choice is arbitrary), in the example, x1, because its coefficient (0,56) is the largest.
According to the constraints, x1 can be increased till:
x1 = 240 x1 = 240
B 1,5 x1 = 180 → x1 = 120 {6}
x1 = 110 x1 = 110
The third equation (why ?) in {2} leads to x1 = 110 and x5 = 0. The variable x1 will be
the entering variable and x5 the leaving variable:

1
A, B, C identify the iteration, as summarized below.
2
Iterative: involving repetition; relating to iteration. Iterate (from Latin iterare), to say or do again
(and again). Not to be confused with interactive.

File: {LP_ZiontsB0308.doc}
2[:4] Solving LP problems [Zionts, 1974]

C x1 = 110 − x5 {7}
Substituting for x1 everywhere (except in its own constraint), we have
[max]z = 0,56(110 − x5 ) + 0,42 x 2
(110 − x5 ) + 2 x2 + x3 = 240
{8}
1,5(110 − x5 ) + x2 + x4 = 180
x1 + x5 = 110

[max]z = 0,42 x 2 − 0,56 x5 + 61,6


+ 2 x2 + {x3 } − x5 = 130
A {9}
x2 + {x 4 } − 1,5 x5 = 15
{x1 } + x5 = 110
which is of course equivalent to Eq. {2}.
We now have a new (equivalent) LP problem, to be treated as the original
was. The process can continue iteratively.
 x1  110
 x  = 130
 3   {10}
 x 4   15 

From Eq. {2} or Eq. {9}, respectively,


110
z = [0,56 0 0]130 = 61,6 {11}
 15 

110
z = [0 0 0]130 + 61,6 = 61,6 {12}
 15 

Now, x2 is the new entering variable. According to the constraints, it can be


increased till:
2 x2 = 130 x2 = 65
B x2 = 15 → x2 = 15 {13}
0 x2 = 110 x2 =∞

C x 2 = 15 − x 4 + 1,5 x5 {14}
Solving LP problems [Zionts, 1974] [4:]3

Substituting for x2 everywhere (except its own constraint), we have


[max]z = 0,42(15 − x 4 + 1,5 x5 ) − 0,56 x5 + 61,6
+ 2(15 − x 4 + 1,5 x5 ) + x3 − x5 = 130
{15}
x2 + x4 − 1,5 x5 = 15
x1 + x5 = 110

[max ]z = − 0,42 x 4 + 0,07 x 5 + 67,9


{x 3 } − 2 x4 + 2 x5 = 100
A {16}
{x 2 } + x4 − 1,5 x 5 = 15
{x1 } + x5 = 110

 x1  110
 x  =  15 
 2   {17}
 x3  100

Now, x5 is the new entering variable. According to the constraints, it can be


increased till:
2 x5 = 100 x5 = 50
B − 1,5 x5 = 15 → x5 =K {18}
x5 = 110 x5 = 110

1
C x5 = 50 − x3 + x 4 {19}
2
Substituting for x5 everywhere (except its own constraint), we have
 
[max ]z = − 0,42 x 4
1
+ 0,07 50 − x 3 + x 4  + 67,9
 2 
x3 − x4 + x5 = 50
 1  {20}
x2 + x4 − 1,5 50 − x 3 + x 4  = 15
 2 
 1 
x1 +  50 − x 3 + x 4  = 110
 2 

[max ]z = − 0,035 x 3 − 0,35 x 4 + 71,4


x3 − x4 + {x 5 } = 50
A
{x 2 } + 0,75 x 3 − 0,5 x 4 = 90
{x1 } − 0,5 x 3 + x4 = 60

 x1  60
 x  = 50
 2   {21}
 x5  50

Now, no variable produces an increase. So, this is a maximum.


4[:4] Solving LP problems [Zionts, 1974]

In sum:
A In the system of equations, find the identity matrix (immediate solution).
B search for an entering variable (or finish)
C consequently, find a leaving variable (if wrongly chosen, negative values will
appear).

References:
– ZIONTS, Stanley, 1974, “Linear and integer programming”, Prentice-Hall,
Englewood Cliffs, NJ (USA), p 5. (IST Library.) ISBN 0-13-536763-8.
– See others on the course webpage (http://web.ist.utl.pt/mcasquilho).

v
Mar-2011 Zionts, "An intuitive algebraic approach for solving LP problems" [max ]z = 0,56 x1 + 0,42 x2
s. to x1 + 2 x2 ≤ 240
X = 60 90 Solver model:
(0) 0,56 0,42 [max] z = 71,4 71,4 1,5 x1 + x2 ≤ 180
(Constr.:) x1 x2 Value RHS 2 x1 ≤ 110
(1) 1 2 <= 240 240 <= 240 TRUE
(2) 1,5 1 <= 180 180 <= 180 100
(3) 1 0 <= 110 60 <= 110 100

Let's solve it manually.


Structural—... Slack—... MAXIMIZE
x1 x2 x3 x4 x5
0,56 0,42 0 0 0 Ratio
0.1 x3 1 2 1 0 0 240 240
0.2 x4 1,5 1 0 1 0 180 120
0.3 x5 1 0 0 0 1 110 110 Smallest+Leaves
0.0 Coeffs 0,56 0,42 0 0 0
Enters z = 0 61,6 = next z
1.1 x3 0 2 1 0 -1 130 65 b) {0.1} - {1.3} × 1
1.2 x4 0 1 0 1 -1,5 15 15 c) {0.2} - {1.3} × 1,5
1.3 x1 1 0 0 0 1 110 -1 a) Pivot {0.3} / 1
1.0 Coeffs 0 0,42 0 0 -0,56 Indep. term.: 61,6 d) {0.0} - {1.3} × 0,56
Enters z = 61,6 67,9 = next z
2.1 x3 0 0 1 -2 2 100 50 b) {1.1} - {2.2} × 2
2.2 x2 0 1 0 1 -1,5 15 -1 a) Pivot {1.2} / 1
2.3 x1 1 0 0 0 1 110 110 c) {1.3} - {2.2} × 0
2.0 Coeffs 0 0 0 -0,42 0,07 Indep. term.: 67,9 d) {1.0} - {1.3} × 0,42
Enters z = 67,9 71,4 = next z
3.1 x5 0 0 0,5 -1 1 50 a) Pivot {2.1} / 2
3.2 x2 0 1 0,75 -0,5 0 90 b) {2.2} - {3.1} × -1,5
3.3 x1 1 0 -0,5 1 0 60 c) {2.3} - {3.1} × 1
3.0 Coeffs 0 0 -0,035 -0,35 0 End Indep. term.: 71,4 d) {1.0} - {1.3} × 0,07
z = 71,4 OPTIMUM
Mar-2011 H&L, Wyndor Probl. [max ]z = 3 x1 + 5 x2
s. to x1 ≤4
X = 2 6 + 2 x2 ≤ 12 Solver model
(0) 3 5 [max] z = 36 36
3 x1 + 2 x2 ≤ 18
(Constr.:) x 1 x2 Value RHS 2
(1) 1 0 <= 4 2 <= 4 TRUE
(2) 0 2 <= 12 12 <= 12 100
(3) 3 2 <= 18 18 <= 18 100

Let's solve it manually. NOT USED


Structural—... Slack—... —--—--Artificial———- MAXIMIZE
x1 x2 x3 x4 x5 x6 x7 x8
3 5 0 0 0 -1000 -1000 -1000 Ratio
0.1 x3 1 0 1 0 0 1 0 0 4 -1
0.2 x4 0 2 0 1 0 0 1 0 12 6 Smallest+Leaves
0.3 x5 3 2 0 0 1 0 0 1 18 9
0.0 Coeffs 3 5 0 0 0 0 0 0
Enters z = 0 30 = next z
1.1 x3 1 0 1 0 0 4 4 b) {0.1} - {1.2} × 0
1.2 x2 0 1 0 0,5 0 6 -1 a) Pivot {0.2} / 2
1.3 x5 3 0 0 -1 1 6 2 c) {0.3} - {1.2} × 2
1.0 Coeffs 3 0 0 -2,5 0 Indep. term.: 30 d) {0.0} - {1.2} × 5
Enters z = 30 36 = next z
2.1 x3 0 0 1 0,33333 -0,3333 2 b) {1.1} - {1.3} × 1
2.2 x2 0 1 0 0,5 0 6 c) {1.2} - {1.3} × 0
2.3 x1 1 0 0 -0,3333 0,33333 2 a) Pivot {1.3} / 3
2.0 Coeffs 0 0 0 -1,5 -1 End Indep. term.: 36 d) {1.0} - {1.3} × 3
z = 36 OPTIMUM

Now follow a different path !


Structural—... Slack—... MAXIMIZE
x1 x2 x3 x4 x5
3 5 0 0 0 Ratio
0.1 x3 1 0 1 0 0 4 4 Smallest+Leaves
0.2 x4 0 2 0 1 0 12 -1
0.3 x5 3 2 0 0 1 18 6
0.0 Coeffs 3 5 0 0 0
Enters z = 0 12 = next z
1.1 x1 1 0 1 0 0 4 -1 a) Pivot {0.1} / 1
1.2 x4 0 2 0 1 0 12 6 b) {0.2} - {1.1} × 0
1.3 x5 0 2 -3 0 1 6 3 c) {0.3} - {1.1} × 3
1.0 Coeffs 0 5 -3 0 0 Indep. term.: 12 d) {0.0} - {1.1} × 3
Enters z = 12 27 = next z
2.1 x1 1 0 1 0 0 4 4 b) {1.1} - {2.3} × 0
2.2 x4 0 0 3 1 -1 6 2 c) {1.2} - {2.3} × 2
2.3 x2 0 1 -1,5 0 0,5 3 -1 a) Pivot {1.3} / 2
2.0 Coeffs 0 0 4,5 0 -2,5 Indep. term.: 27 d) {1.0} - {1.3} × 5
Enters z = 27 36 = next z
3.1 x1 1 0 0 -0,3333 0,33333 2 b) {2.1} - {3.2} × 1
3.2 x3 0 0 1 0,33333 -0,3333 2 a) Pivot {2.2} / 3
3.3 x2 0 1 0 0,5 0 6 c) {2.3} - {3.2} × -1,5
3.0 Coeffs 0 0 0 -1,5 -1 End Indep. term.: 36 d) {2.0} - {3.2} × 4,5
z = 36 OPTIMUM
Path 1 (0, 0, z=0), (0, 6, z=30), (2, 6, z=36)
Path 2 (0, 0, z=0), (4, 0, z=12), (4, 3, z=27), (2, 6, z=36) Feasible region
10
Try: 27 or 36 9
∆x = 0,5 z =? 36
y1 y2 y3 yz 8
x
0 6 9 7,2 x2 7
0,5 6 8,25 6,9 6
1 6 7,5 6,6 5
1,5 6 6,75 6,3 4
2 6 6 6
3
2,5 6 5,25 5,7
3 6 4,5 5,4 2
3,5 6 3,75 5,1 1
4 3 6 3 4,8 0
4,5 6 2,25 4,5
0 1 2 3 4 5 6 7
5 6 1,5 4,2 x1
5,5 6 0,75 3,9
6 6 0 3,6
Artificial variables in Linear Programming
Adapted from H&L [2005] and Taha [1992]

Equality constraints [H&L, p 125]


Suppose a modification to the original Wyndor problem, as follows ({1}).
[max] z = 3 x1 + 5 x2
s. to x1 ≤4
{1}
2x 2 ≤ 12
3 x1 + 2 x2 = 18
with x ≥ 0. Thus, the third constraint is now an equality. This can become
(0) z − 3 x1 − 5 x2 =0
(1) x1 + x3 =4
{2}
(2) 2 x2 + x4 = 12
(3) 3 x1 + 2 x2 = 18
However, these equations do not have an obvious initial (basic feasible) solution.
So, the artificial variable technique is applied. With M a very high number (+∞) —
this is the Big M method*—, we can augment the system {2} to obtain
(0) z − 3 x1 − 5 x2 + M x5 = 0
(1) x1 + x3 =4
{3}
(2) 2 x2 + x4 = 12
(3) 3 x1 + 2 x2 + x5 = 18

Converting equation 0 to proper form


In {3}, the (obvious) initial basic variables are x3, x4 and x5 (non-basic x1 = 0
and x2 = 0). However, this system is not yet in proper form for Gaussian elimination
because a basic variable ( x5 ) has a non-zero coefficient in Eq. 0. Indeed, all the
basic variables must be (algebraically) eliminated from Eq. 0 before the simplex
method can find the entering basic variable. (This elimination is necessary so that the
negative of the coefficient of each non-basic variable will give the rate at which z
would increase if that non-basic variable were to be increased from 0 while adjusting
the values of the basic variables accordingly.)
To eliminate x5 from Eq. 0, we need to subtract from Eq. 0 the product M
times Eq. 3:
z − 3 x1 − 5x2 + M x5 =0
− M (3x1 + 2 x2 + x5 = 18) {4}
z − (3M + 3)x1 − (2M + 5)x 2 = −18M

*
Another method to solve this matter is the “two-phase method”.
In this example, there is only one equation with an artificial variable. If there
were several equations with artificial variables, we would have to subtract
accordingly.

Application of the simplex method


The new Eq. 0 gives z in terms of just the non-basic variables (x1, x2):
z = −18M + (3M + 3)x1 + (2M + 5)x 2 {5}
Since the coefficient of x1 is the best (greatest), this variable is chosen as the
entering variable.
The leaving variable, as always, will correspond to the smallest “positive”
(non-negative) ratio (from the so-called “minimum ratio test”).

Another (more general) example (Taha [1992], p 72)

[min] z = 4 x1 + x2
s. to 3 x1 + x2 =3
{6}
4 x1 + 3x2 ≥6
x1 + 2 x2 ≤4
with x ≥ 0. The augmented standard form is
[min] z = 4 x1 + x2 + 0 x3 + 0x4 + Ma1 + Ma 2
s. to 3 x1 + x2 + a1 =3
{7}
4 x1 + 3x2 − x3 + a2 =6
x1 + 2 x2 + x4 =4

References
- HILLIER, Frederick S., and Gerald J. LIEBERMAN, 2005, “Introduction to Operations
Research”, 8.th ed., McGraw-Hill
- TAHA, Hamdy, 1992, “Operations Research: an introduction”, 5.th ed., MacMillan
Publishing Company
(Blank page)
Redundant ?
[max]x2 − x1
x1 + x 2 ≤ 10 {1}
x1 + x 2 ≤ 20

[max] z = − x1 + x2
s. to x1 + x2 ≤ 10 {2}
x1 + x2 ≤ 20

[max] z = − x1 + x2 + 0 x3 + 0 x4
s. to x1 + x2 + x3 = 10 {3}
x1 + x2 + x4 = 20
Solve:
Go to http://web.ist.utl.pt/~mcasquilho/compute/or/Fx-lp-revised.php
Supply:
Opt. max
Coefficients -1 1 0 0
1 1 1 0 10
A|B
1 1 0 1 20
Artificials 0
Initial basis 34

Redundant ? No problem.

2010 — M. Casquilho (IST)


File: {LP_redund.doc}
Impossible ?
[max]x2 − x1
x1 + x 2 ≤ 10 {1}
x1 + x 2 ≥ 20

[max] z = − x1 + x2
s. to x1 + x2 ≤ 10 {2}
x1 + x2 ≥ 20
M ≅ +∞
[max] z = − x1 + x2 + 0 x3 + 0 x4 − Mx5
s. to x1 + x2 + x3 = 10 {3}
x1 + x2 − x4 + x5 20
Solve:
Go to http://web.ist.utl.pt/~mcasquilho/compute/or/Fx-lp-revised.php
Supply:
Opt. max
Coefficients -1 1 0 0 0
1 1 1 0 0 10
A|B
1 1 0 -1 1 20
Artificials 5
Big M 1+2
Initial basis 35

Impossible ? No problem.

2010 — M. Casquilho (IST)


File: {LP_imposs.doc}
Scientific application (!) of LP [6:] 1

_________________________________________________________________________________

A “scientific application” (!) of Linear Programming


In Ecker & Kupferschmid [1988], Ch. 2, “LP models and applications”, 2.3, “Some scientific
applications of LP”, pp 24–25; example problem from Guttman et al. [1982], Ch. 15, “Regression
analysis”, 15.5, An example, pp 361–365

A study was instituted to determine the percent of waste solids removed in a


filtration system as a function of flow rate, x, of the effluentbeing fed into the system.
It was decided to use flow rate of 2 (2) 14 gal/min and to observe ye (“experimental”),
the percent of waste solid removed,when each of these flow rates was used. The
study yielded the data displayed in Table 1.
The mathematical model E ( y x ) = ax + b was proposed.
Find the parameters, a and b, of the model [Guttman, et al., 1982, p 361].
Table 1
i x ye
1 2 24,3
2 4 19,7
3 6 17,8
4 8 14,0
5 10 12,3
6 12 7,2
7 14 5,5

→ Resolution

a) Classical solution
(We will use only points 1, 4 and 7 of Table 1. With all the points, the source
cited gives yˆ =26,81 − 1,55 x , “in the sense of least squares”.)
As is well known, the parameters of the problem are obtained minimizing a
sum of errors (squared, for convenience), of the form
n
z = ∑ ( yi − yie )
2
{1}
i =1

with
z – measure (a sum) of the n errors. ([z] = ψ2, see below)
n – number of experiments
yi – theoretical (or “calculated”) value, y = ax + b , of the measured
variable, corresponding to xi (i integer, i = 1..n)
a, b – process parameters. (With χ and ψ the dimensions of x and y,
respectively, it is [a] = ψχ–1 and [b] = ψ.)
yie – experimental value (a constant, thus) of the measured variable,
corresponding to xi
So, z 1 is a function of only a and b, whose minimum is easy to find by differentiation,

1 The use of z, as may be concluded, would be more logical, although indifferent from the viewpoint
of optimization.

MC-IST file={EckerK_sciSolved.doc}
2 [:6] Scientific application (!) of LP

_________________________________________________________________________________

giving for these parameters, as is known,


 ∑ ( xi − x ) y ie 
  
aˆ 2 
   ∑ (xi − x ) 
 =  {2}
   
 ˆ   y − aˆx 
e

b   
 
while the optimum of z is not relevant.
Table 2
i xi yie xi − x ( xi − x ) yie ( xi − x ) 2
1 2 24,3 -6 -145,8 36,00
2 4 19,7
3 6 17,8
4 8 14,0 0 0,0 0,00
5 10 12,3
6 12 7,2
7 14 5,5 6 33 36,00
Sum 24 43,8 (0) -112,8 72,00
Average x=8 y = 14,6

From Table 2, for the points selected, it is


â = –1,5(6) (% removed) / (gal/min)
b̂ = 27,1(3) (% removed)
(These values are near the values reported for the 7 points, â = –1,55 and b̂ = 26,81.)
The calculated y’s 2 give: y1 = 24 (“low”, vs. 24,3), y4 = 14,6 (“high”, vs.
14,0), y7 = 5,2 (“low”, vs. 5,5).

b) Solution by Linear Programming


(We use the same points, 1, 4 e 7, from Table 1.)
We propose, now, to obtain the parameters a and b, of the same model, by
another criterion: make the “errors” or deviations be small individually (not as a
sum). To this end, we will try to minimize the “worst” (largest) deviation, i.e.,
[min] z = max( d i ) {3}
i

with
d i = yie − yi {4}
or, since (in this case) it is y = ax + b ,

2 The plural in the form “x’s” seems appropriate (better than “xx”).
Scientific application (!) of LP [6:] 3

_________________________________________________________________________________

d i = yie − axi − b {5}


Remember that any value of z depends only of a and b, as all other values are
constants (experimental values). (This time, the physical dimensions of z are, of
course, the same as those of the measured variable, y.)
As z must be the maximum deviation, it has, equivalently, to satisfy each of
the following inequalities
z ≥ yie − axi − b i = 1..n {6}

with n the number of points.


The problem becomes, thus, to find a, b and z such that all the inequalities
should be satisfied and z be as small as possible. So, we need to find
[min] z {7}
subject to
z ≥ yie − axi − b i = 1..n {8}

Now, this problem has the disadvantage of not being a linear programming, in this
form, because, of course, the ‘absolute value’ 3 of a linear function is not a linear
function [Ecker et al., 1988]. We can, however, convert it into a linear program
through the following elementary fact:

For any z and w,


z ≥ |w| iff z ≥ w and z ≥ –w.

So, let us replace each (non-linear) inequality by two linear inequalities, to get a linear
program:
[min] z {9}
subject to
(
z ≥ + yie − axi − b ) i = 1..n {10a}

(
z ≥ − yie − axi − b ) i = 1..n {10b}

z ≥ 0; a, b: of free sign
As is known, a and b can be replaced by differences of non-negative variables, say,
a ′ − a ′′ e b ′ − b ′′ . Incidentally, as we have (possibly good) approximations of the
optimum values of a and b, from the previous section, we can simply just replace a by
–a´ (a´ non-negative) —an artifice that must be verified in the end (and which would
be under suspicion in case we obtained the boundary value a´ = 0).
The problem then becomes:
[min] z {11}
subject to

3 Or “modulus”.
4 [:6] Scientific application (!) of LP

_________________________________________________________________________________

xi a′ − b + z ≥ − yie i = 1..n {12a}

− xi a′ + b + z ≥ yie i = 1..n {12b}


or, finally, introducing the numerical values,
[min] z {13}
subject to
2a ′ − b + z ≥ −24,3
8a ′ − b + z ≥ −14,0
14a ′ − b + z ≥ −5,5
{14}
− 2a ′ + b + z ≥ 24,3
− 8a ′ + b + z ≥ 14,0
− 14a ′ + b + z ≥ 5,5

In matrix form, it is
[min ] w = cT x
subject to : Ax ≥ b {15}
x ≥0
with
x = [a ′ b z]
T

c T = [0 0 1]

 2 − 1 1 − 24,3
 8 
− 1 1  − 14,0 
   {16}
 14 − 1 1  − 5,5 
A= b =  
 − 2 1 1  24,3 
 − 8 1 1  14,0 
   
− 14 1 1  5,5 

i) Direct resolution
The problem, as just formulated, has 3 structural variables and 6 constraints.
Its manual resolution, thus, faces the practically unfeasible handling of square
matrices of order 6, among others. The computer resolution took 5 iterations and
gave (as structural variables and objective function):
Scientific application (!) of LP [6:] 5

_________________________________________________________________________________

a ′ 1,56667 
 b  = 26,9833 ( z = 0,45 )
    {17}
 z   0,45 

So, we have a = –a´ = –1,56667 and b = 26,9833. Notice that it is a´ ≠ 0 (and,


inevitably, a´ > 0), as expected, which validates the hypothesis made to ease the
calculations, so this result is not “suspect”.
It is not evident whether this set (a, b) is better or worse than the former
(otherwise, it happens that one of the values coincides), a fact that depends on the
finalities.

ii) Resolution by the dual (brief note)


The LP problems can be grouped in pairs, where one of the problems is the
primal and the other the dual —an assignment that is arbitrary, although usually the
primal corresponds to the original problem. Duality —present in various areas of
Mathematics— is important both theoretically and practically in LP, as both problems
yield an identical optimum (if it exists) for the objective function. Moreover:
indeed, in the complete solution of one of the problems, the complete solution of the
other can be read, with the advantage that, frequently, one of them is
computationally (much) less difficult.
The relationship between primal and dual, explored in the LP literature, may
be shortly presented as follows, conveniently for theory and application:

Primal Dual

[min ] z = cT x [max] z = bTy


subject to : Ax ≥ b subject to : ATy ≤ c
x ≥0 y ≥0

The case under study corresponds to the classification above; in other cases, the
descriptions under the titles primal and dual would be exchanged.
Among other properties, it can be proved that:
– If one of the problems has an optimum vector (solution), then the other also has
one, and the optimum objective function is identical.
– If one of the problems is possible but has no finite optimum, then the other is
impossible.
– Both problems can be impossible.
– The optimum vector for the maximization has its elements equal to the
coefficients of the slack variables of the optimum basis of the minimization,
and reciprocally.

Therefore, starting from the original problem under study, which has 3 structural
variables and 6 constraints (two per each experimental point), its dual can be
constructed, having 6 structural variables and only 3 constraints. So, in this case, the
dual (a) evolves by much easier iterations (matrices of order 3, not 6), and (b) will
6 [:6] Scientific application (!) of LP

_________________________________________________________________________________

be, expectedly, less cumbersome, as it will yield about half the iterations (about
proportional to 3, not 6). Using the dual would still allow to easily consider all the
experimental points, even if more numerous, as the number of iterations till the
optimum depends essentially on the number of constraints.
The dual would be:
[max] (w = ) 24,3s1 + 14,0 s 2 + 5,5s3 − 24,3s 4 − 14,0 s 5 − 5,5s 6 {18}
subject to
 s1 
s 
 2 8 14 − 2 − 8 − 14   0
2

− 1 − 1 − 1 1   s 3  ≤ 0 
 1 1  s    {19}
 1 1 1 1 1 1   4  1
 s5 
 
 s 6 
The result, in 4 iterations (instead of 5), is (of course)
z = 0,45 {20}
and contains —in its so-called dual variables— the values
∆ = [ −1,567 −26,98 −0,45]
T
{21}
Consequently, this vector (always negative —i.e., non-positive— in the optimum of a
maximization, of course) has as elements the symmetrical of the results (a´, b, z) of
the primal, already known.

References
– ECKER, Joseph G., Michael KUPFERSCHMID, 1988, “Introduction to Operations
Research”, John Wiley & Sons, New York, NY (USA), ISBN 0-471-63362-3.
– GUTTMAN, Irwin, Samuel S. WILKS, J. Stuart HUNTER, 1982, “Introduction to
Engineering Statistics”, 3.rd ed., John Wiley & Sons, New York, NY (USA),
ISBN 0-471-86956-2.

v
Bronson & Naadimuthu, 1997, pp 56–57

You might also like