An Introduction To Optimization With Applications In Machine Learning And Data Analytics Jeffrey Paul Wheeler pdf download
An Introduction To Optimization With Applications In Machine Learning And Data Analytics Jeffrey Paul Wheeler pdf download
https://ebookbell.com/product/an-introduction-to-optimization-
with-applications-in-machine-learning-and-data-analytics-jeffrey-
paul-wheeler-53329220
https://ebookbell.com/product/an-introduction-to-optimization-with-
applications-to-machine-learning-5th-edition-5th-edition-edwin-k-p-
chong-215720954
https://ebookbell.com/product/an-introduction-to-optimization-on-
smooth-manifolds-nicolas-boumal-48155782
https://ebookbell.com/product/an-introduction-to-optimization-edwin-k-
p-chong-stanislaw-h-zak-chong-22381640
https://ebookbell.com/product/an-introduction-to-optimization-
techniques-1st-edition-sharma-23509948
An Introduction To Optimization Third Edition Edwin K P Chong
https://ebookbell.com/product/an-introduction-to-optimization-third-
edition-edwin-k-p-chong-4306834
https://ebookbell.com/product/an-introduction-to-optimization-2nd-ed-
edwin-k-p-chong-stanislaw-h-zak-974346
https://ebookbell.com/product/an-introduction-to-optimization-4th-
edition-solution-manual-fourth-edwin-k-p-chong-9996842
https://ebookbell.com/product/an-introduction-to-nonlinear-
optimization-theory-marius-durea-radu-strugariu-51046154
https://ebookbell.com/product/an-introduction-to-structural-
optimization-solid-mechanics-and-its-applications-1st-edition-peter-w-
christensen-2523464
An Introduction to
Optimization
The primary goal of this text is a practical one. Equipping students with enough knowledge
and creating an independent research platform, the author strives to prepare students for
professional careers. Providing students with a marketable skill set requires topics from
many areas of optimization. The initial goal of this text is to develop a marketable skill set
for mathematics majors as well as for students of engineering, computer science, econom-
ics, statistics, and business. Optimization reaches into many different fields.
This text provides a balance where one is needed. Mathematics optimization books are
often too heavy on theory without enough applications; texts aimed at business students
are often strong on applications, but weak on math. The book represents an attempt at
overcoming this imbalance for all students taking such a course.
The book contains many practical applications but also explains the mathematics behind
the techniques, including stating definitions and proving theorems. Optimization tech-
niques are at the heart of the first spam filters, are used in self-driving cars, play a great
role in machine learning, and can be used in such places as determining a batting order in a
Major League Baseball game. Additionally, optimization has seemingly limitless other ap-
plications in business and industry. In short, knowledge of this subject offers an individual
both a very marketable skill set for a wealth of jobs as well as useful tools for research in
many academic disciplines.
Many of the problems rely on using a computer. Microsoft’s Excel is most often used, as
this is common in business, but Python and other languages are considered. The consider-
ation of other programming languages permits experienced mathematics and engineering
students to use MATLAB or Mathematica, and the computer science students to write
their own programs in Java or Python.
Jeffrey Paul Wheeler earned his PhD in Combinatorial Number Theory from the University
of Memphis by extending what had been a conjecture of Erdős on the integers to finite groups.
He has published, given talks at numerous schools, and twice been a guest of Trinity College at
the University of Cambridge. He has taught mathematics at Miami University (Ohio), the Uni-
versity of Tennessee-Knoxville, the University of Memphis, Rhodes College, the University of
Pittsburgh, Carnegie Mellon University, and Duquesne University. He has received numerous
teaching awards and is currently in the Department of Mathematics at the University of Pitts-
burgh. He also occasionally teaches for Pitt’s Computer Science Department and the College
of Business Administration. Dr. Wheeler’s Optimization course was one of the original thirty
to participate in the Mathematical Association of America’s NSF-funded PIC Math program.
Textbooks in Mathematics
Series editors:
Al Boggess, Kenneth H. Rosen
Classical Analysis
An Approach through Problems
Hongwei Chen
Probability and Statistics for Engineering and the Sciences with Modeling using R
William P. Fox and Rodney X. Sturdivant
https://www.routledge.com/Textbooks-in-Mathematics/book-series/CANDHTEXBOOMTH
An Introduction to
Optimization
With Applications in Machine
Learning and Data Analytics
Reasonable efforts have been made to publish reliable data and information, but the author and pub-
lisher cannot assume responsibility for the validity of all materials or the consequences of their use.
The authors and publishers have attempted to trace the copyright holders of all material reproduced
in this publication and apologize to copyright holders if permission to publish in this form has not
been obtained. If any copyright material has not been acknowledged please write and let us know so
we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information stor-
age or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access www.copyright.com
or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923,
978-750-8400. For works that are not available on CCC please contact [email protected]
Trademark notice: Product or corporate names may be trademarks or registered trademarks and are
used only for identification and explanation without intent to infringe.
DOI: 10.1201/9780367425517
Publisher’s note: This book has been prepared from camera-ready copy provided by the authors.
Contents
Acknowledgments xiii
List of Figures xv
I Preliminary Matters 1
1 Preamble 3
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 About This Book . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 Presentation . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.2 Contents . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 One-Semester Course Material . . . . . . . . . . . . . . . . . 6
1.5 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 6
3 Computational Complexity 17
3.1 Arithmetic Complexity . . . . . . . . . . . . . . . . . . . . . 17
3.2 Asymptotic Notation . . . . . . . . . . . . . . . . . . . . . . 19
3.3 Intractability . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.4 Complexity Classes . . . . . . . . . . . . . . . . . . . . . . . 23
3.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 23
v
vi Contents
4 Algebra Review 29
4.1 Systems of Linear Inequalities in Two Variables – Geometric
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.2 Solving Systems of Linear Equations Using Linear Algebra . 33
4.2.1 Gauss-Jordan Elimination . . . . . . . . . . . . . . . . 33
4.2.2 Gaussian Elimination Compared with Gauss-Jordan
Elimination . . . . . . . . . . . . . . . . . . . . . . . . 35
4.3 Linear Algebra Basics . . . . . . . . . . . . . . . . . . . . . . 36
4.3.1 Matrices and Their Multiplication . . . . . . . . . . . 36
4.3.2 Identity Matrices, Inverses, and Determinants of
Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.3.3 Solving Systems of Linear Equations via Cramer’s Rule 44
4.3.4 Vector and Matrix Norms . . . . . . . . . . . . . . . . 45
4.3.5 Vector Spaces . . . . . . . . . . . . . . . . . . . . . . . 52
4.4 Matrix Properties Important to Optimization . . . . . . . . . 57
4.4.1 Eigenvalues . . . . . . . . . . . . . . . . . . . . . . . . 57
4.4.2 Unimodular Matrices . . . . . . . . . . . . . . . . . . . 58
4.5 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5 Matrix Factorization 66
5.1 LU Factorization . . . . . . . . . . . . . . . . . . . . . . . . 66
5.2 Cholesky Decomposition . . . . . . . . . . . . . . . . . . . . 69
5.3 Orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.4 Orthonormal Matrices . . . . . . . . . . . . . . . . . . . . . . 74
5.5 The Gram-Schmidt Process . . . . . . . . . . . . . . . . . . . 78
5.6 QR Factorization . . . . . . . . . . . . . . . . . . . . . . . . 80
5.7 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.8 For Further Study . . . . . . . . . . . . . . . . . . . . . . . . 83
5.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
II Linear Programming 85
6 Linear Programming 87
6.1 A Geometric Approach to Linear Programming in Two
Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6.1.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6.1.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.1.3 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . 92
Contents vii
28 Forecasting 404
28.1 Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
28.1.1 Exponential Smoothing . . . . . . . . . . . . . . . . . 405
28.1.2 Trends . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
28.1.3 Seasonality . . . . . . . . . . . . . . . . . . . . . . . . 406
28.2 Stationary Data and Differencing . . . . . . . . . . . . . . . 407
28.2.1 Autocorrelation . . . . . . . . . . . . . . . . . . . . . . 408
28.3 ARIMA Models . . . . . . . . . . . . . . . . . . . . . . . . . 409
28.3.1 Autoregressive Models . . . . . . . . . . . . . . . . . . 410
28.3.2 Moving Average Models . . . . . . . . . . . . . . . . . 411
28.3.3 ARIMA Model Structure . . . . . . . . . . . . . . . . 411
28.4 Partial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
xii Contents
Bibliography 433
Index 439
Acknowledgments
Also, to my immediate family for the support as I hid in the basement work-
ing on this book, and to my extended family – especially my parents – for
their hard work, sacrifice, and support through all the years in giving me a
great education and continually encouraging me along the way. You all have
optimized the quality of my life.
xiii
List of Figures
xv
xvi List of Figures
24.1 The Excel setup for Jamie’s SunLov’d Organic Oranges. . . 345
24.2 Excel’s SUMPRODUCT in Jamie’s SunLov’d Organic
Oranges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
24.3 Constraints in Jamie’s SunLov’d Organic Oranges. . . . . . 346
24.4 Optimal distribution for Jamie’s SunLov’d Organic Oranges. 347
22.1 Possible Edge Cuts in the Network N from Figure 22.2 . . . 308
22.2 Using DEKaFF to Find a First Augmenting Semipath in N
in Figure 22.2 . . . . . . . . . . . . . . . . . . . . . . . . . . 312
22.3 Vertex Labels from the First Run through Algorithm 22.3.1 315
22.4 Original Flow, Capacity and Augmentations on Edges in N
from the First Run Through Algorithm 22.3.1 . . . . . . . . 315
xix
xx List of Tables
xxi
List of Notation
xxiii
xxiv List of Notation
Preliminary Matters
1
Preamble
1.1 Introduction
As a subject, optimization can be admired because it reaches into many dif-
ferent fields. It borrows tools from statistics, computer science, calculus (anal-
ysis), numerical analysis, graph theory, and combinatorics as well as other
areas of mathematics. It has applications in economics, computer science and
numerous other disciplines as well as being incredibly useful outside academics
(this is an understatement!). Its techniques were at the heart of the first spam
filters, are used in self-driving cars, play a great role in machine learning and
can be used in such places as determining a batting order in a Major League
Baseball game. Additionally, it has seemingly limitless other applications in
business and industry. In short, knowledge of this subject offers an individual
both a very marketable skill set for a wealth of jobs as well as useful tools for
research in many academic disciplines.
1.2 Software
Even though much of this text has problems that rely on using a computer, I
have stayed away from emphasizing any one particular software. Microsoft’s
Excel is most often used as this is common in business, but Python and other
languages are considered. There are two reasons for this:
1. Software changes.
2. In a typical Introduction to Optimization class in the Mathematics Depart-
ment at the University of Pittsburgh, I get students from Mathematics,
Engineering, Economics, Computer Science, Statistics, and Business and
these students come to the class with different computer experience. I do
assign problems that involve using a computer, but I never require using
a particular software and this has been very rewarding; especially during
student presentations. The reason for this is we all get to experience the
DOI: 10.1201/9780367425517-1 3
4 Preamble
1.3.2 Contents
The structure of the text is such that most chapters and even some sections
can be read independently. A refresher, for example, on Taylor’s Theorem for
multivariable functions or a crash course on matrix factorization can be easily
done by finding the appropriate section in the text.
This text grew out of notes for the class Mathematical Models for Con-
sultants I taught three times for the Tepper School of Business at Carnegie
About This Book 5
Mellon University, Applied Optimization and Simulation, I have taught for the
Katz College of Business Administration at the University of Pittsburgh, and
my Introduction to Optimization class offered regularly in the Department
of Mathematics at the University of Pittsburgh. I have taught undergradu-
ate and graduate versions of the class more than a dozen times so far for
our department and have even had colleagues attend the course. In a typical
semester of my math class, I try to cover Linear Programming, Integer Linear
Programming, multiple Geometric Programming techniques, the Fundamental
Theorem of Linear Programming, transshipment problems, minimum-weight
spanning trees, shortest paths, and the Traveling Salesperson Problem as well
as some other topics based upon student interest. My goal for the math class
at Pitt is to provide a skill set so that our majors can get a job after gradu-
ating, but the course – as previously stated – has ended up attracting many
students with diverse backgrounds including Engineering, Computer Science,
Statistics, Economics, and Business. This mix of student interests explains the
structure of the text: a smorgasbord of topics gently introduced with deeper
matters addressed as needed. Students have appreciated sampling different
dishes from the buffet, and the ones that wanted to dig further were asked to
do a little research on their own and give a short presentation. Some extra
credit was used as the carrot to motivate them, but the true reward was much
greater. All of us in the audience were treated with learning something new,
but the student presenter’s true reward was the realization that they had the
ability to learn on their own (and show an employer that they can give a great
presentation). The educator in me has found this to be the most rewarding
of all the classes I teach; feeling that same satisfaction of watching my child
happily ride a bike for the first time.
As such, I would change nothing about the structure of this text. It prob-
ably has too much mathematics for some and not enough mathematics for
others, but that is exactly where I want the text to be. I have taught college
mathematics for over 30 years and taught a wide range of courses at differ-
ent levels. I receive many thank you cards, but I get the most from students
that took this course; usually because of the job they have secured because
of what they learned in this class. I have also had many students continue to
graduate school in a wide range of areas, but none more than in some version
of Optimization. Numerous students have obtained interesting jobs as well,
including working on self-driving cars, doing analysis for a professional sports
team, and being a contributing member of the discussion on how to distribute
the first COVID vaccine during the pandemic. In short, this approach to the
material has worked very well and given the subject’s utility, it is the right
time for an undergraduate-level survey text in the material. I hope you enjoy
the journey through the material as much as I and my students have.
6 Preamble
1.5 Acknowledgments
This book would not have been possible without significant contributions from
talented professionals with whom I have had the privilege to work in some ca-
pacity. I am quite pleased to share that most on this list are former optimiza-
tion students, and all of the contributors have written from their professional
Acknowledgments 7
DOI: 10.1201/9780367425517-2 9
10 The Language of Optimization
2.5
2.0
1.5
1.0
0.5
1 2 3 4 5
FIGURE 2.1
The graph of f (x) = x1 , where x > 0.
• global (or absolute) minimizer of f (x) over D if f (x∗ ) ≤ f (x) for all
x ∈ D;
• strict global (or absolute) minimizer of f (x) over D if f (x∗ ) < f (x) for
all x ∈ D with x ̸= x∗ ;
• local (or relative) minimizer of f (x) if there exists some positive number
ϵ such that f (x∗ ) ≤ f (x) for all x, where x∗ − ϵ ≤ x ≤ x∗ + ϵ;
• strict local (or relative) minimizer of f (x) if there exists some positive
number ϵ such that f (x∗ ) < f (x) for all x, where x∗ − ϵ < x < x∗ + ϵ with
x≠ x∗ .
The f (x∗ ) in the above is, respectively, the global (or absolute) minimum),
strict global minimum, local (or relative) minimum, or strict local (or rela-
tive) minimum of f (x) over D.
Note that the plural form of maximum is maxima and that the plural form
of minimum is minima. Together the local and global maxima and minima of
a function f (x) are referred to as extreme values or extrema of f (x). A single
maximum or minimum of f (x) is called an extreme value or an extremum of
the function.
We also note that the stated definitions of maximum and minimum are for
functions of a single variable, but the definitions2 are the same for a function
of n variables except that D ⊆ Rn and x∗ = ⟨x∗1 , . . . , x∗n ⟩ would replace x∗ .
we mean “finding the particular values of x that satisfy equation 2.1” (they
are −2 and 1). In another circumstance, we may be interested in what a lower
bound of the polynomial 2x2 + 2x + 5 is (this solution is 9/2 or anything
smaller).
But when solving an optimization problem, we always mean a little more
than just some numeric value. For example, consider the classic algebra prob-
lem of a farmer having 1000 feet of fence and wanting to know what is the
biggest area he can enclose with a rectangular pen for his livestock if he builds
the pen adjacent to his barn (big enough that he only needs fence on three
sides). If we label the side parallel to the barn y and the other two sides x,
then the mathematical model of our problem is
consider washing your hair. First you wet your hair, then you apply the sham-
poo and lather, and lastly you rinse. This process may be repeated as many
times as you wish to obtain the desired level of cleanliness (read your shampoo
bottle; it may have an algorithm written on it). In some sense, an algorithm
is a recipe that is repeated.
You may have noticed that we have not offered a formal definition of an
algorithm. We are going to avoid unnecessary formality and potential disputes
and not offer one all the while noting (modifying Justice Potter Stewart’s
words in Jacobellis v. Ohio:) “I may not know how what the definition of
an algorithm is, but I know one when I see it” (Justice Stewart was not
addressing algorithms; decency forbids me addressing the matter of that case).
It is worthwhile to note that the authoritative text on algorithms – Algorithms
[11] by Thomas H. Cormen, Charles E. Leiserson, Ronald Rivest, and Clifford
Stein – as well does not define the term algorithm anywhere in its 1312 pages.
Algorithms have been around for a long time. Perhaps in grade school you
learned the Sieve of Eratosthenes (circa 3rd century BCE) to find primes.
Given a finite list of integers, one circles 2 and crosses out all other multiples
of 2. We then proceed to the next available integer, 3, keep it, and cross out
all other multiples of 3. We repeat until every integer in our list is circled or
crossed out, and what remains are the primes that were in our list of numbers.
Algorithms will play a major role in techniques we study iterative methods
and combinatorial optimization.
The word algorithm has a fascinating origin. It comes from the La-
tinized (“Algorithmi”) version of the Persian name Muh.ammad ibn Mūsā
al-Khwārizmı̄ whose early 9th century CE book Al-kitāb al-mukhtas.ar fī h.isāb
al-ğabr wa’l-muqābala (“The Compendious Book on Calculation by Comple-
tion and Balancing”) is the first known systematic treatment of algebra as
an independent subject. Unlike other early works presenting specific problems
and their solution, Al-Khwārizmı̄’s work presents general solution techniques
for first- and second-order equations, including completing the square. Al-
Khwārizmı̄ can be regarded as the father of algebra, and it is from his text
we get the term “algebra” (interestingly, it is also from his name the Spanish
and Portuguese get their words for “digit”; see [64]).
Algorithms may produce a globally optimal solution, as we will see in
the Simplex Method to solve Linear Programming problems and as well in
Kruskal’s Algorithm or Prim’s Method to find minimum weight spanning trees
in a graph. On the other hand, an algorithm may not give a solution but under
the right conditions give a good approximation as in Newton’s Method.
A heuristic is a slightly different monster. A dictionary from before the
days of everyday people being familiar with computers would report that
“heuristic” is an adjective meaning “enabling a person to discover or learn
something for themselves” [15] or “by trial and error” [16]. These days, the
word is also regarded as a noun and is most likely shortened from “a heuristic
method”. When using it as a noun, we mean by heuristic a technique that
is employed when no method of obtaining a solution (either global or local)
14 The Language of Optimization
is known or a known technique takes too long. It is, in a very true sense, an
“educated guess”. Consider the Traveling Salesperson Problem (TSP) which
is introduced in Chapter 25. A salesperson needs to visit a collection of cities
and would like to know how to plan her route to minimize distance driven.
Unfortunately, there does not yet exist a deterministic-polynomial time al-
gorithm to solve this3 , nor is it known that it is impossible for one to exist
(P = N P anyone?), so she can instead do what seems like a good idea: drive
to the nearest city and when done with her business there, drive to the nearest
city not yet visited, etc. (this is the Nearest Neighbor Heuristic 4 that we will
see later).
terminate in a finite amount of time. Unfortunately, there are (n − 1)!/2 possible tours
(routes) on n cities, so with 10 cities there are 181,440 possible tours and 20 cities have
60,822,550,204,416,000 possible tours. Hence, though a brute force approach works, we may
not live long enough to see the end of the algorithm.
4 We are referencing specifically the algorithm for “solving” the TSP and not the unre-
2.7 Keywords
(strict) global or absolute maximizer/minimizer, (strict) local or relative max-
imizer/minimizer, maximum, minimum, infimum, supremum, solution to an
optimization problem, algorithm, heuristic, runtime, (computational) com-
plexity.
2.8 Exercises
Exercise 2.1. State the maximum, minimum, infimum, and supremum (if
they exist) of each of the following sets:
i) A = {8, 6, 7, 5, 3, 0, 9},
ii) B = [a, b), where a, b ∈ R,
iii) C = the range of f (x) = 1/(1 − x), where x ̸= 1,
iv) D = the range of g(x) = 1/(1 − x)2 , where x ̸= 1,
n
v) E = {1 + (−1)n }, where n is a positive integer,
vi) F = the set of prime numbers.
Exercise 2.2. Let f : Rn → R and x∗ = ⟨x∗1 , . . . , x∗n ⟩ ∈ Rn . Show f (x∗ ) is a
maximum of f if and only if −f (x∗ ) is a minimum of −f .
Exercise 2.3. Suppose s1 and s2 are suprema of some set S ⊂ R. Prove
s1 = s2 , thus establishing that the supremum of a set is unique (obviously, a
very similar proof shows that, if it exists, the infimum of a set is also unique).
16 The Language of Optimization
−2 3 5 7 −2 3 5 7
2R1 +R2 →R2
4 −3 −8 −14 −−−−−−−−→ 0 3 2 0 (3.1)
3R1 +R3 →R3
6 0 −7 −15 0 9 8 6
−2 3 5 7
−3R +R →R3
−−−−2−−−3−−−→ 0 3 2 0 (3.2)
0 0 2 6
We may continue row operations to get the matrix in reduced row echelon
form, but this is computationally expensive1 , so we instead back substitute:
2x3 = 6, so x3 = 3; (3.3)
3x2 + 2(3) = 0, thus x2 = −2; and (3.4)
−2x1 + 3(−2) + 5(3) = 7, hence x1 = 1. (3.5)
The process of reducing the matrix but stopping short of reaching reduced row
echelon form and using back substitution is usually referred to as Gaussian
elimination.
1 A good lesson to carry with us as we explore the topics in this text is that it is not
always best for a computer to do a problem the same way you and I would solve it on paper.
This matter is briefly discussed at the beginning of Section 5.
DOI: 10.1201/9780367425517-3 17
18 Computational Complexity
7 2n3 7
= n3 (3.17)
2 3 3
< n4 for n ≥ 3. (3.18)
2 The reason for this is that using Cholesky Decomposition (Chapter 5) to solve a system
3
of linear equations is O( n3 ); i.e. twice as fast as Gaussian elimination.
Intractability 21
and taking C = N = 1 we see that the sum of the first n positive integers is
O(n2 ).
Example 3.2.5. Let n ∈ Z+ . Then
n factors
n! := n(n − 1)(n − 2) · · · 3 · 2 · 1 ≤ n · n · n · · · · · n = nn
z }| {
(3.20)
3.3 Intractability
Some problems we will encounter will have solutions that can be reached in
theory, but take too much time in practice, are said to be intractable. Con-
versely, any problem that can be solved in practice is said to be tractable; that
is, “easily worked” or “easily handled or controlled” [16]. The bounds between
3 The interested reader is encouraged to read the appropriate sections in [11] or [48].
22 Computational Complexity
80
x!=O(x^x)
60
40 2^x
x^2
xlog(x)
20 x
log(x)
c=O(1)
FIGURE 3.1
The growth of functions.
these two are not clearly defined and depend on the situation. Though the dis-
cipline lacks a precise definition of both tractable and intractable, their usage
is standard and necessary for many situations encountered in Optimization.
For an example, let us revisit using Gauss-Jordan elimination as was con-
sidered in Section 3.1. Oak Ridge National Laboratory unveiled in 2018 its
supercomputer Summit capable of 122.3 petaflops (122.3 × 1015 ) calculations
per second. Without worrying about the details, let us assume a good PC can
do 100,000,000,000 = 1011 calculations per second (this is a little generous).
By our work in Section 3.1, to perform Gaussian elimination on a matrix with
106 rows (i.e. a system of equations with 106 variables) it would take Summit
2
(106 )3 /122.3 × 1015 ≈ 5.45 seconds. (3.21)
3
On a good PC this would take
2
(106 )3 /1011 /86400 seconds per day ≈ 77 days. (3.22)
3
Note that these calculation are not exact as we have not consider calls to
memory, etc., but they do illustrate the point.
Spending 77 days to solve a problem is a nuisance, but not an insur-
mountable situation. Depending on the practice one would have to decide if
this amount of time makes the problem intractable or not. But Gauss-Jordan
elimination is a polynomial time algorithm, so to better illustrate this point
let us now assume we have a program that runs in exponential time; say one
that has as its runtime 2n . For n = 100 (considerably less than 1,000,000) this
Complexity Classes 23
We will not even consider how long this would take on a good PC. If we
consider a system with n = 103 variables, the runtime on Summit becomes
2.7 × 10276 years which is 2 × 10266 times the age of the universe.
We will close this section by noting that most computer security depends
on intractability. The most used public key encryption scheme is known as
RSA encryption. This encryption scheme uses a 400 digit number that is
known to be the product of two primes and it works well since currently
factoring algorithms for a number this large are intractable4 . The intractability
of this problem will most likely change with quantum computing.
integers, we know little about them, especially how many there are in (large) intervals and
where they reside.
Random documents with unrelated
content Scribd suggests to you:
8.—Beside No. 7, but more in the center of the back of the head.
Whenever this area is properly developed, it shows that the
possessor would make an admirable husband or wife. He or she
would be devoted, loyal and attentive.
If the area is over-developed, the possessor has a jealous
disposition; if under-developed, he or she is fickle and apt to flirt
with others.
9.—Beside No. 8, in the center of the back of the head, low down.
Should this area be well developed, it shows that the possessor has
a proper love and regard for children and that he thinks no person
has experienced the fullest joys of life who has not become a parent.
If this area is over-developed, the possessor thinks so much of
children that he spoils them; if it is under-developed, he is of the
type that "cannot stand them at any price."
HOW ASTROLOGY DECIDES YOUR
DESTINY
Astrology is one of the oldest sciences in the world. It is said to have
originated with the Egyptians, almost at the very beginning of time.
Indeed, it is almost impossible to trace a period when this science
was not practiced.
There is nothing new under the sun, and its close followers will
scarcely allow any errors in its deductions. They go so far as to
declare it to be an exact science, a term which means that
everything can be reasoned out and proved; nothing is left to
guesswork.
Such sciences are Mathematics, Algebra, and Geometry. We need
not believe that Astrology is all this, but certainly some very startling
and accurate predictions have been made by astrologers.
However, as in all other methods of fortunetelling attempted by us
mortals, it is far from infallible. So long as we do not take it to be
exact and sure, we shall get plenty of amusement and interest from
its study, with the exciting feeling all the time at the back of our
minds that "it might come true."
Here is a list giving you the names and meanings given to planets by
astrologers.
Mars. Strength.
Venus. Beauty.
Mercury. Capacity for adapting oneself.
Uranus. Improvement.
Sun. Life.
Jupiter. Freedom and growth.
Saturn. Diminished—shrinking—lack of growth.
Neptune. Able to receive—receptive.
Earth. Physical—not spiritual.
The Moon. Feeling.
The main idea at the back of astrology is that the planets (or starry
bodies which revolve round the sun) each have a strong and varying
influence upon the minds of human beings.
THE ZODIAC.—Of course when the planets revolve round the sun
they travel through a course or path. The Zodiac is the name given
by astronomers to the boundary which encloses this course or path
in the sky.
The signs of the Zodiac are the spaces into which the Zodiac is
divided.
Here are the signs of the Zodiac arranged in order to show which
signs are opposite to each other.
Now each sign has a planet which is said to rule it; this is called the
ruling planet. It is from the nature of this planet that the probable
character and fate of the individual are told. It is not necessary to
know the whys and wherefores of this, if you have not studied
astronomy it will only serve to muddle you, and if, on the other
hand, you do understand astronomy you will not need any
explanation. We will just say what does happen, and that will tell
you all you need in these first steps.
Well, we all know that the earth revolves upon its axis once in every
24 hours. Now, according to astronomers, this causes one of the
Zodiac signs to appear in the eastern sky, where it remains for two
hours. We have said that each sign has a planet ruling it, so the sign
that appears on the sky at the time of birth decides what planet that
person is born under or is influenced by.
Let us suppose for a moment that you were born when the sign
Libra was rising, as the saying is. The planet which rules Libra is
Venus, so the person born at that time would be a Venus type, i.e., a
person having the influence of Venus upon him.
In addition to the main ruling planet, astrologers will tell you that
there are other "neighboring" planets—we will call them neighboring
because it is a simple term—which also have their effect upon us.
Astrologers call this one planet being "in aspect" with another. For
instance, you might have the planet Mars in aspect with (or
influenced by) the planet Saturn; you would then be dealing with a
very strong character.
The qualities of Mars which give the fighter and the pushing type, or
in excess the bully, will be well steadied by the qualities of Saturn,
which by themselves give coldness and, in excess, lack of feeling.
The two together result in a character remarkable for its steadiness
combined with its never-wearying energy and good balance.
So you see, we seldom find pure types (i.e., qualities of Mars, or
other planets by themselves), and it is very fortunate that this is so;
we should get a very one-sided world if we did.
Now we come to that part of Astrology which really interests most
people; here will be shown the birth-dates for each month in the
year and the probable characters of persons born at that special
time. You may ask why the characters are given and why not the
fate or future of the person concerned. The reason is this: you can
be pretty sure that what you read of an individual's character will
give you a sound idea of what in all probability his future will be.
After all, the carving out of our lives is in our own hands. We are the
masters of our fate, or as the song has it, "Captain of our Soul."
However, if we believe astrologers, there is a way to tell the times of
our lives when matters should go smoothly or the reverse. The most
favorable times for speculating with money, starting in business, in
fact, the most and least favorable periods of our lives can, according
to astrology, be worked out by what is known as the Horoscope.
Now this Horoscope is in reality a chart of your life. The rocky waters
are shown, and the barrier reefs which each of us must avoid
through our life, so you will see a use in the study of astrology. It
would seem to be Nature's warning to us all of the necessity for
effort, effort and again effort.
Here are the birth dates and characteristics of persons born between
the dates mentioned. Since astrology is not infallible, do not take all
these characteristics too seriously.
You will notice that each date is taken from about the 20th of one
month to the 20th of the next month.
ebookbell.com