Download presentation
Presentation is loading. Please wait.
1
Computation Basics & NP-Completeness
박상준
2
컴퓨터로 문제풀기 Computational Efficiency? 컴퓨팅 How the Analyzing goes?
Problem Solving Running Time 함수 -> 기본적인 스텝의 수 How the Analyzing goes?
3
Insersion-Sort The running time of the algorithm is the sum of running times for each statements executed
4
Running time T(n) is expressed as an2+bn+c for constants a,b,c; it is thus a quadratic function of n.
5
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 ) ”
6
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
7
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
8
NP-Complete Problems
9
Hamiltonian cycles Graph G=(V,E) V:vertex(정점) E:edge(간선)
10
Traveling Salesman Problems (TSP)
11
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?
12
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}?
13
The Vertex-cover Problem
To find a vertex cover of minimum size in a given graph
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.