Chapter 7 - University of Scranton: Computing Sciences Dept.

advertisement
Chapter 7
What Can Computers Do For Me?
How important is the material in this
chapter to understanding how a
computer works?

4
How important is the material in this
chapter to understanding how to use
a computer?

3
What types of problems are
Computers good at?

Problems that involve




Storage and
Retrieval of Data
Manipulation of Data
Mathematical Calculations
When would a computer’s storage
and retrieval skills help me?




Word Processing
Database
Multimedia
Communications
How does a computer’s
computational capabilities help me?




Personal Finance
Forecasting (weather, economic)
Engineering and Science
Graphics and animation (games)
What Else can a Computer Help
me with?

Manipulation of Date




Creation of data in spreadsheets and word
processing.
Entering data into a database
Formatting data in a word processing program.
And many more …
What do good applications have
in Common?

They are particularly amenable to computer
solution.



They depend on the retrieval, manipulation, and
storage of data.
They can be precisely described in a model
which is well understood.
The process can be extensively monitored by
the user (such as watching what you are
typing in a word processor or listening to
music that you’re playing).
Why can a computer guide
astronauts into space but not predict
the stock market?




Space travel is governed by the laws of
physics which are well known.
There are mathematical formulas that
describe these laws and they can easily be
programmed.
There are no known formulas for predicting
the stock market.
So you just have to use general principles and
expertise to determine what to do.
If programs that predict the stock market are
unreliable, how can I tell when other computer
programs might give unreliable results?







This section emphasizes material that was discussed in chapter
five and could better be phrased as, how can software
developers be confident that the software that they designed
works.
Specifications
Design
Implementation
Testing
Maintenance
MODELS AND SIMULATIONS.
For problems that a computer can
solve, what process should I use to
get an answer?



This section of the book is generally talking
about using commercial programs to solve
problems.
One possible example is to use a spreadsheet
to set up a monthly budget.
The general principles are similar to the way
that programmers design software as we saw
in chapter 5.
Solving Problems (continued)


Stepwise refinement (top down methodology)
Setting up a budget





List sources of income and total them up
List fixed expenses (rent, car payment, insurance
etc) and deduct from income
List non-discretionary expenses and estimate such
as utilities, food, gasoline.
How much is left?
Divvy it up based on experience.
Can some computers solve problems
that other computers can’t?




No
But sort of
In principle the answer is no, but for practical
purposes, some software is available only on
certain platforms and therefore you can’t use
those programs on all computers.
Also some computers lack certain
“unimportant” features such as sound or
color.
What are Turing Machines?

A mathematical model of a computer
consisting of



A tape on which data is placed that is infinitely
long in one direction.
A head that can read or write data to the tape and
move from cell to cell
A control that can change states, and that based
on the current state and content of the tape can
perform actions with the tape head.
Turing Machines (continued)


Explain Example 1 on page 188-190
You should make sure that you understand
Example 2.
What do Turing Machines have to
do with computers today?

A Turing machine is a theoretical model of
modern computer in terms of its capabilities



The tape represents memory for data
The control represents the program being run
Different types of Turing machines are
equivalent to each other is capabilities but
not in speed or convenience.
Universality of Computers



All computational tasks can be decomposed
into simple instructions that any computer
can execute.
Even though different computers use different
instruction sets, the instructions that one
computer lacks can be programmed using
instructions that it does have.
Computers differ in how fast they can solve a
problem, not whether they can solve a
problem.
If all computers are universal,
how do they differ?





Speed
Storage capacity
“Special” features such as sound, color,
graphics, animation, …
Some software may not actually be available
on various platforms
User interfaces differ.
How can I decide what machine I
should buy?





What do you want to do with your computer,
especially specialized tasks? Pick out
software packages.
Compatibility with other users.
How important is portability?
Price – how much can you afford?
What hardware requirements are there for
the software that you need?
Summary





Computers excel at storing, retrieving and
manipulating data at great speed.
Computers excel at presenting results in both textual
and graphical form
For a computer to solve a problem, it must be
precisely specified, and a detailed algorithm must be
developed to meet this specification.
The implementation of the algorithm (software) must
be tested thoroughly to be sure that it does work.
Relevant data must be obtained and used.
Summary (continued)





If problems do not satisfy these characteristics,
computers may not be useful in solving them.
Complex software likely has errors, so users should
be mindful of this fact.
Top-down refinement of a problem is a good
technique for creating a solution.
All computers are alike (more or less).
In selecting a computer to purchase, you should
proceed with a logical and methodological approach.
Terminology








Algorithm
Algorithmic thinking
Data structure
Database
Decomposition
Modeling
Parity bit
refinement






Repetition
Simulation
Spreadsheet
Top-down
methodology
Turing Machine
Universality of
Computers
Download