Chapter 23 Flashcards

1
Q

Where greedy algorithm used

A

For optimization

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

Does greedy algorithm use recursion

A

No

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

What is backtrack search

A

Its a search technique

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

What are 2 phases of greedy algorithm

A

1- We can take the best you can get right now, without regard for future consequences.
2- We hope that choosing a local optimum at each step, you will end up a global optimum.

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

What is backtrack

A

Decide and move on to one strategy and then taking that decision back and leave that strategy

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

What is greedy approximation

A

Greedy finds good but not best

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

In which case greedy algorithm gives optimal solution

A

Entities are all powers of a fixed denomination

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

How much time greedy algorithm takes

A

O(k)

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

How much time dynamic programming takes

A

O(kn)

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

What is huffmen encoding

A

Lets suppose we have data (text, ASCII etc) and we want to send in over network. We need to convert it into smaller chunks for speed point of view. We also want to compress it so it will take minimum numbers of bits during transfer. For compressing, we will use huffmen encoding.

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

Does greedy algorithm have any link with huffmen encoding

A

Yes

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