SlideShare a Scribd company logo
Name : Karan Jogi
Student Code : BWU/BTA/23/461
Roll Number : 23010332429
Registration Number : 23013002043
Section : H
Course Code : PCC-CSM404
Course Name : Formal Language and
Automata
BRAINWARE
Approximation Algorithms
01
What Are Approximation
Algorithms?
Approximation algorithms are algorithms designed to solve
problems that are not solvable in polynomial time for approximate
solutions. These problems are known as NP complete problems.
What Are NP Complete Problems?
NP-Complete Problems are a special class of computational problems in computer science that are
both:
• In NP: Their solutions can be verified in polynomial time.
• NP-hard: Every problem in NP can be reduced to them in polynomial time.
Performance ratio of Approximation
Algorithms
02
Performance ratio of Approximation
Algorithms
02
Performance
Ratios
The main idea behind calculating
the performance ratio of an approximation
algorithm, which is also called as
an approximation ratio, is to find how close
the approximate solution is to the optimal
solution.
The approximate ratio is represented
using (n) where n is the input size of the
algorithm, C is the near-optimal solution
obtained by the algorithm, C* is the optimal
solution for the problem. The algorithm has
an approximate ratio of (n) if and only if-
Examples of Approximation
Algorithms
03
Examples of Approximation Algorithms
Few popular examples of the
approximation algorithms are −
• Vertex Cover Algorithm
• Set Cover Problem
• Travelling Salesman Problem
(Approximation Approach)
• The Subset Sum Problem
RANDOMIZED Algorithms
04
What Are Randomized Algorithms?
Randomized algorithm is a different design approach taken
by the standard algorithms where few random bits are added
to a part of their logic.
Why Are they different?
They are different from deterministic algorithms; deterministic algorithms
follow a definite procedure to get the same output every time an input is
passed where randomized algorithms produce a different output every time
they are executed.
Classification of Randomized Algorithms
05
Classification
Randomized algorithms are classified
based on whether they have time
constraints as the random variable or
deterministic values.
Randomized
Algorithms
Las Vegas Monte Carlo
DIFFERENCE BETWEEN LAS VEGAS & MONTE CARLO
ALGORITHMS
06
Feature Las Vegas Algorithm Monte Carlo Algorithm
Correctness of Output Always correct
May produce incorrect
results
Runtime
Random (varies each
run)
Fixed or bounded
Use of Randomness
Affects performance
(speed)
Affects accuracy
Example
Randomized QuickSort
(with retries)
Monte Carlo integration,
randomized primality test
Guarantee
Guarantees correct
solution
Guarantees fast runtime
When to Use
When correctness is
essential
When speed is more
important and small
errors are tolerable
Examples of RANDOMIZED Algorithms
06
Examples of RANDOMIZED Algorithms
Few popular examples of the
randomized algorithms are −
• Randomized Quick Sort Algorithm
• Kargers Minimum Cut Algorithm
• Fisher-Yates Shuffle Algorithm
• The Subset Sum Problem
THANK YOU

More Related Content

PPTX
Lecture 1-cs648
PPTX
Lecture 1-cs648
PDF
Solution 3.
PPTX
Randomized Algorithm- Advanced Algorithm
PDF
Randomized Algorithm
PPTX
Algorithms Design
PPT
Introduction to algorithms and it's different types
PDF
P, NP, NP-Complete, and NP-Hard
Lecture 1-cs648
Lecture 1-cs648
Solution 3.
Randomized Algorithm- Advanced Algorithm
Randomized Algorithm
Algorithms Design
Introduction to algorithms and it's different types
P, NP, NP-Complete, and NP-Hard

Similar to Overview of Approximation and Randomized Algorithms KARAN 461.pptx (20)

PDF
Analysis and design of algorithms part 4
PPT
35 algorithm-types
PPT
35-algorithm-types.ppt
PPT
35 algorithm-types
PPT
algorithm-types.ppt
PPTX
Types of algorithms
PPT
44 randomized-algorithms
PPTX
DAA UNIT 3
PDF
Bt0080 fundamentals of algorithms1
PPT
Algorithm types
PDF
Approximation alogrithms
PDF
Algorithm Design and Analysis
PPT
Perform brute force
 
PPT
Randomized Algorithms
PPTX
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
PPTX
UNIT_I [Autosaved].pptx
PDF
Data Analysis and Algorithms Lecture 1: Introduction
PPTX
Undecidable Problems and Approximation Algorithms
Analysis and design of algorithms part 4
35 algorithm-types
35-algorithm-types.ppt
35 algorithm-types
algorithm-types.ppt
Types of algorithms
44 randomized-algorithms
DAA UNIT 3
Bt0080 fundamentals of algorithms1
Algorithm types
Approximation alogrithms
Algorithm Design and Analysis
Perform brute force
 
Randomized Algorithms
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
UNIT_I [Autosaved].pptx
Data Analysis and Algorithms Lecture 1: Introduction
Undecidable Problems and Approximation Algorithms
Ad

Recently uploaded (20)

PPTX
Lecture Notes Electrical Wiring System Components
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
OOP with Java - Java Introduction (Basics)
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Well-logging-methods_new................
PPTX
additive manufacturing of ss316l using mig welding
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
Welding lecture in detail for understanding
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPT
Project quality management in manufacturing
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Lecture Notes Electrical Wiring System Components
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
OOP with Java - Java Introduction (Basics)
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Well-logging-methods_new................
additive manufacturing of ss316l using mig welding
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Welding lecture in detail for understanding
UNIT-1 - COAL BASED THERMAL POWER PLANTS
bas. eng. economics group 4 presentation 1.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Sustainable Sites - Green Building Construction
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Operating System & Kernel Study Guide-1 - converted.pdf
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Project quality management in manufacturing
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Ad

Overview of Approximation and Randomized Algorithms KARAN 461.pptx

  • 1. Name : Karan Jogi Student Code : BWU/BTA/23/461 Roll Number : 23010332429 Registration Number : 23013002043 Section : H Course Code : PCC-CSM404 Course Name : Formal Language and Automata BRAINWARE
  • 3. What Are Approximation Algorithms? Approximation algorithms are algorithms designed to solve problems that are not solvable in polynomial time for approximate solutions. These problems are known as NP complete problems. What Are NP Complete Problems? NP-Complete Problems are a special class of computational problems in computer science that are both: • In NP: Their solutions can be verified in polynomial time. • NP-hard: Every problem in NP can be reduced to them in polynomial time.
  • 4. Performance ratio of Approximation Algorithms 02
  • 5. Performance ratio of Approximation Algorithms 02
  • 6. Performance Ratios The main idea behind calculating the performance ratio of an approximation algorithm, which is also called as an approximation ratio, is to find how close the approximate solution is to the optimal solution. The approximate ratio is represented using (n) where n is the input size of the algorithm, C is the near-optimal solution obtained by the algorithm, C* is the optimal solution for the problem. The algorithm has an approximate ratio of (n) if and only if-
  • 8. Examples of Approximation Algorithms Few popular examples of the approximation algorithms are − • Vertex Cover Algorithm • Set Cover Problem • Travelling Salesman Problem (Approximation Approach) • The Subset Sum Problem
  • 10. What Are Randomized Algorithms? Randomized algorithm is a different design approach taken by the standard algorithms where few random bits are added to a part of their logic. Why Are they different? They are different from deterministic algorithms; deterministic algorithms follow a definite procedure to get the same output every time an input is passed where randomized algorithms produce a different output every time they are executed.
  • 12. Classification Randomized algorithms are classified based on whether they have time constraints as the random variable or deterministic values. Randomized Algorithms Las Vegas Monte Carlo
  • 13. DIFFERENCE BETWEEN LAS VEGAS & MONTE CARLO ALGORITHMS 06
  • 14. Feature Las Vegas Algorithm Monte Carlo Algorithm Correctness of Output Always correct May produce incorrect results Runtime Random (varies each run) Fixed or bounded Use of Randomness Affects performance (speed) Affects accuracy Example Randomized QuickSort (with retries) Monte Carlo integration, randomized primality test Guarantee Guarantees correct solution Guarantees fast runtime When to Use When correctness is essential When speed is more important and small errors are tolerable
  • 15. Examples of RANDOMIZED Algorithms 06
  • 16. Examples of RANDOMIZED Algorithms Few popular examples of the randomized algorithms are − • Randomized Quick Sort Algorithm • Kargers Minimum Cut Algorithm • Fisher-Yates Shuffle Algorithm • The Subset Sum Problem

Editor's Notes

  • #3: Big text and subtitle. You can add graphic resources to the composition (photo or vector)
  • #6: Title and subtitle
  • #8: Big text and subtitle. You can add graphic resources to the composition (photo or vector)
  • #10: Big text and subtitle. You can add graphic resources to the composition (photo or vector)
  • #12: Title and subtitle
  • #14: Big text and subtitle. You can add graphic resources to the composition (photo or vector)
  • #16: Big text and subtitle. You can add graphic resources to the composition (photo or vector)