NP-Hard
❑NP-Hard problems(say X) can be solved if and only if there is a
NP-Complete problem(say Y) that can be reducible into X in
polynomial time.
❑To solve this problem, it do not have to be in NP .
❑Do not have to be a Decision problem.
❑Example: Halting problem, Vertex cover problem, etc.
Definition
Polynomial Time Algorithms
Linear Search n
Binary search Log(n)
Insertion sort
Merge sort nlog(n)
Matrix multiplication
Non-Polynomial Time Algorithms
0/1 knapsack problem
TSP
Sum of subset
Graph coloring
Hamiltonian Cycle
REDUCTION
Problem - A Problem - B
Input : IA
Input : IB
Algorithm - A Algorithm - B
Let’s Say algorithm for B can be used to solve problem A
REDUCTION
Let’s Say algorithm for B can be used to solve problem A
• Algorithm-B needs inputs in form IB, so we need to convert IA
into IB
• This function convert in polynomial time
Algorithm - B
ƒ
IA
Output
Algorithm - A ƒ (IA
) = IB
REDUCTION
Problem - A Problem - B
A≤ B
Problem A is Reducible to problem B, if there is function which convert
instance of A into instance of B and solution of that instance provide
solution to problem A.
Cost = Conversion Cost + algorithm B Cost
= Polynomial + Algorithm B Cost
Applications
• Approximate computing
• Configuration
• Cryptography
• Data mining
• Decision support
• Phylogenetics
• Planning
• Process monitoring and control
• Rosters or schedules
• Routing/vehicle routing
• Scheduling
NP-hard problems are often tackled with rules-based languages in areas including:
Data Mining
Data mining is the process of sorting through large data sets to identify
patterns and relationships that can help solve business problems
through data analysis.
Travelling salesman problem
The TSP is classified as NP-hard because it has no “quick” solution and
the complexity of calculating the best route will increase when you add
more destinations to the problem.
Routing/vehicle routing
Routing represents the entire process of planning delivery routes for
the vehicles in a fleet. The goal is to create the most cost-effective
route by minimizing the distance and traveled time necessary to reach
a set of planned stops.

NP Hard Presentation

  • 1.
    NP-Hard ❑NP-Hard problems(say X)can be solved if and only if there is a NP-Complete problem(say Y) that can be reducible into X in polynomial time. ❑To solve this problem, it do not have to be in NP . ❑Do not have to be a Decision problem. ❑Example: Halting problem, Vertex cover problem, etc. Definition
  • 2.
    Polynomial Time Algorithms LinearSearch n Binary search Log(n) Insertion sort Merge sort nlog(n) Matrix multiplication Non-Polynomial Time Algorithms 0/1 knapsack problem TSP Sum of subset Graph coloring Hamiltonian Cycle
  • 3.
    REDUCTION Problem - AProblem - B Input : IA Input : IB Algorithm - A Algorithm - B Let’s Say algorithm for B can be used to solve problem A
  • 4.
    REDUCTION Let’s Say algorithmfor B can be used to solve problem A • Algorithm-B needs inputs in form IB, so we need to convert IA into IB • This function convert in polynomial time Algorithm - B ƒ IA Output Algorithm - A ƒ (IA ) = IB
  • 5.
    REDUCTION Problem - AProblem - B A≤ B Problem A is Reducible to problem B, if there is function which convert instance of A into instance of B and solution of that instance provide solution to problem A. Cost = Conversion Cost + algorithm B Cost = Polynomial + Algorithm B Cost
  • 6.
    Applications • Approximate computing •Configuration • Cryptography • Data mining • Decision support • Phylogenetics • Planning • Process monitoring and control • Rosters or schedules • Routing/vehicle routing • Scheduling NP-hard problems are often tackled with rules-based languages in areas including:
  • 7.
    Data Mining Data miningis the process of sorting through large data sets to identify patterns and relationships that can help solve business problems through data analysis.
  • 8.
    Travelling salesman problem TheTSP is classified as NP-hard because it has no “quick” solution and the complexity of calculating the best route will increase when you add more destinations to the problem.
  • 9.
    Routing/vehicle routing Routing representsthe entire process of planning delivery routes for the vehicles in a fleet. The goal is to create the most cost-effective route by minimizing the distance and traveled time necessary to reach a set of planned stops.