computation basics & np-completeness

13
Computation Basics & NP-Completeness 박박박

Upload: charlotte-keon

Post on 31-Dec-2015

30 views

Category:

Documents


2 download

DESCRIPTION

Computation Basics & NP-Completeness. 박상준. 컴퓨터로 문제풀기. Computational Efficiency? 컴퓨팅 Problem Solving Running Time 함수 -> 기본적인 스텝의 수 How the Analyzing goes?. Insersion-Sort. The running time of the algorithm is the sum of running times for each statements executed. Running time. - PowerPoint PPT Presentation

TRANSCRIPT

Computation Basics &NP-Completeness

박상준

컴퓨터로 문제풀기• Computational Efficiency?• 컴퓨팅

– Problem Solving– Running Time– 함수 -> 기본적인 스텝의 수

• How the Analyzing goes?

Insersion-Sort

• The running time of the algorithm is the sum of running times for each statements executed

Running time

• T(n) is expressed as an2+bn+c for constants a,b,c; it is thus a quadratic function of n.

O-notation

• O(g(n))={f(n): there exist positive constants c and n0 such that 0 <=f(n)<= cg(n) for all n >= n0 }

• It is upper bound on the worst-case running time– an2+bn+c=O(n2 )

– We say “ The running time is O(n2 ) ”

Polynomial-time algorithms

• An algorithms that ,on inputs of size n their worst-case running time is O(nk) for some constant k.

• Complexity class P : the Set of decision problems that are solvable in polynomial time

NP-Completeness

• Although problem O(n100) looks intractable, there are very few practical problems that require such a high-degree polynomial time order

• P ≠ NP ? No one knows• For simplicity, the theory of NP-

completeness restricts attention to decision problems: those having a yes/no solution

NP-Complete Problems

Hamiltonian cycles

• Graph G=(V,E) V:vertex( 정점 ) E:edge( 간선 )

Traveling Salesman Problems (TSP)

Steiner Tree

• Instance: Graph G=(V,E), subset R⊆V, positive integer K <= |V|-1.

• Question: Is there a subtree of G that includes all the vertices of R and that contains on more than K edges?

The Maximum Clique Problem

• Clique : in undirected graph G=(V,E), a subset V’⊆V of vertices, each pair of which is connected by an edge in E

• Size of a clique is the number of vertices it contains.

• It is Exist, CLIQUE={<G,k>:G is a graph with a clique of size k}?

The Vertex-cover Problem

• To find a vertex cover of minimum size in a given graph