Cs3310

Only available on StudyMode
  • Download(s) : 273
  • Published : February 4, 2013
Open Document
Text Preview
Chapter 1
An Introduction to Computer Science

INVITATION TO
Computer Science

1

Objectives
After studying this chapter, students will be able to:
• Understand the definition of computer science
• Write down everyday algorithms and evaluate them to
determine if they are ambiguous or not effectively
computable

Invitation to Computer Science, 6th Edition

2

Objectives (continued)
After studying this chapter, students will be able to:
• Understand the roots of modern computer science in
mathematics thousands of years old and in mechanical
machines hundreds of years old
• Summarize the key points in the historical development
of modern electronic computers
• Map the organization of the text onto the definition of
computer science

Invitation to Computer Science, 6th Edition

3

Introduction
• Misconceptions
– Computer science is:
• The study of computers
• The study of how to write computer programs
• The study of the uses and applications of computers
and software

Invitation to Computer Science, 6th Edition

4

The Definition of Computer Science
• Computer science is the study of algorithms,
including:





Their formal and mathematical properties
Their hardware realizations
Their linguistic realizations
Their applications

Invitation to Computer Science, 6th Edition

5

The Definition of Computer Science
(continued)
• Algorithm
– Informally, “an ordered sequence of instructions that
is guaranteed to solve a specific problem.”

• Operations used to construct algorithms
– Sequential operations
– Conditional operations
– Iterative operations

Invitation to Computer Science, 6th Edition

6

Invitation to Computer Science, 6th Edition

7

Invitation to Computer Science, 6th Edition

8

The Definition of Computer Science
(continued)
• Why are formal algorithms so important in
computer science?
– If we can specify an algorithm to solve a problem,
then we can automate its solution

• Computing agent
– Machine, robot, person, or thing carrying out the
steps of the algorithm

• Unsolved problems
– Some problems are unsolvable, some solutions are
too slow, and some solutions are not yet known
Invitation to Computer Science, 6th Edition

9

Algorithms
• The Formal Definition of an Algorithm
– A well-ordered collection of unambiguous and
effectively computable operations that, when
executed, produces a result and halts in a finite
amount of time

Invitation to Computer Science, 6th Edition

10

Algorithms (continued)
• Well-ordered collection
– Upon completion of an operation we always know
which operation to do next

• Ambiguous statements
– Go back and do it again (Do what again?)
– Start over (From where?)

Invitation to Computer Science, 6th Edition

11

Algorithms (continued)
• Unambiguous operation, or primitive
– Can be understood by the computing agent without
having to be further defined or simplified

• It is not enough for an operation to be
understandable
– It must also be doable (effectively computable) by
the computing agent

Invitation to Computer Science, 6th Edition

12

Algorithms (continued)
• Algorithm
– Result must be produced after the execution of a
finite number of operations
– Result may be a number, text, a light, picture, sound,
or a change in the computing agent’s environment

• Infinite loop
– Runs forever
– Usually a mistake

Invitation to Computer Science, 6th Edition

13

Invitation to Computer Science, 6th Edition

14

Invitation to Computer Science, 6th Edition

15

Algorithms (continued)
• The Importance of Algorithmic Problem Solving
– “Industrial revolution” of 19th century
• Mechanized and automated repetitive physical tasks

– “Computer revolution” of the 20th and 21st centuries • Mechanized and automated repetitive mental tasks
• Through algorithms and computer hardware

Invitation to Computer Science, 6th...
tracking img