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.

24
Q

Name languages in P

25
Please name NP-complete languages
26
27
28
29
30
Name a case in which there is definitely a **mapping** reduction between two languages.
31
32
33
In what class is SAT-complement? Why?
SAT-complement is in coNP-complete. This is because SAT is NPC, and because of the following rule:
34
If this unknown statement were true, what others would be true?
35
How could you prove a language is in NP?
By providing a poly-time verifier for the language.
36
37
What is the difference between a vertex cover and a dominating set?
38
Important Question:
The point is, as opposed to what I thought, this problem is easier, not harder, to solve than SAT which is NPC.
39
Important Question: Please detail the reduction from SAT that proves this.
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
41
let A be a language in P. When can we make a polynomial reduction to a language B?
42
43
Please define the language D-ST-EULPATH.
{(G,s,t) : G is a directed graph and there is a path from s to t.} The language belongs to P.
44
Please define the language: SetCover
Belongs to NPC
45
Define the Kleen star operation over a language L.
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
How is the proof built?
## Footnote https://www.shulamitrachel.co.il/?ref=4009
47
## Footnote 2017 moed 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
NP = coNP
48
## Footnote 2018 Moed A
49
50
## Footnote 2022 Sem B Moed B
51
What is the time complexity of Atm?
NP **Hard**
52
53
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?
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
Note you don't have to make up a language for L1, the theorem says such a language exists.
54
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).