0% found this document useful (0 votes)
2 views

Introduction to Computational Models with Python 1st Edition Jose M. Garrido pdf download

The document is a promotional overview for the book 'Introduction to Computational Models with Python' by José M. Garrido, which is part of the Chapman & Hall/CRC Computational Science Series. It includes links to various related titles and outlines the structure of the book, covering topics such as problem solving, programming principles, and data structures. The book aims to provide foundational knowledge in computational modeling using Python.

Uploaded by

pongdhembo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Introduction to Computational Models with Python 1st Edition Jose M. Garrido pdf download

The document is a promotional overview for the book 'Introduction to Computational Models with Python' by José M. Garrido, which is part of the Chapman & Hall/CRC Computational Science Series. It includes links to various related titles and outlines the structure of the book, covering topics such as problem solving, programming principles, and data structures. The book aims to provide foundational knowledge in computational modeling using Python.

Uploaded by

pongdhembo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Introduction to Computational Models with Python

1st Edition Jose M. Garrido pdf download

https://ebookname.com/product/introduction-to-computational-
models-with-python-1st-edition-jose-m-garrido/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Introduction to Probability Models 11th Edition Sheldon


M. Ross

https://ebookname.com/product/introduction-to-probability-
models-11th-edition-sheldon-m-ross/

Complex Adaptive Systems An Introduction to


Computational Models of Social Life John H. Miller

https://ebookname.com/product/complex-adaptive-systems-an-
introduction-to-computational-models-of-social-life-john-h-
miller/

Introduction to probability models 9th ed Edition


Sheldon M. Ross

https://ebookname.com/product/introduction-to-probability-
models-9th-ed-edition-sheldon-m-ross/

The Arab Americans A History Gregory Orfalea

https://ebookname.com/product/the-arab-americans-a-history-
gregory-orfalea/
Hydrogen Energy for Beginners 1st Edition Alexander
Gavrilyuk

https://ebookname.com/product/hydrogen-energy-for-beginners-1st-
edition-alexander-gavrilyuk/

Who s Who in the Arab World 2007 2008 18th Edition


Publitec Publications (Editor)

https://ebookname.com/product/who-s-who-in-the-arab-
world-2007-2008-18th-edition-publitec-publications-editor/

Chemical Weapons Convention Chemicals Analysis Sample


Collection Preparation and Analytical Methods 1st
Edition Markku Mesilaakso

https://ebookname.com/product/chemical-weapons-convention-
chemicals-analysis-sample-collection-preparation-and-analytical-
methods-1st-edition-markku-mesilaakso/

Of myth life and war in Plato s Republic 1ST Edition


Claudia Baracchi

https://ebookname.com/product/of-myth-life-and-war-in-plato-s-
republic-1st-edition-claudia-baracchi/

Elementary cryptanalysis 2nd ed Edition Sinkov

https://ebookname.com/product/elementary-cryptanalysis-2nd-ed-
edition-sinkov/
Marginal gains monetary transactions in Atlantic Africa
1st Edition Jane I. Guyer

https://ebookname.com/product/marginal-gains-monetary-
transactions-in-atlantic-africa-1st-edition-jane-i-guyer-2/
INTRODUCTION TO
Computational
Models with
Python
Chapman & Hall/CRC
Computational Science Series
SERIES EDITOR

Horst Simon
Deputy Director
Lawrence Berkeley National Laboratory
Berkeley, California, U.S.A.

PUBLISHED TITLES

COMBINATORIAL SCIENTIFIC COMPUTING


Edited by Uwe Naumann and Olaf Schenk
CONTEMPORARY HIGH PERFORMANCE COMPUTING: FROM PETASCALE
TOWARD EXASCALE
Edited by Jeffrey S. Vetter
CONTEMPORARY HIGH PERFORMANCE COMPUTING: FROM PETASCALE
TOWARD EXASCALE, VOLUME TWO
Edited by Jeffrey S. Vetter
DATA-INTENSIVE SCIENCE
Edited by Terence Critchlow and Kerstin Kleese van Dam
THE END OF ERROR: UNUM COMPUTING
John L. Gustafson
FUNDAMENTALS OF MULTICORE SOFTWARE DEVELOPMENT
Edited by Victor Pankratius, Ali-Reza Adl-Tabatabai, and Walter Tichy
THE GREEN COMPUTING BOOK: TACKLING ENERGY EFFICIENCY AT LARGE SCALE
Edited by Wu-chun Feng
GRID COMPUTING: TECHNIQUES AND APPLICATIONS
Barry Wilkinson
HIGH PERFORMANCE COMPUTING: PROGRAMMING AND APPLICATIONS
John Levesque with Gene Wagenbreth
HIGH PERFORMANCE PARALLEL I/O
Prabhat and Quincey Koziol
HIGH PERFORMANCE VISUALIZATION:
ENABLING EXTREME-SCALE SCIENTIFIC INSIGHT
Edited by E. Wes Bethel, Hank Childs, and Charles Hansen
INDUSTRIAL APPLICATIONS OF HIGH-PERFORMANCE COMPUTING:
BEST GLOBAL PRACTICES
Edited by Anwar Osseyran and Merle Giles
PUBLISHED TITLES CONTINUED

INTRODUCTION TO COMPUTATIONAL MODELS WITH PYTHON


José M Garrido
INTRODUCTION TO COMPUTATIONAL MODELING USING C AND
OPEN-SOURCE TOOLS
José M Garrido
INTRODUCTION TO CONCURRENCY IN PROGRAMMING LANGUAGES
Matthew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen
INTRODUCTION TO ELEMENTARY COMPUTATIONAL MODELING: ESSENTIAL
CONCEPTS, PRINCIPLES, AND PROBLEM SOLVING
José M. Garrido
INTRODUCTION TO HIGH PERFORMANCE COMPUTING FOR SCIENTISTS
AND ENGINEERS
Georg Hager and Gerhard Wellein
INTRODUCTION TO REVERSIBLE COMPUTING
Kalyan S. Perumalla
INTRODUCTION TO SCHEDULING
Yves Robert and Frédéric Vivien
INTRODUCTION TO THE SIMULATION OF DYNAMICS USING SIMULINK®
Michael A. Gray
PEER-TO-PEER COMPUTING: APPLICATIONS, ARCHITECTURE, PROTOCOLS,
AND CHALLENGES
Yu-Kwong Ricky Kwok
PERFORMANCE TUNING OF SCIENTIFIC APPLICATIONS
Edited by David Bailey, Robert Lucas, and Samuel Williams
PETASCALE COMPUTING: ALGORITHMS AND APPLICATIONS
Edited by David A. Bader
PROCESS ALGEBRA FOR PARALLEL AND DISTRIBUTED PROCESSING
Edited by Michael Alexander and William Gardner
INTRODUCTION TO
Computational
Models with
Python
José M. Garrido
Kennesaw State University,
Kennesaw, Georgia, USA

Boca Raton London New York

CRC Press is an imprint of the


Taylor & Francis Group, an informa business
A CHAPMAN & HALL BOOK
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2016 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works


Version Date: 20150623

International Standard Book Number-13: 978-1-4987-1204-0 (eBook - PDF)

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 stor-
age or retrieval system, without written permission from the publishers.

For permission to photocopy or use material electronically from this work, please access www.copy-
right.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 pro-
vides licenses and registration for a variety of users. For organizations that have been granted a photo-
copy 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.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
Contents

Section I Problem Solving

Chapter 1  Problem Solving and Computing 3


1.1 INTRODUCTION 3
1.2 COMPUTER PROBLEM SOLVING 3
1.3 ELEMENTARY CONCEPTS 4
1.4 DEVELOPING COMPUTATIONAL MODELS 6
1.5 TEMPERATURE CONVERSION 8
1.5.1 Initial Problem Statement 8
1.5.2 Analysis and Conceptual Model 9
1.5.3 Mathematical Model 9
1.6 AREA AND PERIMETER OF A CIRCLE 10
1.7 CATEGORIES OF COMPUTATIONAL MODELS 10
1.8 GENERAL PROCESS OF SOFTWARE DEVELOPMENT 12
1.9 MODULAR DESIGN 14
1.10 PROGRAMMING LANGUAGES 14
1.10.1 High-Level Programming Languages 15
1.10.2 Interpreters and Python 15
1.10.3 Compilers 17
1.10.4 Compiling and Execution of Java Programs 17
1.10.5 Compiling and Executing C Programs 18
1.11 PRECISION, ACCURACY, AND ERRORS 19
1.11.1 Number Representation 19
1.11.2 Number of Significant Digits 20
1.11.3 Precision and Accuracy 20
1.11.4 Errors 20
1.12 SUMMARY 22
1.13 EXERCISES 22

vii
viii  Contents

Chapter 2  Simple Python Programs 25


2.1 INTRODUCTION 25
2.2 COMPUTING WITH PYTHON 25
2.2.1 Using Interactive Mode with Simple Operations 25
2.2.2 Mathematical Operations 26
2.2.3 More Advanced Mathematical Expressions 27
2.2.4 Scientific Notation 29
2.3 PROGRAMS 29
2.4 DATA DEFINITIONS 29
2.4.1 Data Objects 30
2.4.2 Variables 30
2.4.3 Using Data Objects and Variables 30
2.4.4 Basic Data Types 31
2.5 SIMPLE PYTHON PROGRAMS 31
2.5.1 The Assignment Statement 32
2.5.2 Basic Input and Output Instructions 32
2.5.2.1 Output Statement 32
2.5.2.2 Input Statements 33
2.5.3 Example Scripts with Input/Output 33
2.6 A SIMPLE PROBLEM: TEMPERATURE CONVERSION 34
2.6.1 Mathematical Model 35
2.6.2 Computational Model 35
2.7 DISTANCE BETWEEN TWO POINTS 37
2.7.1 Problem Statement 37
2.7.2 Analysis of the Problem 37
2.7.3 Design of the Solution 37
2.7.4 Implementation 38
2.8 GENERAL STRUCTURE OF A PYTHON PROGRAM 39
2.9 SIMPLE FUNCTIONS 41
2.9.1 Function Definitions 41
2.9.2 Function Calls 42
2.10 SUMMARY 43
2.11 EXERCISES 44

Section II Basic Programming Principles with Python


Contents  ix

Chapter 3  Modules and Functions 47


3.1 INTRODUCTION 47
3.2 MODULAR DECOMPOSITION 47
3.3 FUNCTIONS 48
3.3.1 Function Calls 48
3.4 CATEGORIES OF FUNCTIONS 49
3.4.1 Simple Function Calls 49
3.4.2 Calling Functions that Return Data 49
3.4.2.1 Including the Function Definition in
Another Module 51
3.4.3 Calling Functions with Arguments 51
3.4.3.1 Including Function squared in Another
Module 53
3.5 BUILT-IN MATHEMATICAL FUNCTIONS 53
3.6 SUMMARY 55
3.7 EXERCISES 55

Chapter 4  Program Structures 57


4.1 INTRODUCTION 57
4.2 ALGORITHMS 57
4.3 IMPLEMENTING ALGORITHMS 58
4.4 ALGORITHM DESCRIPTION 58
4.4.1 Flowcharts 58
4.4.2 Pseudo-Code 60
4.5 DESIGN STRUCTURES 61
4.5.1 Sequence 61
4.5.2 Selection 61
4.5.3 Repetition 61
4.5.4 Simple Input/Output 63
4.5.4.1 Output 63
4.5.4.2 Input 63
4.6 COMPUTING AREA AND CIRCUMFERENCE 64
4.6.1 Specification 64
4.6.2 Algorithm with the Mathematical Model 65
4.7 SUMMARY 66
4.8 EXERCISES 66
x  Contents

Chapter 5  The Selection Program Structure 69


5.1 INTRODUCTION 69
5.2 CONDITIONAL EXPRESSIONS 69
5.2.1 Relational Operators 69
5.2.2 Logical Operators 71
5.3 THE SELECTION STRUCTURE 72
5.3.1 Selection Structure with Flowcharts and Pseudo-
code 72
5.3.2 Selection with Python 72
5.3.3 Example with Selection 73
5.4 A COMPUTATIONAL MODEL WITH SELECTION 74
5.4.1 Analysis and Mathematical Model 74
5.4.2 Algorithm for General Solution 75
5.4.3 Detailed Algorithm 75
5.5 MULTI-LEVEL SELECTION 78
5.6 SUMMARY 79
5.7 EXERCISES 80

Chapter 6  The Repetition Program Structure 83


6.1 INTRODUCTION 83
6.2 REPETITION WITH THE WHILE-LOOP 83
6.2.1 While-Loop Flowchart 84
6.2.2 While Structure in Pseudo-Code 84
6.2.3 While-Loop in the Python Language 85
6.2.4 Loop Counter 86
6.2.5 Accumulator Variables 87
6.2.6 Summation of Input Numbers 88
6.3 REPEAT-UNTIL LOOP 89
6.4 FOR-LOOP STRUCTURE 92
6.4.1 Summation Problem with a For-Loop 94
6.4.2 Factorial Problem 95
6.4.2.1 Mathematical Specification of Factorial 95
6.4.2.2 Computing Factorial 96
6.5 SUMMARY 97
6.6 EXERCISES 97
Contents  xi

Section III Data Structures, Object Orientation, and


Recursion

Chapter 7  Python Lists, Strings, and Other Data Sequences 101


7.1 INTRODUCTION 101
7.2 LISTS 101
7.2.1 Indexing Lists 102
7.2.2 Slicing Operations 103
7.2.3 Iterating over a List with a Loop 104
7.2.4 Creating a List Using a Loop 105
7.2.5 Passing Lists to a Function 106
7.2.6 Additional Operations on Lists 108
7.3 TEMPERATURE CONVERSION PROBLEM 109
7.3.1 Mathematical Model 109
7.3.2 The Python Implementation 110
7.3.3 Implementation Using a Function 111
7.4 LIST COMPREHENSIONS 112
7.5 LISTS OF LISTS 113
7.6 TUPLES 114
7.7 DICTIONARIES 116
7.8 STRINGS 117
7.9 SIMPLE NUMERICAL APPLICATIONS USING LISTS 120
7.9.1 The Average Value in an Array 120
7.9.2 Maximum Value in a List 122
7.9.3 Searching 123
7.9.3.1 Linear Search 123
7.9.3.2 Binary Search 125
7.10 SUMMARY 127
7.11 EXERCISES 128

Chapter 8  Object Orientation 131


8.1 INTRODUCTION 131
8.2 OBJECTS IN THE PROBLEM DOMAIN 131
8.3 DEFINING CLASSES 132
8.4 DESCRIBING OBJECTS 133
8.5 INTERACTION BETWEEN TWO OBJECTS 133
xii  Contents

8.6 DESIGN WITH CLASSES 134


8.6.1 Encapsulation 134
8.6.2 Data Hiding 135
8.7 SUMMARY 135
8.8 EXERCISES 136

Chapter 9  Object-Oriented Programs 137


9.1 INTRODUCTION 137
9.2 PROGRAMS 137
9.3 DEFINITION OF CLASSES 137
9.4 CLASS DEFINITIONS IN PYTHON 138
9.4.1 Data Definitions in a Class 139
9.4.2 Methods in a Class Definition 139
9.4.3 Example of a Class Definition 140
9.5 CREATING AND MANIPULATING OBJECTS 141
9.6 COMPLETE PROGRAM WITH A CLASS 142
9.7 SCOPE OF VARIABLES 143
9.8 CLASS HIERARCHY WITH INHERITANCE 143
9.9 DEFINING CLASSES WITH INHERITANCE 144
9.9.1 Inheritance with Python 145
9.9.2 Inheritance and Constructor Methods 145
9.9.3 Example Objects 147
9.10 OVERLOADING AND OVERRIDING METHODS 148
9.11 SUMMARY 148
9.12 EXERCISES 149

Chapter 10  Linked Lists 151


10.1 INTRODUCTION 151
10.2 NODES AND LINKED LISTS 151
10.2.1 Nodes 153
10.2.2 Definition of a Class for Linked Lists 153
10.2.3 Creating and Manipulating a Linked List 155
10.3 LINKED LISTS WITH TWO ENDS 158
10.4 DOUBLE-LINKED LISTS 159
10.5 STACKS AND QUEUES DATA STRUCTURES 159
10.5.1 Stacks 160
Contents  xiii

10.5.2 Queues 163


10.6 SUMMARY 165
10.7 EXERCISES 166

Chapter 11  Recursion 167


11.1 INTRODUCTION 167
11.2 RECURSIVE APPROACH TO PROBLEM SOLVING 167
11.3 RECURSIVE DEFINITION OF FUNCTIONS 167
11.3.1 Factorial Problem 168
11.3.2 Sum of Squares 169
11.3.3 Reversing a Linked List 170
11.4 ANALYZING RECURSION 173
11.5 SUMMARY 174
11.6 EXERCISES 174

Section IV Fundamental Computational Models with


Python

Chapter 12  Computational Models with Arithmetic Growth 177


12.1 INTRODUCTION 177
12.2 MATHEMATICAL MODELING 177
12.2.1 Difference Equations 178
12.2.2 Functional Equations 179
12.3 MODELS WITH ARITHMETIC GROWTH 179
12.4 USING THE PYTHON LANGUAGE AND NUMPY 180
12.5 PRODUCING THE CHARTS OF THE MODEL 183
12.6 VALIDATION OF A MODEL 184
12.7 FILE I/O 184
12.7.1 Types of Files 184
12.7.2 Opening and Closing Text Files 185
12.7.3 Writing Data to a File 186
12.7.4 Reading Data from a File 187
12.8 SUMMARY 189
12.9 EXERCISES 189

Chapter 13  Computational Models with Quadratic Growth 191


13.1 INTRODUCTION 191
xiv  Contents

13.2 DIFFERENCES OF THE DATA 191


13.3 DIFFERENCE EQUATIONS 195
13.4 FUNCTIONAL EQUATIONS 195
13.5 EXAMPLES OF QUADRATIC MODELS 196
13.5.1 Growth of Number of Patients 196
13.5.2 Growth of Computer Networks 196
13.5.3 Models with Sums of Arithmetic Growth 199
13.6 SUMMARY 200
13.7 EXERCISES 201

Chapter 14  Models with Geometric Growth 203


14.1 INTRODUCTION 203
14.2 BASIC CONCEPTS 203
14.2.1 Increasing Data with Geometric Growth 204
14.2.2 Decreasing Data with Geometric Growth 204
14.2.3 Case Study 1 205
14.2.4 Case Study 2 208
14.3 FUNCTIONAL EQUATIONS IN GEOMETRIC GROWTH 209
14.4 SUMMARY 210
14.5 EXERCISES 211

Chapter 15  Computational Models with Polynomial Growth 213


15.1 INTRODUCTION 213
15.2 GENERAL FORMS OF POLYNOMIAL FUNCTIONS 213
15.3 THE polynomial MODULE OF THE Numpy PACKAGE 214
15.4 EVALUATION OF POLYNOMIAL FUNCTIONS 215
15.5 SOLVING POLYNOMIAL FUNCTIONS 218
15.6 SUMMARY 220
15.7 EXERCISES 220

Chapter 16  Empirical Models with Interpolation and Curve


Fitting 223
16.1 INTRODUCTION 223
16.2 INTERPOLATION 223
16.2.1 Linear Interpolation 224
16.2.2 Non-Linear Interpolation 227
Contents  xv

16.3 CURVE FITTING 230


16.3.1 Linear Polynomial Function 231
16.3.2 Fitting Non-Linear Polynomial Functions 233
16.4 MODELING THE HEAT CAPACITY OF CARBON
DIOXIDE 235
16.5 SUMMARY 237
16.6 EXERCISES 238

Chapter 17  Using Arrays with Numpy 241


17.1 INTRODUCTION 241
17.2 VECTORS AND OPERATIONS 242
17.2.1 Addition of a Scalar and a Vector 242
17.2.2 Vector Addition 242
17.2.3 Multiplication of a Vector and a Scalar 242
17.2.4 Dot Product of Two Vectors 243
17.2.5 Length (Norm) of a Vector 243
17.3 VECTOR PROPERTIES AND CHARACTERISTICS 243
17.3.1 Orthogonal Vectors 244
17.3.2 Linear Dependence 244
17.4 USING ARRAYS IN PYTHON WITH NUMPY 244
17.5 SIMPLE VECTOR OPERATIONS 247
17.5.1 Arithmetic Operations 247
17.5.2 Element Multiplication and Division Operations 249
17.5.3 Vector Multiplication 250
17.5.4 Additional Vector Operations 251
17.6 SUMMARY 255
17.7 EXERCISES 255

Chapter 18  Models with Matrices and Linear Equations 257


18.1 INTRODUCTION 257
18.2 MATRICES 257
18.2.1 Basic Concepts 258
18.2.2 Arithmetic Operations 258
18.3 MATRIX MANIPULATION WITH NUMPY 262
18.3.1 Creating, Initializing, and Indexing Matrices 262
18.3.2 Element Addition and Subtraction Operations 264
xvi  Contents

18.3.3 Element Multiplication and Division 266


18.3.4 Additional Matrix Functions 268
18.4 SOLVING SYSTEMS OF LINEAR EQUATIONS 277
18.5 INDUSTRIAL MIXTURES IN MANUFACTURING 279
18.6 SUMMARY 281
18.7 EXERCISES 282

Chapter 19  Introduction to Models of Dynamical Systems 285


19.1 INTRODUCTION 285
19.2 AVERAGE AND INSTANTANEOUS RATE OF CHANGE 285
19.3 THE FREE-FALLING OBJECT 287
19.3.1 Initial Problem Statement 288
19.3.2 Analysis 288
19.3.2.1 Assumptions 288
19.3.2.2 Basic Definitions 289
19.3.3 Design 289
19.3.4 Implementation 290
19.4 DERIVATIVE OF A FUNCTION 292
19.4.1 Computing the Derivative with Finite Differences 294
19.4.2 Computing the First Derivative Using Python 295
19.5 NUMERICAL INTEGRATION 298
19.5.1 Area under a Curve 298
19.5.2 Using the Trapezoid Method 299
19.5.3 Using Adaptive Quadrature 301
19.6 WORK PRODUCED IN A PISTON WITH AN IDEAL GAS 302
19.7 DIFFERENTIAL EQUATIONS 303
19.8 MODELS OF DYNAMICAL SYSTEMS 304
19.8.1 State Equations 305
19.8.2 Output Equations 305
19.9 FORMULATING SIMPLE EXAMPLES 306
19.9.1 Free-Falling Object 306
19.9.2 Object on Horizontal Surface 307
19.9.3 Object Moving on an Inclined Surface 308
19.10 SOLUTION OF DIFFERENTIAL EQUATIONS 309
19.10.1 Model with a Single Differential Equation 310
19.10.2 Model with a System of Differential Equations 313
Contents  xvii

19.10.3 Model with Drag Force 315


19.10.4 Prey and Predator Model 317
19.11 SUMMARY 319
19.12 EXERCISES 319

Section V Linear Optimization Models

Chapter 20  Linear Optimization Modeling 325


20.1 INTRODUCTION 325
20.2 GENERAL FORM OF A LINEAR OPTIMIZATION
MODEL 325
20.3 THE SIMPLEX ALGORITHM 326
20.3.1 Foundations of the Simplex Algorithm 326
20.3.2 Problem Formulation in Standard Form 327
20.3.3 Generalized Standard Form 328
20.3.4 Additional Definitions 329
20.4 DESCRIPTION OF THE SIMPLEX ALGORITHM 329
20.4.1 General Description of the Simplex Algorithm 329
20.4.2 Detailed Description of the Simplex Algorithm 330
20.4.3 Degeneracy and Convergence 331
20.4.4 Two-Phase Method 331
20.5 FORMULATION OF LINEAR OPTIMIZATION MODELS 332
20.6 EXAMPLE PROBLEMS 332
20.6.1 Case Study 1 333
20.6.1.1 Understanding the Problem 333
20.6.1.2 Mathematical Formulation 333
20.6.2 Case Study 2 333
20.6.2.1 Understanding the Problem 334
20.6.2.2 Mathematical Formulation 334
20.6.3 Case Study 3 334
20.6.3.1 Understanding the Problem 335
20.6.3.2 Mathematical Formulation 335
20.6.4 Case Study 4 335
20.6.4.1 Understanding the Problem 335
20.6.4.2 Mathematical Formulation 336
20.7 SUMMARY 336
20.8 EXERCISES 337
xviii  Contents

Chapter 21  Solving Linear Optimization Models 341


21.1 INTRODUCTION 341
21.2 LINEAR OPTIMIZATION MODELS WITH PYTHON 341
21.3 MODELING WITH PYOMO 342
21.3.1 Formulating Case Study 1 342
21.3.2 An Abstract Model Case Study 1 346
21.4 MODELING WITH PULP 349
21.5 SOFTWARE LINEAR OPTIMIZATION SOLVERS 352
21.6 SHORT LIST OF OPTIMIZATION SOLVERS 353
21.7 SUMMARY 353
21.8 EXERCISES 354

Chapter 22  Sensitivity Analysis and Duality 357


22.1 INTRODUCTION 357
22.2 SENSITIVITY ANALYSIS 357
22.2.1 Coefficients of the Objective Function 357
22.2.2 Using Pulp: Example 1 358
22.2.3 Using Pyomo: Example 1 360
22.2.4 Right-Hand Side of Constraints 362
22.3 DUALITY 363
22.3.1 Formulating the Dual Problem 363
22.3.2 Transforming a Problem to Standard Form 365
22.3.3 Duality Discussion 366
22.4 SUMMARY 366
22.5 EXERCISES 367

Chapter 23  Transportation Models 369


23.1 INTRODUCTION 369
23.2 MODEL OF A TRANSPORTATION PROBLEM 369
23.3 TRANSPORTATION CASE STUDY 1 371
23.3.1 Formulation Using the Pyomo Modeler 372
23.3.2 Formulation Using the Pulp Modeler 375
23.4 UNBALANCED PROBLEM: CASE STUDY 2 377
23.4.1 Formulation with the Pyomo Modeler 379
23.4.2 Formulation with the Pulp Modeler 382
23.5 UNBALANCED PROBLEM: CASE STUDY 3 384
Contents  xix

23.5.1 Formulation with the Pyomo Modeler 385


23.5.2 Formulation with the Pulp Modeler 388
23.6 TRANSSHIPMENT MODELS 390
23.7 TRANSSHIPMENT PROBLEM: CASE STUDY 4 390
23.7.1 Formulation with the Pyomo Modeler 392
23.7.2 Formulation with the Pulp Modeler 395
23.8 ASSIGNMENT PROBLEMS 397
23.9 ASSIGNMENT PROBLEM: CASE STUDY 5 398
23.9.1 Formulation with the Pyomo Modeler 399
23.9.2 Formulation with the Pulp Modeler 403
23.10 SUMMARY 404
23.11 EXERCISES 405

Chapter 24  Network Models 407


24.1 INTRODUCTION 407
24.2 GRAPHS 407
24.3 SHORTEST PATH PROBLEM 407
24.4 SHORTEST PATH: CASE STUDY 1 408
24.4.1 Formulation Using the Pyomo Modeler 410
24.4.2 Formulation Using the Pulp Modeler 413
24.5 MAXIMUM FLOW PROBLEMS 415
24.5.1 Formulation Using the Pyomo Modeler 417
24.5.2 Formulation Using the Pulp Modeler 421
24.6 CRITICAL PATH METHOD 422
24.6.1 Critical Path Method: Case Study 424
24.6.2 Formulation Using the Pyomo Modeler 425
24.6.3 Formulation Using the Pulp Modeler 427
24.7 REDUCING THE TIME TO COMPLETE A PROJECT 428
24.7.1 Reducing Time Case Study 429
24.7.2 Formulation Using the Pyomo Modeler 430
24.7.3 Formulation Using the Pulp Modeler 435
24.8 SUMMARY 436
24.9 EXERCISES 437

Chapter 25  Integer Linear Optimization Models 439


25.1 INTRODUCTION 439
xx  Contents

25.2 MODELING WITH INTEGER VARIABLES 439


25.3 APPLICATIONS OF INTEGER LINEAR OPTIMIZATION 443
25.3.1 Branch and Bound 443
25.3.2 Branch and Cut 444
25.4 INTEGER LINEAR OPTIMIZATION: CASE STUDY 1 444
25.4.1 Formulation of the Model Using Pyomo 445
25.4.2 Formulation of the Model Using Pulp 447
25.5 INTEGER LINEAR OPTIMIZATION: CASE STUDY 2 448
25.5.1 Formulation of the Model Using Pyomo 450
25.5.2 Formulation of the Model Using Pulp 454
25.6 SUMMARY 456
25.7 EXERCISES 456

Bibliography 459
Index 461
List of Figures

1.1 Computational science as an integration of several disciplines. 6


1.2 Development of computational models. 6
1.3 Model development and abstract levels. 8
1.4 Continuous model. 11
1.5 Discrete changes of number of cars in the queue. 12
1.6 The waterfall model. 13
1.7 Modular design. 14
1.8 Python interpreter. 16
1.9 Compiling a Java source program. 17
1.10 Executing a Java program. 18
1.11 Compiling a C program. 18
1.12 Linking a C program. 18

2.1 Plot of the values of temperature Celsius and Fahrenheit. 36


2.2 Horizontal and vertical distances between two points. 37
2.3 General structure of a Python program. 40
2.4 Structure of a python function. 41
2.5 A function calling another function. 42

3.1 A function call. 48


3.2 Calling function square. 50
3.3 Calling function squared with an argument. 52

4.1 Flow of control. 59


4.2 Basic flowchart symbols. 59
4.3 A simple flowchart example. 60
4.4 A flowchart with a sequence. 60
4.5 Selection structure. 62
4.6 An example of the selection structure. 62
4.7 While-loop of the repetition structure. 62

xxi
xxii  LIST OF FIGURES

4.8 Repeat-until loop of the repetition structure. 62


4.9 Flowchart data input/output symbol. 63

5.1 Flowchart of the selection structure. 73


5.2 Example of selection structure. 74
5.3 High-level flowchart for solving a quadratic equation. 76

6.1 A flowchart with a while-loop. 84


6.2 A flowchart with a repeat-until structure. 90

8.1 Collections of objects. 132


8.2 Diagram of class Employee. 133
8.3 Interaction between two objects. 134

9.1 Structure of a typical class. 138


9.2 Class inheritance. 144

10.1 Structure of a node. 152


10.2 A simple linked list. 152
10.3 A new node inserted in the front of a linked list. 156
10.4 A new node inserted after node 2. 158
10.5 A linked list with two ends. 158
10.6 A linked list with two links per node. 159
10.7 A stack as a dynamical data structure. 160
10.8 A queue as a dynamical data structure. 163

11.1 Linked list of characters. 170


11.2 Reversing a linked list recursively. 171

12.1 Given and computed values of monthly price of electricity. 184

13.1 Plot of data in the sequence. 192


13.2 Plot of first differences. 193
13.3 Number of patients for 1995–2002. 197
13.4 Number of links to connect n computers. 199

14.1 Data with geometric growth. 204


14.2 Data decreasing with geometric growth. 205
14.3 Population of a small town for 1995–2003. 207
14.4 Impurities in water (parts/gallon). 209
LIST OF FIGURES  xxiii

15.1 Graph of the equation y = 14 − 36x − 3x2 + 2x3 . 216


15.2 Graph of the equation y = −2 + 3x5 . 218

16.1 Linear interpolation of an intermediate data point. 224


16.2 Graph of linear interpolation of data points. 225
16.3 Graph of linear interpolation of many data points. 227
16.4 Graph of given data points. 228
16.5 Cubic spline interpolation of data points. 229
16.6 Graph of a given set of data points. 230
16.7 Polynomial of degree 1 fit from given data points. 232
16.8 Curve fitting of a polynomial of degree 3. 234
16.9 Heat Cap CO2 polynomial deg 3. 236
16.10 Heat Cap CO2 polynomial deg 6. 236

19.1 The slope of a line. 286


19.2 Slope of a secant. 287
19.3 Slope of a tangent. 287
19.4 The slope of x = c. 294
19.5 The area under a curve. 299
19.6 High-level view of a dynamical system. 304
19.7 Object on inclined surface. 308
19.8 Case Study 1: Model with single differential equation. 311
19.9 Numerical solution to a system of two differential equations. 314
19.10 Vertical position of free-falling object. 315
19.11 Vertical velocity of free-falling object. 316
19.12 Population changes of prey and predator. 317
19.13 Phase plot of the population changes. 319

24.1 Graph of shortest path problem. 409


24.2 Graph of airline routes to Rio. 416
24.3 Several activities completed before next activity. 423
24.4 Sequencing of activities. 423
24.5 Graph of project activities. 424
24.6 Graph of road capacity in a city. 438

25.1 Graph of road capacity in city. 457


Another Random Document on
Scribd Without Any Related Topics
ought not to object to a little account of other people's animals. We
had an offer of $500 for Custis Lee at Alexandria."

"I sometimes have uninvited guests in my tent. Friday, Nettie saw


something on the tray that Eliza was carrying. It had a long tail, and
proved to be a stinging scorpion. The citizens pooh-pooh at our fear
of scorpions, and insist that they are not so very dangerous; but I was
glad to have that particular one killed by Armstrong planting his gun
on it. I feel much pleased, and Armstrong is quite proud, that I made
myself a riding-habit. You know I lost the waist of mine in the forest.
It took me weeks to finish it, being my first attempt. I ripped an old
waist, and copied it by drawing lines with a pencil, pinning and
basting; but it fits very well. I remember how you both wanted me to
learn when I was at home, and I almost wished I had, when I found it
took me such ages to do what ought to have been short work."
"Our letters take twenty days in coming, and longer if there are
storms in the Gulf. The papers are stale enough, but Armstrong goes
through them all. I feel so rich, and am luxuriating in four splint-
bottom chairs that we hired an old darkey to make for us. I want to sit
in all four at once, it seems so good to get anything in which to rest
that has a back."
"Our dogs give us such pleasure, though it took me some time to
get used to the din they set up when Armstrong practiced on the
horn. They call it 'giving tongue' here, but I call that too mild a word.
Their whole bodies seem hollow, they bring forth such wild cries and
cavernous howls. We call them Byron, Brandy, Jupiter, Rattler, Sultan,
and Tyler."

"Something awful is constantly occurring among the citizens. It is a


lawless country. A relative of one of our old army officers, a prominent
planter living near here, was shot dead in Houston by a man bearing
an old grudge against him. It is a common occurrence to shoot down
men here for any offense whatever. Armstrong never goes anywhere
except for hunting, and as we have plenty of books and our evening
rides, we enjoy life thoroughly. Nettie fell from her horse, and we
were frightened for a time, but she was only lamed. Though she
weighs 165 pounds, Autie[C] picked her up as if she were a baby, and
carried her into their tent."

"Besides visiting at the house of the collector of the port, where


there is a houseful of young girls, we have been hospitably treated by
some people to whom Armstrong was able to be of use. One day, a
gentle well-bred Southern woman came into our tent to see
Armstrong, and asked his protection for her boy, telling him that for
some childish carelessness the neighboring colored people had
threatened his life. Armstrong believed her, and melted. He afterward
inquired elsewhere into the matter, and was convinced that the boy
had not intentionally erred. The child himself was proof, by his frank
manner and his straightforward story, of his innocence."
"I suppose we were the first Yankees these people had ever
known, and doubtless nothing but gratitude induced them even to
speak with us; yet they conquered prejudice, and asked us to dinner.
They had been so well dressed when they called—and were
accounted rich, I believe, by the neighbors—that I could scarcely
believe we had reached the right house when we halted. It was like
the cabins of the 'poor white trash' in the forest, only larger. I thought
we had mistaken the negro quarters for the master's. Two large
rooms, with extensions at the rear, were divided by an open space
roofed over, under which the table was spread. The house was of
rough logs, and unpainted. Unless the Texans built with home
materials, their houses cost as much as palaces abroad, for the
dressed lumber had to be hauled from the seacoast."
"The inside of this queer home was in marked contrast with the
exterior. The furniture was modern and handsome, and the piano, on
which the accomplished mother, as well as her little son, gave us
music, was from one of our best Northern manufactories. The china,
glass and linen on the dinner-table were still another surprise."
"They never broached politics, gave us an excellent dinner, and got
on Armstrong's blind side forever by giving him a valuable full-blooded
pointer, called Ginnie, short for Virginia. With four game chickens, a
Virginia cured ham (as that was their former State), and two turkeys,
we were sent on our way rejoicing."

"Our Henry has gone home, and we miss him, for he is fidelity
itself. He expects to move his entire family of negroes from Virginia to
Monroe, because he says, father, you are the finest man he ever did
see. Prepare, then, for the dark cloud that is moving toward you, and
you may have the privilege of contributing to their support for a time,
if he follows Eliza's plan of billeting the orphan upon us."
"We have a new cook called Uncle Charley, who has heretofore
been a preacher, but now condescends to get up good dinners for us.
We had eleven to dine to-day, and borrowed dishes of our Southern
neighbors. We had a soup made out of an immense turtle that
Armstrong killed in the stream yesterday. Then followed turkeys,
boiled ham—and roast beef, of course, for Armstrong thinks no dinner
quite perfect without his beef. We are living well, and on so little.
Armstrong's pay as a major-general will soon cease, and we are trying
now to get accustomed to living on less."
"I listen to the citizens talking over the prospects of this State, and
I think it promises wonders. There are chances for money-making all
the time thrown in Armstrong's way; but he seems to think that while
he is on duty he had better not enter into business schemes."
"Armstrong has such good success in hunting and fishing that he
sends to the other officers' messes turtle, deer, duck, quail, squirrels,
doves and prairie chickens. The possums are accepted with many a
scrape and flourish by the 'nigs.' I forgot to tell you that our nine dogs
sleep round our wagon at night, quarreling, growling, snoring, but I
sleep too soundly to be kept awake by them."
The very ants in Texas, though not poisonous, were provided with
such sharp nippers that they made me jump from my chair with a
bound, if, after going out of sight in the neck or sleeves of my dress,
they attempted to cut their way out. They clipped one's flesh with
sharp little cuts that were not pleasant, especially when there
remained a doubt as to whether it might be a scorpion. We had to
guard our linen carefully, for they cut it up with ugly little slits that
were hard to mend. Besides, we had to be careful, as we were so cut
off that we could not well replace our few clothes, and it costs a
ruinous sum to send North, or even to New Orleans, for anything. I
found this out when the General paid an express bill on a gown from
New York—ordered before we left the East—far larger than the cost of
the material and the dressmaker's bill together. The ants besieged the
cook-tent and set Uncle Charley and Eliza to growling; but an old
settler told them to surround the place with tan-bark, and they were
thus freed. It was all I could do to keep the General from digging
down into the ant-mounds, as he was anxious to see into their
mechanism. The colored people and citizens told us what fighters they
were, and what injuries they inflicted on people who molested them.
We watched them curiously day by day, and wanted to see if the
residents had told us stories about their stripping the trees of foliage
just to guy us. (It has long been the favorite pastime of old residents
to impose all sorts of improbable tales on the new-comer.) Whether
this occurrence happens often or not I cannot say, but it certainly took
place once while we were there. One morning my husband ran into
the tent and asked me to hurry up with my dressing; he had
something strange to show me, and helped me scramble into my
clothes.
The carriage-road in front of our tents cut rather deep ruts, over
which the ants found a difficult passage, so they had laid a causeway
of bits of cut leaves, over which they journeyed between a tree and
their ant-hills, not far from our tents on the other side of the road.
They were still traveling back and forth, each bearing a bit of leaf
bigger than itself; and a half-grown tree near us, which had been full
of foliage the day before, was entirely bare.
For some reason unexplainable, malarial fever broke out among our
staff. It was, I suppose, the acclimation to which we were being
subjected. My father Custer was ill, and came forth from the siege
whitened out, while the officers disappeared to mourn over the
number of their bones for a few days, and then crept out of the tents
as soon as they could move. My husband all this time had never even
changed color. His powers of endurance amazed me. He seemed to
have set his strong will against yielding to climatic influences; but
after two days of this fighting he gave in and tossed himself on our
borrowed lounge, a vanquished man. He was very sick. Break-bone
fever had waited to do its worst with its last victim. Everything looked
very gloomy to me. We had not even a wide bed, on which it is a little
comfort if a fever-tossed patient can fling himself from side to side.
We had no ice, no fruit, indeed nothing but quinine. The supplies of
that drug to the hospital department of Texas must be sent by the
barrel, it seemed to me, from the manner in which it was consumed.
Our devoted surgeon came, of his own accord, over and over
again, and was untiring in his patience in coming when I sent for him
in-between-times, to please me in my anxiety. My husband was so
racked and tormented by pain, and burnt up with fiery heat, that he
hardly made the feeblest fight about the medicine, after having
attained the satisfaction of my tasting it, to be sure that I knew how
bitter it was. As the fever abated every hour, I resorted to new modes
of bribery and corruption to get him to swallow the huge pill. My
stepmother's cake had come in the very best time, for I extracted the
raisins and hid the quinine in them, as my father had done when
giving me medicine as a child. It seemed to me an interminable time
before the disease began to yield to the remedies. In reality, it was
not long, as the General was unaccustomed to medicine, and its effect
was more quickly realized on that account. Even when my husband
began to crawl about again, the doctor continued the medicine, and I
as nurse remorselessly carried out his directions, though I had by no
means a tractable patient, as with returning health came restored
combative powers. My husband noticed the rapid disappearance of the
pills from the table when he lay and watched the hated things with
relief, as he discovered that he was being aided in the consumption by
some unknown friend. One morning we found the plate on which the
doctor had placed thirty the night before, empty. Of course I accused
the General of being the cause of the strange disappearance, and
prepared to send for more, inexorable in my temporary reign over a
weak man. He attempted a mild kicking celebration and clapping
accompaniment over the departure of his hated medicine, as much as
his rather unsteady feet and arms would allow, but stoutly denied
having done away with the offending pills. The next night we kept
watch over the fresh supply, and soon after dark the ants began their
migrations up the loose tent-wall on the table-cover that fell against
the canvas, and while one grasped the flour-mixed pill with his long
nippers, the partner pushed, steered and helped roll the plunder down
the side of the tent on to the ground.
The triumph of the citizens was complete. Their tales were outdone
by our actual experience. After that there was no story they told us
which we did not take in immediately without question.
The hunting included alligators also. In the stream below us there
were occasional deep pools, darkened by the overhanging trees. As
we women walked on the banks, we kept a respectful distance from
the places where the bend in the creek widened into a pond, with still
water near the high banks. In one of these dark pools lived an ancient
alligator, well known to the neighbors, on which they had been
unsuccessfully firing for years. The darkeys kept aloof from his
fastness, and even Eliza, whose Monday-morning soul longed for the
running water of the stream, for she had struggled with muddy water
so long, trembled at the tales of this monster. She reminds me now
"what a lovely place to wash that Gros wash-house was, down by the
creek. But it was near the old alligator's pool, and I know I hurried up
my wash awfully, for I was afraid he might come up; for you know,
Miss Libbie, it was reckoned that they was mighty fond of children and
colored people."
One of
the young
officers was
determined
to get this
veteran,
and day
after day
went up
and down
the creek,
coming
home at
night to MEASURING AN ALLIGATOR.
meet the
jeers of the others, who did not believe that alligator-hunting in a hot
country paid. One night he stopped at our tent, radiant and jubilant.
He had shot the old disturber of the peace, the intimidator of the
neighborhood, and was going for help to haul him up to the tents. He
was a monster, and it cost the men tough pulling to get him up the
bank, and then to drag him down near our tent. There he was left for
us women to see. We walked around and around him, very brave, and
quite relieved to think that we were rid of so dangerous a neighbor,
with a real old Jonah-and-the-whale mouth. The General
congratulated the young officer heartily, and wished it had been his
successful shot that had ended him. Part of the jaw had been shot
away, evidently years ago, as it was then calloused over. It was
distended to its utmost capacity, and propped open with a stick. Nettie
brought out a broom from her tent, with which to get a rough
estimate of his length, as we knew well that if we did not give some
idea of his size in our letters home, they would think the climate,
which enervates so quickly, had produced a total collapse in our power
to tell the truth. The broom did not begin to answer, so we pieced out
the measure with something else, in order to arrive at some kind of
accuracy. Then we thought we would like to see how the beast looked
with his mouth closed, and the officers, patient in humoring our
whims, pulled out the props. There was a sudden commotion. The
next thing visible was three sets of flying petticoats making for the
tent, as the alligator, revived by the sudden let-down of his upper jaw,
sprawled out his feet and began to walk over the grass. The crack of
the rifle a moment after brought the heads of three cowards from
their tents, but after that no woman hovered over even his dead hide.
The General was convulsed over our retreat. The drying skin of his
majesty, the lord of the pool, flung and flapped in the wind,
suspended to the pole of the officers' arbor for weeks, and it was well
tanned by the air long before they ceased to make sly allusions to
women's curiosity.
At last, in November, the sealed proposals from citizens to the
quartermaster for the contract for transporting the camp equipage
and baggage, forage, etc., over the country, were all in, and the most
reasonable of the propositions was accepted. Orders had come to
move on to Austin, the capital, where we were to winter. It was with
real regret that I saw our traps packed, the tents of our pretty
encampment taken down, the arbors thrown over, and our faces
turned toward the interior of the State. The General, too buoyant not
to think that every move would better us, felt nothing but pleasure to
be on the march again. The journey was very pleasant through the
day, and we were not compelled to rise before dawn, for the sun was
by no means unbearable, as it had been in August. It was cold at
night, and the wind blew around the wagon, flapping the curtains,
under which it penetrated, and lifting the covers unless they were
strongly secured. As to trying to keep warm by a camp-fire in
November, I rather incline to the belief that it is impossible. Instead of
heat coming into the tent where I put on my habit with benumbed
fingers, the wind blew the smoke in. Sometimes the mornings were so
cold I begged to be left in bed, and argued that the mules could be
attached and I could go straight on to camp, warm all the way. But
my husband woke my drowsy pride by saying "the officers will surely
think you a 'feather-bed soldier,'" which term of derision was applied
to a man who sought soft places for duty and avoided hardships,
driving when he ought to ride.
If we all huddled around one of my husband's splendid camp-fires,
I came in for the smoke. The officers' pretty little gallantries about
"smoke always following beauty," did not keep my eyes from being
blistered and blinded. It was, after all, not a very great hardship, as
during the day we had the royal sun of that Southern winter.
My husband rode on in advance every day to select a camp. He
gave the choice into my hands sometimes, but it was hard to keep
wood, water and suitable ground uppermost; I wanted always the
sheltered, pretty spots. We enjoyed every mile of our march. It rained
sometimes, pouring down so suddenly that a retreat to the traveling
wagons was impossible. One day I was wet to the skin three times,
and my husband wondered what the anxious father and mother, who
used frantically to call "rubbers" after me, as a girl, when I tried to slip
out unnoticed, would say to him then; but it did not hurt me in the
least. The General actually seemed unconscious of the shower. He
wore a soldier's overcoat, pulled his broad hat down to shed the rain,
and encouraged me by saying I was getting to be a tough veteran,
which among us was very high praise. Indeed, we were all then so
well, we snapped our fingers at the once-dreaded break-bone fever. If
we broke the ice in the bucket for our early ablutions, it became a
matter to joke over when the sun was up and we all rode together,
laughing and singing, at the head of the column.
Our march was usually twenty-five miles, sometimes thirty, in a
day. The General and I foraged at the farms we passed, and bought
good butter, eggs and poultry. He began to collect turkeys for the
winter, until we had enough for a year. Uncle Charley was doing his
best to awe Eliza with his numerous new dishes. Though he was a
preacher, he put on that profession on Sundays as he did his best
coat; and if during the week the fire smoked, or a dog stole some
prepared dish that was standing one side to cool, he expressed
himself in tones not loud but deep, and had as extensive a collection
of negro oaths as Texas afforded, which, I believe, is saying a good
deal. My husband, observant as he always was, wondered what
possessed the old fellow when preparing poultry for dinner. We used
slyly to watch him go one side, seize the chicken, and, while swiftly
wringing its neck, mumble some unintelligible words to himself, then
throw down the fowl in a matter-of-fact way, and sit down to pluck it.
We were mystified, and had to get Eliza to explain this peculiar
proceeding that went on day after day. She said that "though Uncle
Charley does swear so powerful, he has a kind of superstition that
poultry has a hereafter." Evidently he thought it was not right to send
them to their last home without what he intended for a funeral
oration. Sometimes he said, as fast as his nimble old tongue could
clatter:
"Hark, from the tombs a doleful sound,
Mine ears attend the cry!
Ye living hens, come view the ground
Where you must shortly die."
Once after this my husband, by hiding, contrived to be present,
though unseen, at one of these funeral ceremonies:
"Princes, this clay must be your bed,
In spite of all your towers,
The tall, the wise, the reverend head,
Must lie as low as yours."
He so timed his verses that with one wrench he gave the final turn
to the poor chicken's head as he jerked out the last line. My husband,
perfectly convulsed himself, was in terror for fear Uncle Charley would
have his feelings hurt by seeing us, and hearing my giggling, and I
nearly smothered myself in the attempt to get back to our tent, where
the General threw himself down with shrieks of laughter.
We varied our march by many an exciting race after jack-rabbits.
The chapparral bushes defeated us frequently by making such good
hiding-places for the hare.[D] If we came to a long stretch of open
prairie, and a rabbit lifted his doe-like head above the grass, the
General uttered a wild whoop to his dog, a "Come on!" to me, and off
we dashed. Some of the staff occasionally joined, while our father
Custer bent over his old roan horse, mildly struck him with a spur, and
was in at the death. The ground was excellent for a run—level and
grassy. We had a superb greyhound called Byron, that was devoted to
the General, and after a successful chase it was rewarded with many a
demonstration of affection. He was the most lordly dog, I think, I ever
saw—powerful, with deep chest, and carrying his head in a royal way.
When he started for a run, with his nostrils distended and his delicate
ears laid back on his noble head, each bound sent him flying through
the air. He hardly touched the elastic cushions of his feet to earth,
before he again was spread out like a dark, straight thread. This
gathering and leaping must be seen, to realize how marvelous is the
rapidity and how the motion seems flying, almost, as the ground is
scorned except at a sort of spring bound. He trotted back to the
General, if he happened to be in advance, with the rabbit in his
mouth, and, holding back his proud head, delivered the game only to
his chief. The tribute that a woman pays to beauty in any form, I gave
to Byron, but I never cared much for him. A greyhound's heart could
be put into a thimble. Byron cared for the General as much as his cold
soul could for any one, but it was not to be compared with the dear
Ginnie: she was all love, she was almost human.
The dog was in an injured state with me much of the time. In
quarters he resented all my rights. My husband had a great fashion of
flinging himself on the bed, or even on the floor, if it was carpeted. He
told me he believed he must unconsciously have acquired the habit at
West Point, where the zeal of the cadet seems divided between his
studies and an effort to keep the wrinkles out of the regulation white
pantaloons, which, being of duck, are easily creased. What
punishment Government sees fit to inflict for each separate crease, I
don't know, but certainly its embryo soldiers have implanted in them a
fear of consequences, even regarding rumpled linen. As soon as the
General tossed himself on the bed, Byron walked to him and was
invited to share the luxury. "Certainly," my husband used to say,
sarcastically; "walk right up here on this clean white spread, without
troubling yourself to care whether your feet are covered with mud or
not. Your Aunt Eliza wants you to lie on nice white counterpanes; she
washes them on purpose for you." Byron answered this invitation by
licking his host's hand, and turning in the most scornful manner on
me, as I uttered a mild protest regarding his muddy paws. The
General quickly remarked that I made invidious distinctions, as no
spread seemed too fine or white for Ginnie, in my mind, while if Eliza
happened to enter, a pair of blazing eyes and an energetically
expressed opinion of Byron ensued, and he retorted by lifting his
upper lip over some of the whitest fangs I ever saw. The General, still
aiding and abetting, asked the dog to let Aunt Eliza see what an
intelligent, knowing animal he was—how soon he distinguished his
friends from his foes. Such an exasperating brute, and such a
tormenting master, were best left alone. But I was tired, and wanted
to lie down, so I told Eliza that if she would stand there, I would try
the broom, a woman's weapon, on his royal highness. Byron wouldn't
move, and growled even at me. Then I quite meekly took what little
place was left, the General's sense of mischief, and his peculiar
fondness for not interfering in a fight, now coming in to keep him
silent. The dog rolled over, and shammed sleep, but soon planting his
feet against my back, which was turned in high dudgeon, he pushed
and pushed, seemingly without premeditation, his dreadful eyes shut,
until I was nearly shoved off. I was conquered, and rose, afraid of the
dog and momentarily irritated at my defeat and his tyranny, while
Eliza read a lesson to the General. She said, "Now see what you've
done. You keer more for that pesky, sassy old hound than you does
for Miss Libbie. Ginnel, I'd be 'shamed, if I was you. What would your
mother Custer think of you now?" But my feelings were not seriously
hurt, and the General, having watched to the last to see how far the
brute would carry his jealousy, gave him a kick that sent him
sprawling on the floor, springing up to restore me to my place and
close the colored harangue that was going on at the foot of the bed.
Eliza rarely dignified me with the honor of being referee in any
disputed question. She used to say, "No matter whether it's right or
wrong, Miss Libbie's sho' to side with the Ginnel." Her droll way of
treating him like a big boy away from home for the first time, always
amused him. She threatened to tell his mother, and brought up that
sainted woman in all our encounters, as she did in the dog episode
just mentioned, as if the very name would restore order at once, and
give Eliza her own way in regulating us. But dear mother Custer had
been in the midst of too many happy scuffles, and the centre of too
many friendly fisticuffs among her active, irrepressible boys, in the old
farm-days, for the mention of her name to restore order in our
turbulent household.

FOOTNOTES:
[B] Don Juan was a horse captured by our soldiers during the
war, and bought, as was the custom, by the General, for the
appraised value of a contract horse. It was the horse that ran away
with him at the grand review, and it afterward died in Michigan.
[C] An abbreviation of the General's second name, Armstrong,
given him by his elder sister's children, when they were too young
to pronounce the full name Armstrong.
[D] I never liked hunting when the game was killed, and I was
relieved to find how often the hare rabbit escaped into the thickets.
CHAPTER VII.
LIFE IN A TEXAS TOWN.

One day we heard shout upon shout from many a soldier's throat in
camp. The headquarters guard and officers' servants, even the
officers themselves, joined in the hallooing, and we ran out to see
what could be the matter. It was our lordly Byron. Stately and superb
as he usually was, he had another side to his character, and now he
was racing up from camp, a huge piece of meat in his jaws, which he
had stolen from the camp-kettle where it was boiling for the soldiers'
dinner. His retreat was accompanied with every sort of missile—sticks,
boots and rocks—but this dog, that made himself into a "greased
streak of lightning," as a colored woman described him, bounded on,
untouched by the flying hail of the soldiers' wrath. The General did not
dare to shout and dance in sight of the men, over what he thought so
cunning in this hateful dog, as he was not protected by the friendly
walls of our tent; but he chuckled, and his eyes danced, for the brute
dropped the hot meat when he had looked about to discover how
close his pursuers were, and then, seeing the enemy nearing him,
picked it up and distanced them all. The General went back to his
tent, and called Eliza, to torment her with an account of what "her
favorite" had done all by himself. She spared no words to express her
opinion of the hated hound, for Byron was no respecter of persons
when the sly side of his character was uppermost. He stole his
master's dinner just as readily as the neighbors'. Eliza said no one
could tell how many times he had made off with a part of her dinner,
just dished up to be served, and then gone off on a prowl, "after he'd
gorged hissel," as she expressed it, "hidin' from the other dogs, and
burying it in jest such a stingy way you might 'spect from such a
worthless, plunderin' old villain."
The march to Austin was varied by fording. All the streams and
rivers were crossed in that manner, except one, where we used the
pontoon bridge. The Colorado we found too high to ford, and so made
a détour of some miles. The citizens were not unfriendly, while there
was a total cessation of work on the part of the negroes until our
column went by. They sat on the fences like a row of black crows, and
with their usual politeness made an attempt to answer questions the
troops put to them, which were unanswerable, even in the ingenious
brain of the propounder. "Well, uncle, how far is it ten miles down the
road from here?" If their feelings were hurt by such irrepressible fun,
they were soon healed by the lively trade they kept up in chickens,
eggs and butter.
The citizens sometimes answered the General's salute, and his
interested questions about the horse they rode, by joining us for a
short distance on the march. The horseflesh of Texas was a delight to
him; but I could not be so interested in the fine points as to forget the
disfiguring brands that were often upon the foreshoulder, as well as
the flank. They spoke volumes for the country where a man has to
sear a thoroughbred with a hot iron, to ensure his keeping possession.
Father Custer used to say, "What sort of country is this, anyhow, when
a man, in order to keep his property, has got to print the whole
constitution of the United States on his horse?" The whole get-up of
the Texans was rather cumbersome, it seemed to me, though they
rode perfectly. They frequently had a Mexican saddle, heavily
ornamented with silver on the high pommel, and everywhere else that
it could be added. Even the design of the stamped leather, for which
Mexico is famous, was embroidered with silver bullion. The stirrup had
handsome leather covers, while a fringe of thongs fell almost to the
ground, to aid in pushing their way through the tall prairie grass.
Sometimes the saddle-cloth, extending to the crupper, was of fur. The
bridle and bit were rich with silver also. On the massive silver pommel
hung an incongruous coil of horse-hair rope, disfiguring and ugly.
There was an iron picket-pin attached to the lariat, which we soon
learned was of inestimable value in the long rides that the Texans
took. If a man made a halt, he encircled himself with this prickly lariat
and lay down securely, knowing that no snake could cross that barrier.
In a land of venomous serpents, it behooved a man to carry his own
abatis everywhere. The saddle was also secured by a cinch or girth of
cow's-hair, which hard riders found a great help in keeping the saddle
firm. The Texan himself, though not often wearing the high-crowned,
silver-embroidered Mexican sombrero, wore usually a wide-brimmed
felt hat, on which the General afterward doted, as the felt was of
superior quality. If the term "dude" had been invented then, it would
often have applied to a Texan horseman. The hair was frequently
long, and they wore no waistcoat, I concluded because they could
better display the vast expanse of shirt-front. While the General and
his casual companion in our march talked horse, too absorbed to
notice anything else, I used to lose myself in the contemplation of the
maze of tucks, puffs and embroidery of this cambric finery,
ornamented with three old-fashioned bosom-pins. The wearer seemed
to me to represent two epochs: the fine linen, side-saddle and
blooded horse belonged to "befo' the war;" while the ragged elbows
of the coat-sleeves, and the worn boots, were decidedly "since the
war." If the shirt-front was intricate in its workmanship, the boots
were ignored by the placid owner.
They usually had the Mexican serape strapped to the back of the
saddle, or, if it was cold, as it was in our late November march, they
put their head through the opening in the middle, so woven for that
purpose, and flung the end across their breast and over one shoulder
in a picturesque manner. The bright hues of the blanket, dyed by the
Indians from the juice of the prickly pear, its soft, flexible folds having
been woven in a hand-loom, made a graceful and attractive bit of
color, which was not at all out of place in that country. These blankets
were valuable possessions. They were so pliable and perfectly water-
proof, that they protected one from every storm. We had a pair, which
we used through every subsequent campaign, and when the cold in
Kansas and Dakota became almost unbearable, sometimes, after the
long trial of a journey in the wagon, my husband used to say, "We will
resort to extreme measures, Libbie, and wrap you in the Mexican
blankets." They were the warmest of all our wraps. Nothing seemed
to fade them, and even when burnt with Tom's cigarette ashes, or
stuck through with the General's spurs, they did not ravel, as do other
fabrics. They have hung as portières in my little home, and the design
and coloring are so like the Persian rug on the floor, that it seems to
be an argument to prove that Mr. Ignatius Donnelly, in his theory of
Atlantis, is right, and that we once had a land highway between the
East and Mexico, and that the reason the Aztec now uses the designs
on his pottery and in his weaving is, that his ancestors brought over
the first sketches on papyrus.[E]
A Texan travels for comfort and safety rather than for style. If a
norther overtakes him, he dismounts and drives the picket-pin into the
ground, thus tethering his horse, which turns his back, the better to
withstand the oncoming wind. The master throws himself, face down,
in the long grass, buried in his blanket, and thus awaits the
termination of the fury with which the storm sweeps a Texas prairie.
Sometimes one of the planters, after riding a distance with us,
talking the county over, and taking in every point of our horses as he
rode, made his adieus and said he was now at his own place, where
he turned in. The General followed his fine thoroughbred with longing
eyes, and was more than astonished to find in what stables they kept
these valuable and delicate animals. No matter if the house was
habitable, the stable was usually in a state of careless dilapidation.
Doors swung on one hinge, and clapboards were torn off here and
there, while the warped roof was far from weather-proof. Even though
Texas is in the "Sunny South," the first sharp norther awakens one to
the knowledge that it is not always summer. Sometimes these storms
are quickly over, but frequently they last three days. This carelessness
about stabling stock was not owing to the depredations of an invading
army. We were the first "Yankees" they had seen. It was the general
shiftlessness that creeps into one's veins. We were not long there
ourselves before climatic influence had its effect on even the most
active among us.
Before we reached Austin, several citizens sent out invitations for
us to come to their houses; but I knew the General would not accept,
and, cold as the nights were, I felt unwilling to lose a day of camp life.
We pitched our tents on rolling ground in the vicinity of Austin, where
we overlooked a pretty town of stuccoed houses that appeared
summery in the midst of the live-oak's perennial green. The State
House, Land Office, and governor's mansion looked regal to us so long
bivouacking in the forest and on uncultivated prairies. The governor
offered for our headquarters the Blind Asylum, which had been closed
during the war. This possessed one advantage that we were glad to
improve: there was room enough for all the staff, and a long saloon
parlor and dining-room for our hops during the winter. By this time
two pretty, agreeable women, wives of staff-officers, were added to
our circle. Still, I went into the building with regret. The wagon in
which the wind had rocked me to sleep so often, and which had
proved such a stronghold against the crawling foes of the country, was
consigned to the stable with a sigh. Camp life had more pleasures
than hardships.
There were three windows in our room, which we opened at night;
but, notwithstanding the air that circulated, the feeling, after having
been so long out of doors, was suffocating. The ceiling seemed
descending to smother us. There was one joy—reveillé could ring out
on the dawning day and there was no longer imperative necessity to
spring from a warm bed and make ablutions in ice-water. There is a
good deal of that sort of mental snapping of the fingers on the part of
campaigners when they are again stationary and need not prepare for
a march. Civilization and a looking-glass must now be assumed, as it
would no longer do to rough it and ignore appearances, after we had
moved into a house, and were to live like "folks." Besides, we soon
began to be invited by the townspeople to visit them. Refined,
agreeable and well-dressed women came to see us, and, womanlike,
we ran our eyes over their dresses. They were embroidered and
trimmed richly with lace—"befo' the war" finery or from the cargo of a
blockade runner; but it was all strange enough in such an isolated
State. Almost everything was then brought from the terminus of the
Brenham Railroad to Austin, 150 miles, by ox-team. We had been
anxiously expected for some time, and there was no manner of doubt
that the arrival of the Division was a great relief to the reputable of
both sides. They said so frankly—the returned Confederate officers
and the "stay-at-home rangers," as well as the newly appointed Union
governor.
Texas was then a "go-as-you-please" State, and the lawlessness
was terrible. The returned Confederate soldiers were poor, and did not
know how to set themselves to work, and in many instances preferred
the life of a freebooter. It was so easy, if a crime was committed, to
slip into Mexico, for though it was inaccessible except by stage or on
horseback, a Texan would not mind a forced march over the country
to the Rio Grande. There were then but one or two short railroads in
operation. The one from Galveston to Brenham was the principal one,
while telegraph lines were not in use. The stage to Brenham was our
one means of communication with the outside world.
It was hard for the citizens who had remained at home to realize
that war was over, and some were unwilling to believe there ever had
been an emancipation proclamation. In the northern part of the State
they were still buying and selling slaves. The lives of the newly
appointed United States officers were threatened daily, and it was an
uneasy head that wore the gubernatorial crown. I thought them
braver men than many who had faced the enemy in battle. The
unseen, lurking foe that hides under cover of darkness was their
terror. They held themselves valiantly; but one wife and daughter
were on my mind night after night, as from dark till dawn they slept
uneasily, and started from their rooms out into the halls at every
strange sound. The General and I thought the courageous daughter
had enough brave, devoted blood in her veins to distill a portion into
the heart of many a soldier who led a forlorn hope. They told us that
in the early part of the war the girl had known of a Union flag in the
State House, held in derision and scornfully treated by the extremists.
She and her younger brother climbed upon the roof of a wing of the
building, after dark, entered a window of the Capitol, found the flag,
concealed it in the girl's clothing, and made their perilous descent
safely. The father of such a daughter might well prize her
watchfulness of his safety, as she vigilantly kept it up during our stay,
and was equal to a squadron of soldiers. She won our admiration; and
our bachelor officers paid the tribute that brave men always pay to
courageous, unselfish women, for she danced, rode and walked with
them, and when she was not so engaged, their orderlies held their
horses before the official door, while they improved every hour
allowed them within the hospitable portal.
It was a great relief to find a Southern State that was not
devastated by the war. The homes destroyed in Virginia could not fail
to move a woman's heart, as it was women and children that suffered
from such destruction. In Texas nothing seemed to have been altered.
I suppose some profited, for blockade-running could be carried on
from the ports of that great State, and there was always Mexico from
which to draw supplies.
In our daily rides we found the country about Austin delightful. The
roads were smooth and the surface rolling. Indeed, there was one
high hill, called Mount Brunnel, where we had picnics and enjoyed the
fine view, far and near, taking one of the bands of the regular
regiments from the North that joined us soon after our arrival. Mount
Brunnel was so steep we had to dismount and climb a part of the
distance. The band played the "Anvil Chorus," and the sound
descended through the valley grandly. The river, filled with sand-bars
and ugly on close examination, looked like a silver ribbon. At that
height, the ripened cotton, at certain seasons of the year, looked like
fields of foam. The thermometer was over eighty before we left the
lowlands; but at the altitude to which we climbed the air was cool. We
even went once to the State Insane Asylum, taking the band, when
the attendants asked if dance music might be played, and we watched
with wonder the quadrille of an insane eight.
The favorite ride for my husband was across the Colorado to the
Deaf and Dumb Asylum. There seemed to be a fascination for him in
the children, who were equally charmed with the young soldier that
silently watched their pretty, pathetic exhibitions of intelligent speech
by gesture. My husband riveted his gaze on their speaking eyes, and
as their instructor spelt the passions of love, hatred, remorse and
reverence on his fingers, one little girl represented them by singularly
graceful gestures, charming him, and filling his eyes with tears, which
he did not seek to hide. The pupils were from ten to sixteen years of
age. Their supple wrists were a delight to us, and the tiny hands of a
child of the matron, whom the General held, talked in a cunning way
to its playmates, who, it knew, could not comprehend its speech. It
was well that the Professor was hospitality itself, and did not mind a
cavalcade dashing up the road to his house. My husband, when he did
not openly suggest going, used some subterfuge as trivial as going for
water-cress, that grew in a pond near the Asylum. The children knew
him, and welcomed him with lustrous, eloquent eyes, and went
untiringly through their little exhibitions, learning to bring him their
compositions, examples and maps, for his commendation. How little
we thought then that the lessons he was taking, in order to talk with
the children he learned to love, would soon come into use while sitting
round a camp-fire and making himself understood by Indians. Of
course, their sign-language is wholly their own, but it is the same
method of using the simplest signs as expressive of thought. It was a
long, pleasant ride; its only drawback to me being the fording of the
river, which had quicksands and a rapid current. The Colorado was
low, but the river-bed was wide and filled with sand-bars. The mad
torrent that the citizens told us of in freshets, we did not see. If I
followed my husband, as Custis Lee had learned to do, I found myself
guided safely, but it sometimes happened that our party entered the
river, laughing and talking so earnestly, noisily and excitedly that we
forgot caution. One lesson was enough; the sensation of the sinking
of the horse's hindlegs in quicksands is not to be forgotten. The loud
cry of the General to "saw on the bit" or whip my horse, excited,
frightened directions from the staff to turn to the right or the left,
Custis Lee trembling and snorting with fear, but responding to a sharp
cut of my whip (for I rarely struck him), and we plunged on to a
firmer soil, wiser for all the future on account of that moment of
serious peril.
We seldom rode through the town, as my husband disliked the
publicity that a group of cavalrymen must necessarily cause in a city
street. If we were compelled to, the staff and Tom pointed out one
after another of the loungers about the stores, or the horseman, who
had killed his man. It seemed to be thought the necessary thing, to
establish the Texan's idea of courage, to have either fought in duels,
or, by waylaying the enemy, to have killed from one to five men. The
Southern climate seems to keep alive a feud that our cold Northern
winters freeze out. Bad blood was never kept in abeyance; they had
out their bursts of temper when the attack of rage came on. Each
man, even the boys of twelve, went armed. I used to wonder at the
humped-up coats, until a norther, before which we were one day
scudding for safety, lifted the coats of men making a similar dash, and
the pistol was revealed.
It was the favorite pastime of our men (having concocted the
scheme with the General) to ride near some of the outskirts, and,
when we reached some lone tree, tell me that from that limb a
murdered man had lately swung. This grim joke was often practiced
on me, in order that the shuddering horror and the start Custis Lee
and I made, to skim over the country away from such a hated spot,
might be enjoyed. I came to think the Texas trees bore that human
fruit a little too often for truth; but some of the citizens gloated over
these scenes of horror, and added a lamp-post in town to the list of
localities from which, in future, I must turn away my head.
The negroes in Texas and Louisiana were the worst in all the South.
The border States had commonly sold their most insubordinate slaves
into these two distant States.[F] Fortunately, our now well-disciplined
Division and the regular cavalry kept everything in a better condition;
but there were constantly individual cases of outrageous conduct, and
often of crime, among whites and blacks, high and low. Texas had so
long been looked upon as a sort of "city of refuge" by outlaws, that
those whom the other States refused to harbor came to that locality. A
country reached only by sea from the south or by a wagon-train from
the north, and through which no telegraph lines ran until after we
came, would certainly offer an admirable hiding-place for those who
leave their country for their country's good. I have read somewhere
that Texas derived its name from a group of rascals, who, sitting
around a fire on their arrival on the soil that was to protect them,
composed this couplet:
"If every other land forsakes us,
This is the land that freely takes us (Texas)."
As story after story reached us, I began to think the State was well
named. There were a great many excellent, law-abiding citizens, but
not enough to leaven the lump at that chaotic period. Even the
women learned to defend themselves, as the war had deprived them
of their natural protectors, who had gone either in the Northern or
Southern army—for Texas had a cavalry regiment of refugees in our
service. One woman, while we were there, found a teamster getting
into her window, and shot him fatally. Firearms were so constantly
about—for the men did not dress without a pistol in their belts—that
women grew accustomed to the sight of weapons. There was a
woman of whom I constantly heard, rich and refined, but living out of
town on a plantation that seemed to be fit only for negroes. She rode
fearlessly, and diverted her monotonous life by hunting. The planters
frequently met her with game slung upon her saddle, and once she
lassoed and brought in a wolf alone. Finally, this woman came to see
me, but curiosity made me hardly civil for a few moments, as I was
trying to reconcile myself to the knowledge that the quiet, graceful
person before me, with rich dress, jewels and a French hat, could take
her gun and dogs, mount a fiery horse, and go hunting alone. We
found, on returning the visit, that, though they were rich, owning
blooded horses, a plantation and a mill, their domicile was anything
but what we at the North would call comfortable. It was a long, one-
storied, log building, consisting of a parlor, dining-room, bedroom and
two small "no-'count" rooms, as the servants said, all opening into one
another and upon the porch. The first surprise on entering was, that
the roof did not fit down snugly on the side wall. A strip of the blue
sky was visible on three sides, while the partition of the dining-room
only came up part way. There seemed to be no sort of provision for
"Caudle lectures." The walls were roughly plastered, but this space
just under the roof was for ventilation, and I fancied they would get
enough of it during a norther.
I am reminded of a story that one of the witty Southern women
told me, after repeating some very good comic verses, in which they
excel. She said the house I described was not uncommon in Texas,
and that once she was traveling over a portion of the State, on a
journey of great suffering, as she was accompanying her husband's
remains to a family burial-ground. They assisted her from her carriage
into one of the rooms of a long log house, used as a wayside inn, and
the landlady kindly helped her into bed, as she was prostrated with
suffering and fatigue. After she left her, the landlady seemed to forget
that the partition did not extend to the rafters, and began questioning
her servant as to what was the matter, etc. Hearing that the lady had
lost her husband, the old dame exclaimed, sympathetically, "Poor
thing! Poor thing! I know how it is; I've lost three of em."
The General and his staff got a good deal of sport out of the
manner in which they exaggerated the tales of bloodshed to me, and
aroused the anger, grief and horror that I could not suppress. I must
defend myself from the supposition that I may have been chronicling
their absurd and highly colored tales. All that I have written I have
either seen or have reliable authority for. Their astounding stories,
composed among themselves, began with a concocted plan by which
one casually started a story, the others met it with surprise, and with
an "Is it possible?" and the next led up to some improbable narrative
of the General's—I growing more and more shivery as the wicked
tormentors advanced. Always rather gullible, I suppose, I must
confess the torn and distracted state of society in Texas made
everything they said seem probable. I don't know how long I kept up
a fashion of starting and shuddering over the frequent crack of a rifle
or pistol, as we rode through the woods about the town. My husband
and his attendant scamps did all they could to confirm my belief that
the woods were full of assassins, and I rode on after these sharp
reports, expecting to come upon the lifeless remains of a murdered
man. They all said, with well-assumed feeling, that Texas was an
awful country in which to live, where a man's life was not safe an
hour, and excitedly exclaimed at each shot, "There goes some other
poor fellow!" I have reason to believe it was a serious disappointment
to the whole confederation of jokers, to have me actually see a
Mexican driver (a greaser) crack his whip over the heads of his oxen,
as they crawled along in front of us one day when we were riding.
There is no sound like the snap of the lash of a "bull-whacker," as they
are called, and perhaps brighter women than I am might have been
taken in by it, and thought it a pistol-shot. This ended my taking it as
the signal of a death.
The lawlessness of the State was much diminished by the troops
scattered through the country. General Custer was much occupied in
answering communications that came from distant parts of Texas,
describing the demoralized state of the country, and asking for troops.
These appeals were from all sides. It was felt more and more that the
presence of the troops was absolutely necessary, and it was certainly
agreeable to us that we were not looked upon as invaders. The
General then had thirteen regiments of infantry and as many of
cavalry, scattered in every part of the State comprised in his district.
The regular troops arriving brought their wives and daughters, and it
was a great addition, as we had constant entertainments, in which the
civilians, so long cut off from all gayety, were glad to participate. The
staff assisted me greatly in my preparations. We dressed the long
parlors in evergreens, made canopies of flags, arranged wax-lights in
impromptu wooden sconces, and with the waxed floor it was tempting
enough to those who cared for dancing. The soldiers soon organized a
string band, and a sergeant called off the quadrilles. Sometimes my
husband planned and arranged the suppers alone, but usually the
staff divided the duty of preparing the refreshments. Occasionally we
attempted a dinner, and, as we wanted to invite our own ladies as well
as some from the regular regiments, the table was a subject of study;
for when twenty came, the dishes gave out. The staff dined early, so
that we could have theirs, and the Southern woman who occupied
two rooms in the building lent everything she had. Uncle Charley, our
cook, who now had found a colored church in which to preach on
Sunday, did up all his religion on that day, and swore all the week, but
the cellar-kitchen was distant, and, besides, my husband used to
argue that it was just as well to endure placidly the evils right about
us, but not to seek for more. The swearing did not interfere with the
cooking, and Charley thought it necessary to thus clear the kitchen, as
our yard at that time was black with the colored race. Each officer's
servant had his circle of friends, and they hovered round us like a dark
cloud. The dishes that Uncle Charley sent up were excellent. The
Texas beef and poultry were of superior quality, and we even had a
respite from condensed milk, as a citizen had lent us a cow.
At one of these dinners Eliza had enlisted a colored boy to help her
wait on the table. I had tried to borrow enough dishes, and thought
the table was provided. But the glory of the occasion departed when,
after soup, roast game, etc., all served with the great luxury, at that
place, of separate plates, Uncle Charley bethought himself that he
would add, as a surprise, a dessert. It is almost unnecessary to say
that a dessert at that time was an event. Uncle Charley said his "best
holt" was on meats, and his attempts at pastry would not only have
ruined the remnant of his temper, but, I am afraid, if often indulged
in, would have effectually finished our digestion. For this I had not
counted, and, to my dismay, after the pudding had been deposited
with great salaam and ceremony before the General, the colored boy
rushed around and gathered everybody's coffee-saucer. Until he
returned them washed, and placed them at the head of the table, I
did not imagine what he was doing; I simply waited, in that uncertain
frame of mind that a hostess well knows. My husband looked at the
array of cups down the long table, standing bereft of their partners,
laid his head back and shouted. Then everybody else laughed, and,
very red and very mortified, I concluded to admit that I had not
arranged for this last course, and that on that table were the united
contents of all our mess-chests, and there were no saucers or dessert-
plates nearer than town. We were aware that our stay in the South
was limited, and made no effort to keep enough crockery for dinners
of twenty.
After many enjoyable parties in our parlor, we received a pathetic
and carefully worded hint from Eliza, who was now a great belle, that
she would like to return some of the hospitality shown her by the
colored people of the town, and my husband was only too glad to
prove to Eliza how we valued her faithful, self-denying life in our
service. We composed an invitation, in which Miss Eliza Brown
presented her compliments to Mr. Washington or Mr. Jefferson, as the
case might be, and would be happy to see him on such an evening,
with the word "dancing" in the left-hand corner. A gathering of the
darkeys seemed equally jubilant, whether it was a funeral, a camp-
meeting or a dance; but it seemed they made a difference in dress for
these occasions, if not in manners. So it was best, Eliza thought, to
add "dancing," though it was only at first a mirthful suggestion of the
General's fertile brain. He gave the copying to the office clerk, who,
being a professional penman, put as many tails to his capitals and
flourishes to his words as he did for the white folks, Eliza's critical eye
watching for any less elaborate embellishment.
The lower part of the house was given over to the negroes, who
polished the floor, trimmed the windows, columns and chimney with
garlands of live-oak, and lavished candles on the scene, while at the
supper they had a heterogeneous jumble of just what they asked for,
including coon, the dish garnished with watercress and bits of boiled
beet. I think we were not asked; but as the fiddle started the jigs, the
General's feet began to keep time, and he executed some pas seul
around our room, and then, extracting, as usual, a promise from me
not to laugh, he dragged me down the steps, and we hid where we
saw it all. The quadrille ended, the order of ceremonies seemed to
consist in the company going down to one end of the room in
response to an order from Uncle Charley to "cl'ar the flo'." Then the
old man of sixty, a grandfather, now dressed in white tie, vest and
gloves, with shining black clothes, took the floor. He knew himself to
be the cynosure of all eyes, and bore himself accordingly. He had
previously said to me, "To-night, I expects, Miss Libbie, to put down
some steps those colored folks has never seen befo'." And surely he
did. He ambled out, as lithe as a youngster, cut some pigeon-wings,
and then skipped and flung himself about with the agility of a boy,
stopping not only for breath, but to watch the expressions, envious
and admiring, of the spectators at the end of the room. When his last
breath was exhausted, Aunt Ann, our old laundress, came tripping
down the polished floor, and executed a shuffle, most decorous at
first, and then, reviving her youth, she struck into a hoydenish jig, her
son encouraging her by patting time. More quadrilles, then another
clearing of the floor, and a young yellow woman pirouetted down the
room, in bright green tarlatan petticoats, very short and airy. She
executed a hornpipe and a reel, and, like Uncle Charley, improvised
some steps for the occasion. This black sylph was surrounded with a
cloud of diaphanous drapery; she wreathed her arms about her head,
kept on the smirk of the ballet-girl, and coquetted and skipped about,
with manners that brought down the house. The fattest darkey of all
waddled down next and did a breakdown, at which all the assembly
patted juba, and with their woolly heads kept time to the violin. My
husband never moved from his hiding-place, but chuckled and shook
over the sight, novel to us, till Eliza found us out and forgave the
"peeking."
The clothes worn looked as if the property-room of a third-rate
theatre had been rifled—faded finery, fag ends of old lace, tumbled
flowers that had done duty at many a "white folks'" ball, on the pretty
costume of the missus, old feathers set up in the wool, where what
was left of the plume bobbed and quavered, as the head of the owner
moved to the time of the music, or nodded and swayed back and forth
while conversation was kept up. The braiding, oiling and smoothing
had gone on for days previous, to straighten the wool and make it lie
flat; but the activity in the pursuit of pleasure soon set the little kinks
free, and each hair stood on tiptoe, joining in a jig of its own. The
powder begged from the toilet-table of the missus was soon swept
away in the general shine; but the belles cared little for having
suspended temporarily the breath of their rivals by the gorgeousness
of their toilettes; they forgot appearances and yielded to that
absorption of excitement in which the colored soul is spellbound.
Eliza moved about, "queening it," as she knew how to do, and it
was a proud hour of triumph to her, as she cast a complacent side
glance at the tail of her gown, which she had wheedled out of me by
cunning arguments, among which the most powerful was that "'twas
getting so mussed, and 'twasn't no sort of a dress for a Ginnel's wife,
no how." The General lost nothing, for he sat in our hidden corner,
shaking and throwing his head back in glee, but keeping a close and
warning hold on my arm, as I was not so successful in smothering a
titter as he was, having no mustache to deaden the sound. After Eliza
discovered us, she let no one know of our perfidy, and the company,
believing they were alone, abandoned themselves to complete
enjoyment, as the fiddle played havoc with the heels of the entire
assembly.

FOOTNOTES:
[E] In a town of Mexico last year I saw these small looms with
blankets in them, in various stages of progress, in many cottages.
Among the Indians the rude loom is carried about in the mountain
villages, and with some tribes there is a superstition about finishing
the blankets in the same place where they were begun. A squaw
will sometimes have one half done, and if an order is given her she
will not break over her rule to finish it if a move is made in the
midst of her work. She waits until the next year, when her people
return to the same camp, as is the custom when the Indian seeks
certain game or grazing, or to cut longer poles.
[F] In order to gain some idea of the immense territory in which
our troops were attempting to restore order, I have only to remind
the reader that Texas is larger than either the German or the
Austrian Empire. The area of the State is 274,356 square miles. It
is as large as France, Belgium, England and Wales all combined. If
we could place the northwestern corner of Texas at Chicago, its
most southerly point would be at Jacksonville, Fla., its most
easterly at Petersburg, Va., and its most westerly in the interior of
Missouri. It would thus cover the entire States of Indiana, Kentucky
and the two Carolinas, and nearly all of Tennessee, with one-third
of Ohio, two-thirds of Virginia, half of Georgia, and portions of
Florida, Alabama, Illinois and Missouri. The cities of Chicago,
Toledo, Cincinnati, Washington, Richmond, Charleston, Atlanta and
Nashville would all be included within its borders.
CHAPTER VIII.
LETTERS HOME.

The trivial events of our daily life were chronicled in a weekly letter
home, and from a number of these school-girl effusions I cull a few
items, as they give an idea of my husband's recreations as well as his
duties.
"We are quartered in the Blind Asylum, which is large and
comfortable. The large rooms in the main part of the building we can
use for entertaining, while the staff occupy the wings and the building
in the yard, that was used for a schoolroom. Out there they can have
all the 'walk-arounds' and 'high-jinks' they choose, without any one
hearing them."

"Our room is large, and, mother, I have two bureaus and a


wardrobe, and lose my things constantly, I am so unused to so much
room. We women hardly knew what to make of the absence of
looking-glasses, as the house is otherwise furnished, until it occurred
to us that the former occupants wouldn't get much good out of a
mirror. It isn't so necessary to have one, after all, as I got on all
summer very well, after I learned to brush my hair straight back and
not try to part it. I have a mirror now, and am wrestling with back hair
again."
"I confess to you, mother, it is a comfort to get out of bed on to a
carpet, and dress by a fire; but don't tell Armstrong I said so, as I
never mentioned to him that dressing before day, my eyes streaming
with tears from the camp-fire while I took an ice-water bath, was not
the mode of serving my country that I could choose."

"Last Sunday it was uncomfortably warm. We wore thin summer


clothes, and were languid from the heat. The thermometer was
eighty-two in the shade. On Monday the weather changed from heat
to cold in five minutes, in consequence of the sudden and violent
winds which are called 'northers.'"
"No one prepares for the cold in this country, but there was a
general scattering when our first norther attacked us. Tom rushed for
wood, and of course none was cut. He fished Tex out from the
kitchen, borrowed an axe from one of the headquarters men, and
soon appeared with an armful. As he took the sticks from Tex to build
the fire, out dropped a scorpion to add to the excitement. It was
torpid, but nevertheless it was a scorpion, and I took my usual safe
position, in the middle of the bed, till there was an auto da fe. The
loose windows rattled, and the wind howled around the corner of our
room. I put a sack and shawl over my summer dress, and we shivered
over Tom's fire. I rather wondered at Armstrong's huddling, as he is
usually so warm, but each act of these boys needs investigating. By
and by he went off to write, while father Custer took out his pipe, to
calm the troubled scene into which the rush of Nova Zembla had
thrown us. He sat 'way under the mantel to let the tobacco-smoke go
up the chimney. Pretty soon Autie returned and threw some waste
paper on the fire, and the next thing we all started violently back from
a wild pyrotechnic display. With the papers went in a handful of blank
cartridges, and these innocent-looking scamps faced their father and
calmly asked him why he had jumped half-way across the room. They
often repeat this Fourth-of-July exhibition with fire-crackers, either tied
to his chair, or tossed carelessly on the burning logs, when his
attention is attracted elsewhere. But don't pity him, mother. No matter
what trick they play, he is never phased. He matches them too, and I
help him, though I am obliged to confess I often join in the laugh, it is
all so funny. This was not the last of the hullabaloo. The wood gave
out and Autie descended for more. Tex took this occasion, when
everyone was hunting a fire and shelter from the cold, to right what
he considered a grievous wrong. Autie found him belaboring another
colored boy, whom he had 'downed.' Autie investigated, for if Tex was
right he was bound to let the fight proceed. You know in his West
Point days he was arrested for allowing a fisticuff to go on, and
because he said, 'Stand back, boys, and let's have a fair fight.' But
finding our boy in the wrong, he arraigned him, and began, 'Did you
strike Jake with malice aforethought?' 'No sah! no sah! I dun struck
him with the back of the hatchet.' At this Autie found himself no
longer a 'most righteous judge.' This Daniel beat a quick retreat, red
with suppressed laughter, and made Tom go down to do the
punishing. Tom shut Tex in the chicken-coop; but it was hard for me
to see from my window his shiny eyes looking out from between the
slats, so they made the sentence light, and he was set free in the
afternoon."
"Now, mother, I have established the only Yankee wood-pile in
Texas. I don't mean to be caught again, and shrivel up as we did this
time. You don't know how these storms deceive you. One hour we are
so suffocated with the heavy, oppressive air, we sit in the deep
window-sills and pant for breath. Along comes a roaring sound
through the tree-tops, and there's a scatter, I can tell you. We bang
down the windows, and shout for Texas to hunt the wood-pile, jump
into warm clothes, and before we are fairly prepared, the hurricane is
upon us. We really don't mind it a bit, as it doesn't last long (once it
lasted three days), besides, it is so good to be in something that isn't
going to blow down, as we momentarily expected in a tent. Our
Sundays pass so slowly! The traveling-wagon holds a good many, and
we don't mind close quarters, so we all squeeze in, and the bachelor
officers ride with us to church. The Episcopal church is still open, but
as they have no fires we would be glad if the rector warmed us up
with his eloquence a little more. However, it's church, and we begin to
feel semi-civilized."
"The citizens are constantly coming to pay their respects to
Armstrong. You see, we were welcomed instead of dreaded, as,
Yankees or no Yankees, a man's life is just as good, preserved by a
Federal soldier as by a Confederate, and everybody seems to be in a
terrified state in this lawless land. Among the callers is one man that
will interest you, father. I believe you are considered authority on the
history of the fight that took place at Monroe, when the Kentucky
regiment fought the British in 1812. Well, whom do you think we have
found down here, but the old Colonel Groome who distinguished
himself that day? He is a white-headed old soldier, and when Autie
told him that we were right from Monroe, he was so affected the tears
came to his eyes. It was he that set the barn on fire to prevent the
British using it as a fortification for sharp-shooters. He crawled away
from the burning building on his hands and knees, while their bullets
cut his clothes and wounded him several times. Years afterward he
met an old British officer, who told him, in their talk, that the man who
fired the barn was killed by his own army, but Colonel Groome, in
quite a dramatic way, said, 'No! I am the man.' He says that he would
like to see you so much. Autie is greatly interested in this veteran, and
we are going to call on him, and get two game chickens he is to give
us."
"Now, father, don't wrinkle up your brows when I tell you that we
race horses. Even I race with Mrs. L——, and much as you may
disapprove, I know my father too well not to be sure he will be glad
that his only daughter beat. But let me explain to you that racing
among ourselves is not your idea of it. There is no money at stake, no
rough crowd, none of the evils of which you may well disapprove, as
we know horse-racing at home. Armstrong is considered the best
judge of a horse here. The Texans supposed no one in the world could
ride as well as themselves, and they do ride splendidly, but those who
saw Armstrong keep his place in the saddle when Don Juan ran away
with him at the grand review in Washington, concede that he does
know how to ride, however mistaken his views on patriotism may be.
We have now three running horses and a fast pony, none of which has
beaten. Autie's bay pony beat a crack runner of which the town
boasts, by three full lengths. The races are near our quarters, so we
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like