NP complete 1-18 Flashcards
Given a graph G=(V,E), find the chromatic number.
what type of proplem is that
Optimization problem
what is Chromatic number problem………
smallest number of colors needed to color a graph
what type of proplem is this :Given a graph G=(V,E) and an integer k, is G k-colorable?
decicion proplem
T or F:solving general problem is as hard as solving the decision problem version.
T
what is intractable proplems
They grow large, we are unable to solve them in reasonable time
T or F:Polynomial-Time Algorithm are intractable
F
O(1), O(log n) is polynmial time algorthim
T
The class P consists of….
all those problems that are solvable in polynomial time
Examples of P proplems
Sorting; merge sort, heapsort, insertion sort, etc.
Searching; linear or binary
Matrix multiplications
Single-source shortest path problem; Bellman-ford and Dijkstra algorithms
proplems that require exponential time 2ˆn to solve
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
diffrence in defntions between P and NP proplems
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.
NP stands for …….
nondeterministic polynomial
NP is the class of decision problems that are solvable in polynomial time with a ………… algorithm.
nondeterministic
Non-deterministic algorithm
Example-Search problem:
Check if X found in a set (1:n)?
p is ………. and……..
NP is …………. but…..
p easy to solve and easy to check
np is hrad to solve but easy to check