Chapter 1 Flashcards
What are the common misconceptions about computer science
Computer science is the study of computers.
Computer science is the study of how to write computer programs.
Computer science is the study of the uses and applications of computers and software.
What is computer science a study of
The study of algorithims
What aspects of algorithims are studied in computer science
Their formal and mathematical properties
Their hardware realizations
Their linguistic realizations
Their applications
What is the informal definition of an algorithm
An ordered sequence of instructions that is guaranteed to solve a specific problem.
What are some examples of an algorithm
Step 1: Do something
Step 2: Do something
Step 3: Do something
What are the three types of operations used to construct algorithms
Sequential operations
Conditional operations
Iterative operations
What is the definition of a sequential operation
Carries out a single well-defined task
What is the definition of a conditional operation
Ask a question and the next operation is then selected on the basis of the answer to that question
What is the definition of an iterative operation
Looping instructions that tell not to go on but go back and repeat the execution of a previous block of instructions
What is an example of a sequential operation
A cookbook recipe
What is an example of a conditional operation
A cookbook recipe that states that if you have a breadmaker then you will proceed with a different step (ex: a condition that changes the procedure)
What is an example of an iterative operation
A computer writes hello
over and over again and never preforms any other function
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
What is a Computing agent
Machine, robot, person, or thing carrying out the steps of the algorithm
What is an unsolved problem
Some problems are unsolvable, some solutions are too slow, and some solutions are not yet known
What is an example of an unsolvable problem
Solving world peace
What is 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
What is a Well-ordered collection
Upon completion of an operation, we always know which operation to do next
What does the statement unambiguous and effectively computable operations
mean
It is not enough for an operation to be understandable, it must also be doable (effectively computable)
What does effectively computable mean
Doable
What are some examples of ambigious statements
Go back and do it again (Do what again?) Start over (From where?)
How do we know an a soltuion (algorithm ) is correct
To know whether a solution is correct, an algorithm must produce a result that is observable to a user:
A numerical answer
A new object
A change in the environment
What are three examples of observable results
A numerical answer
A new object
A change in the environment
What does an unambiguous operation/primitive operations mean
Can be understood by the computing agent without having to be further defined or simplified
Why is it not enough for an operation to be understandable
It must also be doable (effectively computable) by the computing agent
Describe an infinite loop (in relation to algorithims)
Runs forever
Generally a mistake in the programming