FPT Dynamic programming Flashcards

1
Q

What is the Independent Set Problem?

A

Finding a subset of nodes in a graph such that no two nodes in the subset are adjacent.

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

What makes solving problems on trees different from general graphs?

A

Trees have no cycles and are structurally simpler, allowing problems to be solved efficiently with dynamic programming or greedy methods.

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

What is the key advantage of working on trees for NP-hard problems?

A

Subproblems on subtrees only interact through their roots, enabling a divide-and-conquer approach.

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

What is the greedy algorithm for finding an independent set on trees?

A

Start with a leaf node, include it in the independent set, remove it and its neighbor, and repeat until the tree is empty.

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

Why does the greedy algorithm work for independent sets on trees?

A

Every tree has at least one leaf, and including a leaf is always part of some maximum independent set.

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

What is a forest in graph theory?

A

A graph consisting of multiple disconnected trees.

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

How does the greedy algorithm handle forests?

A

It applies the same logic to each tree in the forest independently.

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

What is the time complexity of the greedy independent set algorithm on trees?

A

O(n), where n is the number of nodes in the tree.

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

What is the Maximum-Weight Independent Set Problem?

A

Finding an independent set in a graph where the total weight of the nodes in the set is maximized.

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

How does Maximum-Weight Independent Set differ from the unweighted version?

A

Each node has a weight, so choosing nodes must consider both independence and weight optimization.

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

What is the difficulty in solving Maximum-Weight Independent Set on trees?

A

Deciding locally whether to include a node or its neighbor requires considering global effects on the tree’s structure and weights.

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

What are the two subproblems for Maximum-Weight Independent Set on trees?

A

OPTin(u): Maximum weight including node u. OPTout(u): Maximum weight excluding node u.

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

What is the recurrence relation for OPTin(u) in Maximum-Weight Independent Set?

A

OPTin(u) = wu + sum(OPTout(v) for v in children(u)), where wu is the weight of u.

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

What is the recurrence relation for OPTout(u) in Maximum-Weight Independent Set?

A

OPTout(u) = sum(max(OPTin(v), OPTout(v)) for v in children(u)).

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

How does dynamic programming solve the Maximum-Weight Independent Set Problem?

A

By building solutions for subtrees recursively from leaves to the root using the OPTin and OPTout recurrences.

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

What is the significance of post-order traversal in the dynamic programming solution?

A

It ensures children are processed before their parent, enabling correct computation of OPTin and OPTout values.

17
Q

How do you recover the actual Maximum-Weight Independent Set from the computed values?

A

Trace back decisions made for each node while solving the subproblems.

18
Q

What is the time complexity of the dynamic programming algorithm for Maximum-Weight Independent Set on trees?

A

O(n), where n is the number of nodes in the tree.

19
Q

Why can’t the greedy algorithm solve Maximum-Weight Independent Set with weights?

A

Including a leaf or its parent depends on weights, and a greedy choice may not lead to a global optimum.

20
Q

Can the greedy algorithm partially solve non-tree graphs?

A

Yes, it can eliminate nodes with degree 1 and their neighbors, simplifying the graph before applying other methods.

21
Q

How does dynamic programming handle subtrees in the Maximum-Weight Independent Set Problem?

A

It computes optimal solutions for each subtree and combines them to solve the problem for the whole tree.

22
Q

What is the relationship between OPTin and OPTout for leaf nodes?

A

For leaf u: OPTin(u) = wu, OPTout(u) = 0, since there are no children.

23
Q

How is the Maximum-Weight Independent Set value obtained from the root?

A

By taking max(OPTin(r), OPTout(r)), where r is the root of the tree.

24
Q

Why are trees a special case for solving NP-hard problems?

A

Their acyclic nature allows problems to be broken into independent subproblems on subtrees.

25
How can the dynamic programming solution for Maximum-Weight Independent Set be adapted for forests?
Solve each tree in the forest independently and combine the results.
26
Why does the dynamic programming approach require linear time?
Each node and edge is processed exactly once in post-order traversal.
27
What is the key idea behind dynamic programming for tree problems?
Breaking down problems into independent subproblems on subtrees and combining their solutions.
28
Why is rooting the tree important for the dynamic programming algorithm?
It orients the tree to allow recursive processing from leaves to the root.
29
How does the recurrence for OPTin and OPTout ensure independence in the set?
OPTin excludes children of the node, while OPTout allows independent decisions for children.