Chapter 17 Flashcards

1
Q

What algorithm is used by fibonacci number: iterative algorithm

A

O(n)

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

What are 2 steps for dynamic programming

A

1- Formulate problem recursively (write down formula for whole problem as a simple combination of answers to smaller sub problems)
2- Build solution to recurrence from bottom up. (write an algorithm that starts with base cases and works its way up to the final solution)

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

Does factorial have recursive foundation

A

Yes

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

What is edit distance algorithm

A

It introduced in 1966 by molecular biology. It says that we can change for example a word to another word by 4 types of operations.
1. Replace
2. Insert
3. Delete
4. Leave it
Edit distance tells how much number of operations required to change word. e.g. spell check, plagiarism, speech recognition

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

What is longest common sequence

A

Its a variation of edit distance. If we have 2 data sets and it is possible that there is sub sequence in it. It does not means a matching portion between 2, but frequency of common occurrence of letters. It is called LCS (longest common sequence problem).

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

Is there a separate algorithm to find short string in long string

A

Yes. e.g. search a word in file

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