Chapter 8 (Dynamic Programming) Flashcards

(5 cards)

1
Q

Warshalls Alg.

A

Purpose: Warshalls alg is a dynamic programming algorithm that solves for the transitive closures of a directed graph, meaning that it finds all possible paths between every pair of vertices in the graph.

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

Transitive Closure

A

def: A transitive closure means there is a path between any two nodes, i.e, if one node is reachable to another via any possible path.

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

True or False: Floyd algorithm is the boolean version of Warshalls algorithm

A

False.

Its the opposite. Warshalls alg is the boolean version of Floyds alg, where 1 means node j is reachable from node i, and 0 means node j is not reachable from node i

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

Floyds alg.

A

Purpose: In a weighted digraph, find the shortest path between every pair of vertices.

(essentially the same as warshalls but with a slightly different recurrence relation)

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

Longest common subsequence (LCS)

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