SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
NP COMPLETENESS & APPROXIMATION
Partha P Chakrabarti
Indian Institute of Technology Kharagpur
Algorithm Design by Recursion Transformation
1. Initial Solution
a. Recursive Definition – A set of Solutions
b. Inductive Proof of Correctness
c. Analysis Using Recurrence Relations
2. Exploration of Possibilities
a. Decomposition or Unfolding of the Recursion Tree
b. Examination of Structures formed
c. Re-composition Properties
3. Choice of Solution & Complexity Analysis
a. Balancing the Split, Choosing Paths
b. Identical Sub-problems
4. Data Structures & Complexity Analysis
a. Remembering Past Computation for Future
b. Space Complexity
5. Final Algorithm & Complexity Analysis
a. Traversal of the Recursion Tree
b. Pruning
6. Implementation
a. Available Memory, Time, Quality of Solution, etc
 Algorithms and Programs
 Pseudo-Code
 Algorithms + Data Structures = Programs
 Initial Solutions + Analysis + Solution
Refinement + Data Structures = Final
Algorithm
 Use of Recursive Definitions as Initial
Solutions
 Recurrence Equations for Proofs and
Analysis
 Solution Refinement through Recursion
Transformation and Traversal
 Data Structures for saving past
computation for future use
Overview of Algorithm Design
1. Initial Solution
a. Recursive Definition – A set of Solutions
b. Inductive Proof of Correctness
c. Analysis Using Recurrence Relations
2. Exploration of Possibilities
a. Decomposition or Unfolding of the Recursion Tree
b. Examination of Structures formed
c. Re-composition Properties
3. Choice of Solution & Complexity Analysis
a. Balancing the Split, Choosing Paths
b. Identical Sub-problems
4. Data Structures & Complexity Analysis
a. Remembering Past Computation for Future
b. Space Complexity
5. Final Algorithm & Complexity Analysis
a. Traversal of the Recursion Tree
b. Pruning
6. Implementation
a. Available Memory, Time, Quality of Solution, etc
1. Core Methods
a. Divide and Conquer
b. Greedy Algorithms
c. Dynamic Programming
d. Branch-and-Bound
e. Analysis using Recurrences
f. Advanced Data Structuring
2. Important Problems to be addressed
a. Sorting and Searching
b. Strings and Patterns
c. Trees and Graphs
d. Combinatorial Optimization
3. Complexity & Advanced Topics
a. Time and Space Complexity
b. Lower Bounds
c. Polynomial Time, NP-Hard
d. Parallelizability, Randomization
Complexity: Order of Growth: Graphically
Problem Complexity Vs Algorithm
Complexity
Decidable / Undecidable Problems
Hard Problems / Easy Problems
Algorithms and Lower Bounds
Optimal Algorithms
Polynomial / Exponential Algorithms
NP Compete or NP Hard Problems
Optimization and Decision Problems
Decision Problems and Languages
The Class P (Problems with Polynomial Time Solutions)
Computer Architecture, Sample Instruction Set
Deterministic Turing Machines and Class P
Tractable Problems with Polynomial Time Algorithms
Intractable Problems
 Evaluation of a Game instance of Chess
 Cryptarithmetic Problem
 Time-Table Scheduling
 Boolean Satisfiability
 Vertex Cover
 Graph Colouring / Independent Set /
Max Clique
 Subset Sum / Knapsack
 Hamiltonian Cycle / Travelling
Salesperson
 Multiprocessor Task Scheduling
 Cutting and Packing Problems
Non-Deterministic Turing Machines and Class NP
Choose Instruction:
Choose(1:n)
Revisiting the Coins Problem
Revisiting the Coins Problem: Non-Deterministic Choice
Other Examples of Problems in NP
 Boolean Satisfiability
 Vertex Cover
 Graph Colouring / Independent Set /
Max Clique
 Subset Sum / Knapsack
 Hamiltonian Cycle / Travelling
Salesperson
 Multiprocessor Task Scheduling
 Cutting and Packing Problems
Other Examples of Problems in NP
 Boolean Satisfiability
 Vertex Cover
 Graph Colouring / Independent Set /
Max Clique
 Subset Sum / Knapsack
 Hamiltonian Cycle / Travelling
Salesperson
 Multiprocessor Task Scheduling
 Cutting and Packing Problems
Other Examples of Problems in NP
 Boolean Satisfiability
 Vertex Cover
 Graph Colouring / Independent Set /
Max Clique
 Subset Sum / Knapsack
 Hamiltonian Cycle / Travelling
Salesperson
 Multiprocessor Task Scheduling
 Cutting and Packing Problems
Class NP and Polynomial Time Verifiability
Class NP and Intractable Problems
P and NP
NP-Complete and NP-Hard Problems
Relating Coins Problem and 2-Processor Scheduling
NP-Completeness
Cook-Levine Theorem
(Boolean Satisfiability is NP-Complete)
Karp’s Reductions
Proving Travelling Salesperson is NP-Complete
Proving Max-Clique is NP-Complete
What does NP-Completeness Signify?
Polynomial Time Approximation Algorithms
Given an NP-Complete
Optimization Problem, can we
develop an algorithm that works in
Polynomial Time and guarantees a
worst-case / average-case bound
on the solution quality?
A Polynomial Time Approximation Scheme (PTAS) is an algorithm
which takes an instance of an optimization problem and a
parameter ε > 0 and produces a solution that is within a factor 1 +
ε of being optimal (or 1 – ε for maximization problems). For
example, for the Euclidean traveling salesman problem, a PTAS
would produce a tour with length at most (1 + ε)L, with L being the
length of the shortest tour.
The running time of a PTAS is required to be polynomial in the
problem size for every fixed ε, but can be different for different ε.
Thus an algorithm running in time O(n1/ε) or even O(nexp(1/ε)) counts
as a PTAS.
An efficient polynomial-time approximation scheme or EPTAS, in
which the running time is required to be O(nc) for a
constant c independent of ε.
A fully polynomial-time approximation scheme or FPTAS, which
requires the algorithm to be polynomial in both the problem
size n and 1/ε.
2-Approximation Algorithm for Euclidean TSP
ε Approximation for
General TSP is NP-Hard
2-Approximation Algorithm for Knapsack
(1+ε) -Approximation Algorithm for Knapsack
Thank you
Any Questions?

Más contenido relacionado

Similar a FADML 09 PPC NP Completeness (1).pdf

Time and space complexity
Time and space complexityTime and space complexity
Time and space complexityAnkit Katiyar
 
Algorithms Design Patterns
Algorithms Design PatternsAlgorithms Design Patterns
Algorithms Design PatternsAshwin Shiv
 
Learning to Search Henry Kautz
Learning to Search Henry KautzLearning to Search Henry Kautz
Learning to Search Henry Kautzbutest
 
Learning to Search Henry Kautz
Learning to Search Henry KautzLearning to Search Henry Kautz
Learning to Search Henry Kautzbutest
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound techniqueishmecse13
 
Proving Lower Bounds to answer the P versus NP Question
Proving Lower Bounds to answer the P versus NP QuestionProving Lower Bounds to answer the P versus NP Question
Proving Lower Bounds to answer the P versus NP Questionguest383ed6
 
On the Numerical Solution of Differential Equations
On the Numerical Solution of Differential EquationsOn the Numerical Solution of Differential Equations
On the Numerical Solution of Differential EquationsKyle Poe
 
NP Hard Presentation
NP Hard Presentation NP Hard Presentation
NP Hard Presentation FoodieVlogger
 
Divide and Conquer Case Study
Divide and Conquer Case StudyDivide and Conquer Case Study
Divide and Conquer Case StudyKushagraChadha1
 
Limits of Computation
Limits of ComputationLimits of Computation
Limits of ComputationJoshua Reuben
 
The Limits of Computation
The Limits of ComputationThe Limits of Computation
The Limits of ComputationJoshua Reuben
 
P, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardP, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardAnimesh Chaturvedi
 

Similar a FADML 09 PPC NP Completeness (1).pdf (20)

Ds lesson plan
Ds lesson planDs lesson plan
Ds lesson plan
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 
Algorithms Design Patterns
Algorithms Design PatternsAlgorithms Design Patterns
Algorithms Design Patterns
 
Learning to Search Henry Kautz
Learning to Search Henry KautzLearning to Search Henry Kautz
Learning to Search Henry Kautz
 
Learning to Search Henry Kautz
Learning to Search Henry KautzLearning to Search Henry Kautz
Learning to Search Henry Kautz
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound technique
 
Particle filter
Particle filterParticle filter
Particle filter
 
Proving Lower Bounds to answer the P versus NP Question
Proving Lower Bounds to answer the P versus NP QuestionProving Lower Bounds to answer the P versus NP Question
Proving Lower Bounds to answer the P versus NP Question
 
On the Numerical Solution of Differential Equations
On the Numerical Solution of Differential EquationsOn the Numerical Solution of Differential Equations
On the Numerical Solution of Differential Equations
 
NP Hard Presentation
NP Hard Presentation NP Hard Presentation
NP Hard Presentation
 
Np completeness
Np completeness Np completeness
Np completeness
 
AA ppt9107
AA ppt9107AA ppt9107
AA ppt9107
 
Algoritmos aproximados
Algoritmos aproximadosAlgoritmos aproximados
Algoritmos aproximados
 
Divide and Conquer Case Study
Divide and Conquer Case StudyDivide and Conquer Case Study
Divide and Conquer Case Study
 
Limits of Computation
Limits of ComputationLimits of Computation
Limits of Computation
 
The Limits of Computation
The Limits of ComputationThe Limits of Computation
The Limits of Computation
 
Academic paper - Final
Academic paper - FinalAcademic paper - Final
Academic paper - Final
 
chap3.pdf
chap3.pdfchap3.pdf
chap3.pdf
 
P, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardP, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-Hard
 
Approximation algorithms
Approximation  algorithms Approximation  algorithms
Approximation algorithms
 

Último

Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...HyderabadDolls
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...kumargunjan9515
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...gajnagarg
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...gajnagarg
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...nirzagarg
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxchadhar227
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdfkhraisr
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...gajnagarg
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...HyderabadDolls
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...gajnagarg
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...Health
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubaikojalkojal131
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...HyderabadDolls
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.pptibrahimabdi22
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...gragchanchal546
 

Último (20)

Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
 

FADML 09 PPC NP Completeness (1).pdf

  • 1. NP COMPLETENESS & APPROXIMATION Partha P Chakrabarti Indian Institute of Technology Kharagpur
  • 2. Algorithm Design by Recursion Transformation 1. Initial Solution a. Recursive Definition – A set of Solutions b. Inductive Proof of Correctness c. Analysis Using Recurrence Relations 2. Exploration of Possibilities a. Decomposition or Unfolding of the Recursion Tree b. Examination of Structures formed c. Re-composition Properties 3. Choice of Solution & Complexity Analysis a. Balancing the Split, Choosing Paths b. Identical Sub-problems 4. Data Structures & Complexity Analysis a. Remembering Past Computation for Future b. Space Complexity 5. Final Algorithm & Complexity Analysis a. Traversal of the Recursion Tree b. Pruning 6. Implementation a. Available Memory, Time, Quality of Solution, etc  Algorithms and Programs  Pseudo-Code  Algorithms + Data Structures = Programs  Initial Solutions + Analysis + Solution Refinement + Data Structures = Final Algorithm  Use of Recursive Definitions as Initial Solutions  Recurrence Equations for Proofs and Analysis  Solution Refinement through Recursion Transformation and Traversal  Data Structures for saving past computation for future use
  • 3. Overview of Algorithm Design 1. Initial Solution a. Recursive Definition – A set of Solutions b. Inductive Proof of Correctness c. Analysis Using Recurrence Relations 2. Exploration of Possibilities a. Decomposition or Unfolding of the Recursion Tree b. Examination of Structures formed c. Re-composition Properties 3. Choice of Solution & Complexity Analysis a. Balancing the Split, Choosing Paths b. Identical Sub-problems 4. Data Structures & Complexity Analysis a. Remembering Past Computation for Future b. Space Complexity 5. Final Algorithm & Complexity Analysis a. Traversal of the Recursion Tree b. Pruning 6. Implementation a. Available Memory, Time, Quality of Solution, etc 1. Core Methods a. Divide and Conquer b. Greedy Algorithms c. Dynamic Programming d. Branch-and-Bound e. Analysis using Recurrences f. Advanced Data Structuring 2. Important Problems to be addressed a. Sorting and Searching b. Strings and Patterns c. Trees and Graphs d. Combinatorial Optimization 3. Complexity & Advanced Topics a. Time and Space Complexity b. Lower Bounds c. Polynomial Time, NP-Hard d. Parallelizability, Randomization
  • 4. Complexity: Order of Growth: Graphically Problem Complexity Vs Algorithm Complexity Decidable / Undecidable Problems Hard Problems / Easy Problems Algorithms and Lower Bounds Optimal Algorithms Polynomial / Exponential Algorithms NP Compete or NP Hard Problems
  • 7. The Class P (Problems with Polynomial Time Solutions)
  • 10. Tractable Problems with Polynomial Time Algorithms
  • 11. Intractable Problems  Evaluation of a Game instance of Chess  Cryptarithmetic Problem  Time-Table Scheduling  Boolean Satisfiability  Vertex Cover  Graph Colouring / Independent Set / Max Clique  Subset Sum / Knapsack  Hamiltonian Cycle / Travelling Salesperson  Multiprocessor Task Scheduling  Cutting and Packing Problems
  • 12. Non-Deterministic Turing Machines and Class NP Choose Instruction: Choose(1:n)
  • 14. Revisiting the Coins Problem: Non-Deterministic Choice
  • 15.
  • 16. Other Examples of Problems in NP  Boolean Satisfiability  Vertex Cover  Graph Colouring / Independent Set / Max Clique  Subset Sum / Knapsack  Hamiltonian Cycle / Travelling Salesperson  Multiprocessor Task Scheduling  Cutting and Packing Problems
  • 17. Other Examples of Problems in NP  Boolean Satisfiability  Vertex Cover  Graph Colouring / Independent Set / Max Clique  Subset Sum / Knapsack  Hamiltonian Cycle / Travelling Salesperson  Multiprocessor Task Scheduling  Cutting and Packing Problems
  • 18. Other Examples of Problems in NP  Boolean Satisfiability  Vertex Cover  Graph Colouring / Independent Set / Max Clique  Subset Sum / Knapsack  Hamiltonian Cycle / Travelling Salesperson  Multiprocessor Task Scheduling  Cutting and Packing Problems
  • 19. Class NP and Polynomial Time Verifiability
  • 20. Class NP and Intractable Problems
  • 23. Relating Coins Problem and 2-Processor Scheduling
  • 28. Proving Max-Clique is NP-Complete
  • 30. Polynomial Time Approximation Algorithms Given an NP-Complete Optimization Problem, can we develop an algorithm that works in Polynomial Time and guarantees a worst-case / average-case bound on the solution quality? A Polynomial Time Approximation Scheme (PTAS) is an algorithm which takes an instance of an optimization problem and a parameter ε > 0 and produces a solution that is within a factor 1 + ε of being optimal (or 1 – ε for maximization problems). For example, for the Euclidean traveling salesman problem, a PTAS would produce a tour with length at most (1 + ε)L, with L being the length of the shortest tour. The running time of a PTAS is required to be polynomial in the problem size for every fixed ε, but can be different for different ε. Thus an algorithm running in time O(n1/ε) or even O(nexp(1/ε)) counts as a PTAS. An efficient polynomial-time approximation scheme or EPTAS, in which the running time is required to be O(nc) for a constant c independent of ε. A fully polynomial-time approximation scheme or FPTAS, which requires the algorithm to be polynomial in both the problem size n and 1/ε.
  • 31. 2-Approximation Algorithm for Euclidean TSP ε Approximation for General TSP is NP-Hard