Introduction to Linear Programming with MATLAB 1st Edition Shashi Kant Mishra instant download
Introduction to Linear Programming with MATLAB 1st Edition Shashi Kant Mishra instant download
https://textbookfull.com/product/introduction-to-linear-
programming-with-matlab-1st-edition-shashi-kant-mishra/
https://textbookfull.com/product/numerical-linear-algebra-a-
concise-introduction-with-matlab-and-julia-folkmar-bornemann/
https://textbookfull.com/product/linear-programming-using-matlab-
springer-optimization-and-its-applications-127-ploskas/
https://textbookfull.com/product/linear-algebra-and-matrix-
computations-with-matlab-1st-edition-dingyu-xue/
https://textbookfull.com/product/matlab-a-practical-introduction-
to-programming-and-problem-solving-stormy-attaway/
MATLAB A Practical Introduction to Programming and
Problem Solving Stormy Attaway
https://textbookfull.com/product/matlab-a-practical-introduction-
to-programming-and-problem-solving-stormy-attaway-2/
https://textbookfull.com/product/introduction-to-programming-
with-c-1st-edition-nhce/
https://textbookfull.com/product/introduction-to-programming-
with-fortran-chivers/
https://textbookfull.com/product/multiobjective-linear-
programming-an-introduction-1st-edition-dinh-the-luc-auth/
https://textbookfull.com/product/introduction-to-programming-
with-fortran-ian-chivers/
Introduction to
LINEAR PROGRAMMING
with MATLAB®
Introduction to
LINEAR PROGRAMMING
with MATLAB®
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been
made to publish reliable data and information, but the author and publisher 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 storage or retrieval system, without written
permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.com
(http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive,
Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for
a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of
payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only
for identification and explanation without intent to infringe.
Foreword vii
Preface ix
List of Figures xi
1 Introduction 1
2.1 Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Linear Equations . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.4 Matrix Inversion . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3 MATLAB 21
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Basic Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 Basic Operations in MATLAB . . . . . . . . . . . . . . . . . 22
3.4 Selection Statements and Loop Statements . . . . . . . . . . 31
3.5 User-Defined Function . . . . . . . . . . . . . . . . . . . . . . 36
3.6 MATLAB Functions Defined in This Book . . . . . . . . . . 38
3.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.2 Simple Examples of Linear Programs . . . . . . . . . . . . . 45
4.3 Convex Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.4 Graphical Solution of Linear Programming Problem . . . . . 52
4.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
v
vi Contents
7 Duality 175
Bibliography 309
Index 311
Foreword
vii
viii Foreword
Sy-Ming Guu
Professor,
Graduate Institute of Business and Management
Dean, College of Management,
Chang Gung University,
Taoyuan, Taiwan
Ph.D. in Operations Research,
Stanford University
Preface
ix
x Preface
xi
List of Tables
xiii
Chapter 1
Introduction
1
2 Introduction to LINEAR PROGRAMMING with MATLAB R
2.1 Vector
An n vector is a column array of n numbers, denoted as
a1
a2
a= ... .
(2.1)
an
The number ai is called the ith component of the vector a. For
1
example, a = 2 is a column vector of size n = 3. Similarly, an
−3
n vector is a row vector of n numbers as
a = a1 a2 . . . an . (2.2)
For example, a = 1 2 −3 is a row vector of size n=3. We
denote R as the set of real numbers and Rn is the set of col-
umn or row n-vectors with real components. We can say Rn as
n-dimensional real vector space. We can denote the vectors by
lowercase letters such as a, b, c, etc. The components of a ∈ Rn
are denoted as a1 , a2 , . . . , an .
The transpose (denoted as T ) of a given column vector (2.1) is a
row vector (2.2). Therefore, we can write
T
a1
a2
. = a1 a2 . . . an .
..
an
5
6 Introduction to LINEAR PROGRAMMING with MATLAB R
a1
T a2
a1 a2 . . . an =
... ,
an
that is
a1
a2
aT =
... .
an
Note that the set of all row vectors forms a vector space called
“row space”, similarly the set of all column vectors forms a vector
space called “column space”.
A vector space V is a collection of vectors, which is closed under
the operations of addition of two vectors a, b ∈ V , and multiplica-
tion by a scalar, α ∈ R, then the following properties hold:
1. Commutativity of vector addition: for vectors a, b ∈ V
a + b = b + a.
Definition
2.2 (Linearly Dependent). A set of the vectors S =
a1 , a2 , . . . , ak is said to be linearly dependent if there exists co-
efficients αi ∈ R, where i = 1, 2, . . . , k not all of which are zero
such that α1 a1 + α2 a2 + · · · + αk ak = 0.
1 1
Example 2.2. Show that the vectors a1 = 2 , a2 = −1, and
1 2
3
a3 = 3 are linearly dependent.
4
The vectors a1 , a2 , a3 are linearly dependent because 2a1 + a2 −
a3 = 0, where αi 6= 0, i.e., α1 = 2, α2 = 1, and α3 = −1.
Theorem 2.1. A set of vectors a1 , a2 , . . . , ak is linearly depen-
dent if and only if one of the vectors ai from the set is a linear
combination of the remaining vectors.
Proof. Using definition (2.2), since a1 , a2 , . . . , an is linearly de-
pendent, there exists coefficients αi ∈ R, not all zero such that
α1 a1 + · · · + αi ai + · · · + αk ak = 0. (2.3)
2.2 Matrix
A matrix is a rectangular array of numbers, commonly denoted
by uppercase bold letters (e.g., A,B, etc.). A matrix with m rows
and n columns is called an m × n matrix, and we write
a11 a12 . . . a1n
a21 a22 . . . a2n
A= ... .. .. .. .
. . .
am1 am2 . . . amn
The real number, aij , located in the ith row and j th column is called
the (i, j)th entry. We can think of A in terms of its n columns, each
of which is a column vector in Rm . Alternatively, we can think of
A in terms of its m rows, each of which is a row n-vector. The
transpose of matrix A, denoted as AT , is the n × m matrix.
a11 a21 . . . am1
a12 a22 . . . am2
AT =
... .. . . .. .
. . .
a1n a2n . . . amn
We see that columns of A are the rows of AT and vice versa.
Note that the symbol Rm×n denotes the set of m × n matrices
whose entries are real numbers. We treat column vectors in Rn as
elements of Rn×1 . Similarly, we treat row n-vectors as elements of
R1×n .
A = [a1 , a2 , . . . , an ].
Consider the m × n matrix
a11 a21 . . . am1
a12 a22 . . . am2
A=
... .. ... .. .
. .
a1n a2n . . . amn
We can apply elementary row operations in the matrix A to get
the matrix in reduced form.
2x + 6y = −11,
6x + 20y − 6z = − 3,
6y − 18z = − 1.
R2 → R2 − 3R1
2 6 0 −11
0 2 −6 30
0 6 −18 −1
Exploring the Variety of Random
Documents with Different Content
Dieu lui-même, Dieu sort de son profond repos.
Ver. 149. We, wretched subjects, &c.] St. Paul himself did not choose
to employ other arguments, when disposed to give us the highest
idea of the usefulness of christianity (Rom. vii.) But it may be, the
poet finds a remedy in natural religion. Far from it. He here leaves
reason unrelieved. What is this, then, but an intimation that we
ought to seek for a cure in that religion, which only dares profess to
give it?
Ver. 163. 'Tis hers to rectify, &c.] The meaning of this precept is,
That as the ruling passion is implanted by nature, it is reason's office
to regulate, direct, and restrain, but not to overthrow it. To reform
the passion of avarice, for instance, into a parsimonious dispensation
of the public revenues: to direct the passion of love, whose object is
worth and beauty,
the το καλον τ' αγαθον, as his master Plato advises; and to restrain
spleen to a contempt and hatred of vice. This is what the poet
meant, and what every unprejudiced man could not but see he must
needs mean, by rectifying the master passion, though he had not
confined us to this sense, in the reason he gives of his precept in
these words:
A mightier pow'r the strong direction sends,
And several men impels to several ends;
for what ends are they which God impels to, but the ends of virtue?
Ver. 175. Th' eternal art, &c.] The author has, throughout these
epistles, explained his meaning to be that vice is, in its own nature,
the greatest of evils, and produced through the abuse of man's free
will:
but that God in his infinite goodness, deviously turns the natural bias
of its malignity to the advancement of human happiness. A doctrine
very different from the Fable of the Bees, which impiously and
foolishly supposes it to have that natural tendency.
Ver. 204. The god within the mind.] A Platonic phrase for
conscience; and here employed with great judgment and propriety.
For conscience either signifies, speculatively, the judgment we pass
of things upon whatever principles we chance to have, and then it is
only opinion, a very unable judge and divider; or else it signifies,
practically, the application of the eternal rule of right (received by us
as the law of God) to the regulation of our actions; and then it is
properly conscience, the god (or the law of God) within the mind, of
power to divide the light from the darkness in this Chaos of the
passions.
Now, of all men, those in adversity have least needs of this caution,
as being least apt to forget, that God consults the good of the
whole, and provides for it by procuring mutual happiness by means
of mutual wants; it being seen that such who yet retain the smart of
any fresh calamity, are most compassionate to others labouring
under distresses, and most prompt and ready to relieve them.
Ver. 9. See plastic nature, &c.] M. du Resnel mistook this description
of the preservation of the material universe, by the quality of
attraction, for a description of its creation; and so translates it
Ver. 45. See all things for my use!] On the contrary, the wise man
hath said, "The Lord hath made all things for himself." Prov. xvi. 4.
Ver. 50. Be man the wit and tyrant of the whole:] Alluding to the
witty system of that philosopher,[1596] which made animals mere
machines, insensible of pain or pleasure; and so encouraged men in
the exercise of that tyranny over their fellow-creatures, consequent
on such a principle.
Ver. 152. Man walked with beast, joint tenant of the shade;] The
poet still takes his imagery from Platonic ideas, for the reason given
above. Plato had said, from old tradition, that, during the golden
age, and under the reign of Saturn, the primitive language then in
use was common to man and beasts. Moral instructors took
advantage of the popular sense of this tradition, to convey their
precepts under those fables which gave speech to the whole brute
creation. The naturalists understood the tradition in the contrary
sense, to signify, that, in the first ages, men used inarticulate
sounds, like beasts, to express their wants and sensations; and that
it was by slow degrees they came to the use of speech. This opinion
was afterwards held by Lucretius, Diodorus Sic., and Gregory of
Nyss.
Ver. 156. All vocal beings, &c.] This may be well explained by a
sublime passage of the Psalmist, who, calling to mind the age of
innocence, and full of the great ideas of those
Chains of love
Combining all below and all above,
Which to one point, and to one centre bring,
Beast, man, or angel, servant, lord, or king;
breaks out into this rapturous and divine apostrophe, to call back the
devious creation to its pristine rectitude; that very state our author
describes above: "Praise the Lord, all his angels; praise ye him, all
his hosts. Praise ye him, sun and moon; praise him, all ye stars of
light," &c. Psalm cxlviii.
Ver. 158. Unbribed, unbloody, &c.] i.e. the state described from ver.
263 to 269 was not yet arrived. For then, when superstition was
become so extreme as to bribe the gods with human sacrifices,
tyranny became necessitated to woo the priest for a favourable
answer.
Ver. 159. Heav'n's attribute, &c.] The poet supposeth the truth of the
Scripture account, that man was created lord of this inferior world
(Ep. i. ver. 230).
Subjected these to those, and all to thee.
What hath misled some to imagine that our author hath here fallen
into a contradiction, was, I suppose, such passages as these, "Ask
for what end the heav'nly bodies shine," &c.; and again, "Has God,
thou fool! worked solely for thy good," &c. But, in truth, this is so far
from contradicting what he had said of man's prerogative, that it
greatly confirms it, and the Scripture account concerning it. And
because the licentious manner in which this subject has been
treated, has made some readers jealous and mistrustful of the
author's sober meaning, I shall endeavour to explain it. Scripture
says, that man was made lord of this sublunary world. But
intoxicated with pride, the common effect of sovereignty, he erected
himself, like little partial monarchs, into a tyrant. And as tyranny
consists in supposing all made for the use of one, he took those
freedoms with all, which are the consequence of such a principle. He
soon began to consider the whole animal creation as his slaves
rather than his subjects, as created for no use of their own, but for
his use only, and therefore treated them with the utmost cruelty;
and not content, to add insult to his cruelty, he endeavoured to
philosophize himself into an opinion that these animals were mere
machines, insensible of pain or pleasure. Thus man affected to be
the wit as well as tyrant of the whole. So that it became one who
adhered to the Scripture account of man's dominion to reprove this
abuse of it, and to show that
turns from those times, to a view of these latter ages, and breaks
out into this tender and humane complaint,
Here you have one of the finest pieces of reasoning turned at once
into a heap of nonsense. The unlucky term of "Great first Father,"
was mistaken by our translator to signify a "great grandfather." But
he should have considered, that Mr. Pope always represents God
under the idea of a Father. He should have observed, that the poet is
here describing those men who
The ancient pagan gods are here very exactly described. This fact
evinceth the truth of that original, which the poet gives to
superstition; for if these phantasms were first raised in the
imagination of tyrants, they must needs have the qualities here
assigned to them. For force being the tyrant's virtue, and luxury his
happiness, the attributes of his god would of course be revenge and
lust; in a word, the antitype of himself. But there was another, and
more substantial cause, of the resemblance between a tyrant and a
pagan god; and that was the making gods of conquerors, as the
poet says, and so canonizing a tyrant's vices with his person. That
these gods should suit a people humbled to the stroke of a master
will be no wonder, if we recollect a generous saying of the ancients,
—"that day which sees a man a slave takes away half his virtue."
Ver. 262. and heav'n on pride.] This might be very well said of those
times when no one was content to go to heaven without being
received there on the footing of a god, with a ceremony of an
Αποθεωσις.
Ver. 283. 'Twas then, the studious head, &c.] The poet seemeth here
to mean the polite and nourishing age of Greece; and those
benefactors to mankind, which he had principally in view, were
Socrates and Aristotle; who, of all the pagan world, spoke best of
God, and wrote best of government.
Ver. 295. Such is the world's great harmony, &c.] A harmony very
different from the pre-established harmony of the celebrated
Leibnitz, which introduceth a fatality destructive of all religion and
morality. Yet hath the learned M. de Crousaz ventured to accuse our
poet of espousing that dangerous whimsy. The pre-established
harmony was built upon, and is an outrageous extension of a
conception of Plato, who, combating the atheistical objections about
the origin of evil, employs this argument in defence of Providence:
"That amongst an infinite number of possible worlds in God's idea,
this which he hath created and brought into being, and which admits
of a mixture of evil, is the best. But if the best, then evil
consequently is partial, comparatively small, and tendeth to the
greater perfection of the whole." This principle is espoused and
supported by Mr. Pope with all the power of reason and poetry. But
neither was Plato a fatalist, nor is there any fatalism in the
argument. As to the truth of the notion, that is another question;
and how far it cleareth up the very difficult controversy about the
origin of evil, is still another. That it is a full solution of the difficulty,
I cannot think, for reasons too long to be given in this place.
Perhaps we shall never have a full solution here, and it may be no
great matter though we have not, as we are demonstrably certain of
the moral attributes of the Deity. Yet this will never hinder writers
from exposing themselves on this subject. A late author[1597] thinks
he can account for the origin of evil, and therefore he will write: he
thinks too, that the clearing up this difficulty is necessary to secure
the foundation of religion, and therefore he will print. But he is
doubly mistaken: he must know little of philosophy to fancy that he
has found the solution; and still less of religion, to imagine that the
want of his solution can affect our belief in God. Such writers
But the reader will not be displeased to see the poet's own apology,
as I find it written in the year 1740, in his own hand, in the margin
of a pamphlet, where he found these two celebrated lines very much
misapplied: "The author of these lines was far from meaning that no
one form of government is, in itself, better than another, (as, that
mixed or limited monarchy, for example, is not preferable to
absolute), but that no form of government, however excellent or
preferable, in itself, can be sufficient to make a people happy, unless
it be administered with integrity. On the contrary, the best sort of
government, when the form of it is preserved, and the
administration corrupt, is most dangerous."
II. Again, to suppose the poet to mean, that all religions are
indifferent, is an equally wrong, as well as uncharitable suspicion.
Mr. Pope, though his subject, in this Essay on Man, confineth him to
natural religion, his purpose being to vindicate God's natural
dispensations to mankind against the atheist, yet he giveth frequent
intimations of a more sublime dispensation, and even of the
necessity of it, particularly in his second Epistle, ver. 149, &c., where
he confesseth the weakness and insufficiency of human reason. And
likewise in his fourth Epistle, where, speaking of the good man, the
favourite of heaven, he saith,
But natural religion never lengthened hope on to faith; nor did any
religion, but the christian, ever conceive that faith could fill the mind
with happiness. Lastly, In this very Epistle, and in this very place,
speaking of the great restorers of the religion of nature, he intimates
that they could only draw God's shadow, not his image:
i.e. a general law always determines the first cause: which is the
very Fate of the ancient pagans; who supposed that the destinies
gave law to the father of gods and men. The poet says again, soon
after, ver. 49, "Order is heaven's first law," i. e. the first law made by
God relates to order, which is a beautiful allusion to the Scripture
history of the creation, when God first appeased the disorders of
chaos, and separated the light from the darkness. Let us now hear
his translator:
L'ordre, cet inflexible et grand législateur,
Qui des décrets du ciel est le premier auteur.
Order, that inflexible and grand legislator, who is the first author of
the law of heaven. A proposition abominable in most senses; absurd
in all.
Ver. 79. Reason's whole pleasure, &c.] This is a beautiful periphrasis
for happiness; for all we feel of good is by sensation and reflection.
But the translator, who seemed little to concern himself with the
poet's philosophy or argument, mistook this description of happiness
for a description of the intellectual and sensitive faculties, opposed
to one another, and therefore turns it thus,
And so, with the highest absurdity, not only makes the poet
constitute sensual excesses a part of human happiness, but likewise
the product of virtue.
Ver. 82. And peace, &c.] Conscious innocence, says the poet, is the
only source of internal peace; and known innocence, of external;
therefore, peace is the sole issue of virtue, or, in his own emphatic
words, peace is all thy own; a conclusive observation in his
argument; which stands thus: Is happiness rightly placed in
externals? No; for it consists in health, peace, and competence;
health and competence are the product of temperance; and peace,
of perfect innocence.
Ver. 100. See god-like Turenne] This epithet has a peculiar justness,
the great man to whom it is applied not being distinguished from
other generals, for any of his superior qualities, so much as for his
providential care of those whom he led to war, in which he was so
intent, that his chief purpose in taking on himself the command of
armies, seems to have been the preservation of mankind. In this
god-like care he was more remarkably employed throughout the
whole course of that famous campaign in which he lost his life.
Ver. 110. Lent heav'n a parent, &c.] This last instance of the poet's
illustration of the ways of Providence, the reader sees has a peculiar
elegance, where a tribute of piety to a parent is paid in return of
thanks to, and made subservient of his vindication of, the great Giver
and Father of all things. The mother of the author, a person of great
piety and charity, died the year this poem was finished, viz. 1733.
Ver. 121. Think we, like some weak prince, &c.] Agreeable hereunto,
Holy Scripture, in its account of things under the common
Providence of heaven, never represents miracles as wrought for the
sake of him who is the object of them, but in order to give credit to
some of God's extraordinary dispensations to mankind.
Ver. 123. Shall burning Etna, &c.] Alluding to the fate of those two
great naturalists, Empedocles and Pliny, who both perished by too
near an approach to Etna and Vesuvius, while they were exploring
the cause of their eruptions.
Ver. 142. After ver. 142 in some editions:
The joke, though lively, was ill placed, and therefore struck out of
the text.
Ver. 177. Go, like the Indian, &c.] Alluding to the example of the
Indian, in Epist. i. ver. 99, which shows, that that example was not
given to discredit any rational hopes of future happiness, but only to
reprove the folly of separating them from charity, as when
Zeal, not charity, became the guide,
And hell was built on spite, and heav'n on pride.
Ver. 219. Heroes are much the same, &c.] This character might have
been drawn with greater force; and deserved the poet's care. But
Milton supplies what is here wanting.
Ver. 222. an enemy of all mankind!] Had all nations, with regard to
their heroes, been of the humour with the Normans, who called
Robert II., the greatest of their Dukes, by the name of Robert the
Devil, the races of heroes might have been less numerous, or,
however, less mischievous.
Ver. 267. Painful pre-eminence, &c.] This, to his friend, nor does it at
all contradict what he had said to him concerning happiness, in the
beginning of the Epistle:
'Tis never to be bought, but always free,
And fled from monarchs, St. John! dwells with thee.
Ver. 309. Know then this truth, enough for man to know,
"Virtue alone is happiness below."]
M. du Resnel translates the line thus:
4. A splendid diction:
5. And fifthly, which includes in itself all the rest, a weight and
dignity in the composition:
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com