unit 6 Flashcards

1
Q

problem

A

a general description of a task that can (or cannot) be solved by an algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

algorithm

A

a finite set of instructions that accomplish a task; requires sequencing, selection, and iteration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

sequencing

A

putting steps in order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

selection

A

deciding which steps to do next

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

iteration

A

doing some steps over and over

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

efficiency

A

a measure of how many steps are needed to complete an algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

linear search

A

a search algorithm which checks each element of a list, in order, until the desired value is found or all elements in the list have been checked

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

binary search

A

a search algorithm that starts at the middle of a sorted set pf numbers and removes half of the data; this process repeats until the desires value is found or all elements have been eliminated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

binary search in terms of binary numbers

A

the steps are the amount of bits when the input is represented in binary
input= 15
binary= 1111
steps= 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

example of linear search

A

given a list of numbers, and have to choose the predetermined number
you give the answer by going through each number chronologically

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

example of binary search

A

given a list of numbers, and have to choose the predetermined number
you give answer by taking the middle number and see if the predetermined answer is above or below. take middle number again and ask above or below

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

polynomial efficiency

A

any algorithm whose efficiency includes n^2, n^3, n^4, etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

polynomial pattern

A

(n^2-n)/2
ex. x=2, y=1; x=3, y=3; x=4, y=6
the increase between two outputs goes up by one to get next output only when input goes up by 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

exponential efficiency

A

an algorithm whose efficiency includes an 2^n, 3^n, 4^n etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

exponential pattern

A

(2^n)-1
ex. n=2, y=3; n=3, y=7
also the output number of bits represented in binary is input value
the increase between two outputs gets doubled to get next output only when input goes up by 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

reasonable time

A

algorithms with polynomial efficiency or lower (constant, linear, square, cube, etc) are said to run in a reasonable amount of time
logs are reasonable too

17
Q

unreasonable time

A

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

18
Q

factorial

A

n!
multiply all whole numbers from the given number down to the number 1
ex. 4!= 4 x 3 x 2 x1 = 24

19
Q

decision problem

A

“Is there a path?”

20
Q

optimization problem

A

“what’s the shortest path?”
some can be unreasonable as there is not an algorithm that can solve the problem in a reasonable time, so we come up with a heuristic solution

21
Q

heuristic

A

provides a “good enough” solution to a problem when an actual solution is impractical or impossible

22
Q

undecidable problem

A

a problem for which no algorithm can be constructed that is always capable of providing a correct yes-or-no answer

23
Q

halting problem

A

is is possible to write a program that determines whether another program halts?
- no it doesnt exist

24
Q

sequential computing

A

programs run in order, one command at a time

25
Q

parallel computing

A

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

26
Q

distributed computing

A

programs are run by multiple devices

27
Q

speedup

A

the time used to complete a task sequentially divided by the tome to complete a task in parallel
sequential/parallel

28
Q

does speedup reach a limt?

A

yes
speed up is never equal to the number of processor
some portions of the algorithm cant be made parallel
each additional processor helps a little less.