Exam 2 Cards Flashcards

1
Q

What NP hard problem did we start with for our reduction to show that 0-1 knapsack is NP hard?

A

subset sum

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

Suppose that graph A from the pdf for the exam has a flow network as indicated. What augmenting path would the edmonds-karp algorithm choose?

A

2, 3, 6,

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

Experimental cuisine problem - what is the value of P and what is the value of k

A

p is 0 and k is k_clique

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

If V is the number of vertices, E is the number of edges, and f* is the max flow of the network, what is the asymptotic runtime of Ford-Fulkerson?

A

O(E |f*|)

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

In the maximum flow for the graph G on the pdf for the exam, what is the flow on the edge from vertex s to vertex 1?

A

8

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

What is the maximum flow of the graph G that appears on the pdf for the exam?

A

30

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

For the graph G on the pdf for the exam, what is the min ST cut? Select all vertices on the S side of the cut.

A

1, 3, 4, 6

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

Showing that a problem is an element of NP means that if it is solvable in deterministic polynomial time then so is every problem in NP

A

False

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

Let X be a problem that belongs to the class NP, then which one of the following is true?

A

If X is NP-Hard then it is NP-Complete

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

Consider two decision problems, Q1, Q2 such that Q1 reduces un polynomial time to 3-SAT and 3-SAT reduces in polynomial time to Q2. Then which of the following is consistent with the above statement?

A

Q2 is NP-Hard

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

In graph A on the pdf, in the corresponding residual flow graph Gf, what is the capacity of the edge from node 1 to node 2?

A

6

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

The problem 3-SAT anad 2-SAT are

A

NP-Complete and in P respectively

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

To verify a yes answer for the Set-Partition problem, a good certificate would be the value v such that each partition sums to the value v.

A

False

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

Consider the following two problems on undirected graphs
a : given G does G have a vertex cover of size |V| - 4?
B : Given G does G have a vertex cover of size 5

Which of the following is true?

A

Both a and B are in P

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

Select all statements that imply that the flow is maximum

A

there is no augmenting path from S to T in the residual flow network, AND the flow across any ST cut is equal to the capacity of the minimum cut

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

Suppose we have a flow network X with a maximum flow and we increase the capacity of an edge in the flow network by 4 and we wish to update the maximum flow without starting over. What is the maximum number of augmenting paths that the Edmunds-Karp algorithm might require to bring X to the new max flow?

A

4