making algaristhisms Flashcards

1
Q

substitution method,

A

In the substitution method, we guess a bound and then use mathematical induction to prove our guess correct.

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

recursion-tree method

A

converts the recurrence into a tree whose nodes represent the costs incurred at various levels of the recursion. We use techniques for bounding summations to solve the recurrence.

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

master method

A

The master method provides bounds for recurrences of the form
T .n/ DaT .n=b/ Cf .n/ ; (4.2)
where a 1, b>1,and f .n/ is a given function. Such recurrences arise frequently. A recurrence of the form in equation (4.2) characterizes a divideand-conquer algorithm that creates a subproblems, each of which is 1=b the size of the original problem, and in which the divide and combine steps together take f .n/ time.

To use the master method, you will need to memorize three cases, but once you do that, you will easily be able to determine asymptotic bounds for many simple recurrences. We will use the master method to determine the running times of the divide-and-conquer algorithms for the maximum-subarray problem and for matrix multiplication, as well as for other algorithms based on divideand-conquer elsewhere in this book

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

brute-force

A

try all combos

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

A transformation

A

find a sequence of days over which the net change from the first day to the last is maximum. Instead of looking at the daily prices, let us instead consider the daily change in price, where the change on day i is the difference between the prices after day i -1 and after day i.

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