Complexity - Time Flashcards

1
Q

Define the classes: P, NP, and EXPTIME

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

The class P is closed under what operations?

A

P is closed under all (classic) operations.

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

Define a polynomial reduction

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

How could you prove that a language is in P using the polynomial reduction theorem?

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

What does it mean that a language L is NP-hard)

A

It means that if you can solve L (in polynomial time) then you could solve every language in NP (in polynomial time).

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

Define: a language L in NP-Complete.

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

Define the language K-SAT

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

What is the Cook-Levin Theorem?

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

What have mapping reductions to ATM?

A

For every L in RE there s a mapping reduction to ATM.

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

NP belongs to what class?

A

NP belongs to RE (and to coRE and to R).

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

What is the proof that Atm is NP-Hard?

A

Note - It is NP-Hard. This doesn’t mean that it is in NP.

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

Define the language CLIQUE.
To what class does it belong?
How is this proven?

A

CLIQUE also belongs to NPC

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

What is the language IS?
To what class does it belong?

A

Proof by reduction from CLIQUE

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

What is the language VC?
To what class does it belong?

A

Proof by reduction from IS.

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

What is the language DS?
To what class does it belong?

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

What is the language SubsetSum?
To what class does it belong?

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

What are the 6 languages related to the notion of Hamiltonian paths?
To what class do they belong?

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

Please define the class coNP.

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

Define: A language L is coNP-Hard / coNP-Complete.

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

Give 2 examples of languages that are coNP-complete.

A
24
Q

Name languages in P

A
25
Q

Please name NP-complete languages

A
26
Q
A
27
Q
A
28
Q
A
29
Q
A
30
Q

Name a case in which there is definitely a mapping reduction between two languages.

A
31
Q
A
32
Q
A
33
Q

In what class is SAT-complement?
Why?

A

SAT-complement is in coNP-complete.
This is because SAT is NPC, and because of the following rule:

34
Q

If this unknown statement were true, what others would be true?

A
35
Q

How could you prove a language is in NP?

A

By providing a poly-time verifier for the language.

36
Q
A
37
Q

What is the difference between a vertex cover and a dominating set?

A
38
Q

Important Question:

A

The point is, as opposed to what I thought, this problem is easier, not harder, to solve than SAT which is NPC.

39
Q

Important Question:

Please detail the reduction from SAT that proves this.

A

Note!
1. One can’t just add variables with the values “True” or “False”. Instead, one can add new variables of the form xi and not(yi) and assign T to xi and F to yi.
2. in this case they proved the iff part of the reduction by showing: (if A than B) and also (if B than A), (as opposed to the normal way of (if A than B) and also (if not A then not B)).

40
Q
A
41
Q

let A be a language in P. When can we make a polynomial reduction to a language B?

A
42
Q
A
43
Q

Please define the language D-ST-EULPATH.

A

{(G,s,t) : G is a directed graph and there is a path from s to t.}
The language belongs to P.

44
Q

Please define the language:
SetCover

A

Belongs to NPC

45
Q

Define the Kleen star operation over a language L.

A

The Kleene star operation over L, denoted as L*, is defined as the set of all possible concatenations of zero or more strings from L, including the empty string ε.

46
Q

How is the proof built?

A

https://www.shulamitrachel.co.il/?ref=4009

47
Q

2017 moed A

A

Note the to make a = b is the same as:
a<-> b =
(a->b) AND (b->a) =
(NOT a OR b) AND (NOT b OR a)

47
Q
A

NP = coNP

48
Q

2018 Moed A

A
49
Q
A
50
Q

2022 Sem B Moed B

A
51
Q

What is the time complexity of Atm?

A

NP Hard

52
Q
A
53
Q

How can you build a function f for a reduction that gives a different f(x) based on if a certain TM does or does not accept a certain input?

A

Note how f returns a TM (M’) that runs a different TM (M) and then based on the result of the run - simulates a specific third TM (Mf).

54
Q
A

Note you don’t have to make up a language for L1, the theorem says such a language exists.

54
Q
A

Note how in this reduction we simply added to original graph** exactly what we needed.**
(The reduction simply adds a clique of size 2k made of new nodes).