AP CSP Unit 6

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What will the algorithm display?

0

If using a linear search, how many comparisons would you make to find 11?

1

If using a linear search, how many comparisons would you make to find 180?

10

What will the second algorithm display?

3

What does the Diamond in the Algorithms flowchart signify?

A conditional or decision step, where execution proceeds to the side labeled true if the condition is true and to the side labeled as false otherwise.

Unreasonable Time

Algorithms with exponential or factorial efficiencies are examples of algorithms that run in an unreasonable amount of time.

What does the Parallelogram in the Algorithms flowchart signify?

Displays a message.

What is the result of this code?

It moves forward 4 steps (It can't move forward anymore).

What does the Rectangle in the Algorithms flowchart signify?

One or more processing steps. Like a statement that assigns a value to a variable.

What steps are needed for a binary search for the number 300?

Since 76 is not equal to our target number, we simply eliminate everything to the left of that. 900 is not equal to our target number, so we eliminate that and every number to the right. We eliminate 330 by rounding down, so we arrive at 300 as our answer.

What does the Oval in the Algorithms flowchart signify?

The start of the algorithm.

What is in this chart?

The steps to reading a flowchart in order.

Boolean condition

a decision in an algorithm based on either true or false

Natural language

a human language such as English, Spanish, German, etc.; as opposed to artificial terms used in programming languages

Iteration

a loop or repeated behavior in an algorithm; one of the three different types of algorithms

Parallel Computing

a model in which programs are broken into small pieces, some of which are run simultaneously

Solvable problem

a problem that can be solved exactly using an algorithm

Unsolvable problem

a problem that cannot be solved exactly using an algorithm

Optimization Problem

a problem with the goal of finding the "best" solution among many (e.g., what is the shortest path from A to B?)

Linear search

a search algorithm that finds a target by looking at each item, one at a time, until the end of the set is reached or the target is found. May also be refered to as a sequential search.

Binary search

a search algorithm that finds a target in a sorted list by starting in the middle. If the target is less than than the middle term, the algorithm then looks at the middle of the lower half. The process of narrowing the search by halves continues until the target is found or until it is determined that the target does not exist in the list.

Algorithm

a step-by-step set of instructions implemented by a program to develop and express solutions to a computational problem

Reasonable time

a way to analyze an algorithm in terms of the number of steps required to solve a problem; an algorithm is given this designation if the number of steps the algorithm takes is less than or equal to a polynomial function of the size of the set.

Heuristic solution

algorithmic approach applied to improve an algorithm that is based on finding solutions among all available options using a general set of rules; may result in approximate solutions instead of exact solutions; may be helpful to find solutions in reasonable time; may be helpful to find approximate solutions to unsolvable problems

Empirical analysis

an evidence-based approach to the study and interpretation of information

Sequencing

ordering the steps of an algorithm; one of three different types of algorithms

Decidable problem

problem in which an algorithm can be constructed to answer "yes" or "no" for all inputs

Undecidable problem

problem in which no algorithms can be constructed to answer "yes" or "no" for all inputs

Run Time

the period during which a computer program is executing

Selection

using a condition to to control the logical path taken by an algorithm; one of three different types of algorithms

Pseudo code

words used to organize thoughts to help plan writing code; helps programmers translate specifications into code


Ensembles d'études connexes

Speech Chapter 20 "Choose and Rehearse a Method of Delivery"

View Set

Constitution Clauses & Related Cases Quizlet

View Set

ATI: DM, ENDOCRINE & CONNECTIVE TISSUE DISORDER TEST

View Set