Lecture 6 - Classes P and NP Flashcards

1
Q

What does the class P contain?

A

All decision problems that can be solved in polynomial time.

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

What does the class NP contain?

A

decision problems solvable in non-deterministic polynomial time-

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

What is a non-determinisitc algorithm?

A

an algorithm that can make non-determinisic choices i.e. it can guess, hence it gives different answers every time it is run

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

Is P contained within NP?

A

Yes, deterministic is just a special case of non-deterministic

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

containment?

A

P within NP, but NP not in P

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

Is the relationship between P and NP solved?

A

NO

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

What is a non-deterministic algorithm?

A

an algorithm with a non-deterministic choice

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

Is each execution of a NDA the same?

A

no

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

When does an NDA solve a problem? IS it always?

A

if there is some execution that return yes
or there is no execution that returns yes (which is no)

doesn’t always solve

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

How do we know an NDA ‘solves’ a problem in poly-time?

A

some exection for the instance returns yes when the number of steps is bounded by a polynomial in the input

no execution for that instance return yes for no

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

Are NDAs useful in practice?

A

No

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

Example of when NDA can be used?

A

In graph colouring to randomly select colours for each vertex and then check if the solution is valid.

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

What are the stages of NDAs?

A
  • make a guess (non deterministic)
  • check (in poly time and deterministic)
  • stop and return
How well did you know this?
1
Not at all
2
3
4
5
Perfectly