This preview shows pages 1–7. Sign up to view the full content.
1
CS1371
Introduction to Computing
for Engineers
Problem Solving and Abstraction
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 2
Problem Solving and Abstraction
Solving Problems
•
Taxonomy of Operations
on Collections
•
Working forward from the
data
•
Working backward from
the answer
•
Designing the Algorithm
•
Implementing the Code
Learning Objectives
Understanding how to
solve problems
Understanding the
value of modularity
3
Problem Solving in General
•
Problem solving is a fundamentally creative skill
•
This skill is learned by practice – solving problems of
different types.
•
Different types of problem require different problem
solving skills:
–
Solving Physics problems frequently involves
identifying the appropriate principles and formulas
based on the given input data
–
Algebra problems require an algebraic representation
of the given information followed by manipulating
equations and axioms until the answer is derived
–
Geometry problems are similar, but usually involve
graphical representations of the situation
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 4
Problem Solving in Computer Science
•
The end result of a computer science problem is a
program that produces the right behavior.
•
As with problem solving in general, there is a wide
spectrum of approaches to problemsolving depending
on the nature of the problem
–
Numeric computation (solving equations)
–
User interaction (games, graphics)
–
Modeling and simulation (ObjectOriented
Programming)
[more on this later]
5
Computation Problems
•
This type of problem will present you with some data
and ask you to compute some result(s).
•
With simple problems, you may be able to find the
solution directly.
•
With more complex problems, you have to work in
two directions:
–
Forward from the data, and
–
Backwards from the answer
data
answer
What you could
do with the data
How you could
find the answer
•
Find a possible match
•
Solve the subproblems
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 6
Possible Operations
•
There are only 6 different operations you can possibly
perform on a collection of like data items.
•
Each operation requires a function to specify how that
operation should be performed
•
Any algorithm can be constructed by applying these
operations in some order.
•
The operations are:
–
Build – create the collection from some source
–
Traverse – touch each item and maybe summarize
–
Map – change the values in each item
–
Filter – remove some items from the collection
–
Search – determine whether a specific item exists
–
Sort – reorder the collection
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 01/23/2012 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Institute of Technology.
 Fall '08
 Stallworth

Click to edit the document details