You are on page 1of 53

Computer Simulation A Foundational

Approach Using Python 1st Edition


Yahya Esmail Osais
Visit to download the full and correct content document:
https://textbookfull.com/product/computer-simulation-a-foundational-approach-using-p
ython-1st-edition-yahya-esmail-osais/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Essential algorithms a practical approach to computer


algorithms using Python and C Second Edition Rod
Stephens

https://textbookfull.com/product/essential-algorithms-a-
practical-approach-to-computer-algorithms-using-python-and-c-
second-edition-rod-stephens/

Python Programming Using Problem Solving Approach


Thareja Reema

https://textbookfull.com/product/python-programming-using-
problem-solving-approach-thareja-reema/

Computer Vision Using Deep Learning Neural Network


Architectures with Python and Keras 1st Edition Vaibhav
Verdhan

https://textbookfull.com/product/computer-vision-using-deep-
learning-neural-network-architectures-with-python-and-keras-1st-
edition-vaibhav-verdhan/

Building Energy Simulation: A Workbook Using


DesignBuilder™ 1st Edition Vishal Garg

https://textbookfull.com/product/building-energy-simulation-a-
workbook-using-designbuilder-1st-edition-vishal-garg/
Practical Programming An Introduction to Computer
Science Using Python 3 6 3rd Edition Paul Gries

https://textbookfull.com/product/practical-programming-an-
introduction-to-computer-science-using-python-3-6-3rd-edition-
paul-gries/

Molecular Physical Chemistry A Computer based Approach


using Mathematica and Gaussian 1st Edition José J. C.
Teixeira-Dias (Auth.)

https://textbookfull.com/product/molecular-physical-chemistry-a-
computer-based-approach-using-mathematica-and-gaussian-1st-
edition-jose-j-c-teixeira-dias-auth/

A Step by Step Approach to the Modeling of Chemical


Engineering Processes: Using Excel for simulation 1st
Edition Liliane Maria Ferrareso Lona (Auth.)

https://textbookfull.com/product/a-step-by-step-approach-to-the-
modeling-of-chemical-engineering-processes-using-excel-for-
simulation-1st-edition-liliane-maria-ferrareso-lona-auth/

Building Energy Simulation: A Workbook Using


DesignBuilder™ 2nd Edition Vishal Garg

https://textbookfull.com/product/building-energy-simulation-a-
workbook-using-designbuilder-2nd-edition-vishal-garg/

Summer of Simulation: 50 Years of Seminal Computer


Simulation Research John Sokolowski

https://textbookfull.com/product/summer-of-simulation-50-years-
of-seminal-computer-simulation-research-john-sokolowski/
Computer Simulation
A Foundational Approach Using Python
CHAPMAN & HALL/CRC
COMPUTER and INFORMATION SCIENCE SERIES
Series Editor: Sartaj Sahni

PUBLISHED TITLES

ADVERSARIAL REASONING: COMPUTATIONAL APPROACHES TO READING THE OPPONENT’S MIND


Alexander Kott and William M. McEneaney
COMPUTER-AIDED GRAPHING AND SIMULATION TOOLS FOR AUTOCAD USERS
P. A. Simionescu
COMPUTER SIMULATION: A FOUNDATIONAL APPROACH USING PYTHON
Yahya E. Osais
DELAUNAY MESH GENERATION
Siu-Wing Cheng, Tamal Krishna Dey, and Jonathan Richard Shewchuk
DISTRIBUTED SENSOR NETWORKS, SECOND EDITION
S. Sitharama Iyengar and Richard R. Brooks
DISTRIBUTED SYSTEMS: AN ALGORITHMIC APPROACH, SECOND EDITION
Sukumar Ghosh
ENERGY-AWARE MEMORY MANAGEMENT FOR EMBEDDED MULTIMEDIA SYSTEMS:
A COMPUTER-AIDED DESIGN APPROACH
Florin Balasa and Dhiraj K. Pradhan
ENERGY EFFICIENT HARDWARE-SOFTWARE CO-SYNTHESIS USING RECONFIGURABLE HARDWARE
Jingzhao Ou and Viktor K. Prasanna
EVOLUTIONARY MULTI-OBJECTIVE SYSTEM DESIGN: THEORY AND APPLICATIONS
Nadia Nedjah, Luiza De Macedo Mourelle, and Heitor Silverio Lopes
FROM ACTION SYSTEMS TO DISTRIBUTED SYSTEMS: THE REFINEMENT APPROACH
Luigia Petre and Emil Sekerinski
FROM INTERNET OF THINGS TO SMART CITIES: ENABLING TECHNOLOGIES
Hongjian Sun, Chao Wang, and Bashar I. Ahmad
FUNDAMENTALS OF NATURAL COMPUTING: BASIC CONCEPTS, ALGORITHMS, AND APPLICATIONS
Leandro Nunes de Castro
HANDBOOK OF ALGORITHMS FOR WIRELESS NETWORKING AND MOBILE COMPUTING
Azzedine Boukerche
PUBLISHED TITLES CONTINUED
HANDBOOK OF APPROXIMATION ALGORITHMS AND METAHEURISTICS
Teofilo F. Gonzalez
HANDBOOK OF BIOINSPIRED ALGORITHMS AND APPLICATIONS
Stephan Olariu and Albert Y. Zomaya
HANDBOOK OF COMPUTATIONAL MOLECULAR BIOLOGY
Srinivas Aluru
HANDBOOK OF DATA STRUCTURES AND APPLICATIONS
Dinesh P. Mehta and Sartaj Sahni
HANDBOOK OF DYNAMIC SYSTEM MODELING
Paul A. Fishwick
HANDBOOK OF ENERGY-AWARE AND GREEN COMPUTING
Ishfaq Ahmad and Sanjay Ranka
HANDBOOK OF GRAPH THEORY, COMBINATORIAL OPTIMIZATION, AND ALGORITHMS
Krishnaiyan “KT” Thulasiraman, Subramanian Arumugam, Andreas Brandstädt, and Takao Nishizeki
HANDBOOK OF PARALLEL COMPUTING: MODELS, ALGORITHMS AND APPLICATIONS
Sanguthevar Rajasekaran and John Reif
HANDBOOK OF REAL-TIME AND EMBEDDED SYSTEMS
Insup Lee, Joseph Y-T. Leung, and Sang H. Son
HANDBOOK OF SCHEDULING: ALGORITHMS, MODELS, AND PERFORMANCE ANALYSIS
Joseph Y.-T. Leung
HIGH PERFORMANCE COMPUTING IN REMOTE SENSING
Antonio J. Plaza and Chein-I Chang
HUMAN ACTIVITY RECOGNITION: USING WEARABLE SENSORS AND SMARTPHONES
Miguel A. Labrador and Oscar D. Lara Yejas
IMPROVING THE PERFORMANCE OF WIRELESS LANs: A PRACTICAL GUIDE
Nurul Sarkar
INTEGRATION OF SERVICES INTO WORKFLOW APPLICATIONS
Paweł Czarnul
INTRODUCTION TO NETWORK SECURITY
Douglas Jacobson
LOCATION-BASED INFORMATION SYSTEMS: DEVELOPING REAL-TIME TRACKING APPLICATIONS
Miguel A. Labrador, Alfredo J. Pérez, and Pedro M. Wightman
PUBLISHED TITLES CONTINUED

METHODS IN ALGORITHMIC ANALYSIS


Vladimir A. Dobrushkin
MULTICORE COMPUTING: ALGORITHMS, ARCHITECTURES, AND APPLICATIONS
Sanguthevar Rajasekaran, Lance Fiondella, Mohamed Ahmed, and Reda A. Ammar
NETWORKS OF THE FUTURE: ARCHITECTURES, TECHNOLOGIES, AND IMPLEMENTATIONS
Mahmoud Elkhodr, Qusay F. Hassan, and Seyed Shahrestani
PERFORMANCE ANALYSIS OF QUEUING AND COMPUTER NETWORKS
G. R. Dattatreya
THE PRACTICAL HANDBOOK OF INTERNET COMPUTING
Munindar P. Singh
SCALABLE AND SECURE INTERNET SERVICES AND ARCHITECTURE
Cheng-Zhong Xu
SOFTWARE APPLICATION DEVELOPMENT: A VISUAL C++®, MFC, AND STL TUTORIAL
Bud Fox, Zhang Wenzu, and Tan May Ling
SPECULATIVE EXECUTION IN HIGH PERFORMANCE COMPUTER ARCHITECTURES
David Kaeli and Pen-Chung Yew
TRUSTWORTHY CYBER-PHYSICAL SYSTEMS ENGINEERING
Alexander Romanovsky and Fuyuki Ishikawa
VEHICULAR NETWORKS: FROM THEORY TO PRACTICE
Stephan Olariu and Michele C. Weigle
X-MACHINES FOR AGENT-BASED MODELING: FLAME PERSPECTIVES
Mariam Kiran
Computer Simulation
A Foundational Approach Using Python

Yahya E. Osais
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2018 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

Printed on acid-free paper


Version Date: 20171024

International Standard Book Number-13: 978-1-498-72682-5 (Hardback)

This book contains information obtained from authentic and highly regarded sources. Reasonable
efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and
publishers have attempted to trace the copyright holders of all material reproduced in this publication
and apologize to copyright holders if permission to publish in this form has not been obtained. If any
copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information
storage or retrieval system, without written permission from the publishers.

For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc.
(CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization
that provides licenses and registration for a variety of users. For organizations that have been granted
a photocopy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and
are used only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
To my wife, Asmahan,
and my daughters, Renad, Retal, and Remas.
Contents

List of Programs xv

List of Figures xix

List of Tables xxvii


Foreword xxix

Preface xxxi

About the Author xxxiii


Abbreviations xxxv

Symbols xxxvii

Part I The Fundamentals

Chapter 1  Introduction 3
1.1 THE PILLARS OF SCIENCE AND ENGINEERING 3
1.2 STUDYING THE QUEUEING PHENOMENON 4
1.3 WHAT IS SIMULATION? 5
1.4 LIFECYCLE OF A SIMULATION STUDY 6
1.5 ADVANTAGES AND LIMITATIONS OF SIMULATION 9
1.6 OVERVIEW OF THE BOOK 10
1.7 SUMMARY 11

Chapter 2  Building Conceptual Models 13


2.1 WHAT IS A CONCEPTUAL MODEL? 13
2.2 ELEMENTS OF A CONCEPTUAL MODEL 15
2.2.1 Entities 15

ix
x  Contents

2.2.2 Attributes 15
2.2.3 State Variables 16
2.2.4 Events 17
2.2.5 Activities 17
2.3 THE SINGLE-SERVER QUEUEING SYSTEM 18
2.4 STATE DIAGRAMS 22
2.5 ACTUAL TIME VERSUS SIMULATED TIME 23
2.6 SUMMARY 24
2.7 EXERCISES 24

Chapter 3  Simulating Probabilities 27


3.1 RANDOM EXPERIMENTS AND EVENTS 27
3.2 WHAT IS PROBABILITY? 28
3.3 COMPUTING PROBABILITIES 30
3.4 PROBABILITY AS A SAMPLE MEAN 32
3.5 SUMMARY 36
3.6 EXERCISES 36

Chapter 4  Simulating Random Variables and Stochastic Pro-


cesses 39
4.1 WHAT ARE RANDOM VARIABLES? 39
4.1.1 Probability Mass Functions 40
4.1.2 Cumulative Distribution Functions 41
4.1.3 Probability Density Functions 43
4.1.4 Histograms 44
4.2 SOME USEFUL RANDOM VARIABLES 46
4.2.1 Bernoulli 46
4.2.2 Binomial 47
4.2.3 Geometric 48
4.2.4 Poisson 49
4.2.5 Uniform 50
4.2.6 Exponential 53
4.2.7 Erlang 54
4.2.8 Normal 54
4.2.9 Triangular 55
4.3 STOCHASTIC PROCESSES 56
Contents  xi

4.4 DYNAMIC SYSTEM EVOLUTION 58


4.5 SIMULATING QUEUEING PROCESSES 60
4.5.1 Discrete-Time Markov Chains 62
4.5.2 Continuous-Time Markov Chains 64
4.6 SUMMARY 67
4.7 EXERCISES 67

Chapter 5  Simulating the Single-Server Queueing System 69


5.1 SIMULATION MODEL 69
5.2 COLLECTING SIMULATED DATA 75
5.3 PERFORMANCE LAWS 76
5.3.1 Throughput 76
5.3.2 Utilization 76
5.3.3 Response Time 77
5.3.4 E[N(t)] 79
5.3.5 P[N] 82
5.4 INDEPENDENT SIMULATION RUNS 84
5.5 TRANSIENT AND STEADY PHASES 86
5.6 SUMMARY 91
5.7 EXERCISES 91

Chapter 6  Statistical Analysis of Simulated Data 93


6.1 POPULATIONS AND SAMPLES 93
6.2 PROBABILITY DISTRIBUTION OF THE SAMPLE MEAN 95
6.3 CONFIDENCE INTERVALS 97
6.3.1 Interpretations 100
6.3.2 Why Not Always Use a 99% Confidence Interval? 102
6.4 COMPARING TWO SYSTEM DESIGNS 104
6.5 SUMMARY 105
6.6 EXERCISES 105

Part II Managing Complexity

Chapter 7  Event Graphs 109


7.1 WHAT IS AN EVENT GRAPH? 109
7.2 EXAMPLES 111
xii  Contents

7.2.1 The Arrival Process 111


7.2.2 Single-Server Queueing System 112
7.2.3 Multiple-Server Queueing System 114
7.2.4 Single-Server Queueing System with a Limited
Queue Capacity 114
7.2.5 Single-Server Queuing System with Failure 115
7.2.6 Single-Server Queuing System with Reneging 116
7.2.7 Single-Server Queuing System with Balking 116
7.3 TRANSLATING EVENT GRAPHS INTO CODE 117
7.4 SUMMARY 120
7.5 EXERCISES 120

Chapter 8  Building Simulation Programs 123


8.1 TIME-DRIVEN SIMULATION 123
8.2 EVENT-DRIVEN SIMULATION 126
8.3 WRITING EVENT-DRIVEN SIMULATION PROGRAMS 127
8.4 PROGRAMMING ISSUES 134
8.4.1 Event Collision 134
8.4.2 Identifiers for Packets 134
8.4.3 Stopping Conditions for the Simulation Loop 134
8.5 SUMMARY 135
8.6 EXERCISES 135

Part III Problem-Solving

Chapter 9  The Monte Carlo Method 139


9.1 ESTIMATING THE VALUE OF π 139
9.2 NUMERICAL INTEGRATION 142
9.3 ESTIMATING A PROBABILITY 144
9.3.1 Buffon’s Needle Problem 144
9.3.2 Reliability 146
9.4 VARIANCE REDUCTION TECHNIQUES 149
9.4.1 Control Variates 149
9.4.2 Stratified Sampling 151
9.4.3 Antithetic Sampling 153
9.4.4 Dagger Sampling 156
9.4.5 Importance Sampling 158
Contents  xiii

9.5 SUMMARY 161


9.6 EXERCISES 161

Part IV Sources of Randomness

Chapter 10  Random Variate Generation 165


10.1 THE INVERSION METHOD 165
10.1.1 Continuous Random Variables 167
10.1.2 Discrete Random Variables 169
10.1.2.1 Generating a Bernoulli Variate 171
10.1.2.2 Generating a Binomial Variate 172
10.1.2.3 Generating a Geometric Variate 173
10.2 THE REJECTION METHOD 173
10.3 THE COMPOSITION METHOD 177
10.4 THE CONVOLUTION METHOD 179
10.5 SPECIALIZED METHODS 182
10.5.1 The Poisson Distribution 182
10.5.2 The Normal Distribution 184
10.6 SUMMARY 186
10.7 EXERCISES 186

Chapter 11  Random Number Generation 187


11.1 PSEUDO-RANDOM NUMBERS 187
11.2 CHARACTERISTICS OF A GOOD GENERATOR 189
11.3 JUST ENOUGH NUMBER THEORY 190
11.3.1 Prime Numbers 190
11.3.2 The Modulo Operation 190
11.3.3 Primitive Roots for a Prime Number 191
11.4 THE LINEAR CONGRUENTIAL METHOD 192
11.5 THE MULTIPLICATIVE CONGRUENTIAL METHOD 193
11.5.1 2k Modulus 193
11.5.2 Prime Modulus 194
11.6 LINEAR FEEDBACK SHIFT REGISTERS 194
11.7 STATISTICAL TESTING OF RNGs 199
11.7.1 The Chi-Squared Test 199
11.7.2 The Poker Test 201
xiv  Contents

11.7.3 The Spectral Test 202


11.7.4 The Lag Plot 204
11.8 SUMMARY 205
11.9 EXERCISES 205

Part V Case Studies

Chapter 12  Case Studies 209


12.1 NETWORK RELIABILITY 209
12.2 PACKET DELIVERY OVER A WIRELESS CHANNEL 218
12.3 SIMPLE ARQ PROTOCOL 226
12.4 SUMMARY 233
12.5 EXERCISES 233

Appendix A  Overview of Python 235


A.1 BASICS 235
A.2 INPUT AND OUTPUT 237
A.3 BITWISE OPERATORS 238
A.4 LISTS 239
A.5 LIST FUNCTIONS 240
A.6 GENERATING RANDOM NUMBERS AND RANDOM VARI-
ATES 241
A.7 IMPLEMENTING THE EVENT LIST 242
A.7.1 Priority Queue 242
A.7.2 Heap Queue 242
A.7.3 Sorting a List 243
A.8 PASSING A FUNCTION NAME AS AN ARGUMENT 244
A.9 TUPLES AS RECORDS 245
A.10 PLOTTING 245

Appendix B  An Object-Oriented Simulation Framework 251


Appendix C  The Chi-Squared Table 267
Appendix D  The t-Distribution Table 269

Bibliography 271
Index 273
List of Programs

3.1 Simulating the experiment of throwing a die. The output is


shown as a comment on each line. 31
3.2 Approximating the probability of an outcome in the experiment
of throwing a die. 31
3.3 Simulation program for studying the running mean of the ran-
dom experiment of tossing a coin. This program is also used to
generate Figure 3.4. 35
4.1 Python program for generating the histogram from an exponen-
tial data set (see Figure 4.6). 44
4.2 Python program for plotting the CDF and PDF of a uniform
random variable (see Figures 4.9(a) and 4.9(b)). 51
4.3 Simulating a two-state discrete-time Markov chain given its
probability transition matrix and an initial state. 63
4.4 Simulating a Poisson process. 64
4.5 Simulating a birth-death process and plotting its sample path
(see Figure 4.21). 66
5.1 Simulation program of the single-server queueing system. 71
5.2 Estimating the average response time of the system. 77
5.3 Estimating the average number of customers in the sytem
(E[N(t)]). 80
5.4 Estimating the steady-state probability distribution (P[N = k]). 82
5.5 Performing multiple independent simulation runs of the simula-
tion model of the single-server queueing system. 86
5.6 Determining a good trunction point using the average of several
realizations of an output variable. 90
6.1 Calculating the confidence interval using Python. 99
6.2 Plotting confidence intervals and population mean. 101
7.1 Python implementation of the event graph in Figure 7.4. 118
8.1 A time-driven simulation program for the discrete-time single-
server queueing system. 124

xv
xvi  Contents

8.2 An event-driven simulation program for the single-server queue-


ing system. 129
9.1 Python procedure for estimating π using MC simulation. 141
9.2 Python procedure for estimating a one-dimensional integral. 143
9.3 Python procedure for the Buffon’s needle experiment. 145
9.4 Estimating the reliability of the system in Figure 9.6(b). 148
9.5 Estimating an integral in Eqn. (9.19) using the method of con-
trol variates. 150
R 1 −x
9.6 Estimating the integral 0 e dx using the crude Monte Carlo
and stratified methods. 152
9.7 Estimating the mean of a uniform random variable using anti-
thetic sampling. 154
9.8 Estimating the value of the integral in Eqn. (9.25) using CMC
and antithetic sampling. The reduction in variance is about 12%. 155
9.9 Estimating the reliability of the system in Figure 9.6(b) using
dagger sampling. 157
9.10 Estimating the average of a function using importance sampling. 160
10.1 Generating random variates using the information in Figure
10.2(a). 170
10.2 Generating Bernoulli random variates. 171
10.3 Generating binomial random variates. 172
10.4 Generating geometric random variates. 173
10.5 Generating random variates based on the rejection method. 176
10.6 Generating an Erlang random variate using the convolution
method. 179
10.7 Generating a standard normal random variate using the convo-
lution method. 181
10.8 Generating a Poisson random variate. 183
10.9 Generating a random variate from a standard normal distribution. 185
11.1 Testing a set of random numbers if they are uniformly distributed. 188
11.2 Generating the maximum-length random sequence from the
four-bit LFSR shown in Figure 11.3. 197
11.3 Generating the maximum-length random sequence from an
eight-bit LFSR. 198
11.4 Python program for generating a 3D scatter plot for the spectral
test. 202
11.5 Python procedure for generating a lag plot for a random sequence. 204
12.1 Computing unreliability for the graph in Figure 12.2 using the
exact expression in Eqn. (12.1). 212
Contents  xvii

12.2 Computing unreliability for the graph in Figure 12.2 using crude
Monte Carlo simulation. 213
12.3 Computing unreliability for the graph in Figure 12.2 using strat-
ified sampling. 214
12.4 Computing unreliability for the graph in Figure 12.2 using an-
tithetic sampling. 215
12.5 Computing unreliability for the graph in Figure 12.2 using dag-
ger sampling. The number of samples is significantly less. 216
12.6 Python implementation of the event graph in Figure 12.4 220
12.7 Python implementation of the event graph of the simple stop-
and-wait ARQ protocol in Figure 12.8. 228
A.1.1 Starting a new Python interactive session. 235
A.1.2 Running a Python program from the command line. 236
A.1.3 A Python source file. It can also be referred to as a Python script. 236
A.2.1 Input and output functions. 237
A.3.1 Binary operations on integer numbers. 238
A.3.2 Handling unsigned binary numbers. 239
A.4.1 Lists and some of their operations. 239
A.5.1 Transposing a matrix using the zip function. Matrix is first un-
packed using the start (*) operator. 240
A.6.1 Importing the random module and calling some of the functions
inside it. 241
A.7.1 Implementing the event list using the queue module. 242
A.7.2 Implementing the event list using the hqueue module. 243
A.7.3 Implementing the event list by sorting a list. 243
A.8.1 The name of the function can be stored in a list and then used
to call the function. 244
A.8.2 The name of the function can be passed as an argument to
another function. 244
A.9.1 A tuple can be used as a record that represents an item in the
event list. 245
A.10.1 Code for generating Figure 4.12(b). 245
A.10.2 Code for generating Figure 10.6(a). 247
A.10.3 Code for generating Figure 10.6(b). 248
B.1 Event. 251
B.2 Simulation Entity. 252
B.3 Event list and scheduler. 252
B.4 Example 1. 254
xviii  Contents

B.5 Example 2. 255


B.6 Example 3. 256
B.7 Example 4. 258
B.8 M/M/1. 259
B.9 State. 262
B.10 State Machine. 263
B.11 Simple Protocol. 263
List of Figures

1.1 The three pillars of science and engineering: Observation (O),


Experimentation (E), and Computation (C). By analogy, the
table needs the three legs to stay up. 4
1.2 A queue at a checkout counter in a supermarket. A phenomenon
arising whenever there is a shared resource (i.e., the cashier) and
multiple users (i.e., the shoppers). 5
1.3 Types of models and the data generated from them. 6
1.4 Phases of a simulation study. 6

2.1 A mental image of the system and its behavior must be devel-
oped before a conceptual model can be constructed. 14
2.2 Different mental images can be developed for the same system.
They include different levels of details. Complexity increases as
you add more details. 14
2.3 A continuous state variable takes values from a continuous set
(e.g., [0, 5] in (a)). A discrete state variable, on the other hand,
takes values from a discrete set (e.g., {0, 1, 2, 3, 4, 5} in (b)). 16
2.4 Events are used to move dynamic entities through a system.
A packet is moved from a source to a destination through two
routers using eight events. 17
2.5 An activity is delimited by two events and lasts for a random
duration of time. 18
2.6 A queueing phenomenon emerges whenever there is a shared
resource and multiple users. 19
2.7 Conceptual model of the queueing situation in Figure 2.6. 20
2.8 A sample path of the state variable Q which represents the
number of persons in the single-server queueing system. Note
the difference in the time between every two consecutive arrival
events. 20
2.9 Four activities occur inside the single-server queueing system:
(a) Generation, (b) Waiting, (c) Service, and (d) Delay. The
length of each activity is a random variable of time. 21

xix
xx  LIST OF FIGURES

2.10 A simple electrical circuit and its state diagram. Only the switch
and lamp are modeled. Events are generated by the switch to
change the state of the lamp. 22
2.11 State diagrams of the state variables associated with the queue
and server in the single-server queueing system in Figure 2.7. A
portion of the state space of the system is shown in (c). 23

3.1 A random experiment of tossing a coin. There are two possible


outcomes. 28
3.2 A random experiment of throwing a die. There are six possible
outcomes. 28
3.3 Three different samples for the random experiment of tossing
a coin 10 times. The running mean is computed for the third
sample using cumulative sums. The last value at position 10
of the list of running means is equal to the sample mean. The
sample mean is the probability of seeing a head. 33
3.4 Running mean for the random experiment of tossing a coin. The
mean eventually converges to the true value as more samples are
generated. 34

4.1 Sample space for the random experiment of throwing two dice.
The outcome of the experiment is a random variable X ∈
{2, 3, ..., 12}. 40
4.2 The PMF of a discrete random variable representing the out-
come of the random experiment of throwing two dice. 41
4.3 The cumulative distribution function of a discrete random vari-
able representing the outcome of the random experiment of
throwing two dice. 42
4.4 Probability density function of a continuous random variable. 43
4.5 Elements of a histogram. Bins can be of different widths. Length
of a bar could represent frequency or relative frequency. 45
4.6 Histogram for an exponential data set. This figure is generated
using Listing 4.1. 46
4.7 The situation of observing four successes in a sequence of seven
Bernoulli trials can be modeled as a binomial random variable. 48
4.8 The PMF of the Poisson random variable for λ = 10. Notice
that P (x) approaches zero as x increases. 49
4.9 Probability distribution functions for the uniform random vari-
able where a = 3 and b = 10. 50
4.10 Probability distribution functions of the exponential random
variable where µ = 1.5. 53
LIST OF FIGURES  xxi

4.11 The PDF of the normal random variable with µ = 30 and σ =


10. 55
4.12 Probability distribution functions of the triangular random vari-
able with a = 1, b = 10, and c = 7. 56
4.13 A stochastic process maps each outcome in the sample space to
a time function. Time functions are combined (convoluted) to
produce two sample paths: g1 and g2 . Two kinds of means can
be defined for a stochastic process. 57
4.14 The Bernoulli random process: (a) sample space, (b) random
variable, (c) time functions, (d) result of running the random
experiment in each slot, and (e) final sample path. 58
4.15 A sample path through the state space of a dynamic system.
Entry and exit points are random. Data is generated along this
sample path and a time average is computed as an estimate of
the performance metric of interest. 59
4.16 A sample path through the state space of the single-server
queueing system. The initial state does not have to be (0, ‘F’). 59
4.17 A sample path of a discrete-time Markov chain over nine time
units. Events occur at integer times only. N(1) is the number of
entities in the system during the first time slot. 61
4.18 A sample path of a continuous-time Markov chain. Events occur
at random times. The time spent in a state has an exponential
distribution. 61
4.19 A graphical representation of a two-state, discrete-time Markov
chain. 62
4.20 Sample path of a Poisson process. Only arrival events occur
inside a Poisson process. 64
4.21 Sample path of a birth-death process. 65

5.1 Physical structure of the single-server queueing system. 70


5.2 Graphical representation of the relationship between random
variables and simulation events. 72
5.3 A sample path of the random process N (t). 72
5.4 Random processes present in the single-server queueing system.
Both the arrival and departure processes are Poisson processes.
(a) Places where the random processes are defined. (b) Total
number of arrivals which have occurred up to time t1 is three.
(c) The sample path of the departure process is a shifted version
of the sample path of the arrival process. (d) Sample path of
the queueing (birth-death) process which tracks the number of
packets in the system. 73
xxii  LIST OF FIGURES

5.5 A simulation experiment represents an execution of a simulation


model with a specific set of parameters, inputs, and outputs. 76
5.6 A sample path of the number of packets in the single-server
queueing system. There are eight rectangles under the curve of
the sample path. 80
5.7 Raw data generated when running a simulation program. 85
5.8 Cumulative average versus number of simulated packets. The
theoretical value is Wavg = 10. After the transient phase is over,
the cumulative average starts approaching the theoretical value. 87
5.9 Z is the average of the five output sequences Y[0]-Y[4]. A trun-
cation point can visually be determined by using the curve of
Z. In this example, a good truncation point is n = 3000. 89
5.10 The first two steps in the Welch’s method. In step 1, multiple
realizations of the output variable are generated. These realiza-
tions are combined into one sequence in step 2. 89
5.11 A two-server queueing system with a finite buffer of size three. 91

6.1 Population and samples for the simulation experiment of esti-


mating the delay through the single-server queueing system by
simulating five packets. The population is (0, ∞). 94
6.2 Probability distribution of the sample mean is normal. 95
6.3 Frequency distribution of the average delay D through the
single-server queueing system with λ = 1 and µ = 1.25. The
population mean is 4. 96
6.4 The empirical rule for the distribution of samples around the
population mean. 95% of the area under the curve of the normal
distribution lies within two standard deviations (equal to 1.96)
of the mean. 97
6.5 Two of the calculated confidence intervals do not include the
population mean. The population mean is 15. 101

7.1 Types of edges in event graphs. 110


7.2 State diagram (a) and event graph (b) for the Poisson arrival
process. 112
7.3 Event graph for the single-server queueing system. 113
7.4 Reduced event graph for the single-server queueing system. 113
7.5 Event graph for the K-server queueing system. 114
7.6 Event graph for the single-server queueing system with a limited
queue capacity. 114
7.7 Event graph for the single-server queueing system with a server
that fails. 115
LIST OF FIGURES  xxiii

7.8 Event graph for the single-server queueing system with reneging. 116
7.9 Event graph for the single-server queueing system with balking. 116
7.10 A template for synthesizing simulation programs from event
graphs. 121
7.11 Two parallel single-server queueing systems with one shared
traffic source. 122
7.12 A simple network setup where a user communicates with a server
in a data center over a communication channel created inside a
network. Propagation delay (Pd ) and rate (R) are two important
characteristics of a channel. 122

8.1 In time-driven simulation, simulated time evolves in increments


of size ∆t. 124
8.2 Arrival and departure processes and their random variables in
continuous- and discrete-time queues. 126
8.3 In event-driven simulation, simulated time evolves in steps of
random sizes (∆t1 6= ∆t2 ). 127
8.4 An event-driven simulation program has two independent com-
ponents: simulator and model. 128
8.5 How a random number u is used to generate an event. 128
8.6 A flowchart of the event-driven simulation program. 129
8.7 Two single-server queueing systems in series with external ar-
rivals. 136

9.1 Setup used for performing MC simulation to estimate π. 140


9.2 Setup used for performing MC simulation to estimate a one-
dimensional integral. 142
9.3 The goal of the Buffon’s needle experiment is to compute the
probability that a needle of length l will intersect a horizontal
line in a set of horizontal lines separated by a distance equal to d. 144
9.4 Two random variables (a and φ) are used in the simulation. The
needle will intersect with the closest horizontal line if b ≥ a. 145
9.5 According to trigonometry, the length of the line segment b is
equal to the value of the y-coordinate of the upper tip of the
needle. 146
9.6 Reliability is the probability that the input is connected to the
output. (a) The input is connected to the output if the swtich is
closed. (b) Reliability of the overall system is a function of the
reliabilities of the individual blocks. In this case, Relsys = R3 ,
where R is the reliability of a block. 147
xxiv  LIST OF FIGURES

9.7 Sample space of the random experiment of throwing two dice.


For the random variate 4, 4+10 2 = 7 is generated instead if anti-
thetic sampling is used. 154
9.8 With dagger sampling, three trials are performed using a single
random number. Hence, three samples are generated. 157
9.9 Values of g(x) are very close to zero over region 1. Probabil-
ity distribution of x is very close to zero over region 1. Another
probability distribution has to be used in order to generate sam-
ples from region 1 where the values of the function g(x) are more
interesting. 159
9.10 Estimating the shortest path between nodes A and D (see Ex-
ercise 9.2). 161

10.1 Generating random variates from cumulative distribution func-


tions. 166
10.2 Generating random variates using the PMF of a discrete random
variable. 170
10.3 Generating a random variate from the PDF f(x) using the aux-
iliary PDF g(x). x = 3 is accepted if u ≤ fg(3)
(3)
. 174
10.4 Random variates generated using the rejection method. 175
10.5 Triangular distribution. f (x) is composed of two functions each
of which is defined over half the interval over which f (x) exists. 177
10.6 The shape of the histogram constructed using the random vari-
ates generated using the convolution method resembles that of
the PDF of the Erlang random variable. 180
10.7 Histogram constructed from standard normal variates generated
using the convolution method in Listing 10.7. 181
10.8 Arrivals during a time slot can be modeled as a Poisson random
variable. 183
10.9 The shape of the histogram constructed using simulated Poisson
random variates resembles that of the PMF of a Poisson random
variable. 184
10.10 Using the procedure in Listing 10.9, the uniform random num-
bers are transformed into random standard normal variates. 185

11.1 Probability distribution of u. 188


11.2 Multiple seeds are used to make different simulation runs. Differ-
ent paths in the system state space are explored and the average
is computed using the values resulting from these different paths. 193
11.3 A four-bit linear feedback shift register with characteristic poly-
nomial c(x) = 1 + x3 + x4 . 195
LIST OF FIGURES  xxv

11.4 Computing the first intermediate binary number on line 13 in


Listing 11.2. 196
11.5 An eight-bit linear feedback shift register with characteristic
polynomial c(x) = 1 + x4 + x5 + x6 + x8 . 197
11.6 104 triplets of successive random numbers generated using List-
ing 11.4. Planes can be seen when the figure is viewed from the
right angle. 202
11.7 The lag plot for a sequence of sinusoidal values. An elliptical
pattern can be clearly identified. 204
11.8 The lag plot generated by the code in Listing 11.5. The sequence
uniformly fills the 2D space. 205

12.1 A graph consisting of eight vertices and 11 edges. 210


12.2 Network fails if nodes v1 and v4 become disconnected. The
event will occur if any of the following groups of links fail:
{(e1 , e2 ), (e1 , e3 ), (e2 , e4 ), (e3 , e4 )}. 210
12.3 A point-to-point wireless system. The transmitter has a buffer
which can store up to B packets. The probability that a trans-
mission attempt is successful is 1 − Perr . 218
12.4 Event graph for the system in Figure 12.3. 220
12.5 Average packet delay increases as the quality of the wireless
channel degrades. 225
12.6 Percentage of delivered packets drops as the quality of the wire-
less channel degrades. 226
12.7 Behavior of the simple stop-and-wait ARQ protocol with two
possibilities: acknowledgment and frame loss. 227
12.8 Event graph for the simple stop-and-wait ARQ protocol. 228
12.9 Throughput deteriorates as the packet error rate increases. 232
List of Tables

1.1 Description of the phases of a simulation study of the system in


Figure 1.2. 8

2.1 Details of the conceptual model of the queueing situation in


Figure 2.6. 19

5.1 Manual simulation of the single-server queueing system using a


simulation table. 74
5.2 IATs and STs for Exercise 5.1. 91

6.1 Notation for the sample and population statistics. 95

7.1 Event table for the event graph in Figure 7.4. 118

8.1 Mapping concepts to code in Listing 8.2. 130

9.1 Sample space of the system in Figure 9.6(b) with probability of


each sample point. 148

11.1 Random variates are repeated after a cycle of size 3. This is


due to the repetition in the generated sequence of the random
numbers. 190
11.2 Maximum-length sequence of random numbers generated by the
LFSR in Figure 11.3. 196
11.3 Types of five-digit numbers according to the poker rules. 201

12.1 Sample space of the system in Figure 12.2 along with the status
of the network for each possible system state. 211
12.2 Restructuring the sample space of the system in Figure 12.2
along with the probability of each stratum. The first row indi-
cates the number of UP links. 212
12.3 State variables of the event graph in Figure 12.4. 219

xxvii
Another random document with
no related content on Scribd:
opportunity to come before the Commission and suggest
objections or amendments to the bills. The Commission has
likewise adopted as part of its regular procedure the
submission of all proposed bills to the Military Governor for
his consideration and comment before enactment. We think that
the holding of public sessions furnishes instructive lessons
to the people, as it certainly secures to the Commission a
means of avoiding mistakes. … The Commission has now passed
forty-seven laws of more or less importance. … A municipal
code has been prepared and forwarded to you for the
consideration of one or two critical matters, and has not yet
been adopted, pending your consideration of it. A tariff bill
… has been prepared. … A judicial and civil procedure bill is
nearly completed. The same thing is true of a bill for
provincial government organization. A new internal tax law
must then be considered. The wealth of this country has
largely been in agricultural lands, and they have been
entirely exempt. This enabled the large landowners to escape
any other taxation than the urbana, a tax which was imposed
upon the rental value of city buildings only, and the cedula
tax, which did not in any case exceed $37.50 (Mexican) a
person. We think that a land tax is to be preferred, but of
this there will be found more detailed discussion below. …

"The only legislation thus far undertaken by the Commission


which bears directly on the conduct of municipal affairs in
the city of Manila is a law regulating the sale of spirituous,
malt, vinous or fermented liquors. It is provided that none of
the so-called native 'wines' [said to be concocted by mixing
alcohol with oils and flavoring extracts] shall be sold except
by holders of native wine licenses, and that such holders
shall not be allowed to sell intoxicants of any other sort
whatever. … The selling of native wines to soldiers of the
United States under any circumstances is strictly prohibited,
because the soldiers are inclined to indulge in those
injurious beverages to excess, with disastrous results. … The
Filipino ordinarily uses them moderately, if at all.
Fortunately, he does not, to any considerable extent, frequent
the American saloon. With a view to preventing his being
attracted there, the playing of musical instruments or the
operation of any gambling device, phonograph, slot machine,
billiard or pool table or other form of amusement in saloons,
bars or drinking places is prohibited."

The report of the Commission urged strongly the establishing


of a purely civil government in the Islands, for reasons thus
stated: "The restricted powers of a military government are
painfully apparent in respect to mining claims and the
organization of railroad, banking and other corporations and
the granting of franchises generally. It is necessary that
there be some body or officer vested with legislative
authority to pass laws which shall afford opportunity to
capital to make investment here. This is the true and most
lasting method of pacification. Now the only corporations here
are of Spanish or English origin with but limited concessions,
and American capital finds itself completely obstructed.
{395}
Such difficulties would all be removed by the passage of the
Spooner bill now pending in both houses.

See below: A. D. 1901 (FEBRUARY-MARCH).

The far reaching effect upon the feeling of the people of


changing the military government to one purely civil, with the
Army as merely auxiliary to the administration of civil law,
cannot be too strongly emphasized. Military methods in
administering quasi-civil government, however successful in
securing efficiency and substantial justice, are necessarily
abrupt and in appearance arbitrary, even when they are those
of the Army of the Republic; and until a civil government is
established here it will be impossible for the people of the
Philippine Islands to realize the full measure of the
difference between a government under American sovereignty and
one under that of Spain."
Another subject of great importance dealt with in the November
report of the Commission was that concerning the employment of
native troops and police, on which it was said: "The question
as to whether native troops and a native constabulary are at
present practicable has received much thought and a careful
investigation by the Commission. … We have sought and obtained
the opinions of a large number of Regular and volunteer officers
of all rank, having their fields of operation in all parts of
the islands, and there appears to be a general consensus of
opinion among them that the time is ripe for these
organizations, and this is also our conclusion. Assuming that
Congress at its next session will provide for an increase of
the Regular Army, it by no means follows that a large part
thereof will, or should, be stationed here permanently.
Considerations of public policy and economy alike forbid such
a programme, nor in our judgment is it necessary.

"While the American soldier is unsurpassed in war, as it is


understood among civilized people, he does not make the best
policeman, especially among a people whose language and
customs are new and strange to him, and in our opinion should
not be put to that use when, as we believe, a better
substitute is at hand. We therefore earnestly urge the
organization of ten regiments of native troops of infantry and
cavalry, the proportion between the two arms of the service to
be fixed by competent military judges. These troops should in
the main be officered by Americans. Certainly this should be
the case as to their field officers and company commanders.
Lieutenants might be Filipinos, judicially selected, and
provision might be made for their promotion in the event of
faithful or distinguished service.

"We further recommend that a comprehensive scheme of police


organization be put in force as rapidly as possible; that it
be separate and distinct from the army, having for its head an
officer of rank and pay commensurate with the importance of
the position, with a sufficient number of assistants and
subordinates to exercise thorough direction and control. This
organization should embrace every township in the islands, and
should be so constituted that the police of several contiguous
townships could be quickly mobilized. The chief officers of
this organization should be Americans, but some of the
subordinate officers should be natives, with proper provision
for their advancement as a reward for loyal and efficient
services. The main duty of the police would, of course, be to
preserve the peace and maintain order in their respective
townships, but occasion would, no doubt, frequently arise when
it would be necessary to utilize the forces of several
townships against large bands of ladrones."

With regard to the organization of municipal government in the


townships (pueblos) of the Islands the report of the
Commission says, in part: "The 'pueblos' of these islands
sometimes include a hundred or more square miles. They are
divided into so-called 'barrios' or wards, which are often
very numerous and widely separated. In order that the
interests of the inhabitants of each ward may be represented
in the Council, on the one hand, and that the body may not
become so numerous as to be unwieldy, on the other, it is
provided that the Councillors shall be few in number (eighteen
to eight, according to the number of inhabitants), and shall
be elected at large; that where the wards are more numerous
than are the Councillors the wards shall be grouped into
districts, and that one Councillor shall be in charge of each
ward or district, with power to appoint a representative from
among the inhabitants of every ward thus assigned to him, so
that he may the more readily keep in touch with conditions in
that portion of the township which it is his duty to supervise
and represent. …

"In order to meet the situation presented by the fact that a


number of the pueblos have not as yet been organized since the
American occupation, while some two hundred and fifty others
are organized under a comparatively simple form of government
and fifty-five under a much more complicated form on which the
new law is based, the course of procedure which must be
followed in order to bring these various towns under the
provisions of the new law has been prescribed in detail, and
every effort has been made to provide against unnecessary
friction in carrying out the change.

"In view of the disturbed conditions which still prevail in


some parts of the archipelago it has been provided that the
military government should be given control of the appointment
and arming of the municipal police and that in all provinces
where civil provincial government has not been established by
the Commission the duties of the Provincial Governor,
Provincial Treasurer and Provincial 'Fiscal' (prosecuting
attorney) shall be performed by military officers assigned by
the Military Governor for these purposes. It has been further
provided that in these provinces the Military Governor shall
have power through such subordinates as he may designate for
the purpose to inspect and investigate at any time all the
official books and records of the several municipalities, and
to summarily suspend any municipal officer for inefficiency,
misconduct or disloyalty to the United States. If upon
investigation it shall prove that the suspended officer is
guilty, the Military Governor has power to remove him and to
appoint his successor, should he deem such a course necessary
in the interest of public safety. It is thought that where the
necessity still exists for active intervention on the part of
the Military Governor it will ordinarily be desirable to allow
the towns to retain their existing organization until such
time as conditions shall improve; but, should it prove
necessary or desirable in individual instances to put the new
law into operation in such provinces, it is felt that the
above provisions will give to the Military Governor ample
power to deal with any situation which can arise, and he has
expressed his satisfaction with them.
{396}

"There are at the present time a considerable number of


provinces which, in the judgment of the Commission, are ready
for a provincial civil government. It is believed that in the
majority of cases it will be possible to organize all the
municipalities of a province, creating at the same time a
civil provincial government. So soon as civil government is
established in any province, power to remove officials for
inefficiency, misconduct or disloyalty, and, should public
safety demand it, to fill the offices thus made vacant, is
vested in the civil authorities. The law does not apply to the
city of Manila or to the settlements of non-Christian tribes,
because it is believed that in both cases special conditions
require special legislation. The question as to the best
methods of dealing with the non-Christian tribes is one of no
little complexity. The number of these tribes is greatly in
excess of the number of civilized tribes, although the total
number of Mahometans and pagans is much less than the number
of Christianized natives. Still, the non-Christian tribes are
very far from forming an insignificant element of the
population. They differ from each other widely, both in their
present social, moral and intellectual state and in the
readiness with which they adapt themselves to the demands of
modern civilization."

PHILIPPINE ISLANDS: A. D. 1900 (October).


United States military forces in the Islands.

"At the date of my last annual report there were in the


Philippine Islands 971 officers and 31,344 enlisted men; and
there were en route for service in those islands 546 officers
and 16,553 enlisted men—the latter force being principally in
California. Since that time an additional force ordered to
China was diverted to the Philippine Islands, making a total
of 98,668 men sent to the archipelago. Of this number 15,000
volunteers, first sent to that country in 1898, together with
the sick and disabled, have been returned to the United
States, leaving at the present time in the islands, according
to last report, 2,367 officers and 69,161 enlisted men.
Fifteen hundred men have been left in China to act as a guard
for the American legation in that country and for other
purposes."

United States, Annual Report of Lieutenant-General


Commanding the Army, October 29, 1900.

PHILIPPINE ISLANDS: A. D. 1900 (November).


The problem of the Spanish Friars.
Two contradictory representations of their work and influence.
Views and recommendations of the United States Commission.

Of the character, work and influence of the Spanish religious


orders in the Philippine Islands there are two diametrically
opposite accounts given by different writers. Both are
represented in two of the quotations below, and those are
followed by extracts from a report made by the United States
Commission, November 30, 1900, on the subject of the problem
they present to the new government of the Islands. The first
writer is condemnatory. He says:

"The better classes [of the Filipinos] have absorbed much of


Spanish civilization in their three-century-old
apprenticeship. They show extraordinary talent for music. The
church of the mother land of Spain is much in evidence among
them. It brought to them its blessings, but also incidentally
a terrible curse. The mendicant orders—the Franciscans, the
Dominicans, the Augustinians, no longer poor preachers,
thinking only of serving, blessing, loving men, but grown
rich, domineering, and, in many cases, sadly corrupt in
morals—ate up the land. They added field to field, house to
house, till there was but little space left for the people.
They charged enormous rents to those who to put bread in their
mouths must till their fields. Just such cause for revolt existed
as that which in France aroused the storm of the great
revolution; the people taxed without mercy, the clergy
untaxed, reaping the benefit. Had the Christ-like St. Francis
of Assisi been endowed with the gift of prophetic vision to
see this gross degeneracy of his followers, more than ever
would he have felt the soundness of his intuition which made
him set his face like flint against the acquisition of any
property by his order. His beloved fair Lady of Poverty would
have seemed to him more beautiful than ever. He would have
been horrified with the knowledge of the cruel rapacity of
monks bearing his name, who, nevertheless, grossly oppressed
the Philippine peasantry in rents and taxes,—the very poor
whom St. Francis founded his order to serve.

"Perhaps the most deep-seated cause of Filipino insurrection


against Spanish authority was this unchecked growth of
ignorant, cruel, and oppressive ecclesiasticism. It was this
which weighed most heavily upon the people. It made the mere
question of gaining a livelihood difficult, but especially did
it strangle intellectual and moral growth. It not only
oppressed the Filipinos, but it overawed and dominated the
Spanish authorities. It was the power of the mendicant orders
which drove out the just Condé de Caspe, and later the
well-disposed and clement Blanco, which stimulated and
supported the frightful atrocities of the cruel Polavieja
during the revolution of 1896. Archbishop Nozaleda, a Spanish
monk of the Dominican order, was a leader in urging wholesale
and often wholly unjustifiable arrests, which were succeeded
by the torture and execution of hundreds of persons. It is
difficult for a mind reared in the freedom and culture of
modern Europe, or still freer America, to realize the horrible
excesses and actual mediæval cruelties which were committed in
the prisons of Manila and elsewhere in the islands upon Filipino
insurgents, or those accused of being in league with them,
during the revolution of 1896. The actual story of these
things as it is unfolded, not only from Filipino sources, but
from the Spanish archives of Manila, is like a scene evoked
from the long-buried and forgotten past in the middle ages.
Indeed, the only intelligible interpretation of events which
cast shame on the name of Spanish authority and Spanish
Christianity is found by reflecting that affairs in the
Philippines, just previous to the battle of Manila, were
controlled by ideas and forces which existed generally in
Europe previous to the Reformation,—ideas which slowly
retreated before the dawn of the new learning and the
liberation of the individual conscience."

H. Welsh,
The Other Man's Country,
chapter 1 (Philadelphia: J. B. Lippincott Company).

{397}

In the other view there is an appeal to results which cannot


easily be divested of force. They are set forth in the
following:

"The ideals of civilization for the Spanish missionary priests


in the Philippines were substantially the same as those of
Bacon and Raleigh, of the founders of New England and the
founders of New York. In the mind of all, a civilized people
was one which lived under settled laws by steady labor, which
was more or less acquainted with the material progress made
amongst the races of Europe, and, as all would say, which was
Christian. The Spanish friars undertook the task of giving
such a civilization to the Malays of the Philippines, and no
other body of men of any race or any faith have accomplished
what they have done. A task of somewhat similar kind has been
attempted by others in our own day in the name of Christian
civilization but not the Catholic Church. Hawaii has been
under control of missionaries from New England for
seventy-five years more completely than the Philippines were
ever under that of the Spanish friars. The native kings
adopted the new creed and enforced its adoption on their
subjects by vigorous corporal punishments. The missionaries
were abundantly supplied with such resources of civilization
as money could buy, and they have grown wealthy on their
mission; but what has been the fate of the natives? They have
dwindled in numbers to a fourth of what they were when Messrs.
Bingham and Thurston entered their islands, their lands have
been taken by strangers, their government overthrown by brute
force, and the scanty remnant has dropped the religion imposed
on them. In the Philippines in a hundred and forty years a
million of Catholic natives has grown seven fold. In Hawaii
under missioners of the world's manufacture a hundred and
forty thousand of the same race has shrunk to thirty-eight
thousand. Have the promises of the Spanish friars or those of
the American ministers been the most truthfully kept? The
actual condition of the Catholic population formed by the work
of the religious orders should not be judged by the excesses
which have marked the present revolution. Many old Christian
nations have gone through similar experiences. It would be as
unreasonable to judge the Christianity of France by the Reign
of Terror as to condemn the Filipino population for the
atrocities sanctioned by Aguinaldo. The mass of the country
population has taken no part in these deeds of blood which are
the work of a small number of political adventurers and
aspirants for office by any means. Until lately revolutionary
disturbance was unknown in the Philippines. During three
centuries there was only one serious Indian rebellion, that of
Silan, in the province of Illocos, at the time of the English
invasion. The Spanish military force was always too small to
hold the islands had there been any real disaffection to the
Government. The whole force at Manila in the present war, as
given by General Otis, was only fifty-six hundred, and about
as many more represented the entire Spanish force among a
population of seven millions.

"The disposition of the Catholic Filipinos is essentially law


abiding. One of the friars lately driven from the islands by
the revolution assured the writer that in Panay, an island
with a population of half a million, a murder did not occur
more often than once or twice in a year. In our own country
last year the proportion was more than fifty times as great.
There is no forced labor as in the Dutch Indian colonies to
compel the native Filipinos to work, yet they support
themselves in content without any of the famines so common in
India under the boasted rule of civilized England. A sure
evidence of material prosperity is the growth of the
population, and of its religion a fair test is the proportion
of Catholic marriages, baptisms and religious interments to
the whole number. The proportion of marriages in 1806 to the
population among the natives administered by the friars was
one to every hundred and twenty, which is higher than England,
Germany, or any European country. The number of baptisms
exceeded the deaths by more than two and a half per cent, a
greater proportion than in our own land. Compare this with
Hawaii and one feels what a farce is the promise of increased
prosperity held out by the American Press as the result of the
expulsion of the Spanish friars. It is not easy to compare
accurately the intellectual development of the Catholic
Filipinos with American or European standards. The ideals of
civilization of the Catholic missioners were different from
those popular with English statesmen and their American
admirers. The friars did not believe that the accumulation of
wealth was the end of civilization, but the support of a large
population in fair comfort. There are no trusts and few
millionaires in the islands, but their population is six times
greater than that of California after fifty years of American
government. The test so often applied of reading and writing
among the population finds the Filipinos fairly up to the
standard of Europe at least. Of highly educated men the
proportion is not so large as in Europe, but it is not
inconsiderable, and neither in science nor in literature are
the descendants of the Malay pirates unrepresented in their
remote islands. The native languages have developed no
important literature of their own, but they have a fair supply
of translations from Spanish works in history, poetry, and
philosophy. In that they are superior to the Hindoo of British
India, though spoken by nearly a hundred millions. These are
facts that throw a strange light on the real meaning of
civilization as planted by the Spanish friars among a
barbarian race. Compare them with the fate of the Indian races
on our own territory and say what benefit the Filipinos may
expect from the advent of 'Anglo-Saxon' civilization."

Bryan J. Clinch
(American Catholic Quarterly Review,
volume 24, page 15).

These opposing views are suggestive of the seriousness of the


problem which the subject offers to the new authority in the
Philippines. The American Commission now studying such
problems in those islands has presented its first views
concerning the Spanish friars in a lengthy report, written by
Judge Taft, and transmitted to Washington as part of the
general report of the Commission, bearing date November 30,
1900. The passages quoted below contain what is most essential
in the interesting document:

"Ordinarily, the Government of the United States and its


servants have little or no concern with religious societies or
corporations and their members. With us, the Church is so
completely separated from the State that it is difficult to
imagine cases in which the policy of a Church in the selection
of its ministers and the assignment of them to duty can be
regarded as of political moment, or as a proper subject of
comment in the report of a public officer.
{398}
In the pacification of the Philippines by our Government,
however, it is impossible to ignore the very great part which
such a question plays. Excepting the Moros, who are Moslems,
and the wild tribes, who are pagans, the Philippine people
belong to the Roman Catholic Church. The total number of
Catholic souls shown by the Church registry in 1898 was
6,559,998. To care for these in that year there were in the
archipelago 746 regular parishes, 105 mission parishes and 116
missions, or 967 in all. Of the regular parishes all save 150
were administered by Spanish monks of the Dominican,
Augustinian, or Franciscan orders. Natives were not admitted
to these orders. There were two kinds of Augustinians in these
islands, the shod and the unshod. The latter are called
Recolletos, and are merely an offshoot from the original order
of St. Augustine.

"By the revolutions of 1896 and 1898 against Spain, all the
Dominicans, Augustinians, Recolletos, and Franciscans acting
as parish priests were driven from their parishes to take
refuge in Manila. Forty were killed and 403 were imprisoned,
and were not all released until by the advance of the American
troops it became impossible for the insurgents to retain them.
Of the 1,124 who were in the islands in 1896, only 472 remain.
The remainder were either killed or died, returned to Spain,
or went to China or South America. There were also in the
islands engaged in missions and missionary parishes, 42
Jesuits, 16 Capuchins, and six Benedictines, and while many of
these left their missions because of disturbed conditions they
do not seem to have been assaulted or imprisoned for any
length of time. In addition to the members of the monastic
orders, there were 150 native secular clergymen in charge of
small parishes who were not disturbed. There were also many
native priests in the larger parishes who assisted the friar
curates and they have remained, and they have been and are
acting as parish priests. The burning political question,
discussion of which strongly agitates the people of the
Philippines, is whether the members of the four great orders
of St. Dominic, St. Augustine, St. Francis, and the Recolletos
shall return to the parishes from which they were driven by
the revolution. Colloquially the term 'friars' includes the
members of these four orders. The Jesuits, Capuchins,
Benedictines, and the Paulists, of whom there are a few
teachers here, have done only mission work or teaching, and
have not aroused the hostility existing against the four large
orders to which we are now about to refer. …

"The truth is that the whole government of Spain in these


islands rested on the friars. To use the expression of the
Provincial of the Augustinians, the friars were 'the pedestal,
or foundation, of the sovereignty of Spain in these islands,'
which being removed, 'the whole structure would topple over.'
… Once settled in a parish, a priest usually continued there
until superannuation. He was, therefore, a constant political
factor for a generation. The same was true of the Archbishop
and the bishops. The civil and military officers of Spain in
the island were here for not longer than four years, and more
often for a less period. The friars, priests, and bishops,
therefore, constituted a solid, powerful, permanent, well
organized political force in the islands which dominated
policies. The stay of those officers who attempted to pursue a
course at variance with that deemed wise by the orders was
invariably shortened by monastic influence. Of the four great
orders, one, the Franciscans, is not permitted to own
property, except convents and schools. This is not true of the
other three. They own some valuable business property in
Manila, and have large amounts of money to lend. But the chief
property of these orders is in agricultural land. The total
amount owned by the three orders in the Philippines is
approximately 403,000 acres. Of this 121,000 acres is in the
Province of Cavité alone. The whole is distributed as follows:
Cavité, Province of Luzon, 121,747 acres; Laguna, Province of
Luzon, 62,172 acres; Manila, Province of Luzon, 50,145;
Bulacan, Province of Luzon, 39,341; Morong, Province of Luzon,
4,940; Bataan, Province of Luzon, 1,000; Cagayan, Province of
Luzon, 49,400; Island of Cebu, 16,413; Island of Mindoro,
58,455. Total, 403,713. …

"It cannot admit of contradiction that the autocratic power


which each friar curate exercised over the people and civil
officials of his parish gave them a most plausible ground for
belief that nothing of injustice, of cruelty, of oppression,
of narrowing restraint of liberty, was imposed on them for
which the friar was not entirely responsible. His sacerdotal
functions were not in their eyes the important ones, except as
they enabled him to clinch and make more complete his civil
and political control. The revolutions against Spain's
sovereignty began as movements against the friars. … Having in
view these circumstances, the statement of the bishops and friars
that the mass of the people in these islands, except only a
few of the leading men of each town and the native clergy, are
friendly to them cannot be accepted as accurate. All the evidence
derived from every source but the friars themselves shows
clearly that the feeling of hatred for the friars is well nigh
universal and permeates all classes. In the provinces of
Cavité, Laguna, and Bulacan, as well as in the country
districts of Manila, the political feeling against the friars
has in it also an element of agrarianism. For generations the
friars have been lords of these immense manors, upon which,
since 1880, they have paid no taxes, while every 'hombre'
living on them paid his cedula, worked out a road tax, and, if
he were in business of any kind, paid his industrial impost. …

"In the light of these considerations it is not wonderful that


the people should regard the return of the friars to their
parishes as a return to the conditions existing before the
revolution. The common people are utterly unable to appreciate
that under the sovereignty of the United States the position
of the friar as curate would be different from that under
Spain. This is not a religious question, though it concerns
the selection of religious ministers for religious
communities. The Philippine people love the Catholic Church. …
The depth of their feeling against the friars may be measured
by the fact that it exists against those who until two years
ago administered the sacraments of the Church upon which they
feel so great dependence and for which they have so profound a
respect. The feeling against the friars is solely political.
The people would gladly receive as ministers of the Roman
Catholic religion any save those who are to them the
embodiment of all in the Spanish rule that was hateful.
{399}
If the friars return to their parishes, though only under the
same police protection which the American Government is bound
to extend to any other Spanish subjects in these islands, the
people will regard it as the act of that Government. They have
so long been used to have every phase of their conduct regulated
by governmental order that the coming again of the friars will
be accepted as an executive order to them to receive the
friars as curates with their old, all-absorbing functions. It
is likely to have the same effect on them that the return of
General Weyler under an American Commission as Governor of
Cuba would have had on the people of that island.

"Those who are charged with the duty of pacifying these


islands may therefore properly have the liveliest concern in a
matter which, though on its surface only ecclesiastical, is,
in the most important phase of it, political, and fraught with
the most critical consequences to the peace and good order of
the country, in which it is their duty to set up civil
government. … It is suggested that the friars, if they
returned, would uphold American sovereignty and be efficient
instruments in securing peace and good order, whereas the
native priests who now fill the parishes are, many of them,
active insurgent agents or in strong sympathy with the cause.
It is probably true that a considerable number of the Filipino
priests are hostile to American sovereignty, largely because
they fear that the Catholic Church will deem it necessary, on
the restoration of complete peace, to bring back the friars or
to elevate the moral tone of the priesthood by introducing
priests from America or elsewhere. But it is certain that the
enmity among the people against the American Government caused
by the return of the friars would far outweigh the advantage
of efforts to secure and preserve the allegiance of the people
to American Sovereignty which might be made by priests who are
still subjects of a monarchy with which the American
Government has been lately at war, and who have not the
slightest sympathy with the political principles of civil
liberty which the American Government represents.

"We have set forth the facts upon this important issue because
we do not think they ought to be or can be ignored. We
earnestly hope that those who control the policy of the
Catholic Church in these islands with the same sagacity and
prevision which characterize all its important policies, will
see that it would be most unfortunate for the Philippine
Islands, for the Catholic Church and for the American
Government to attempt to send back the friars, and that some
other solution of the difficulties should be found. … The
friars have large property interests in these islands which
the United States Government is bound by treaty obligations
and by the law of its being to protect. It is natural and
proper that the friars should feel a desire to remain where so
much of their treasure is. … It would avoid some very
troublesome agrarian disturbances between the friars and their
quondam tenants if the Insular Government could buy these
large haciendas of the friars, and sell them out in small
holdings to the present tenants, who, forgiven for the rent
due during the two years of war, would recognize the title of
the Government without demur, and gladly accept an
opportunity, by payment of the price in small instalments, to
become absolute owners of that which they and their ancestors
have so long cultivated. With the many other calls upon the
insular treasury a large financial operation like this could
probably not be conducted to a successful issue without the
aid of the United States Government, either by a direct loan
or by a guaranty of bonds to be issued for the purpose. The
bonds or loans could be met gradually from the revenues of the
islands, while the proceeds of the land, which would sell
readily, could be used to constitute a school fund. This
object, if declared, would make the plan most popular, because
the desire for education by the Filipinos of all tribes is
very strong, and gives encouraging promise of the future
mental development of a now uneducated and ignorant people.
The provincials of the orders were understood in their
evidence to intimate a willingness on the part of the orders
to sell their agricultural holdings if a satisfactory price
should be paid. What such a price would be we are unable
without further investigation to state. If an agreement could
not be reached it is probable, though upon this we express no
definite opinion, that there would be ground in the
circumstances for a resort to condemnation proceedings."

PHILIPPINE ISLANDS: A. D. 1901.


Act of the United States Congress increasing army and
authorizing the enlistment of native troops.
Rejection of the proviso of Senator Hoar.

See (in this volume)


UNITED STATES OF AMERICA:
A. D. 1901 (FEBRUARY).

PHILIPPINE ISLANDS: A. D. 1901 (February-March).


Congressional grant of military, civil and judicial
powers for the government of the Islands to persons whom the
President may appoint.
The so-called "Spooner Amendment."

During the first session of the 56th Congress the following


bill was introduced in the U. S. Senate by Mr. Spooner, of
Wisconsin, but received no action:

"Be it enacted, etc., That when all insurrection against the


sovereignty and authority of the United States in the
Philippine Islands, acquired from Spain by the treaty
concluded at Paris on the 10th day of December, 1898, shall
have been completely suppressed by the military and naval
forces of the United States, all military, civil, and judicial
powers necessary to govern the said islands shall, until
otherwise provided by Congress, be vested in such person and
persons, and shall be exercised in such manner as the
President of the United States shall direct for maintaining
and protecting the inhabitants of said islands in the free
enjoyment of their liberty, property, and religion."

Half the following session of Congress passed before any


disposition to take the action proposed by Senator Spooner was
shown. Then the matter was brought to notice and pressed by
the following communication to the Secretary of War, from the
Commission in the Philippines:

"If you approve, ask transmission to proper Senators and


Representatives of following: Passage of Spooner bill at
present session greatly needed to secure best result from
improving conditions. Until its passage no purely central
civil government can be established, no public franchises of
any kind granted, and no substantial investment of private
capital in internal improvements possible." This was repeated
soon afterwards more urgently by cable in the message
following:

{400}

"Sale of public lands and allowance of mining claims


impossible until Spooner bill. Hundreds of American miners on
ground awaiting law to perfect claims. More coming. Good
element in pacification. Urgently recommend amendment Spooner
bill so that its operation be not postponed until complete
suppression of all insurrection, but only until in President's
judgment civil government may be safely established."

The request of the Philippine Commission, endorsed by the


Secretary of War, was communicated to Congress by the
President, who said in doing so: "I earnestly recommend
legislation under which the government of the islands may have
authority to assist in their peaceful industrial development."
Thereupon the subject was taken up in Congress, not as
formulated in Senator Spooner's bill of the previous session,
but in the form of an amendment to the Army Appropriation
Bill, then pending in the Senate. The amendment, as submitted
to discussion in the Senate on the 25th of February, 1901, was
in the following terms:

"All military, civil, and judicial powers necessary to govern


the Philippine Islands, acquired from Spain by the treaties
concluded at Paris on the 10th day of December, 1898, and at
Washington on the 7th day of November, 1900, shall, until
otherwise provided by Congress, be vested in such person and
persons and shall be exercised in such manner as the President
of the United States shall direct, for the establishment of
civil government and for maintaining and protecting the
inhabitants of said islands in the free enjoyment of their
liberty, property, and religion: Provided, That all franchises
granted under the authority hereof shall contain a reservation
of the right to alter, amend, or repeal the same. Until a
permanent government shall have been established in said
archipelago full reports shall be made to Congress, on or
before the first day of each regular session, of all
legislative acts and proceedings of the temporary government
instituted under the provisions hereof, and full reports of
the acts and doings of said government and as to the condition
of the archipelago and its people shall be made to the
President, including all information which may be useful to
the Congress in providing for a more permanent government."

Strenuous opposition was made, firstly to the hasty grafting


of so profoundly important a measure of legislation on an
appropriation bill, and secondly to the measure itself, as
being a delegation of powers to the President which did
violence to the Constitution and to all the precedents and
principles of the American government, and also as having
objects which would not only do flagrant wrong to the people
of the Philippine Islands, but bring dishonor on those of the
United States. The military authority already exercised by the

You might also like