# MAT 351 Dynamics of Public Opinion About Political Ideologies Project

Description

Hi,I need detailed solutions for both parts of the final project.**The final project, a guideline for how to solve the project, as well as the book for the course have been attached**
Thanks đ

3 attachmentsSlide 1 of 3attachment_1attachment_1attachment_2attachment_2attachment_3attachment_3

Unformatted Attachment Preview

MAT-351: MATHEMATICAL MODELING
Final Project
OVERVIEW
You are required to complete a final project on modeling in two parts. In the first part you are to write a
mathematical model for a given scenario and study its asymptotic behavior. The second part will have
you pick a specific case and carry out linear stability analysis of the model you wrote. The final report will
include the description of the model, some calculations, and analysis of the results of the models.
Course objectives covered in this project include CO1, CO2, CO3, CO4, CO5, CO6, CO7, CO8, CO9,
CO10, CO11, CO12, CO13
SCENARIO AND PROBLEM STATEMENTS
Consider the dynamics of public opinion about political ideologies.
For simplicity, letâs assume that there are only three options: Republican, Democrat, and Independent.
Republican and Democrat are equally attractive (or annoying, maybe) to people, with no fundamental
asymmetry between them. The popularities of Republican and Democrat ideologies can be represented
by two variables, pr and pd, respectively (0 â¤ pr â¤ 1; 0 â¤ pd â¤ 1; 0â¤ pr + pd â¤ 1). This implies that 1- pr pd = pi represents the popularity of Independent. Assume that at each election poll, people will change
their ideological states among the three options according to their relative popularities in the previous poll.
For example, the rate of switching from option X to option Y can be considered proportional to (pY – pX) if
pY > pX, or 0 otherwise. You should consider six different cases of such switching behaviors (Republican
to Democrat, Republican to Independent, Democrat to Republican, Democrat to Independent,
Independent to Republican, and Independent to Democrat) and represent them in dynamical equations.
1. Complete a discrete-time mathematical model that describes this system, and simulate its
behavior. See what the possible final outcomes are after a sufficiently long time period. (Hint:
Revise Code 4.13 and use.)
For a specific case of pX, pY, and pZ:
2. Find equilibrium points.
3. Calculate the Jacobian matrix at each of the equilibrium points.
4. Calculate the eigenvalues of each of the matrices obtained above. (Hint: Revise Code 5.6 and
use.)
5. Based on the results, discuss the stability of each equilibrium point.
6. Why is an all Independent state (electorate) not feasible?
7. Give one major cause of change of state of convergence (Democrat or Republican) from election
to election in the context of this model.
WRITING AND RESEARCH RESOURCES
â
â
â
â
OWL (Online Writing Lab) at Purdue University
Writer’s Handbook, the Writing Center at the University of WisconsinâMadison
APA Guidelines
Information Literacy for TESU Students (an online guide from the New Jersey State Library to
assist you in starting your research, searching databases for articles, citing sources, using ILLiad
to request books or articles, etc.)
1. Let pd=X; pr=Y; and pi=Z. The X+Y+Z=1
Xt= Xt-1+r*max(Xt-1-Yt-1,0)*Yt-1+r*max(Xt-1-Zt-1,0)*Zt-1-r*max(Yt-1-Xt-1,0)*Xt-1-r*max(Zt-1-Xt-1,0)*Xt-1
Yt= Yt-1+r*max(Yt-1-Xt-1,0)*Xt-1+r*max(Yt-1-Zt-1,0)*Zt-1-r*max(Xt-1-Yt-1,0)*Yt-1-r*max(Zt-1-Yt-1,0)*Yt-1
Zt= Zt-1+r*max(Zt-1-Yt-1,0)*Yt-1+r*max(Zt-1-Xt-1,0)*Xt-1-r*max(Xt-1-Zt-1,0)*Zt-1-r*max(Yt-1-Zt-1,0)*Zt-1
To simulate, you need initial conditions. Hint: There are three main possible cases of initial conditions.
Case 1. X0>Y0,Z0
Case 2. Y0>X0,Z0
Case 3. Z0>X0,Y0
When you set the initial conditions, then the maximum function will no longer be necessary and the equations will
simplify as some terms will fall out due to being multiplied by zero. For example,
X0= 0.5
Y0= 0.3
Z0= 0.2
r=4/5
Our equations simplify as follows:
Xt= Xt-1+r(Xt-1-Yt-1)Yt-1+r(Xt-1-Zt-1)Zt-1
(1)
Yt= Yt-1+r(Yt-1-Zt-1)Zt-1-r(Xt-1-Yt-1)Yt-1
(2)
Zt= Zt-1-r(Xt-1-Zt-1)Zt-1-r(Yt-1-Zt-1)Zt-1
(3)
Simulate using a revised code 4.13. Depending on the initial conditions the model will converge to and all democratic
state (1,0,0), republican state (0,1,0), or independent state (0,0,1). With the above initial conditions, the model will
converge to (1,0,0).
2. Finding equilibrium points. At equilibrium Xt=x, Yt=y, and Zt=z. From equation (3) you will get z=(x+y)/2 or
z=0. Substituting z=(x+y)/2 in equations (1) and (2) and solving for x we get x=y or -5y. But -5y is impossible
since all values must be in the cube [0,1]^3. Also, z=1-x-y. Setting (x+y)/2=1-x-y, you get x+y=2/3. Hence z=1/3.
x=y and x+y=2/3 means x=1/3 and y=1/3. Hence an interior equilibrium at (1/3, 1/3, 1/3). From z=1-x-y we get
the boundary equilibrium points at (1,0,0), (0,1,0), and (0,0,1).
3. Jacobian Matrix:
1
2
4. To find the eigenvalues we have to solve the equation (1 â đ) (5 â đ) = 0
1
Hence the eigenvalues are đ = 1, đ = 5
5. Consequently, the dominant eigenvalue is 1, and the other ones have absolute value less than 1. The equilibrium
point is Lyapunov stable.
Finding the Jacobian matrix for (0,1,0) and (0,0,1) and their eigenvalues, you will see that the dominant
eigenvalue in each case has absolute value greater than 1, confirming that the equilibrium points unstable. Hence
for the initial condition (0.5, 0.3, 0.2) the model converges to (1,0,0).
Cases 2 and 3 can be verified accordingly. Notice that the equilibrium point (1/3, 1/3, 1/3) will be unstable for any
initial condition. Must be verified!
6. An all independent electorate is not feasible because each citizen who identifies as independent leans either
democratic or republican.
7. In the context of this model, a change from democratic to republican from election to election will be caused by a
change in initial condition. This means massive registration of first time voters at the beginning of the election
cycle by one or the other party.
Note: Since the Jacobian matrix depends on the constant of proportionality r, the numerical values of these
matrices will vary from student to student. Consequently, the eigenvalues will also vary. But the conclusions will
stay the same.
Introduction to the Modeling and Analysis of
Complex Systems
Hiroki Sayama
c 2015 Hiroki Sayama
ISBN:
978-1-942341-06-2 (deluxe color edition)
978-1-942341-08-6 (print edition)
978-1-942341-09-3 (ebook)
You are free to:
Shareâcopy and redistribute the material in any medium or format
Adaptâremix, transform, and build upon the material
The licensor cannot revoke these freedoms as long as you follow the license terms. Under
the following terms:
changes were made. You may do so in any reasonable manner, but not in any way that
suggests the licensor endorses you or your use.
NonCommercialâYou may not use the material for commercial purposes.
ShareAlikeâIf you remix, transform, or build upon the material, you must distribute your
contributions under the same license as the original.
This publication was made possible by a SUNY Innovative Instruction Technology Grant
(IITG). IITG is a competitive grants program open to SUNY faculty and support staff
across all disciplines. IITG encourages development of innovations that meet the Power
of SUNYâs transformative vision.
State University of New York at Geneseo
Geneseo, NY 14454
iii
Introduction to the Modeling and Analysis of Complex Systems introduces students to
mathematical/computational modeling and analysis developed in the emerging interdisciplinary field of Complex Systems Science. Complex systems are systems made of a
large number of microscopic components interacting with each other in nontrivial ways.
Many real-world systems can be understood as complex systems, where critically important information resides in the relationships between the parts and not necessarily within
the parts themselves.
This textbook offers an accessible yet technically-oriented introduction to the modeling
and analysis of complex systems. The topics covered include: fundamentals of modeling,
basics of dynamical systems, discrete-time models, continuous-time models, bifurcations,
chaos, cellular automata, continuous field models, static networks, dynamic networks, and
agent-based models. Most of these topics are discussed in two chapters, one focusing on
computational modeling and the other on mathematical analysis. This unique approach
provides a comprehensive view of related concepts and techniques, and allows readers
and instructors to flexibly choose relevant materials based on their objectives and needs.
Python sample codes are provided for each modeling example.
Hiroki Sayama, D.Sc., is an Associate Professor in the Department of Systems Science
and Industrial Engineering, and the Director of the Center for Collective Dynamics of
Complex Systems (CoCo), at Binghamton University, State University of New York. He
received his BSc, MSc and DSc in Information Science, all from the University of Tokyo,
Japan. He did his postdoctoral work at the New England Complex Systems Institute in
Cambridge, Massachusetts, from 1999 to 2002. His research interests include complex
dynamical networks, human and social dynamics, collective behaviors, artificial life/chemistry, and interactive systems, among others.
He is an expert of mathematical/computational modeling and analysis of various complex systems. He has published more than 100 peer-reviewed journal articles and conference proceedings papers and has edited eight books and conference proceedings about
complex systems related topics. His publications have acquired more than 2000 citations
as of July 2015. He currently serves as an elected Board Member of the International
Society for Artificial Life (ISAL) and as an editorial board member for Complex Adaptive
Systems Modeling (SpringerOpen), International Journal of Parallel, Emergent and Distributed Systems (Taylor & Francis), and Applied Network Science (SpringerOpen).
iv
Reviewerâs Notes
This book provides an excellent introduction to the field of modeling and analysis of complex systems to both undergraduate and graduate students in the physical sciences, social
sciences, health sciences, humanities, and engineering. Knowledge of basic mathematics is presumed of the reader who is given glimpses into the vast, diverse and rich world of
nonlinear algebraic and differential equations that model various real-world phenomena.
The treatment of the field is thorough and comprehensive, and the book is written in a
very lucid and student-oriented fashion. A distinguishing feature of the book, which uses
the freely available software Python, is numerous examples and hands-on exercises on
complex system modeling, with the student being encouraged to develop and test his or
her own code in order to gain vital experience.
The book is divided into three parts. Part I provides a basic introduction to the art
and science of model building and gives a brief historical overview of complex system
modeling. Part II is concerned with systems having a small number of variables. After
introducing the reader to the important concept of phase space of a dynamical system,
it covers the modeling and analysis of both discrete- and continuous-time systems in a
systematic fashion. A very interesting feature of this part is the analysis of the behavior of
such a system around its equilibrium state, small perturbations around which can lead to
bifurcations and chaos. Part III covers the simulation of systems with a large number of
variables. After introducing the reader to the interactive simulation tool PyCX, it presents
the modeling and analysis of complex systems (e.g., waves in excitable media, spread
of epidemics and forest fires) with cellular automata. It next discusses the modeling and
analysis of continuous fields that are represented by partial differential equations. Examples are diffusion-reaction systems which can exhibit spontaneous self-organizing behavior (e.g., Turing pattern formation, Belousov-Zhabotinsky reaction and Gray-Scott pattern
formation). Part III concludes with the modeling and analysis of dynamical networks and
agent-based models.
The concepts of emergence and self-organization constitute the underlying thread that
weaves the various chapters of the book together.
About the Reviewer: Dr. Siddharth G. Chatterjee received his Bachelorâs Degree in Technology (Honors) from the Indian Institute of Technology, Kharagpur, India, and M.S. and
Ph.D. degrees from Rensselaer Polytechnic Institute, Troy, New York, USA, all in Chemical Engineering. He has taught a variety of engineering and mathematical courses and
his research interests are the areas of philosophy of science, mathematical modeling and
simulation. Presently he is Associate Professor in the Department of Paper and Bioprocess Engineering at SUNY College of Environmental Science and Forestry, Syracuse,
v
New York. He is also a Fellow of the Institution of Engineers (India) and Member of the
Indian Institute of Chemical Engineers.
Sayama has produced a very comprehensive introduction and overview of complexity.
Typically, these topics would occur in many different courses, as a side note or possible
behavior of a particular type of mathematical model, but only after overcoming a huge
hurdle of technical detail. Thus, initially, I saw this book as a âmile-wide, inch-deepâ approach to teaching dynamical systems, cellular automata, networks, and the like. Then
I realized that while students will learn a great deal about these topics, the real focus is
learning about complexity and its hallmarks through particular mathematical models in
which it occurs. In that respect, the book is remarkably deep and excellent at illustrating
how complexity occurs in so many different contexts that it is worth studying in its own
right. In other words, Sayama sort of rotates the axes from âcalculusâ, âlinear algebraâ,
and so forth, so that the axes are âself-organizationâ, âemergenceâ, etc. This means that I
would be equally happy to use the modeling chapters in a 100-level introduction to modeling course or to use the analysis chapters in an upper-level, calculus-based modeling
course. The Python programming used throughout provides a nice introduction to simulation and gives readers an excellent sandbox in which to explore the topic. The exercises
about the models and about the underlying situations being modeled. The logical structure of the material takes maximum advantage of early material to support analysis and
understanding of more difficult models. The organization also means that students experiencing such material early in their academic careers will naturally have a framework for
later studies that delve more deeply into the analysis and application of particular mathematical tools, like PDEs or networks.
About the Reviewer: Dr. Kris Green earned his Ph.D. in applied mathematics from the University of Arizona. Since then, he has earned the rank of full professor at St. John Fisher
College where he often teaches differential equations, mathematical modeling, multivariable calculus and numerical analysis, as well as a variety of other courses. He has guided
a number of successful undergraduate research projects related to modeling of complex
systems, and is currently interested in applications of such models to education, both in
terms of teaching and learning and of the educational system as a whole. Outside of the
office, he can often be found training in various martial arts or enjoying life with his wife
and two cats.
To Mari
Preface
This is an introductory textbook about the concepts and techniques of mathematical/computational modeling and analysis developed in the emerging interdisciplinary field of complex systems science. Complex systems can be informally defined as networks of many
interacting components that may arise and evolve through self-organization. Many realworld systems can be modeled and understood as complex systems, such as political
organizations, human cultures/languages, national and international economies, stock
markets, the Internet, social networks, the global climate, food webs, brains, physiological systems, and even gene regulatory networks within a single cell; essentially, they
are everywhere. In all of these systems, a massive amount of microscopic components
are interacting with each other in nontrivial ways, where important information resides in
the relationships between the parts and not necessarily within the parts themselves. It
is therefore imperative to model and analyze how such interactions form and operate in
order to understand what will emerge at a macroscopic scale in the system.
Complex systems science has gained an increasing amount of attention from both inside and outside of academia over the last few decades. There are many excellent books
already published, which can introduce you to the big ideas and key take-home messages
about complex systems. In the meantime, one persistent challenge I have been having in
teaching complex systems over the last several years is the apparent lack of accessible,
easy-to-follow, introductory-level technical textbooks. What I mean by technical textbooks
are the ones that get down to the âwet and dirtyâ details of how to build mathematical or
computational models of complex systems and how to simulate and analyze them. Other
books that go into such levels of detail are typically written for advanced students who are
already doing some kind of research in physics, mathematics, or computer science. What
I needed, instead, was a technical textbook that would be more appropriate for a broader
audienceâcollege freshmen and sophomores in any science, technology, engineering,
as the social sciences, management/organizational sciences, health sciences and the humanities, and even advanced high school students looking for research projects who are
ix
x
interested in complex systems modeling.
This OpenSUNY textbook is my humble attempt to meet this need. As someone who
didnât major in either physics or mathematics, and who moved away from the mainstream
of computer science, I thought I could be a good âtranslatorâ of technical material for
laypeople who donât major in those quantitative fields. To make the material as tangible
as possible, I included a lot of step-by-step instructions on how to develop models (especially computer simulation codes), as well as many visuals, in this book. Those detailed
instructions/visuals may sometimes look a bit redundant, but hopefully they will make the
technical material more accessible to many of you. I also hope that this book can serve
as a good introduction and reference for graduate students and researchers who are new
to the field of complex systems.
In this textbook, we will use Python for computational modeling and simulation. Python
is a rapidly growing computer programming language widely used for scientific computing
and also for system development in the information technology industries. It is freely
available and quite easy to learn for non-computer science majors. I hope that using
Python as a modeling and simulation tool will help you gain some real marketable skills,
and it will thus be much more beneficial than using other pre-made modeling/simulation
software. All the Python sample codes for modeling examples are available from the
textbookâs website at http://bingweb.binghamton.edu/~sayama/textbook/, which are
directly linked from each code example shown in this textbook (if you are reading this
electronically). Solutions for the exercises are also available from this website.
To maintain a good balance between accessibility and technical depth/rigor, I have
written most of the topics in two chapters, one focusing on hands-on modeling work and
the other focusing on more advanced mathematical analysis. Here is a more specific
breakdown:
Preliminary chapters 1, 2
Modeling chapters 3, 4, 6, 10, 11, 13, 15, 16, 19
Analysis chapters 5, 7, 8, 9, 12, 14, 17, 18
The preliminary and modeling chapters are marked with an orange side bar at the top,
while the analysis chapters are marked with a blue side bar at the bottom. The modeling
chapters wonât require any in-depth mathematical skills; some basic knowledge of derivatives and probabilities is enough. The analysis chapters are based on a more solid understanding of calculus, differential equations, linear algebra, and probability and statistics.
I hope this unique way of organizing topics in two complementary chapters will provide
xi
a comprehensive view of the related concepts and techniques, as well as allow you to
flexibly choose relevant materials based on your learning/teaching objectives and needs.
If you are an instructor, here are some suggested uses for this textbook:
â˘ One-semester course as an introduction to complex systems modeling
â Target audience: College freshmen or sophomores (or also for research projects
â Chapters to be covered: Part I and some modeling chapters selected from
Parts II & III
â˘ One-semester course as an introduction to dynamical systems
â Chapters to be covered: Parts I & II, plus Continuous Field Models chapters
(both modeling and analysis)
â˘ One-semester advanced course on complex systems modeling and analysis
â Chapters to be covered: Part III (both modeling and analysis)
â˘ Two-semester course sequence on both modeling and analysis of complex systems
â Chapters to be covered: Whole textbook
Note that the chapters of this textbook are organized purely based on their content. They
are not designed to be convenient curricular modules that can be learned or taught in
similar amounts of time. Some chapters (especially the preliminary ones) are very short
and easy, while others (especially the analysis ones) are extensive and challenging. If you
are teaching a course using this book, it is recommended to allocate time and resources
to each chapter according to its length and difficulty level.
One more thing I need to note is that the contents of this book are focused on dynamical models, and as such, they are not intended to cover all aspects of complex systems
science. There are many important topics that are not included in the text because of
the limitation of space and time. For example, topics that involve probability, stochasticity,
and statistics, such as information theory, entropy, complexity measurement, stochastic
models, statistical analysis, and machine learning, are not discussed much in this book.
Fortunately, there are several excellent textbooks on these topics already available.
xii
This textbook was made possible, thanks to the help and support of a number of
people. I would like to first express my sincere gratitude to Ken McLeod, the former
Chair of the Department of Bioengineering at Binghamton University, who encouraged
me to write this textbook. The initial brainstorming discussions I had with him helped me
tremendously in shaping the basic topics and structure of this book. After all, it was Ken
who hired me at Binghamton, so I owe him a lot anyway. Thank you Ken.
My thanks also go to Yaneer Bar-Yam, the President of the New England Complex
Systems Institute (NECSI), where I did my postdoctoral studies (alas, way more than a
decade agoâtime flies). I was professionally introduced to the vast field of complex systems by him, and the various research projects I worked on under his guidance helped
me learn many of the materials discussed in this book. He also gave me the opportunity
to teach complex systems modeling at the NECSI Summer/Winter Schools. This ongoing
teaching experience has helped me a lot in the development of the instructional materials
included in this textbook. I would also like to thank my former PhD advisor, Yoshio Oyanagi, former Professor at the University of Tokyo. His ways of valuing both scientific rigor
and intellectual freedom and creativity influenced me greatly, which are still flowing in my
blood.
This textbook uses PyCX, a simple Python-based complex systems simulation framework. Its GUI was developed by Chun Wong, a former undergraduate student at Binghamton University and now an MBA student at the University of Maryland, and PrzemysĹaw
Szufel and BogumiĹ KaminĚski, professors at the Warsaw School of Economics, to whom I
owe greatly. If you find PyCXâs GUI useful, you should be grateful to them, not me. Please
send them a thank you note.
I thank Cyril Oberlander, Kate Pitcher, Allison Brown, and all others who have made
this wonderful OpenSUNY textbook program possible. Having this book with open access
to everyone in the world is one of the main reasons why I decided to write it in the first
place. Moreover, I greatly appreciate the two external reviewers, Kris Green, at St. John
Fisher College, and Siddharth G. Chatterjee, at SUNY College of Environmental Science
and Forestry, whose detailed feedback was essential in improving the quality and accuracy of the contents of this book. In particular, Kris Greenâs very thorough, constructive,
extremely helpful comments have helped bring the scientific contents of this textbook up
to a whole new level. I truly appreciate his valuable feedback. I also thank Sharon Ryan
for her very careful copy editing for the final version of the manuscript, which greatly improved the quality of the text.
My thanks are also due to my fellow faculty members and graduate students at the
Center for Collective Dynamics of Complex Systems (CoCo) at Binghamton University,
including Shelley Dionne, Fran Yammarino, Andreas Pape, Ken Kurtz, Dave Schaffer, Yu
xiii
Chen, Hal Lewis, Vlad Miskovic, Chun-An Chou, Brandon Gibb, Genki Ichinose, David
Sloan Wilson, Prahalad Rao, Jeff Schmidt, Benjamin James Bush, Xinpei Ma, and Hyobin Kim, as well as other fantastic collaborators I was lucky enough to have outside
the campus, including Thilo Gross, ReneĚ Doursat, LaĚszloĚ BarabaĚsi, Roberta Sinatra, Junichi Yamanoi, Stephen Uzzo, Catherine Cramer, Lori Sheetz, Mason Porter, Paul Trunfio,
Gene Stanley, Carol Reynolds, Alan Troidl, Hugues Bersini, J. Scott Turner, Lindsay Yazzolino, and many others. Collaboration with these wonderful people has given me lots of
insight and energy to work on various complex systems research and education projects.
I would also like to thank the people who gave me valuable feedback on the draft
versions of this book, including Barry Goldman, Blake Stacey, Ernesto Costa, Ricardo
Alvira, Joe Norman, Navdep Kaur, Dene Farrell, Aming Li, Daniel Goldstein, Stephanie
Smith, Hoang Peter Ta, Nygos Fantastico, Michael Chambers, and Tarun Bist. Needless
to say, I am solely responsible for all typos, errors, or mistakes remaining in this textbook.
I would greatly appreciate any feedback from any of you.
My final thanks go to a non-living object, my Lenovo Yoga 13 laptop, on which I was
able to write the whole textbook anytime, anywhere. It endured the ownerâs careless
handling (which caused its touchscreen to crack) and yet worked pretty well to the end.
I hope you enjoy this OpenSUNY textbook and begin an exciting journey into complex
systems.
July 2015
Hiroki Sayama
Binghamton, NY / Natick, MA / Dresden, Germany
Contents
I
Preliminaries
1
1 Introduction
1.1 Complex Systems in a Nutshell . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Topical Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Fundamentals of Modeling
2.1 Models in Science and Engineering
2.2 How to Create a Model . . . . . . .
2.3 Modeling Complex Systems . . . . .
2.4 What Are Good Models? . . . . . . .
2.5 A Historical Perspective . . . . . . .
II
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Systems with a Small Number of Variables
3
3
6
11
11
14
19
21
22
27
3 Basics of Dynamical Systems
29
3.1 What Are Dynamical Systems? . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2 Phase Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3 What Can We Learn? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4 Discrete-Time Models I: Modeling
4.1 Discrete-Time Models with Difference Equations . . . . . .
4.2 Classifications of Model Equations . . . . . . . . . . . . . .
4.3 Simulating Discrete-Time Models with One Variable . . . .
4.4 Simulating Discrete-Time Models with Multiple Variables . .
4.5 Building Your Own Model Equation . . . . . . . . . . . . . .
4.6 Building Your Own Model Equations with Multiple Variables
xv
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
35
35
36
39
46
51
55
xvi
CONTENTS
5 Discrete-Time Models II: Analysis
5.1 Finding Equilibrium Points . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Phase Space Visualization of Continuous-State Discrete-Time Models . . .
5.3 Cobweb Plots for One-Dimensional Iterative Maps . . . . . . . . . . . . . .
5.4 Graph-Based Phase Space Visualization of Discrete-State Discrete-Time
Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.5 Variable Rescaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.6 Asymptotic Behavior of Discrete-Time Linear Dynamical Systems . . . . . .
5.7 Linear Stability Analysis of Discrete-Time Nonlinear Dynamical Systems . .
6 Continuous-Time Models I: Modeling
6.1 Continuous-Time Models with Differential Equations . . . . . . .
6.2 Classifications of Model Equations . . . . . . . . . . . . . . . . .
6.3 Connecting Continuous-Time Models with Discrete-Time Models
6.4 Simulating Continuous-Time Models . . . . . . . . . . . . . . . .
6.5 Building Your Own Model Equation . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
7 Continuous-Time Models II: Analysis
7.1 Finding Equilibrium Points . . . . . . . . . . . . . . . . . . . . . . . .
7.2 Phase Space Visualization . . . . . . . . . . . . . . . . . . . . . . .
7.3 Variable Rescaling . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.4 Asymptotic Behavior of Continuous-Time Linear Dynamical Systems
7.5 Linear Stability Analysis of Nonlinear Dynamical Systems . . . . . .
8 Bifurcations
8.1 What Are Bifurcations? . . . . . . . . . . . . . . .
8.2 Bifurcations in 1-D Continuous-Time Models . . .
8.3 Hopf Bifurcations in 2-D Continuous-Time Models
8.4 Bifurcations in Discrete-Time Models . . . . . . . .
9 Chaos
9.1 Chaos in Discrete-Time Models . .
9.2 Characteristics of Chaos . . . . . .
9.3 Lyapunov Exponent . . . . . . . .
9.4 Chaos in Continuous-Time Models
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
61
61
62
68
74
77
81
90
.
.
.
.
.
99
99
100
102
104
108
.
.
.
.
.
111
111
112
118
120
125
.
.
.
.
131
131
132
140
144
.
.
.
.
153
153
156
157
162
CONTENTS
III
xvii
Systems with a Large Number of Variables
171
10 Interactive Simulation of Complex Systems
10.1 Simulation of Systems with a Large Number of Variables
10.2 Interactive Simulation with PyCX . . . . . . . . . . . . .
10.3 Interactive Parameter Control in PyCX . . . . . . . . . .
10.4 Simulation without PyCX . . . . . . . . . . . . . . . . . .
.
.
.
.
173
173
174
180
181
.
.
.
.
.
185
185
190
192
200
201
.
.
.
.
209
209
211
215
219
.
.
.
.
.
.
227
227
229
236
241
249
259
.
.
.
.
269
269
273
275
285
11 Cellular Automata I: Modeling
11.1 Definition of Cellular Automata . . . . . . . . . . . .
11.2 Examples of Simple Binary Cellular Automata Rules
11.3 Simulating Cellular Automata . . . . . . . . . . . . .
11.4 Extensions of Cellular Automata . . . . . . . . . . .
11.5 Examples of Biological Cellular Automata Models . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
12 Cellular Automata II: Analysis
12.1 Sizes of Rule Space and Phase Space . . . . . . . . . . . . . . . .
12.2 Phase Space Visualization . . . . . . . . . . . . . . . . . . . . . .
12.3 Mean-Field Approximation . . . . . . . . . . . . . . . . . . . . . . .
12.4 Renormalization Group Analysis to Predict Percolation Thresholds
13 Continuous Field Models I: Modeling
13.1 Continuous Field Models with Partial Differential Equations
13.2 Fundamentals of Vector Calculus . . . . . . . . . . . . . . .
13.3 Visualizing Two-Dimensional Scalar and Vector Fields . . .
13.4 Modeling Spatial Movement . . . . . . . . . . . . . . . . . .
13.5 Simulation of Continuous Field Models . . . . . . . . . . . .
13.6 Reaction-Diffusion Systems . . . . . . . . . . . . . . . . . .
14 Continuous Field Models II: Analysis
14.1 Finding Equilibrium States . . . . . . . . . . . . . . . . .
14.2 Variable Rescaling . . . . . . . . . . . . . . . . . . . . .
14.3 Linear Stability Analysis of Continuous Field Models . .
14.4 Linear Stability Analysis of Reaction-Diffusion Systems
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15 Basics of Networks
295
15.1 Network Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
15.2 Terminologies of Graph Theory . . . . . . . . . . . . . . . . . . . . . . . . . 296
xviii
15.3
15.4
15.5
15.6
CONTENTS
Constructing Network Models with NetworkX
Visualizing Networks with NetworkX . . . . .
Importing/Exporting Network Data . . . . . .
Generating Random Graphs . . . . . . . . .
16 Dynamical Networks I: Modeling
16.1 Dynamical Network Models . . . .
16.2 Simulating Dynamics on Networks
16.3 Simulating Dynamics of Networks
16.4 Simulating Adaptive Networks . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
17 Dynamical Networks II: Analysis of Network Topologies
17.1 Network Size, Density, and Percolation . . . . . . . . .
17.2 Shortest Path Length . . . . . . . . . . . . . . . . . . .
17.3 Centralities and Coreness . . . . . . . . . . . . . . . .
17.4 Clustering . . . . . . . . . . . . . . . . . . . . . . . . .
17.5 Degree Distribution . . . . . . . . . . . . . . . . . . . .
17.6 Assortativity . . . . . . . . . . . . . . . . . . . . . . . .
17.7 Community Structure and Modularity . . . . . . . . . .
18 Dynamical Networks III: Analysis of Network Dynamics
18.1 Dynamics of Continuous-State Networks . . . . . . . .
18.2 Diffusion on Networks . . . . . . . . . . . . . . . . . .
18.3 Synchronizability . . . . . . . . . . . . . . . . . . . . .
18.4 Mean-Field Approximation of Discrete-State Networks
18.5 Mean-Field Approximation on Random Networks . . .
18.6 Mean-Field Approximation on Scale-Free Networks . .
19 Agent-Based Models
19.1 What Are Agent-Based Models? . .
19.2 Building an Agent-Based Model . . .
19.3 Agent-Environment Interaction . . .
19.4 Ecological and Evolutionary Models
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
303
310
314
320
.
.
.
.
325
325
326
348
360
.
.
.
.
.
.
.
371
371
377
380
386
389
396
400
.
.
.
.
.
.
405
405
407
409
416
417
420
.
.
.
.
427
427
431
440
448
Bibliography
465
Index
473
Part I
Preliminaries
1
Chapter 1
Introduction
1.1
Complex Systems in a Nutshell
It may be rather unusual to begin a textbook with an outright definition of a topic, but
anyway, here is what we mean by complex systems in this textbook1 :
Complex systems are networks made of a number of components that interact with
each other, typically in a nonlinear fashion. Complex systems may arise and evolve
through self-organization, such that they are neither completely regular nor completely random, permitting the development of emergent behavior at macroscopic
scales.
These properties can be found in many real-world systems, e.g., gene regulatory networks within a cell, physiological systems of an organism, brains and other neural systems, food webs, the global climate, stock markets, the Internet, social media, national
and international economies, and even human cultures and civilizations.
To better understand what complex systems are, it might help to know what they are
not. One example of systems that are not complex is a collection of independent components, such as an ideal gas (as discussed in thermodynamics) and random coin tosses
(as discussed in probability theory). This class of systems was called âproblems of disorganized complexityâ by American mathematician and systems scientist Warren Weaver
[2]. Conventional statistics works perfectly when handling such independent entities. Another example, which is at the other extreme, is a collection of strongly coupled compo1
In fact, the first sentence of this definition is just a bit wordier version of Herbert Simonâs famous definition in his 1962 paper [1]: â[A] complex system [is a system] made up of a large number of parts that
interact in a nonsimple way.â
3
4
CHAPTER 1. INTRODUCTION
nents, such as rigid bodies (as discussed in classical mechanics) and fixed coin tosses
(Iâm not sure which discipline studies this). Weaver called this class of systems âproblems of simplicityâ [2]. In this class, the components of a system are tightly coupled to
each other with only a few or no degrees of freedom left within the system, so one can
describe the collection as a single entity with a small number of variables. There are very
well-developed theories and tools available to handle either case. Unfortunately, however,
most real-world systems are somewhere in between.
Complex systems science is a rapidly growing scientific research area that fills the
huge gap between the two traditional views that consider systems made of either completely independent or completely coupled components. This is the gap where what
Weaver called âproblems of organized complexityâ exist [2]. Complex systems science
develops conceptual, mathematical, and computational tools to describe systems made
of interdependent components. It studies the structural and dynamical properties of various systems to obtain general, cross-disciplinary implications and applications.
Complex systems science has multiple historical roots and topical clusters of concepts,
as illustrated in Fig. 1.1. There are two core concepts that go across almost all subareas
of complex systems: emergence and self-organization.
The idea of emergence was originally discussed in philosophy more than a century
ago. There are many natural phenomena where some property of a system observed
at macroscopic scales simply canât be reduced to microscopic physical rules that drive
the systemâs behavior. For example, you can easily tell that a dog wagging its tail is
alive, but it is extremely difficult to explain what kind of microscopic physical/chemical
processes going on in its body are making this organism âalive.â Another typical example
is your consciousness. You know you are conscious, but it is hard to describe what
kind of neurophysiological processes make you a âconsciousâ entity. Those macroscopic
properties (livingness, consciousness) are called emergent properties of the systems.
Despite its long history of discussion and debate, there are still a number of different definitions for the concept of emergence in complex systems science. However, the
one thing that is common in most of the proposed definitions is that the emergence is
about the systemâs properties at different scales. If you observe a property at a macroscopic scale that is fundamentally different from what you would naturally expect from
microscopic rules, then you are witnessing emergence. More concisely, emergence is a
nontrivial relationship between the systemâs properties at different scales. This definition
was proposed by complex systems scientist Yaneer Bar-Yam [4]. I will adopt this definition
since it is simple and consistent with most of the definitions proposed in the literature.
1.1. COMPLEX SYSTEMS IN A NUTSHELL
Figure 1.1: Visual, organizational map of complex systems science broken into seven
topical areas. The three circles on the left (Nonlinear Dynamics, Systems Theory, and
Game Theory) are the historical roots of complex systems science, while the other
four circles (Pattern Formation, Evolution and Adaptation, Networks, and Collective
Behavior) are the more recently studied topical areas. Created by the author and
available from Wikipedia [3].
5
6
CHAPTER 1. INTRODUCTION
Emergence is a nontrivial relationship between the properties of a system at microscopic and macroscopic scales. Macroscopic properties are called emergent when it
is hard to explain them simply from microscopic properties.
Another key idea of complex systems science is self-organization, which is sometimes confused with emergence. Some researchers even use these terms almost interchangeably. One clear distinction, though, is that, while emergence is about scale,
self-organization is about time (in addition to scale). Namely, you call something selforganizing when you observe that the system spontaneously organizes itself to produce
a nontrivial macroscopic structure and/or behavior (or âorder,â if you will) as time progresses. In other words, self-organization is a dynamical process that looks as if it were
going against the second law of thermodynamics (which states that entropy of a closed
system increases monotonically over time). Many physical, biological, and social systems show self-organizing behavior, which could appear mysterious when people were
not aware of the possibility of self-organization. Of course, these systems are not truly
going against the law of thermodynamics, because they are open systems that are driven
by energy flow coming from and going to the outside of the system. In a sense, the idea
of self-organization gives a dynamical explanation for emergent properties of complex
systems.
Self-organization is a dynamical process by which a system spontaneously forms
nontrivial macroscopic structures and/or behaviors over time.
Around these two key ideas, there are several topical clusters, which are illustrated in
Fig. 1.1. Letâs quickly review them.
1.2
Topical Clusters
Nonlinear dynamics is probably the topical cluster that has the longest history, at least
from as far back as the 17th century when Isaac Newton and Gottfried Wilhelm Leibniz
invented calculus and differential equations. But it was found only in the 20th century that
systems that include nonlinearity in their dynamics could show some weird behaviors,
such as chaos [5, 6] (which will be discussed later). Here, nonlinearity means that the
outputs of a system are not given by a linear combination of the inputs. In the context
of system behavior, the inputs and outputs can be the current and next states of the
system, and if their relationship is not linear, the system is called a nonlinear system.
1.2. TOPICAL CLUSTERS
7
The possibility of chaotic behavior in such nonlinear systems implies that there will be
no analytical solutions generally available for them. This constitutes one of the several
origins of the idea of complexity.
Systems theory is another important root of complex systems science. It rapidly developed during and after World War II, when there was a huge demand for mathematical
theories to formulate systems that could perform computation, control, and/or communication. This category includes several ground-breaking accomplishments in the last century, such as Alan Turingâs foundational work on theoretical computer science [7], Norbert
Wienerâs cybernetics [8], and Claude Shannonâs information and communication theories
[9]. A common feature shared by those theories is that they all originated from some engineering discipline, where engineers were facing real-world complex problems and had to
come up with tools to meet societal demands. Many innovative ideas of systems thinking
were invented in this field, which still form the key components of todayâs complex systems
science.
Game theory also has an interesting societal background. It is a mathematical theory,
established by John von Neumann and Oskar Morgenstern [10], which formulates the
decisions and behaviors of people playing games with each other. It was developed
during the Cold War, when there was a need to seek a balance between the two mega
powers that dominated the world at that time. The rationality of the game players was
typically assumed in many game theory models, which made it possible to formulate the
decision making process as a kind of deterministic dynamical system (in which either
decisions themselves or their probabilities could be modeled deterministically). In this
sense, game theory is linked to nonlinear dynamics. One of the many contributions game
theory has made to science in general is that it demonstrated ways to model and analyze
human behavior with great rigor, which has made huge influences on economics, political
science, psychology, and other areas of social sciences, as well as contributing to ecology
and evolutionary biology.
Later in the 20th century, it became clearly recognized that various innovative ideas
and tools arising in those research areas were all developed to understand the behavior
of systems made of multiple interactive components whose macroscopic behaviors were
often hard to predict from the microscopic rules or laws that govern their dynamics. In the
1980s, those systems began to be the subject of widespread interdisciplinary discussions
under the unified moniker of âcomplex systems.â The research area of complex systems
science is therefore inherently interdisciplinary, which has remained unchanged since the
inception of the field. The recent developments of complex systems research may be
roughly categorized into four topical clusters: pattern formation, evolution and adaptation,
networks, and collective behavior.
8
CHAPTER 1. INTRODUCTION
Pattern formation is a self-organizing process that involves space as well as time. A
system is made of a large number of components that are distributed over a spatial domain, and their interactions (typically local ones) create an interesting spatial pattern over
time. Cellular automata, developed by John von Neumann and StanisĹaw Ulam in the
1940s [11], are a well-known example of mathematical models that address pattern formation. Another modeling framework is partial differential equations (PDEs) that describe
spatial changes of functions in addition to their temporal changes. We will discuss these
modeling frameworks later in this textbook.
Evolution and adaptation have been discussed in several different contexts. One context is obviously evolutionary biology, which can be traced back to Charles Darwinâs evolutionary theory. But another, which is often discussed more closely to complex systems,
is developed in the âcomplex adaptive systemsâ context, which involves evolutionary computation, artificial neural networks, and other frameworks of man-made adaptive systems
that are inspired by biological and neurological processes. Called soft computing, machine learning, or computational intelligence, nowadays, these frameworks began their
rapid development in the 1980s, at the same time when complex systems science was
about to arise, and thus they were strongly coupledâconceptually as well as in the literature. In complex systems science, evolution and adaptation are often considered to
be general mechanisms that can not only explain biological processes, but also create
non-biological processes that have dynamic learning and creative abilities. This goes well
beyond what a typical biological study covers.
Finally, networks and collective behavior are probably the most current research fronts
of complex systems science (as of 2015). Each has a relatively long history of its own. In
particular, the study of networks was long known as graph theory in mathematics, which
was started by Leonhard Euler back in the 18th century. In the meantime, the recent boom
of network and collective behavior research has been largely driven by the availability of
increasingly large amounts of data. This is obviously caused by the explosion of the Internet and the WWW, and especially the rise of mobile phones and social media over the
last decade. With these information technology infrastructures, researchers are now able
to obtain high-resolution, high-throughput data about how people are connected to each
other, how they are communicating with each other, how they are moving geographically,
what they are interested in, what they buy, how they form opinions or preferences, how
they respond to disastrous events, and the list goes on and on. This allows scientists
to analyze the structure of networks at multiple scales and also to develop dynamical
models of how the collectives behave. Similar data-driven movements are also seen in
biology and medicine (e.g., behavioral ecology, systems biology, epidemiology), neuroscience (e.g., the Human Connectome Project [12]), and other areas. It is expected that
1.2. TOPICAL CLUSTERS
9
these topical areas will expand further in the coming decades as the understanding of
the collective dynamics of complex systems will increase their relevance in our everyday
lives.
Here, I should note that these seven topical clusters are based on my own view of
the field, and they are by no means well defined or well accepted by the community.
There must be many other ways to categorize diverse complex systems related topics.
These clusters are more or less categorized based on research communities and subject
areas, while the methodologies of modeling and analysis traverse across many of those
clusters. Therefore, the following chapters of this textbook are organized based on the
methodologies of modeling and analysis, and they are not based on specific subjects
to be modeled or analyzed. In this way, I hope you will be able to learn the âhow-toâ
skills systematically in the most generalizable way, so that you can apply them to various
Exercise 1.1 Choose a few concepts of your own interest from Fig. 1.1. Do
a quick online literature search for those words, using Google Scholar (http:
their meaning, when and how frequently they are used in the literature, and in what
context.
Exercise 1.2 Conduct an online search to find visual examples or illustrations of
some of the concepts shown in Fig. 1.1. Discuss which example(s) and/or illustration(s) are most effective in conveying the key idea of each concept. Then create
a short presentation of complex systems science using the visual materials you
selected.
Exercise 1.3 Think of other ways to organize the concepts shown in Fig. 1.1 (and
any other relevant concepts you want to include). Then create your own version of
a map of complex systems science.
Now we are ready to move on. Letâs begin our journey of complex systems modeling
and analysis.
Chapter 2
Fundamentals of Modeling
2.1
Models in Science and Engineering
Science is an endeavor to try to understand the world around us by discovering fundamental laws that describe how it works. Such laws include Newtonâs law of motion, the
ideal gas law, Ohmâs law in electrical circuits, the conservation law of energy, and so on,
some of which you may have learned already.
A typical cycle of scientific effort by which scientists discover these fundamental laws
may look something like this:
1. Observe nature.
2. Develop a hypothesis that could explain your observations.
3. From your hypothesis, make some predictions that are testable through an experiment.
4. Carry out the experiment to see if your predictions are actually true.
â˘ Yes â Your hypothesis is proven, congratulations. Uncork a champagne bottle
and publish a paper.
â˘ No â Your hypothesis was wrong, unfortunately. Go back to the lab or the field,
get more data, and develop another hypothesis.
Many people think this is how science works. But there is at least one thing that is not
quite right in the list above. What is it? Can you figure it out?
11
12
CHAPTER 2. FUNDAMENTALS OF MODELING
As some of you may know already, the problem exists in the last part, i.e., when the
experiment produced a result that matched your predictions. Letâs do some logic to better
understand what the problem really is. Assume that you observed a phenomenon P in
nature and came up with a hypothesis H that can explain P . This means that a logical
statement H â P is always true (because you chose H that way). To prove H, you also
derived a prediction Q from H, i.e., another logical statement H â Q is always true, too.
Then you conduct experiments to see if Q can be actually observed. What if Q is actually
observed? Or, what if ânot Qâ is observed instead?
If ânot Qâ is observed, things are easy. Logically speaking, (H â Q) is equivalent to
(not Q â not H) because they are contrapositions of each other, i.e., logically identical
statements that can be converted from one to another by negating both the condition and
the consequence and then flipping their order. This means that, if not Q is true, then it
logically proves that not H is also true, i.e., your hypothesis is wrong. This argument is
clear, and there is no problem with it (aside from the fact that you will probably have to
redo your hypothesis building and testing).
The real problem occurs when your experiment gives you the desired result, Q. Logically speaking, â(H â Q) and Qâ doesnât tell you anything about whether H is true or not!
There are many ways your hypothesis could be wrong or insufficient even if the predicted
outcome was obtained in the experiment. For example, maybe another alternative hypothesis R could be the right one (R â P , R â Q), or maybe H would need an additional
condition K to predict P and Q (H and K â P , H and K â Q) but you were not aware
of the existence of K.
Let me give you a concrete example. One morning, you looked outside and found
that your lawn was wet (observation P ). You hypothesized that it must have rained while
you were asleep (hypothesis H), which perfectly explains your observation (H â P ).
Then you predicted that, if it rained overnight, the driveway next door must also be wet
(prediction Q that satisfies H â Q). You went out to look and, indeed, it was also wet
(if not, H would be clearly wrong). Now, think about whether this new observation really
proves your hypothesis that it rained overnight. If you think critically, you should be able to
come up with other scenarios in which both your lawn and the driveway next door could
be wet without having a rainy night. Maybe the humidity in the air was unusually high,
so the condensation in the early morning made the ground wet everywhere. Or maybe a
fire hydrant by the street got hit by a car early that morning and it burst open, wetting the
nearby area. There could be many other potential explanations for your observation.
In sum, obtaining supportive evidence from experiments doesnât prove your hypothesis in a logical sense. It only means that you have failed to disprove your hypothesis.
However, many people still believe that science can prove things in an absolute way. It
2.1. MODELS IN SCIENCE AND ENGINEERING
13
canât. There is no logical way for us to reach the ground truth of nature1 .
This means that all the âlaws of nature,â including those listed previously, are no more
than well-tested hypotheses at best. Scientists have repeatedly failed to disprove them,
so we give them more credibility than we do to other hypotheses. But there is absolutely
no guarantee of their universal, permanent correctness. There is always room for other
alternative theories to better explain nature.
In this sense, all science can do is just build models of nature. All of the laws of nature
mentioned earlier are also models, not scientific facts, strictly speaking. This is something
every single person working on scientific research should always keep in mind.
I have used the word âmodelâ many times already in this book without giving it a definition. So here is an informal definition:
A model is a simplified representation of a system. It can be conceptual, verbal,
diagrammatic, physical, or formal (mathematical).
As a cognitive entity interacting with the external world, you are always creating a
model of something in your mind. For example, at this very moment as you are reading
this textbook, you are probably creating a model of what is written in this book. Modeling
is a fundamental part of our daily cognition and decision making; it is not limited only to
science.
With this understanding of models in mind, we can say that science is an endless effort
to create models of nature, because, after all, modeling is the one and only rational approach to the unreachable reality. And similarly, engineering is an endless effort to control
or influence nature to make something desirable happen, by creating and controlling its
models. Therefore, modeling occupies the most essential part in any endeavor in science
and engineering.
Exercise 2.1 In the âwet lawnâ scenario discussed above, come up with a few
more alternative hypotheses that could explain both the wet lawn and the wet
driveway without assuming that it rained. Then think of ways to find out which
hypothesis is most likely to be the real cause.
1
This fact is deeply related to the impossibility of general system identification, including the identification
of computational processes.
14
CHAPTER 2. FUNDAMENTALS OF MODELING
Exercise 2.2 Name a couple of scientific models that are extensively used in
todayâs scientific/engineering fields. Then investigate the following:
â˘ How were they developed?
â˘ What made them more useful than earlier models?
â˘ How could they possibly be wrong?
2.2
How to Create a Model
There are a number of approaches for scientific model building. My favorite way of classifying various kinds of modeling approaches is to put them into the following two major
families:
Descriptive modeling In this approach, researchers try to specify the actual state
of a system at a given time point (or at multiple time points) in a descriptive
manner. Taking a picture, creating a miniature (this is literally a âmodelâ in the
usual sense of the word), and writing a biography of someone, all belong to
this family of modeling effort. This can also be done using quantitative methods (e.g., equations, statistics, computational algorithms), such as regression
analysis and pattern recognition. They all try to capture âwhat the system looks
like.â
Rule-based modeling In this approach, researchers try to come up with dynamical rules that can explain the observed behavior of a system. This allows researchers to make predictions of its possible (e.g., future) states. Dynamical
equations, theories, and first principles, which describe how the system will
change and evolve over time, all belong to this family of modeling effort. This
is usually done using quantitative methods, but it can also be achieved at conceptual levels as well (e.g., Charles Darwinâs evolutionary theory). They all try
to capture âhow the system will behave.â
Both modeling approaches are equally important in science and engineering. For
example, observation of planetary movement using telescopes in the early 17th century
generated a lot of descriptive information about how they actually moved. This information
was already a model of nature because it constituted a simplified representation of reality.
2.2. HOW TO CREATE A MODEL
15
In the meantime, Newton derived the law of motion to make sense out of observational
information, which was a rule-based modeling approach that allowed people to make
predictions about how the planets would/could move in the future or in a hypothetical
scenario. In other words, descriptive modeling is a process in which descriptions of a
system are produced and accumulated, while rule-based modeling is a process in which
underlying dynamical explanations are built for those descriptions. These two approaches
take turns and form a single cycle of the scientific modeling effort.
In this textbook, we will focus on the latter, the rule-based modeling approach. This is
because rule-based modeling plays a particularly important role in complex systems science. More specifically, developing a rule-based model at microscopic scales and studying its macroscopic behaviors through computer simulation and/or mathematical analysis
is almost a necessity to understand emergence and self-organization of complex systems. We will discuss how to develop rule-based models and what the challenges are
throughout this textbook.
A typical cycle of rule-based modeling effort goes through the following steps (which
are similar to the cycle of scientific discoveries we discussed above):
1. Observe the system of your interest.
2. Reflect on the possible rules that might cause the systemâs characteristics that were
seen in the observation.
3. Derive predictions from those rules and compare them with reality.
4. Repeat the above steps to modify the rules until you are satisfied with the model (or
you run out of time or funding).
This seems okay, and it doesnât contain the logical problem of âproving a hypothesisâ
that we had before, because I loosened the termination criteria to be your satisfaction
as a researcher. However, there is still one particular step that is fundamentally difficult.
Which step do you think it is?
Of course, each of the four steps has its own unique challenges, but as an educator
who has been teaching complex systems modeling for many years, I find that the second
step (âReflect on possible rules that might cause the systemâs characteristics seen in
the observation.â) is particularly challenging to modelers. This is because this step is
so deeply interwoven with the modelerâs knowledge, experience, and everyday cognitive
processes. It is based on who you are, what you know, and how you see the worldâit
is, ultimately, a personal thinking process, which is very difficult to teach or to learn in a
structured way.
16
CHAPTER 2. FUNDAMENTALS OF MODELING
Let me give you some examples to illustrate my point. The following figure shows
an observation of a system over time. Can you create a mathematical model of this
observation?
Some quantity
Time
Figure 2.1: Observation example 1.
This one should be quite easy, because the observed data show that nothing changed
over time. The description âno changeâ is already a valid model written in English, but if
you prefer writing it in mathematical form, you may want to write it as
(2.1)
x(t) = C
or, if you use a differential equation,
dx
= 0.
dt
(2.2)
Coming up with these models is a no brainer, because we have seen this kind of behavior
many times in our daily lives.
Here is another example. Can you create a mathematical model of this observation?
Some quantity
Time
Figure 2.2: Observation example 2.
2.2. HOW TO CREATE A MODEL
17
Now we see some changes. It seems the quantity monotonically increased over time.
Then your brain must be searching your past memories for a pattern that looks like this
curve you are looking at, and you may already have come up with a phrase like âexponential growth,â or more mathematically, equations like
x(t) = aebt
(2.3)
dx
= bx.
dt
(2.4)
or
This may be easy or hard, depending on how much knowledge you have about such
exponential growth models.
In the meantime, if you show the same curve to middle school students, they may
proudly say that this must be the right half of a flattened parabola that they just learned
about last week. And there is nothing fundamentally wrong with that idea. It could be a
right half of a parabola, indeed. We never know for sure until we see what the entire curve

## Reviews, comments, and love from our customers and community:

This page is having a slideshow that uses Javascript. Your browser either doesn't support Javascript or you have it turned off. To see this page as it is meant to appear please use a Javascript enabled browser.

Peter M.
So far so good! It's safe and legit. My paper was finished on time...very excited!
Sean O.N.
Experience was easy, prompt and timely. Awesome first experience with a site like this. Worked out well.Thank you.
Angela M.J.
Good easy. I like the bidding because you can choose the writer and read reviews from other students
Lee Y.
My writer had to change some ideas that she misunderstood. She was really nice and kind.
Kelvin J.
I have used other writing websites and this by far as been way better thus far! =)
Antony B.
I received an, "A". Definitely will reach out to her again and I highly recommend her. Thank you very much.