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

Download Introduction to Elementary Computational Modeling Essential Concepts Principles and Problem Solving 1st Edition Jose Garrido (Author) ebook All Chapters PDF

The document promotes the book 'Introduction to Elementary Computational Modeling: Essential Concepts, Principles, and Problem Solving' by Jose Garrido, which focuses on foundational principles of computational modeling and problem-solving techniques. It emphasizes analytical skill development over programming syntax and includes case studies, examples, and exercises. Additionally, it provides links to download this book and other related ebooks.

Uploaded by

pansekatosho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Download Introduction to Elementary Computational Modeling Essential Concepts Principles and Problem Solving 1st Edition Jose Garrido (Author) ebook All Chapters PDF

The document promotes the book 'Introduction to Elementary Computational Modeling: Essential Concepts, Principles, and Problem Solving' by Jose Garrido, which focuses on foundational principles of computational modeling and problem-solving techniques. It emphasizes analytical skill development over programming syntax and includes case studies, examples, and exercises. Additionally, it provides links to download this book and other related ebooks.

Uploaded by

pansekatosho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Visit https://ebookfinal.

com to download the full version and


explore more ebooks

Introduction to Elementary Computational


Modeling Essential Concepts Principles and
Problem Solving 1st Edition Jose Garrido
(Author)

_____ Click the link below to download _____


https://ebookfinal.com/download/introduction-to-
elementary-computational-modeling-essential-concepts-
principles-and-problem-solving-1st-edition-jose-
garrido-author/

Explore and download more ebooks at ebookfinal.com


Here are some suggested products you might be interested in.
Click the link to download

Introduction to Computer Science Using Python A


Computational Problem Solving Focus 1st Edition Charles
Dierbach
https://ebookfinal.com/download/introduction-to-computer-science-
using-python-a-computational-problem-solving-focus-1st-edition-
charles-dierbach/

Java An Introduction to Problem Solving and Programming


7th Edition Walter Savitch

https://ebookfinal.com/download/java-an-introduction-to-problem-
solving-and-programming-7th-edition-walter-savitch/

Cases on Information Technology Entrepreneurship Jose A.


Medina-Garrido

https://ebookfinal.com/download/cases-on-information-technology-
entrepreneurship-jose-a-medina-garrido/

Puzzles Paradoxes and Problem Solving An Introduction to


Mathematical Thinking 1st Edition Marilyn A. Reba

https://ebookfinal.com/download/puzzles-paradoxes-and-problem-solving-
an-introduction-to-mathematical-thinking-1st-edition-marilyn-a-reba/
An Elementary Introduction To Stochastic Interest Rate
Modeling 2nd Edition Edition Nicolas Privault

https://ebookfinal.com/download/an-elementary-introduction-to-
stochastic-interest-rate-modeling-2nd-edition-edition-nicolas-
privault/

An Introduction to Statistical Problem Solving in


Geography Third Edition J. Chapman Mcgrew Jr.

https://ebookfinal.com/download/an-introduction-to-statistical-
problem-solving-in-geography-third-edition-j-chapman-mcgrew-jr/

Giant Molecules Essential Materials for Everyday Living


and Problem Solving 2nd Edition Charles E. Carraher Jr.

https://ebookfinal.com/download/giant-molecules-essential-materials-
for-everyday-living-and-problem-solving-2nd-edition-charles-e-
carraher-jr/

Mathematics in Action An Introduction to Algebraic


Graphical and Numerical Problem Solving 4th Edition
Consortium For Foundation Mathematics
https://ebookfinal.com/download/mathematics-in-action-an-introduction-
to-algebraic-graphical-and-numerical-problem-solving-4th-edition-
consortium-for-foundation-mathematics/

Group Problem Solving Patrick R. Laughlin

https://ebookfinal.com/download/group-problem-solving-patrick-r-
laughlin/
Introduction to Elementary Computational Modeling
Essential Concepts Principles and Problem Solving 1st
Edition Jose Garrido (Author) Digital Instant Download
Author(s): Jose Garrido (Author)
ISBN(s): 9781466538641, 1439867399
Edition: 1
File Details: PDF, 3.13 MB
Year: 2011
Language: english
Mathematical Modeling

Chapman & Hall/CRC Chapman & Hall/CRC

Introduction to Elementary Computational Modeling


Computational Science Series Computational Science Series

With an emphasis on problem solving, this book introduces the basic principles
and fundamental concepts of computational modeling. It emphasizes reasoning
and conceptualizing problems, elementary mathematical modeling, and the
implementation using computing concepts and principles. Examples are included
that demonstrate the computation and visualization of the implemented models.

Features
• Emphasizes analytical skill development and problem solving rather than
programming language syntax
• Discusses the design of algorithmic solutions to problems using standard
flowcharts and pseudo-code
• Provides the foundations of computational modeling and programming
concepts that will facilitate a smooth transition to object-oriented modeling
and programming
• Includes summaries, examples, and problems in every chapter
• Explains modularity and abstraction to help deal with large and complex
models

The author provides case studies, along with an overview of computational models
and their development. The first part of the text presents the basic concepts of
models and techniques for designing and implementing problem solutions. It
applies standard pseudo-code constructs and flowcharts for designing models.
The second part covers model implementation with basic programming constructs
using MATLAB®, Octave, and FreeMat.

Aimed at beginning students in computer science, mathematics, statistics, and


engineering, Introduction to Elementary Computational Modeling: Essential
Concepts, Principles, and Problem Solving focuses on fundamentals, helping
the next generation of scientists and engineers hone their problem-solving skills.
Garrido

K13027

K13027_Cover.indd 1 9/23/11 9:55 AM


Introduction to Elementary
Computational Modeling
Essential Concepts, Principles,
and Problem Solving

K13027_FM.indd 1 9/26/11 12:58 PM


Chapman & Hall/CRC
Computational Science Series

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

AIMS AND SCOPE


This series aims to capture new developments and applications in the field of computational science through the
publication of a broad range of textbooks, reference works, and handbooks. Books in this series will provide introduc-
tory as well as advanced material on mathematical, statistical, and computational methods and techniques, and will
present researchers with the latest theories and experimentation. The scope of the series includes, but is not limited
to, titles in the areas of scientific computing, parallel and distributed computing, high performance computing, grid
computing, cluster computing, heterogeneous computing, quantum computing, and their applications in scientific
disciplines such as astrophysics, aeronautics, biology, chemistry, climate modeling, combustion, cosmology, earth-
quake prediction, imaging, materials, neuroscience, oil exploration, and weather forecasting.

PUBLISHED TITLES
PETASCALE COMPUTING: ALGORITHMS AND APPLICATIONS
Edited by David A. Bader

PROCESS ALGEBRA FOR PARALLEL AND DISTRIBUTED PROCESSING


Edited by Michael Alexander and William Gardner

GRID COMPUTING: TECHNIQUES AND APPLICATIONS


Barry Wilkinson

INTRODUCTION TO CONCURRENCY IN PROGRAMMING LANGUAGES


Matthew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen

INTRODUCTION TO SCHEDULING
Yves Robert and Frédéric Vivien

SCIENTIFIC DATA MANAGEMENT: CHALLENGES, TECHNOLOGY, AND DEPLOYMENT


Edited by Arie Shoshani and Doron Rotem

INTRODUCTION TO THE SIMULATION OF DYNAMICS USING SIMULINK®


Michael A. Gray

INTRODUCTION TO HIGH PERFORMANCE COMPUTING FOR SCIENTISTS


AND ENGINEERS, Georg Hager and Gerhard Wellein

PERFORMANCE TUNING OF SCIENTIFIC APPLICATIONS, Edited by David Bailey,


Robert Lucas, and Samuel Williams

HIGH PERFORMANCE COMPUTING: PROGRAMMING AND APPLICATIONS


John Levesque with Gene Wagenbreth

PEER-TO-PEER COMPUTING: APPLICATIONS, ARCHITECTURE, PROTOCOLS, AND CHALLENGES


Yu-Kwong Ricky Kwok

FUNDAMENTALS OF MULTICORE SOFTWARE DEVELOPMENT


Victor Pankratius, Ali-Reza Adl-Tabatabai, and Walter Tichy

INTRODUCTION TO ELEMENTARY COMPUTATIONAL MODELING: ESSENTIAL CONCEPTS,


PRINCIPLES, AND PROBLEM SOLVING
José M. Garrido

K13027_FM.indd 2 9/26/11 12:58 PM


Introduction to Elementary
Computational Modeling
Essential Concepts, Principles,
and Problem Solving

José M. Garrido
Kennesaw State University
Georgia, USA

K13027_FM.indd 3 9/26/11 12:58 PM


MATLAB® is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does
not warrant the accuracy of the text or exercises in this book. This book’s use or discussion of MAT-
LAB® software or related products does not constitute endorsement or sponsorship by The MathWorks
of a particular pedagogical approach or particular use of the MATLAB® software.

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

No claim to original U.S. Government works


Version Date: 20111012

International Standard Book Number-13: 978-1-4665-0634-3 (eBook - PDF)

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

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

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

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

List of Figures xv

List of Tables xix

Preface xxi

About the Author xxv

I Understanding Problem Solving 1


1 Understanding Word Problems 3
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Nouns and Verbs . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Problem Decomposition . . . . . . . . . . . . . . . . . . . . 6
1.4 The Language of Computational Problems . . . . . . . . . . 8
1.4.1 Terms for Computed Values . . . . . . . . . . . . . . 8
1.4.2 Implied Phrases . . . . . . . . . . . . . . . . . . . . . 9
1.4.3 Units of Measure . . . . . . . . . . . . . . . . . . . . 9
1.4.4 Conditions . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.5 Repetition . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5 Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.6 Problems with Many Numbers . . . . . . . . . . . . . . . . . 15
1.6.1 Working with Patterns . . . . . . . . . . . . . . . . . 16
1.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2 Problem Solving and Computing 21


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3 Data Definitions . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3.1 Name of Data Items . . . . . . . . . . . . . . . . . . 22
2.3.2 Data Types . . . . . . . . . . . . . . . . . . . . . . . 23
2.3.3 Data Declarations . . . . . . . . . . . . . . . . . . . . 24
2.4 Programming Languages . . . . . . . . . . . . . . . . . . . . 24

v
vi

2.4.1 High-Level Programming Languages . . . . . . . . . 24


2.4.2 Interpreters . . . . . . . . . . . . . . . . . . . . . . . 25
2.4.3 Compilers . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4.4 Compiling and Execution of Java Programs . . . . . . 25
2.4.5 Compiling and Executing C++ Programs . . . . . . . 26
R
2.5 Interpretation of Commands with MATLAB and Octave . . 27
2.6 Computer Problem Solving . . . . . . . . . . . . . . . . . . 28
2.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3 MATLAB and Octave Programming 33


3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2 The MATLAB and Octave Prompt . . . . . . . . . . . . . . . 33
3.3 Variables and Constants . . . . . . . . . . . . . . . . . . . . 35
3.4 Assignment Statements . . . . . . . . . . . . . . . . . . . . . 35
3.5 Simple Mathematical Expressions . . . . . . . . . . . . . . . 36
3.6 Scientific Notation . . . . . . . . . . . . . . . . . . . . . . . 37
3.7 Built-In Mathematical Functions . . . . . . . . . . . . . . . . 37
3.8 Internal Documentation . . . . . . . . . . . . . . . . . . . . 38
3.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

II Computational Models 41
4 Introduction to Computational Models 43
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2 Preliminary Concepts . . . . . . . . . . . . . . . . . . . . . . 43
4.3 A Simple Problem: Temperature Conversion . . . . . . . . . 46
4.3.1 Initial Problem Statement . . . . . . . . . . . . . . . 46
4.3.2 Analysis and Conceptual Model . . . . . . . . . . . . 46
4.3.3 The Mathematical Model . . . . . . . . . . . . . . . . 47
4.4 Using MATLAB and Octave . . . . . . . . . . . . . . . . . . 48
4.4.1 Basic MATLAB and Octave Commands . . . . . . . . 48
4.4.2 The Computational Model . . . . . . . . . . . . . . . 48
4.4.3 Using Data Lists with MATLAB and Octave . . . . . 50
4.4.4 Implementation of Model with Data Lists . . . . . . . 53
4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
vii

5 Computational Models and Simulation 57


5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.2 Categories of Computational Models . . . . . . . . . . . . . 57
5.3 Development of Computational Models . . . . . . . . . . . . 59
5.4 Simulation: Basic Concepts . . . . . . . . . . . . . . . . . . 61
5.4.1 Simulation Models . . . . . . . . . . . . . . . . . . . 62
5.4.2 Simulation Results . . . . . . . . . . . . . . . . . . . 64
5.5 Modular Decomposition . . . . . . . . . . . . . . . . . . . . 64
5.6 Average and Instantaneous Rate of Change . . . . . . . . . . 65
5.7 Area under a Curve . . . . . . . . . . . . . . . . . . . . . . . 67
5.8 The Free-Falling Object . . . . . . . . . . . . . . . . . . . . 68
5.8.1 Initial Problem Statement . . . . . . . . . . . . . . . 69
5.8.2 Analysis and Conceptual Model . . . . . . . . . . . . 69
5.8.2.1 Assumptions . . . . . . . . . . . . . . . . . 70
5.8.2.2 Basic Definitions . . . . . . . . . . . . . . 70
5.8.3 The Mathematical Model . . . . . . . . . . . . . . . . 70
5.8.4 The Computational Model . . . . . . . . . . . . . . . 71
5.8.4.1 Simple Implementation . . . . . . . . . . . 71
5.8.4.2 Implementation with Arrays . . . . . . . . . 75
5.8.4.3 Computing the Rates of Change . . . . . . . 78
5.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

6 Algorithms and Design Structures 83


6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.2 Problem Solving . . . . . . . . . . . . . . . . . . . . . . . . 83
6.3 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
6.4 Describing Data . . . . . . . . . . . . . . . . . . . . . . . . 84
6.5 Notations for Describing Algorithms . . . . . . . . . . . . . 85
6.5.1 Flowcharts . . . . . . . . . . . . . . . . . . . . . . . 85
6.5.2 Pseudo-Code . . . . . . . . . . . . . . . . . . . . . . 86
6.6 Algorithmic Structures . . . . . . . . . . . . . . . . . . . . . 87
6.6.1 Sequence . . . . . . . . . . . . . . . . . . . . . . . . 88
6.6.2 Selection . . . . . . . . . . . . . . . . . . . . . . . . 88
6.6.3 Repetition . . . . . . . . . . . . . . . . . . . . . . . . 88
6.7 Implementation of Algorithms . . . . . . . . . . . . . . . . . 90
6.7.1 Programming Languages . . . . . . . . . . . . . . . . 91
6.7.2 Assignment and Arithmetic Expressions . . . . . . . . 92
6.7.3 Simple Numeric Computations . . . . . . . . . . . . . 92
6.7.4 Simple Input/Output . . . . . . . . . . . . . . . . . . 93
6.8 Computing Area and Circumference . . . . . . . . . . . . . . 95
6.8.1 Specification . . . . . . . . . . . . . . . . . . . . . . 95
viii

6.8.2 Algorithm with the Mathematical Model . . . . . . . 95


6.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

7 Selection 99
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
7.2 Selection Structure . . . . . . . . . . . . . . . . . . . . . . . 99
7.2.1 General Concepts of the Selection Structure . . . . . 99
7.2.2 Selection with Pseudo-Code . . . . . . . . . . . . . . 100
7.2.3 Selection with MATLAB and Octave . . . . . . . . . 101
7.2.4 Conditional Expressions . . . . . . . . . . . . . . . . 101
7.2.5 Example with Selection . . . . . . . . . . . . . . . . 102
7.3 Complex Numbers with MATLAB and Octave . . . . . . . . 104
7.4 A Computational Model with Selection . . . . . . . . . . . . 106
7.4.1 Analysis and Mathematical Model . . . . . . . . . . . 106
7.4.2 Algorithm for General Solution . . . . . . . . . . . . 106
7.4.3 Detailed Algorithm . . . . . . . . . . . . . . . . . . . 107
7.5 Multilevel Selection . . . . . . . . . . . . . . . . . . . . . . 109
7.5.1 General Multipath Selection . . . . . . . . . . . . . . 110
7.5.2 The Case Structure . . . . . . . . . . . . . . . . . . . 111
7.6 Complex Conditions . . . . . . . . . . . . . . . . . . . . . . 113
7.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

8 Repetition 117
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
8.2 Repetition with While Construct . . . . . . . . . . . . . . . . 117
8.2.1 While-Loop Flowchart . . . . . . . . . . . . . . . . . 118
8.2.2 The While Structure in Pseudo-Code . . . . . . . . . 118
8.2.3 While-Loop with MATLAB and Octave . . . . . . . . 119
8.2.4 Loop Counter . . . . . . . . . . . . . . . . . . . . . . 119
8.2.5 Accumulator Variables . . . . . . . . . . . . . . . . . 120
8.2.6 Summation of Input Numbers . . . . . . . . . . . . . 121
8.3 Repeat-Until Construct . . . . . . . . . . . . . . . . . . . . . 122
8.4 For Loop Structure . . . . . . . . . . . . . . . . . . . . . . . 124
8.4.1 The Summation Problem with a For Loop . . . . . . . 125
8.4.2 The Factorial Problem . . . . . . . . . . . . . . . . . 126
8.4.2.1 Mathematical Specification of Factorial . . . 126
8.4.2.2 Computing Factorial . . . . . . . . . . . . . 126
8.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
ix

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

9 Data Lists 131


9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
9.2 Creating an Array . . . . . . . . . . . . . . . . . . . . . . . 132
9.2.1 Creating Arrays in Pseudo-Code . . . . . . . . . . . . 132
9.2.2 Creating Arrays in MATLAB and Octave . . . . . . . 133
9.3 Operations on Arrays . . . . . . . . . . . . . . . . . . . . . . 135
9.3.1 Array Elements in Pseudo-Code . . . . . . . . . . . . 136
9.3.2 Using Array Elements with MATLAB and Octave . . 136
9.3.3 Arithmetic Operations on Vectors . . . . . . . . . . . 137
9.4 Multidimensional Arrays . . . . . . . . . . . . . . . . . . . . 138
9.4.1 Multidimensional Arrays with Pseudo-Code . . . . . . 138
9.4.2 Multidimensional Arrays with MATLAB and Octave . 139
9.5 Applications Using Arrays . . . . . . . . . . . . . . . . . . . 141
9.5.1 Problems with Simple Array Manipulation . . . . . . 141
9.5.1.1 The Average Value in an Array . . . . . . . 141
9.5.1.2 Maximum Value in an Array . . . . . . . . 143
9.5.2 Searching . . . . . . . . . . . . . . . . . . . . . . . . 145
9.5.2.1 Linear Search . . . . . . . . . . . . . . . . 145
9.5.2.2 Binary Search . . . . . . . . . . . . . . . . 147
9.6 Average and Instantaneous Rate of Change . . . . . . . . . . 150
9.6.1 Average Rate of Change . . . . . . . . . . . . . . . . 150
9.6.2 Instantaneous Rate of Change . . . . . . . . . . . . . 151
9.6.3 Computing the Rates of Change . . . . . . . . . . . . 152
9.7 Area under a Curve . . . . . . . . . . . . . . . . . . . . . . . 156
9.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

10 Modules 163
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
10.2 Modular Design . . . . . . . . . . . . . . . . . . . . . . . . 163
10.3 MATLAB and Octave Script Files . . . . . . . . . . . . . . . 165
10.4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
10.4.1 Function Definition . . . . . . . . . . . . . . . . . . . 166
10.4.2 Function Definition in MATLAB and Octave . . . . . 167
10.4.3 Simple Function Calls . . . . . . . . . . . . . . . . . 168
10.4.4 Functions with Parameters . . . . . . . . . . . . . . . 169
10.4.5 Function Calls with Data . . . . . . . . . . . . . . . . 170
10.4.6 Functions with Return Data . . . . . . . . . . . . . . 171
10.5 Documenting MATLAB and Octave Functions . . . . . . . . 172
10.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
x

Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173


Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

11 Mathematical Models: Basic Concepts 175


11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
11.2 From the Real-World to the Abstract World . . . . . . . . . . 175
11.3 Discrete and Continuous Models . . . . . . . . . . . . . . . . 177
11.4 Difference Equations and Data Lists . . . . . . . . . . . . . . 177
11.5 Functional Equations . . . . . . . . . . . . . . . . . . . . . . 180
11.6 Validating a Model . . . . . . . . . . . . . . . . . . . . . . . 181
11.7 Models with Arithmetic Growth . . . . . . . . . . . . . . . . 181
11.8 Using MATLAB and Octave to Implement the Model . . . . . 182
11.8.1 MATLAB and Octave Implementation . . . . . . . . . 182
11.8.2 Producing the Charts of the Model . . . . . . . . . . . 183
11.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

12 Models with Quadratic Growth 187


12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
12.2 Quadratic Growth . . . . . . . . . . . . . . . . . . . . . . . 187
12.3 Differences of the Data . . . . . . . . . . . . . . . . . . . . . 188
12.4 Difference Equations . . . . . . . . . . . . . . . . . . . . . . 191
12.5 Functional Equations . . . . . . . . . . . . . . . . . . . . . . 192
12.6 Models with Quadratic Growth . . . . . . . . . . . . . . . . 193
12.6.1 Simple Quadratic Growth Models . . . . . . . . . . . 193
12.6.2 Models with Sums of Arithmetic Growth . . . . . . . 194
12.7 Solution and Graphs of Quadratic Equations . . . . . . . . . 196
12.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

13 Models with Polynomial Functions 201


13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
13.2 General Forms of Polynomial Functions . . . . . . . . . . . . 201
13.3 Evaluation and Graphs of Polynomial Functions . . . . . . . 202
13.3.1 Evaluating Polynomial Functions . . . . . . . . . . . 202
13.3.2 Generating Graphs of Polynomial Functions . . . . . . 205
13.4 Solution to Polynomial Equations . . . . . . . . . . . . . . . 206
13.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
xi

14 Data Estimation and Empirical Modeling 211


14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
14.2 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . 211
14.2.1 Linear Interpolation . . . . . . . . . . . . . . . . . . 212
14.2.2 Nonlinear Interpolation . . . . . . . . . . . . . . . . . 215
14.3 Curve Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . 218
14.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

15 Models with Geometric Growth 225


15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
15.2 Basic Concepts of Geometric Growth . . . . . . . . . . . . . 225
15.2.1 Geometric Growth with Increasing Data . . . . . . . . 226
15.2.2 Geometric Growth with Decreasing Data . . . . . . . 226
15.2.3 Geometric Growth: Case Study 1 . . . . . . . . . . . 227
15.2.4 Geometric Growth: Case Study 2 . . . . . . . . . . . 230
15.3 Functional Equations in Geometric Growth . . . . . . . . . . 232
15.4 Properties of Exponential Functions . . . . . . . . . . . . . . 233
15.4.1 Exponentiation . . . . . . . . . . . . . . . . . . . . . 233
15.4.2 Logarithms . . . . . . . . . . . . . . . . . . . . . . . 233
15.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

16 Vectors and Matrices 239


16.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
16.2 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
16.3 Simple Vector Operations . . . . . . . . . . . . . . . . . . . 240
16.3.1 Arithmetic Operations . . . . . . . . . . . . . . . . . 241
16.3.2 Applying Vector Functions . . . . . . . . . . . . . . . 243
16.4 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
16.4.1 Arithmetic Operations . . . . . . . . . . . . . . . . . 246
16.4.2 Function Application . . . . . . . . . . . . . . . . . . 247
16.5 Array Indexing . . . . . . . . . . . . . . . . . . . . . . . . . 247
16.6 Plotting Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 249
16.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
xii

17 Text Data 253


17.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
17.2 String Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . 253
17.2.1 String Operations . . . . . . . . . . . . . . . . . . . . 253
17.2.2 String Functions . . . . . . . . . . . . . . . . . . . . 254
17.3 String Matrices . . . . . . . . . . . . . . . . . . . . . . . . . 257
17.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

18 Advanced Data Structures 259


18.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
18.2 Cell Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
18.3 Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
18.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268

Appendix A MATLAB and GNU Octave Software 271


A.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
A.2 The MATLAB Components . . . . . . . . . . . . . . . . . . 271
A.3 The Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . 272
A.4 Starting MATLAB . . . . . . . . . . . . . . . . . . . . . . . 274
A.5 Exiting MATLAB . . . . . . . . . . . . . . . . . . . . . . . 274
A.6 The Command Window . . . . . . . . . . . . . . . . . . . . 275
A.7 Current User Folder . . . . . . . . . . . . . . . . . . . . . . 275
A.8 The Startup Folder . . . . . . . . . . . . . . . . . . . . . . . 276
A.9 Using Command Files (Scripts) . . . . . . . . . . . . . . . . 276
A.10 MATLAB Functions . . . . . . . . . . . . . . . . . . . . . . 280
A.11 GNU Octave . . . . . . . . . . . . . . . . . . . . . . . . . . 285

Appendix B Computer Systems 289


B.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
B.2 Computer Systems . . . . . . . . . . . . . . . . . . . . . . . 289
B.2.1 Hardware Components . . . . . . . . . . . . . . . . . 290
B.2.1.1 Processors . . . . . . . . . . . . . . . . . . 290
B.2.1.2 Main Memory . . . . . . . . . . . . . . . . 291
B.2.1.3 Storage Devices . . . . . . . . . . . . . . . 291
B.2.1.4 Input Devices . . . . . . . . . . . . . . . . 292
B.2.1.5 Output Devices . . . . . . . . . . . . . . . 292
B.2.1.6 Bus . . . . . . . . . . . . . . . . . . . . . 292
B.2.2 Computer Networks . . . . . . . . . . . . . . . . . . 292
B.2.3 Software Components . . . . . . . . . . . . . . . . . 293
xiii

B.3 Operating Systems . . . . . . . . . . . . . . . . . . . . . . . 294


B.3.1 Operating System User Interfaces . . . . . . . . . . . 294
B.3.2 Contemporary Operating Systems . . . . . . . . . . . 295
B.3.2.1 Unix . . . . . . . . . . . . . . . . . . . . . 295
B.3.2.2 Microsoft Windows . . . . . . . . . . . . . 296
B.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296

Bibliography 297

Index 299
This page intentionally left blank
List of Figures

1.1 Identifying nouns and verbs. . . . . . . . . . . . . . . . . . . 4


1.2 Area of rectangle. . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Formula from nouns and verbs. . . . . . . . . . . . . . . . . . 5
1.4 Heating water. . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Multiple steps problem. . . . . . . . . . . . . . . . . . . . . . 7
1.6 Diagram of counting example. . . . . . . . . . . . . . . . . . 7
1.7 Diagram with average. . . . . . . . . . . . . . . . . . . . . . 8
1.8 Validating conditions. . . . . . . . . . . . . . . . . . . . . . . 11
1.9 Simple data validation. . . . . . . . . . . . . . . . . . . . . . 12
1.10 Multiple conditions. . . . . . . . . . . . . . . . . . . . . . . . 12
1.11 OR used with one value. . . . . . . . . . . . . . . . . . . . . 13
1.12 OR used with multiple values. . . . . . . . . . . . . . . . . . 13

2.1 General structure of a program. . . . . . . . . . . . . . . . . . 22


2.2 Compiling a Java source program. . . . . . . . . . . . . . . . 26
2.3 Executing a Java program. . . . . . . . . . . . . . . . . . . . 26
2.4 Compiling a C++ program. . . . . . . . . . . . . . . . . . . . 27
2.5 Linking a C++ program. . . . . . . . . . . . . . . . . . . . . 27
2.6 MATLAB/Octave interpreter. . . . . . . . . . . . . . . . . . . 28
2.7 The waterfall model. . . . . . . . . . . . . . . . . . . . . . . 29

3.1 MATLAB/Octave interpreter. . . . . . . . . . . . . . . . . . . 33


3.2 Simple commands in an Octave window. . . . . . . . . . . . . 34

4.1 Computational science as an integration of several disciplines. 45


4.2 Simple commands in an Octave window. . . . . . . . . . . . . 49
4.3 Plot of the temperature conversion. . . . . . . . . . . . . . . . 54

5.1 Discrete changes of number of cars in the queue. . . . . . . . 58


5.2 Development of computational models. . . . . . . . . . . . . 59
5.3 Model development and abstract levels. . . . . . . . . . . . . 61
5.4 High-level view of a simulation model. . . . . . . . . . . . . . 63
5.5 The slope of a line. . . . . . . . . . . . . . . . . . . . . . . . 65
5.6 The slope of a secant. . . . . . . . . . . . . . . . . . . . . . . 66

xv
xvi

5.7 The slope of a tangent. . . . . . . . . . . . . . . . . . . . . . 67


5.8 The area under a curve. . . . . . . . . . . . . . . . . . . . . . 69
5.9 Computing the height of the falling object in Octave. . . . . . 73
5.10 Plot of the values of height with time. . . . . . . . . . . . . . 77
5.11 Plot of the values of velocity with time. . . . . . . . . . . . . 79

6.1 Transformation applied to the input data. . . . . . . . . . . . . 84


6.2 Simple flowchart symbols. . . . . . . . . . . . . . . . . . . . 86
6.3 A simple flowchart example. . . . . . . . . . . . . . . . . . . 87
6.4 A flowchart with a sequence. . . . . . . . . . . . . . . . . . . 88
6.5 Selection structure in flowchart form. . . . . . . . . . . . . . . 89
6.6 An example of the selection structure. . . . . . . . . . . . . . 89
6.7 While loop of the repetition structure. . . . . . . . . . . . . . 90
6.8 Repeat-until loop of the repetition structure. . . . . . . . . . . 91
6.9 Flowchart data input/output symbol. . . . . . . . . . . . . . . 94

7.1 Flowchart of the selection structure. . . . . . . . . . . . . . . 100


7.2 Example of selection structure. . . . . . . . . . . . . . . . . . 103
7.3 Complex number P in the complex plane. . . . . . . . . . . . 104
7.4 High-level flowchart for the quadratic equation. . . . . . . . . 107
7.5 Solving the quadratic equation in Octave. . . . . . . . . . . . 109

8.1 A flowchart with a while-loop . . . . . . . . . . . . . . . . . 118


8.2 A flowchart with a repeat-until structure . . . . . . . . . . . . 123

9.1 A simple array. . . . . . . . . . . . . . . . . . . . . . . . . . 131


9.2 A simple two-dimensional array. . . . . . . . . . . . . . . . . 132
9.3 The slope of a line. . . . . . . . . . . . . . . . . . . . . . . . 151
9.4 The slope of a secant. . . . . . . . . . . . . . . . . . . . . . . 152
9.5 The slope of a tangent. . . . . . . . . . . . . . . . . . . . . . 153
9.6 The velocity of the free-falling object. . . . . . . . . . . . . . 154
9.7 Bar chart of the velocity of the free-falling object. . . . . . . . 155
9.8 The area under a curve. . . . . . . . . . . . . . . . . . . . . . 157

10.1 Modular structure of a computational model. . . . . . . . . . . 164


10.2 Module communication and interface. . . . . . . . . . . . . . 164
10.3 A simple function call. . . . . . . . . . . . . . . . . . . . . . 168

11.1 Real-world to abstract-world mapping. . . . . . . . . . . . . . 176


11.2 Discrete model. . . . . . . . . . . . . . . . . . . . . . . . . . 178
11.3 Continuous model. . . . . . . . . . . . . . . . . . . . . . . . 178
11.4 Monthly price of electric energy. . . . . . . . . . . . . . . . . 184
11.5 Monthly price given and calculated of electric energy. . . . . . 185
xvii

12.1 Number of patients for 1995–2002. . . . . . . . . . . . . . . . 188


12.2 Original data. . . . . . . . . . . . . . . . . . . . . . . . . . . 189
12.3 Original data and differences. . . . . . . . . . . . . . . . . . . 190
12.4 Number of links to connect n computers. . . . . . . . . . . . . 195
12.5 Graph of a quadratic equation. . . . . . . . . . . . . . . . . . 197

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


13.2 Graph of the equation y = 3x5 − 2. . . . . . . . . . . . . . . . 206
13.3 Graph of equation y = 23x4 − 17x3 − 14x2 + 3x + 3. . . . . . . 207

14.1 Graph of linear interpolation of an intermediate data point. . . 212


14.2 Graph of linear interpolation of multiple intermediate data
points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
14.3 Graph of given data points. . . . . . . . . . . . . . . . . . . . 216
14.4 Graph of given and estimated data points. . . . . . . . . . . . 217
14.5 Graph of fitted linear polynomial. . . . . . . . . . . . . . . . 219
14.6 Regression of linear polynomial. . . . . . . . . . . . . . . . . 220
14.7 Regression of a polynomial of degree 3. . . . . . . . . . . . . 221

15.1 Data with geometric growth. . . . . . . . . . . . . . . . . . . 226


15.2 Data decreasing with geometric growth. . . . . . . . . . . . . 227
15.3 Population of a small town for 1995–2003. . . . . . . . . . . . 229
15.4 Impurities in water (parts/gallon). . . . . . . . . . . . . . . . 231
15.5 A typical exponential function, 95.25 · 1.6 t . . . . . . . . . . . 234
15.6 Natural logarithm. . . . . . . . . . . . . . . . . . . . . . . . . 235

16.1 A simple plot. . . . . . . . . . . . . . . . . . . . . . . . . . . 250

18.1 A simple cell array. . . . . . . . . . . . . . . . . . . . . . . . 261

A.1 MATLAB desktop. . . . . . . . . . . . . . . . . . . . . . . . 273


A.2 MATLAB Command Window. . . . . . . . . . . . . . . . . . 275
A.3 MATLAB Current Folder. . . . . . . . . . . . . . . . . . . . 276
A.4 MATLAB Editor. . . . . . . . . . . . . . . . . . . . . . . . . 277
A.5 MATLAB Current Folder. . . . . . . . . . . . . . . . . . . . 277
A.6 The Octave window. . . . . . . . . . . . . . . . . . . . . . . 286
A.7 Octave help documentation on plot. . . . . . . . . . . . . . . 287
A.8 Octave documentation manual. . . . . . . . . . . . . . . . . . 287

B.1 Basic hardware structure of a computer system. . . . . . . . . 291


B.2 Basic structure of a network. . . . . . . . . . . . . . . . . . . 293
This page intentionally left blank
List of Tables

4.1 Celsius and Fahrenheit temperatures. . . . . . . . . . . . . . . 50

5.1 Values of height and vertical velocity. . . . . . . . . . . . . . 74


5.2 Values of the rates of change of height and vertical velocity of
the free-falling object. . . . . . . . . . . . . . . . . . . . . . . 80

11.1 Average price of electricity (cents per kW-h) in 2010. . . . . . 180

12.1 Number of patients for years 1995–2002. . . . . . . . . . . . 187


12.2 Number of cable installations for years 1995–2002. . . . . . . 195

15.1 Population of a small town during 1995–2003 (in thousands). . 227

xix
This page intentionally left blank
Preface

Computational science is an emerging area (or discipline) that includes con-


cepts, principles, and methods from applied mathematics and algorithmic de-
sign and computer programming; these are applied in various areas of sci-
ence and engineering to solve large-scale scientific problems. A computational
model is a computer implementation of the solution to a (scientific) problem for
which a mathematical representation has been formulated. Developing a com-
putational model includes formulating the mathematical representation and im-
plementing it by applying computer science concepts, principles and methods.
Computational modeling is the foundational component of computational sci-
ence and focuses on reasoning about problems using computational thinking
and developing models for problem solving.
The primary goal of this book is to introduce readers to the basic principles
of computational modeling at the level of fundamental concepts. Emphasis is
on reasoning about problems, conceptualizing the problem, elementary math-
ematical modeling, and their computational solution that involves computing
results and visualization.
The book emphasizes analytical skill development and problem solving
rather than programming language syntax and explains simple pseudo-code,
R
simple algorithm design, and MATLAB , Octave, and FreeMat programming.
MATLAB is a widely used scientific software tool; Octave and FreeMat are
freely available software tools compatible with MATLAB.
R
MATLAB is a registered trademark of The Mathworks, Inc. For product
information, please contact: The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098 USA
Tel: 508 647 7000
Fax: 508-647-7001
E-mail: [email protected]
Web: www.mathworks.com

Although computational models require high-performance computing to


solve large and complex scientific problems, this book presents only the ele-
mentary notions of computational models. For beginning undergraduate stu-
dents (of science and engineering), the goal is to provide relevant material for

xxi
xxii

easy understanding of computational models and their development, as early


as possible in their studies. Therefore, the book takes an “early introduction”
approach to computational models by providing the readers with a strong foun-
dation in computational modeling by applying elementary mathematical con-
cepts and basic principles, methods, and techniques of computer science.
The book consists of two parts. Part I presents the basic concepts and prin-
ciples of computational models. In this part, the book discusses basic model-
ing and techniques for designing and implementing problem solutions, inde-
pendent of software and hardware tools. Standard pseudo-code constructs and
flowcharts are explained and applied in designing models for various case stud-
ies. These are implemented using only the minimum necessary knowledge of
MATLAB, a widely used scientific software tool, and Octave, a freely available
tool that is compatible with MATLAB. Part II of the book presents the elemen-
tary mathematical modeling principles and more detailed computer implemen-
tation of models with programming constructs using MATLAB and Octave.
Examples and case studies demonstrate the computation and visualization of
computational models.
The basic syntax constructs of MATLAB and Octave are presented grad-
ually and the various programming principles are explained in an incremen-
tal manner for the actual implementation of computational models. This book
avoids presenting too much syntax of the programming language at the begin-
ning, which usually results in unnecessary difficulty for the student in under-
standing the underlying concepts in problem solution and programming.
There are very few books on the basic treatment of computational models;
this book and its associated models were designed as teaching materials. The
book is aimed at beginning college students in computer science, mathemat-
ics, statistics, science, and engineering. The main features of the book are the
following:

• Explanation of the basic concepts and principles of computational mod-


els are explained.

• Discussion of the models is based on elementary mathematical models,


at the level of pre-calculus.

• Emphasis on modularity and abstraction that help in dealing with large


and complex models. These concepts are introduced early in Chapters 1
and 2.

• Discussion of the design of algorithmic solutions to problems using stan-


dard flowcharts and pseudo-code.

• Implementation of the problem solutions and the corresponding models


in MATLAB and Octave.
xxiii

The material in this book is adequate at the beginning undergraduate level,


a CS0 course or a CS1 course. As mentioned previously, the material can also
be used in other undergraduate curricula, e.g., mathematics, engineering, and
the other sciences. Because of the level of mathematics used, the book can also
be utilized for a course in college preparation at the high school level.
This book will be extremely helpful to readers who have never programmed
before and the book can help improve the overall approach in teaching/learning
programming principles by emphasizing more problem solving, abstraction,
algorithm design with pseudo-code, and basic programming before teach-
ing/learning more advanced programming principles with standard program-
ming languages such as Java, C++, Ada, and others.
I acknowledge the help provided through discussions with some of my col-
leagues, namely Dr. Ben Setzer and Dr. Dick Gayler. I also acknowledge and
give special thanks to Professor Rich Schlesinger for writing Chapter 1.

José M. Garrido
Kennesaw, Georgia
This page intentionally left blank
About the Author

José M. Garrido is professor of computer science in the Department of Com-


puter Science, Kennesaw State University, Georgia. He holds a Ph.D. from
George Mason University in Fairfax, Virginia, an M.S.C.S also from George
Mason University, an M.Sc. from the University of London, and B.S. in elec-
trical engineering from the Universidad de Oriente, Venezuela.
Dr. Garrido’s research interest is on object-oriented modeling and sim-
ulation, multi-disciplinary computational modeling, formal specification of
real-time systems, language design and processors, modeling systems perfor-
mance, and software security. Dr. Garrido developed the Psim3, PsimJ, and
PsimJ2 simulation packages for C++ and Java. He has recently developed the
OOSimL, the Object-Oriented Simulation Language (with partial support from
NSF).
Dr. Garrido has published several papers on modeling and simulation, and
on programming methods. He has also published six textbooks on object-
oriented simulation and operating systems.

xxv
This page intentionally left blank
Part I

Understanding Problem
Solving
This page intentionally left blank
Chapter 1
Understanding Word Problems

1.1 Introduction
Although a computational problem may be solved using mathematics, a
calculator, or a computer program, developing a solution to these problems
begins with a description of the problem in a human language (e.g. English). To
solve such problems, it is necessary to understand what the (English) problem
statement is saying. One may say “well, I already understand English,” and
that is correct — for casual conversations. In this case, one only needs to have
a general understanding of what is being said.
The problem statement of real-world situations is often described in a very
ambiguous, incomplete, and confusing manner. However, for developing com-
putation models from problem statements, one needs to understand precisely
what is being said. Therefore, there is a need to focus on every word that is be-
ing said (not just the general context). Otherwise, the appropriate computations
will most likely not be performed.
The first important step in developing computational models is understand-
ing the problem. This is part of the general approach of computational think-
ing that is required for any problem that involves calculations. This chapter
discusses how to understand a precise problem description.
Computational thinking is an approach for developing computational mod-
els and is used for problem solving in the following application areas:

• Sciences (biology, chemistry, computing, physics, geology, etc.)

• Social Sciences (psychology, sociology, geography, etc.)

• Engineering (electrical engineering, civil engineering, mechanical engi-


neering, etc.)

• Business (accounting, finance, marketing, economics, risk management,


etc.)

3
4 Introduction to Elementary Computational Modeling

1.2 Nouns and Verbs


Consider the following example:

To calculate the area of a rectangle, multiply the width and height.

This problem is so simple that our minds may automatically grasp what
to do. Other problems are not so simple. So, let’s develop a technique for un-
derstanding a problem like this and then use that technique on more complex
problems. The key to understanding a word problem is to find the nouns and the
verbs. As shown in Figure 1.1, the nouns in this problem are “area,” “width,”
and “height.” The verbs are “calculate” and “multiply.”

FIGURE 1.1: Identifying nouns and verbs.

FIGURE 1.2: Area of rectangle.

The nouns identify data values to use. The nouns also give us names for
those values. The verbs describe what actions are to be performed.
This is illustrated in Figure 1.2. In this type of diagram, the blocks indicate
steps in the solution and the arrows show the uses of the data. This diagram
illustrates the concepts of uses and produces. It shows that width and height
will be used by the times operation, which then produces the value of area.
This is a key concept. Once we know what the nouns and verbs are, we can
Understanding Word Problems 5

understand the computation by understanding how the values we have are used
and what values are produced. Once we understand that, then it is easy to
create a formula for the problem.

FIGURE 1.3: Formula from nouns and verbs.

We can then reason that this word problem becomes the formula in Fig-
ure 1.3. Now consider a more complicated example:

Calculate the energy needed to heat water from an initial temperature


to a final temperature. The formula to compute the energy is the
amount of water in kilograms times the difference of the final and
initial temperatures in Celsius times 4184.

The nouns are: “energy,” “water,” “initial temperature,” “final temperature,”


“amount,” “difference,”and “formula.” The verbs are “calculate,” “heat,” “com-
pute,’’ and “times.”

FIGURE 1.4: Heating water.

All of the nouns listed refer to values except for “water.” This noun helps
us understand the physical context of the problem, but it can be ignored for
6 Introduction to Elementary Computational Modeling

the calculations. Similarly, all of the verbs refer to a computational action ex-
cept “heat.” Again, this verb helps us understand the physical context of the
problem, but we can ignore it for the computation.
The word ”difference” is special. It is a noun, indicating it describes a
value, but the meaning of that word also describes an action (subtraction).
Now we can draw the diagram in Figure 1.4. This clearly shows how the
values are used and what values are produced. In this type of diagram, the
blocks indicate steps in the solution and the arrows show the uses of the data.
From that diagram we can then develop the formula for this problem.

Energy = amount × ( f inal temp − initial temp) × 4184

1.3 Problem Decomposition


Many problems cannot be solved with a single equation. These types of
problems need to be decomposed into smaller problems. We solve the smaller
problems and then put the pieces together to get the solution to the entire prob-
lem.
Consider the problem discussed previously, but with an additional step:

Calculate the energy needed to heat water from an initial tem-


perature to a final temperature. The user will provide the amount
of water in kilograms and the initial and final temperatures of the
water in Celsius. The formula to compute the energy is the amount
of water in kilograms times the difference of the final and initial
temperatures times 4184.

The 2nd sentence describes actions to be performed by a person before we


can do the computation. Thus, this problem has two steps:
1. User Input
2. Calculate Energy
This kind of multiple step problem is best visualized in a diagram like the
one shown in Figure 1.5. The figure illustrates the idea of uses. First, the user
provides data. Then, the calculation uses that data. In this type of diagram,
the blocks indicate steps in the solution and the arrows show the uses of the
data. Each of the boxes in this diagram represents a more detailed diagram
that describes the actual steps to solve that part of the whole problem. Now,
consider a more complicated problem:
Understanding Word Problems 7

FIGURE 1.5: Multiple steps problem.

Count how many numbers are greater than the average

When we analyze this problem, we discover the nouns are “numbers” and
“average.” The verb is “count.” Thus, this calculation uses two values (numbers
and average). This is illustrated in Figure 1.6.

FIGURE 1.6: Diagram of counting example.

However, the average is not a separate independent value, it must be cal-


culated. To calculate the average, we need to use numbers. This is shown in
Figure 1.7.
This diagram is important because it visually indicates:

• What calculations use what values

• The order in which the calculations must occur.

The first calculation uses “average.” Consequently, we must calculate “av-


erage” before we perform that step.
8 Introduction to Elementary Computational Modeling

FIGURE 1.7: Diagram with average.

1.4 The Language of Computational Problems


The English problem statement may use certain special terms.

1.4.1 Terms for Computed Values


One type of such special terms are nouns that refer to a value and an implied
calculation to obtain that value. All of these special nouns are usually followed
by the word of and then the value(s) to be in the implied calculation.

• As seen previously, the word difference is both a noun which refers to a


value and the result of a calculation (subtraction).
• The word inverse is a noun but also refers to the result of either:
– Taking a fraction and reversing the numerator and denominator.
The inverse of 25 is 25 .
– Dividing 1 by a specified whole number. The inverse of 5 is 15 .
• The word sum or total refers to a value which is the addition of poten-
tially many values. These values may be explicitly stated or a range of
values may be specified.

The sum of all the weights

• The word product refers to a value which is the multiplication of several


values. These values will usually be explicitly stated.

The product of the width and height

• The word negative can either be an adjective preceding some value or it


can be a noun.
Understanding Word Problems 9

– negative total
– the negative of the total
• The word average refers to the sum of many values divided by the count
of how many values there are.

The average of all the scores

• The word number or count often refers to how many items of a certain
type there are.

The number of values greater than the average

1.4.2 Implied Phrases


Often, an English statement will not explicitly include a phrase. Instead, it
will be implied by the context. Consider this problem:

To compute the average of a set of numbers, calculate the sum and


divide by how many numbers there are

This problem statement is missing “of all of the numbers” immediately


after the word “sum.” The missing phrase is implied by the context of the entire
statement. Thus, it is important to look for missing phrases like this one and
add them to the problem statement to fully understand the problem.

1.4.3 Units of Measure


Problem statements often refer to “units of measure” (e.g. kilograms, days,
meters, etc.). To add or subtract two values, they must be measures of the same
type of thing. You can add or subtract two distances, but you cannot add a
distance and a weight. If two values measure the same type of thing but are
expressed in different units of measure, you must first convert them to the same
unit of measure in order to add or subtract them. For example, if you need to
add 5 inches and 2 meters, you must either convert the inches to meters or the
meters to inches.
Units of measure often have the word “per” (e.g. kilometers per hour, miles
per gallon, etc.). Whenever you see the word “per,” this is a description of a
ratio or rate. The first step to solving this type of problem is to rewrite each
“ratio” as a fraction.
5 miles
5 miles per hour =
hour
Problems that refer to ratios will often require multiplication. When you
10 Introduction to Elementary Computational Modeling

multiply units of measure, a unit in a numerator will cancel out the same unit
in a denominator. So, for this problem,

At 5 miles per hour, how far will you go in 10 hours?

We would use this formula.

5 miles
× 10 hours
hour
The hours cancel each other

5 miles
 × 10 hours

hour

and we are left with 5 miles x 10. The answer will be 50 miles. Sometimes, this
type of problem also requires converting units of measure. Suppose you have
this problem:

At 5 miles per hour, how far will you go in 30 minutes?

We use this formula:

5 miles
× 30 minutes
hour
Hours and minutes are not the same and do not cancel. So, we must include
a conversion ratio

5 miles 1 hour
× 30 minutes ×
hour 60 minutes
Now, the hours will cancel and the minutes will cancel

5 miles 1hour

× 30 
minutes ×
 
hour
  60 
minutes
The result is 2.5 miles. Thus, to solve this type of problem, you need to
construct a formula that will:

• Result in all of the units being canceled except the one for the desired
answer.

• Have the remaining uncanceled (desired) unit in the numerator.

To construct a formula, you can invert units of measure, as necessary. So, for
this problem:

At 5 miles per hour, how long will it take to go 10 miles?


Understanding Word Problems 11

Our answer should be a measure of time (hours). So, we invert our miles
per hour ratio to get this formula:

hour
× 10 miles
5 miles
In this formula, the miles cancel and we have
hour
× 10
5
which yields 2 hours.

1.4.4 Conditions
A common occurrence in computations is a statement that the computation
is valid only if certain conditions apply. For example, the area of a square is
valid only if the length of a side is greater than 0. This is illustrated in Fig-
ure 1.8. The details of the data validation are shown in Figure 1.9.

FIGURE 1.8: Validating conditions.

We describe a condition using an If statement that precedes the calculation.


Thus, the above condition is written as:

IF side > 0, area = side × side


Sometimes, there will be multiple conditions to consider. These multiple
conditions will be separated by one of the following:

• The word “and” means that both or all of the associated conditions must
be true. For example:

The area of a rectangle is length times width if both are


greater than 0.

Figure 1.10 illustrates this set of conditions and is written as:


12 Introduction to Elementary Computational Modeling

FIGURE 1.9: Simple data validation.

FIGURE 1.10: Multiple conditions.

IF length > 0 AND width > 0, area = length × width

• In English, the word “or” has different meanings depending on its con-
text. A named value can only have one actual value at any instant. Thus,
when “or” is used to refer to the same named value, it means that only
one of those possible conditions can occur.

if distance is less than 100 or greater than 200, ...

On the other hand, when the word “or” is used to refer to values of
different named items, it means that either one is fine.
Understanding Word Problems 13

FIGURE 1.11: OR used with one value.

FIGURE 1.12: OR used with multiple values.

if temperature is less than 30 or wind speed greater than 10,


...

1.4.5 Repetition
We often have to repeat the same calculation, but with different values. Any
of the following phrases will be an indication that this is required.

• for. This will specify a range of values and the calculation(s) to perform
on each of the values in the range. An example would be:

For each value in the range 5 < x < 10, compute the sum of
the inverses.
Exploring the Variety of Random
Documents with Different Content
ÉPILOGUE

Enfant-Jésus, je ne suis pas un Mage versé dans toute sorte de


sciences et je ne puis te présenter des cadeaux somptueux. Berger
hirsute, traînant mon corps maladif, je t’amène quelques brebis
boiteuses et dont la toison s’est arrachée aux ronces de la lande où,
lorsque je les rassemblai, elles grelottaient sous le vent glacé que
souffle le démon.
Je t’apporte aussi une gerbe des fleurs de la forêt où mon âme
est née à ta Lumière, où tu l’as détachée des choses périssables, où
elle voudrait bien retourner pour y attendre que tu lui fasses franchir
le seuil de la Vie éternelle. Voici l’or des genêts, voici l’encens des
aubépines, voici, pour figurer les souffrances bienheureuses subies
à ton service et le sang que je me réjouirais de verser pour toi, les
baies rouges d’une touffe de houx cueillie au bord du sentier qui
mène aux clairières de l’oraison.
Maintenant, Roi des pauvres, des affligés et des méprisés,
puisque ta Mère me fait signe d’approcher, permets que je me
blottisse au fond de l’étable, entre mon frère l’âne et mon frère le
bœuf. Comme je suis très las, je m’assiérai sur la paille et je tirerai
de mon pipeau les notes assourdies d’un cantique de Noël pour
bercer ton sommeil.
Quand la grande paix, annoncée par tes anges aux vagabonds
des routes de la terre, m’aura rendu un peu de force, j’irai mendier
pour la Sainte-Famille. Ce ne sont point des monnaies que je
solliciterai. Je dirai aux gens de la ville :
— Donnez-moi vos âmes ; je les porterai à la Vierge
miséricordieuse afin qu’après les avoir blanchies, elle en fasse les
langes dont elle enveloppera l’Enfant-Jésus.
Je sais que beaucoup me chasseront en me chargeant d’injures.
D’autres s’écrieront : — C’est un fou qu’il ne faut, sous aucun
prétexte, recevoir dans notre maison. D’autres : — Les affaires sont
les affaires et les intérêts de notre commerce sont incompatibles
avec ces fadaises. D’autres : — Nous irons, nous-mêmes, trouver
l’Enfant-Jésus, dimanche prochain, si nous avons le temps. Et des
scribes chuchoteront : — Nous l’avons fréquenté jadis ce
galvaudeux et nous gardons contre lui le grief qu’il ne nous
ressemble pas. S’il s’adresse à nous, faisons mine de ne plus le
connaître.
Mais je sais également que, dans des ruelles perdues, aux
bâtisses sordides, comme sous les balcons de palais tout scintillants
des fêtes de la Chimère, je découvrirai plusieurs âmes en détresse
pour avoir oublié Dieu. Celles-là entendront ma requête et
m’accompagneront jusqu’à la crèche où tu les appelles, Enfant né
de nos fautes et de nos larmes pour le salut du monde.
Alors, peut-être le privilège me sera-t-il concédé de chanter à mi-
voix : Domine, quinque talenta tradidisti mihi ; ecce enim quinque
alia superlucratus sum.
Ensuite, je m’agenouillerai à tes pieds, je poserai ma tête
douloureuse sur la pierre de ton berceau, je me recueillerai dans la
contemplation de ta divine splendeur et je te demanderai une grâce :
non pas celle de guérir, non pas celle de mourir mais celle de veiller
sur toi, en silence, avec ta Mère immaculée et ton Père nourricier.
Exauce-moi, petit Enfant de Bethléem, mon maître aimé, mon maître
adoré Seigneur Jésus-Christ !…

Prière conçue devant l’autel de


l’Enfant-Jésus, dans la chapelle des
Carmélites de Beaune, le Mercredi des
Cendres 1926.

Fin
TABLE DES MATIÈRES

Pages
Préambule 9
Dans la forêt de l’Oraison 19
Reflets des Évangiles 33
Les deux récits du curé 137
Au jardin de la Souffrance 205
Épilogue 235
SAINT-AMAND (CHER). — IMP. R. BUSSIÈRE
*** END OF THE PROJECT GUTENBERG EBOOK JUSQU'À LA
FIN DU MONDE ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright
in these works, so the Foundation (and you!) can copy and
distribute it in the United States without permission and without
paying copyright royalties. Special rules, set forth in the General
Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree to
abide by all the terms of this agreement, you must cease using
and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project
Gutenberg™ works in compliance with the terms of this
agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms
of this agreement by keeping this work in the same format with
its attached full Project Gutenberg™ License when you share it
without charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the


United States and most other parts of the world at no
cost and with almost no restrictions whatsoever. You may
copy it, give it away or re-use it under the terms of the
Project Gutenberg License included with this eBook or
online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the
country where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of the
copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.
1.E.5. Do not copy, display, perform, distribute or redistribute
this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to the
Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt that
s/he does not agree to the terms of the full Project Gutenberg™
License. You must require such a user to return or destroy all
copies of the works possessed in a physical medium and
discontinue all use of and all access to other copies of Project
Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite
these efforts, Project Gutenberg™ electronic works, and the
medium on which they may be stored, may contain “Defects,”
such as, but not limited to, incomplete, inaccurate or corrupt
data, transcription errors, a copyright or other intellectual
property infringement, a defective or damaged disk or other
medium, a computer virus, or computer codes that damage or
cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES -


Except for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU
AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE,
STRICT LIABILITY, BREACH OF WARRANTY OR BREACH
OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE
TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER
THIS AGREEMENT WILL NOT BE LIABLE TO YOU FOR
ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE
OR INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF
THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If


you discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person or
entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR
ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you do
or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status by
the Internal Revenue Service. The Foundation’s EIN or federal
tax identification number is 64-6221541. Contributions to the
Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or
determine the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About Project


Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like