Download Introduction to Elementary Computational Modeling Essential Concepts Principles and Problem Solving 1st Edition Jose Garrido (Author) ebook All Chapters PDF
Download Introduction to Elementary Computational Modeling Essential Concepts Principles and Problem Solving 1st Edition Jose Garrido (Author) ebook All Chapters PDF
https://ebookfinal.com/download/java-an-introduction-to-problem-
solving-and-programming-7th-edition-walter-savitch/
https://ebookfinal.com/download/cases-on-information-technology-
entrepreneurship-jose-a-medina-garrido/
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/
https://ebookfinal.com/download/an-introduction-to-statistical-
problem-solving-in-geography-third-edition-j-chapman-mcgrew-jr/
https://ebookfinal.com/download/giant-molecules-essential-materials-
for-everyday-living-and-problem-solving-2nd-edition-charles-e-
carraher-jr/
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
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.
K13027
SERIES EDITOR
Horst Simon
Deputy Director
Lawrence Berkeley National Laboratory
Berkeley, California, U.S.A.
PUBLISHED TITLES
PETASCALE COMPUTING: ALGORITHMS AND APPLICATIONS
Edited by David A. Bader
INTRODUCTION TO SCHEDULING
Yves Robert and Frédéric Vivien
José M. Garrido
Kennesaw State University
Georgia, USA
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
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
Preface xxi
v
vi
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
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
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
Bibliography 297
Index 299
This page intentionally left blank
List of Figures
xv
xvi
xix
This page intentionally left blank
Preface
xxi
xxii
José M. Garrido
Kennesaw, Georgia
This page intentionally left blank
About the Author
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:
3
4 Introduction to Elementary Computational Modeling
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.”
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.
We can then reason that this word problem becomes the formula in Fig-
ure 1.3. Now consider a more complicated example:
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.
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.
– 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 word number or count often refers to how many items of a certain
type there are.
multiply units of measure, a unit in a numerator will cancel out the same unit
in a denominator. So, for this problem,
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:
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.
To construct a formula, you can invert units of measure, as necessary. So, for
this problem:
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.
• The word “and” means that both or all of the associated conditions must
be true. For example:
• 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.
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
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
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 ***
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.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.
• 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 comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
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.
ebookfinal.com