NP complete 1-18 Flashcards

1
Q

Given a graph G=(V,E), find the chromatic number.
what type of proplem is that

A

Optimization problem

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

what is Chromatic number problem………

A

smallest number of colors needed to color a graph

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

what type of proplem is this :Given a graph G=(V,E) and an integer k, is G k-colorable?

A

decicion proplem

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

T or F:solving general problem is as hard as solving the decision problem version.

A

T

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

what is intractable proplems

A

They grow large, we are unable to solve them in reasonable time

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

T or F:Polynomial-Time Algorithm are intractable

A

F

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

O(1), O(log n) is polynmial time algorthim

A

T

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

The class P consists of….

A

all those problems that are solvable in polynomial time

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

Examples of P proplems

A

Sorting; merge sort, heapsort, insertion sort, etc.
Searching; linear or binary
Matrix multiplications
Single-source shortest path problem; Bellman-ford and Dijkstra algorithms

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

proplems that require exponential time 2ˆn to solve

A

Satisfiability — 2^n
0/1 Knapsack — 2^n
Traveling SP (Traveling Salesman Problem) — 2^n
Sum of Subsets — 2^n
Graph Coloring — 2^n
Hamiltonian Cycle — 2^n

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

diffrence in defntions between P and NP proplems

A

The class P consists of all those problems that are solvable in polynomial time.
.
The class NP consists of all those problems that are verifiable in polynomial time.

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

NP stands for …….

A

nondeterministic polynomial

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

NP is the class of decision problems that
 are solvable in polynomial time with a ………… algorithm.

A

nondeterministic

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

Non-deterministic algorithm

A

Example-Search problem:
Check if X found in a set (1:n)?

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

p is ………. and……..
NP is …………. but…..

A

p easy to solve and easy to check
np is hrad to solve but easy to check

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

Open question since 1970

A

Is P = NP ?

17
Q

complete what written under this digram

A
18
Q

when dose problems becomes NP-complete (NPC)

A

A problem is in the class NP-complete (NPC) if it is in NP and is as “hard” as any problem in NP.
The hardest problems in NP.

19
Q

give examples of NP-complete proplems

A

3-SAT problem, Hamiltonian cycle problem, longest path problem, etc.

20
Q

A decision problem Q is NP-complete if:

A

Q ∈ NP
for all R ∈ NP, R ≤pQ

21
Q

How to Prove a Problem L is NP-Complete?

A
22
Q

NP-Hard problems

A

At least as hard as the hardest problems inNP.

23
Q

If all problems in NP are polynomial-time reducible to Q, then Q is …..

A

NP-Hard

24
Q

T or F: NP-Hard ∈ NP.

A

not neccarly

25
Q

Theorems proveing np-hard

A

If R≤pQ and R is NP-Hard, Q is also NP-Hard.

26
Q

NP-Hard and NP-complete problems in theory

A

If R ≤pQ and R is NP-Complete, then Q is NP-Hard.
If R ≤pQ and R is NP-Complete and Q is NP, then Q is NP-Complete.

27
Q

talk about a property in NP-complete

A

If any one NP-complete problem can be solved in polynomial time, then every problem in NP can also be solved similarly

28
Q

list three 2ˆn algorthims

A
29
Q
A
30
Q
A