Professional Documents
Culture Documents
CSE303: ADA M#5 (E-Tutorial#2) : Computational Complexity Reduction
CSE303: ADA M#5 (E-Tutorial#2) : Computational Complexity Reduction
CSE303: ADA M#5 (E-Tutorial#2) : Computational Complexity Reduction
CSE303: ADA
M#5 [E-Tutorial#2]
Computational Complexity
Reduction
By
Anant Kumar Jayswal
anantvns20@gmail.com
M.Tech.(CSE)-JNU
PhD*(CSE)-JNU
GATE(CS), UGC-NET(CS)
1
Amity School of Engineering & Technology (CSE)
Objectives
After completing this module#5, you will be able to:
1. Differentiate between types of Problem: Trackable Vs Intractable
and Decision Vs Optimization problems.
2. Polynomial Vs non-polynomial time complexity
3. Differentiate between Complexity classes: P, NP, NP-C and NP-Hard
problem
4. Understand NP-Complete Proofs
2
Amity School of Engineering & Technology (CSE)
Trackable Problem Vs Intractable Problem
3
Amity School of Engineering & Technology (CSE)
decision Problem Vs Optimization Problem
4
Amity School of Engineering & Technology (CSE)
cla
Class of problems
Problems
Solvable Unsolvable
Problems Problems
Halting Problem of TM
PCB (Post
Easy Hard
correspondence Problem
Problems Problems
P Class NP Class
Binary Search TSP
Quicksort, Merge Sort Tower of Hanoi
Dijkstra’s Algorithm Graph coloring
Hamiltonian Graph 5
Amity School of Engineering & Technology (CSE)
6
Amity School of Engineering & Technology (CSE)
P-Class
and NP-
Class of
Problems
A Problem for which we know the algorithm and can be solved in polynomial time is
called a P-class (or Polynomial -Class) problem, such as
Linear search, Binary Search, Merge sort, Matrix multiplication etc.
There are some problems which takes Polynomial time, and some problems takes
exponential time.
A problem which takes exponential time, or more is called NP-Class (Non-deterministic
Class) of problem.
Clearly
7
Amity School of Engineering & Technology (CSE)
8
Amity School of Engineering & Technology (CSE)
9
Amity School of Engineering & Technology (CSE)
10
Amity School of Engineering & Technology (CSE)
Relationship
between P,
NP, NP-Hard
and NP-C
Problems
Clearly
PNP ((means any problem that can be solved by deterministic
machine in polynomial time can also be solved by non-deterministic machine
in polynomial time).
• Open question: Does P = NP?
– P ≠ NP
11
Amity School of Engineering & Technology (CSE)
Polynomial
time
Reduction of
known NP-
Complete
Problems
12
Amity School of Engineering & Technology (CSE)
Thank you!
13