Week One Flashcards

1
Q

What is Big-O Notation?

A

Upper Bound

f(n) = O(g(n))

iff c, n0 such that whenever n >= n0,
we have f(n) <= cg(n)

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

What is Big-Ω Notation?

A

Lower Bound

f(n) = Ω(g(n))

iff g(n) = O(f(n))

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

What is Big-θ Notation?

A

Tight Bound

f(n) = θ(g(n))

iff f(n) = O(g(n)) and g(n) = O(f(n))

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

Explain the SAT problem

A

Prop Vars: Prop = {p0, p1, …}
Formulas: A, B ::= pi | ¬A | A v B | A ^ B

Assignments: α : Prop -> {0, 1}
SAT is the set of formulas A for which there is α(A) = 1.

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

What is the definition of decidability?

A

An algorithm A(x) decides a predicate/language L⊆{0, 1}* in time O(f(n)) if, for each instance x ∈ {0, 1}*, A(x) terminates after O(f(|x|)) basic steps of computation and accepts iff x ∈ L.

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

What is the definition of P?

A

P is the set of L ⊆ {0, 1}* such that there is some polynomial p(n) and an algorithm A(x) deciding L in O(p(n)) steps.

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

What is the definition of NP?

A

NP is the set of languages L ⊆ {0, 1}* for which there is a
polynomial-time algorithm A(x, y) and a polynomial p(n) such that:

x ∈ L ⇐⇒ ∃y.(|y| < p(|x|) and A(x, y) accepts)

For a given x ∈ L, we may call such a witness y the certificate (guessed) of acceptance.
The algorithm A(x, y) is the verifier.

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

What is the definition of a polynomial-time reduction?

A

A polynomial-time reduction from L to L′ is a function
f : {0, 1}* → {0, 1}* such that:

  • f is polynomial-time, i.e. we can compute f (x) in a number of steps polynomial in |x|.
  • x ∈ L ⇐⇒ f (x) ∈ L′.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the definition of NP-hardness?

A

L ⊆ {0, 1}* is NP-hard if for every L′ ∈ NP we have L′ ≤p L.

If, furthermore, L ∈ NP, then we say L is NP-complete.

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

What are the NP bounding principles?

A

if L ∈ NP and L′ ≤p L then L′ ∈ NP.

if L is NP-hard and L ≤p L′ then L′ is NP-hard.

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