SlideShare a Scribd company logo
1 of 24
Randomized Algorithms
CS648
Lecture 1
1
Overview of the lecture
• What is a randomized algorithm ?
• Motivation
• The structure of the course
2
What is a randomized algorithm ?
3
Deterministic Algorithm
• The output as well as the running time are functions only of the input.
4
Algorithm
Input Output
Randomized Algorithm
• The output or the running time are functions of the input and random
bits chosen .
5
Algorithm
Input Output
Random bits
EXAMPLE 1 : APPROXIMATE MEDIAN
6
Approximate median
7
EXAMPLE 2 : RANDOMIZED QUICK SORT
8
9
10
11
Types of Randomized Algorithms
Randomized Las Vegas Algorithms:
• Output is always correct
• Running time is a random variable
Example: Randomized Quick Sort
Randomized Monte Carlo Algorithms:
• Output may be incorrect with some probability
• Running time is deterministic.
Example: Randomized algorithm for approximate median
12
MOTIVATION FOR
RANDOMIZED ALGORITHMS
13
“Randomized algorithm for a problem is usually simpler and
more efficient than its deterministic counterpart.”
14
Example 1: Sorting
15
Example 2: Smallest Enclosing circle
Problem definition: Given n points in a plane, compute the smallest radius circle
that encloses all n point.
Applications: Facility location problem
Best deterministic algorithm : [Megiddo, 1983]
• O(n) time complexity, too complex, uses advanced geometry
Randomized Las Vegas algorithm: [Welzl, 1991]
• Expected O(n) time complexity, too simple, uses elementary geometry
16
Example 3: minimum Cut
17
Example 4: Primality Testing
18
UNCERTAINTY ASSOCIATED WITH RANDOMIZED ALGORITHMS
IS IT REALLY A SERIOUS ISSUE ?
19
A real Fact
[A study by Microsoft in 2008]
20
Compare this probability with the failure (or exceeding
the running time) probability of various randomized
algorithms mentioned earlier.
COURSE STRUCTURE
21
Prerequisites
• Fundamentals of Data structures
• Fundamentals of the design and analysis of Algorithms
• Adequate programming skills (in C++)
• Elementary probability (12th standard)
• Ability to work hard
• Commitment to attend classes
22
Marks Breakup
Assignments: 40%
• Programming as well as theoretical.
• To be done in groups of 2.
Mid Semester Exam: 30%
End Semester Exam: 30%
Passing criteria:
• At least 25% marks in both the exam (Total 15 out of 60)
• If a student scores less than 50% marks in first mid semester exam, he/she
must attend all classes for the rest of the course.
23
Contact Details
Office: 307, Department of CSE
Office Hours:
– Every week day 12:30PM-1:00PM and 5:30PM-6:00PM
Course website will be maintained at moodle.cse.iitk.ac.in
24

More Related Content

What's hot

What's hot (18)

Algorithm Design Presentation
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design Presentation
 
Ic lecture6 architecture and algo
Ic lecture6 architecture and algoIc lecture6 architecture and algo
Ic lecture6 architecture and algo
 
03 algorithm properties
03 algorithm properties03 algorithm properties
03 algorithm properties
 
Architecture Algorithm Definition
Architecture Algorithm DefinitionArchitecture Algorithm Definition
Architecture Algorithm Definition
 
Lecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of AlgorithmsLecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of Algorithms
 
Algorithmic problem solving
Algorithmic problem solvingAlgorithmic problem solving
Algorithmic problem solving
 
Design & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture NotesDesign & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture Notes
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Daa presentation 97
Daa presentation 97Daa presentation 97
Daa presentation 97
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
#1 designandanalysis of algo
#1 designandanalysis of algo#1 designandanalysis of algo
#1 designandanalysis of algo
 
Notion of an algorithm
Notion of an algorithmNotion of an algorithm
Notion of an algorithm
 
Empirical analysis
Empirical analysisEmpirical analysis
Empirical analysis
 
Fundamentals of algorithms
Fundamentals of algorithmsFundamentals of algorithms
Fundamentals of algorithms
 
Types of algorithms
Types of algorithmsTypes of algorithms
Types of algorithms
 
COMPUTER PROGRAMMING UNIT 1 Lecture 4
COMPUTER PROGRAMMING UNIT 1 Lecture 4COMPUTER PROGRAMMING UNIT 1 Lecture 4
COMPUTER PROGRAMMING UNIT 1 Lecture 4
 
ADA complete notes
ADA complete notesADA complete notes
ADA complete notes
 
Aad introduction
Aad introductionAad introduction
Aad introduction
 

Similar to Lecture 1-cs648

Lecture 1-cs648
Lecture 1-cs648Lecture 1-cs648
Lecture 1-cs648Rajiv Omar
 
Algorithm and C code related to data structure
Algorithm and C code related to data structureAlgorithm and C code related to data structure
Algorithm and C code related to data structureSelf-Employed
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of AlgorithmsBulbul Agrawal
 
Algo_Lecture01.pptx
Algo_Lecture01.pptxAlgo_Lecture01.pptx
Algo_Lecture01.pptxShaistaRiaz4
 
Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]Muhammad Hammad Waseem
 
Chapter1.1 Introduction.ppt
Chapter1.1 Introduction.pptChapter1.1 Introduction.ppt
Chapter1.1 Introduction.pptTekle12
 
Chapter1.1 Introduction to design and analysis of algorithm.ppt
Chapter1.1 Introduction to design and analysis of algorithm.pptChapter1.1 Introduction to design and analysis of algorithm.ppt
Chapter1.1 Introduction to design and analysis of algorithm.pptTekle12
 
DAA 1 ppt.pptx
DAA 1 ppt.pptxDAA 1 ppt.pptx
DAA 1 ppt.pptxRAJESH S
 
DAA ppt.pptx
DAA ppt.pptxDAA ppt.pptx
DAA ppt.pptxRAJESH S
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxsatvikkushwaha1
 
Lecture01 algorithm analysis
Lecture01 algorithm analysisLecture01 algorithm analysis
Lecture01 algorithm analysisZara Nawaz
 
Chapter 14 software testing techniques
Chapter 14 software testing techniquesChapter 14 software testing techniques
Chapter 14 software testing techniquesSHREEHARI WADAWADAGI
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxSyed Zaid Irshad
 
Experimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles BakerExperimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles BakerDatabricks
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniquesFincy V.J
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.pptALIZAIB KHAN
 
INTRODUCTION TO ALGORITHM in MATHEMATICAL PROBLEM SOLVING
INTRODUCTION TO ALGORITHM in MATHEMATICAL PROBLEM SOLVINGINTRODUCTION TO ALGORITHM in MATHEMATICAL PROBLEM SOLVING
INTRODUCTION TO ALGORITHM in MATHEMATICAL PROBLEM SOLVINGSwastiSwagat
 
1_Introduction.pptx
1_Introduction.pptx1_Introduction.pptx
1_Introduction.pptxASVKVinayak
 

Similar to Lecture 1-cs648 (20)

Lecture 1-cs648
Lecture 1-cs648Lecture 1-cs648
Lecture 1-cs648
 
Algorithm and C code related to data structure
Algorithm and C code related to data structureAlgorithm and C code related to data structure
Algorithm and C code related to data structure
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of Algorithms
 
Algo_Lecture01.pptx
Algo_Lecture01.pptxAlgo_Lecture01.pptx
Algo_Lecture01.pptx
 
Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]
 
Chapter1.1 Introduction.ppt
Chapter1.1 Introduction.pptChapter1.1 Introduction.ppt
Chapter1.1 Introduction.ppt
 
Chapter1.1 Introduction to design and analysis of algorithm.ppt
Chapter1.1 Introduction to design and analysis of algorithm.pptChapter1.1 Introduction to design and analysis of algorithm.ppt
Chapter1.1 Introduction to design and analysis of algorithm.ppt
 
DAA 1 ppt.pptx
DAA 1 ppt.pptxDAA 1 ppt.pptx
DAA 1 ppt.pptx
 
DAA ppt.pptx
DAA ppt.pptxDAA ppt.pptx
DAA ppt.pptx
 
Algorithm Design and Analysis
Algorithm Design and AnalysisAlgorithm Design and Analysis
Algorithm Design and Analysis
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptx
 
Lecture01 algorithm analysis
Lecture01 algorithm analysisLecture01 algorithm analysis
Lecture01 algorithm analysis
 
Chapter 14 software testing techniques
Chapter 14 software testing techniquesChapter 14 software testing techniques
Chapter 14 software testing techniques
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Experimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles BakerExperimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles Baker
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.ppt
 
Unit 2 algorithm
Unit   2 algorithmUnit   2 algorithm
Unit 2 algorithm
 
INTRODUCTION TO ALGORITHM in MATHEMATICAL PROBLEM SOLVING
INTRODUCTION TO ALGORITHM in MATHEMATICAL PROBLEM SOLVINGINTRODUCTION TO ALGORITHM in MATHEMATICAL PROBLEM SOLVING
INTRODUCTION TO ALGORITHM in MATHEMATICAL PROBLEM SOLVING
 
1_Introduction.pptx
1_Introduction.pptx1_Introduction.pptx
1_Introduction.pptx
 

More from Anshul Yadav

Lecture 14-cs648-2013
Lecture 14-cs648-2013Lecture 14-cs648-2013
Lecture 14-cs648-2013Anshul Yadav
 
Theoretical assign-2-hints
Theoretical assign-2-hintsTheoretical assign-2-hints
Theoretical assign-2-hintsAnshul Yadav
 
Lecture 12-cs648-2013 Randomized Algorithms
Lecture 12-cs648-2013 Randomized AlgorithmsLecture 12-cs648-2013 Randomized Algorithms
Lecture 12-cs648-2013 Randomized AlgorithmsAnshul Yadav
 
Lecture 11-cs648-2013 Randomized Algorithms
Lecture 11-cs648-2013 Randomized AlgorithmsLecture 11-cs648-2013 Randomized Algorithms
Lecture 11-cs648-2013 Randomized AlgorithmsAnshul Yadav
 
Lecture 10-cs648=2013 Randomized Algorithms
Lecture 10-cs648=2013 Randomized AlgorithmsLecture 10-cs648=2013 Randomized Algorithms
Lecture 10-cs648=2013 Randomized AlgorithmsAnshul Yadav
 
Lecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized AlgorithmsLecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized AlgorithmsAnshul Yadav
 
Lecture 5-cs648 Randomized Algorithms
Lecture 5-cs648 Randomized AlgorithmsLecture 5-cs648 Randomized Algorithms
Lecture 5-cs648 Randomized AlgorithmsAnshul Yadav
 
Lecture 4-cs648 Randomized Algorithms
Lecture 4-cs648 Randomized AlgorithmsLecture 4-cs648 Randomized Algorithms
Lecture 4-cs648 Randomized AlgorithmsAnshul Yadav
 
Lecture 3-cs648 Randomized Algorithms
Lecture 3-cs648 Randomized AlgorithmsLecture 3-cs648 Randomized Algorithms
Lecture 3-cs648 Randomized AlgorithmsAnshul Yadav
 
Lecture 2-cs648 Randomized Algorithms
Lecture 2-cs648 Randomized AlgorithmsLecture 2-cs648 Randomized Algorithms
Lecture 2-cs648 Randomized AlgorithmsAnshul Yadav
 
Lecture 7-cs648 Randomized Algorithms
Lecture 7-cs648 Randomized AlgorithmsLecture 7-cs648 Randomized Algorithms
Lecture 7-cs648 Randomized AlgorithmsAnshul Yadav
 

More from Anshul Yadav (16)

Lecture 19-cs648
Lecture 19-cs648Lecture 19-cs648
Lecture 19-cs648
 
Lecture 17-cs648
Lecture 17-cs648Lecture 17-cs648
Lecture 17-cs648
 
Lecture 14-cs648-2013
Lecture 14-cs648-2013Lecture 14-cs648-2013
Lecture 14-cs648-2013
 
Lecture 13-cs648
Lecture 13-cs648Lecture 13-cs648
Lecture 13-cs648
 
Lecture 18-cs648
Lecture 18-cs648Lecture 18-cs648
Lecture 18-cs648
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
Theoretical assign-2-hints
Theoretical assign-2-hintsTheoretical assign-2-hints
Theoretical assign-2-hints
 
Lecture 12-cs648-2013 Randomized Algorithms
Lecture 12-cs648-2013 Randomized AlgorithmsLecture 12-cs648-2013 Randomized Algorithms
Lecture 12-cs648-2013 Randomized Algorithms
 
Lecture 11-cs648-2013 Randomized Algorithms
Lecture 11-cs648-2013 Randomized AlgorithmsLecture 11-cs648-2013 Randomized Algorithms
Lecture 11-cs648-2013 Randomized Algorithms
 
Lecture 10-cs648=2013 Randomized Algorithms
Lecture 10-cs648=2013 Randomized AlgorithmsLecture 10-cs648=2013 Randomized Algorithms
Lecture 10-cs648=2013 Randomized Algorithms
 
Lecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized AlgorithmsLecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized Algorithms
 
Lecture 5-cs648 Randomized Algorithms
Lecture 5-cs648 Randomized AlgorithmsLecture 5-cs648 Randomized Algorithms
Lecture 5-cs648 Randomized Algorithms
 
Lecture 4-cs648 Randomized Algorithms
Lecture 4-cs648 Randomized AlgorithmsLecture 4-cs648 Randomized Algorithms
Lecture 4-cs648 Randomized Algorithms
 
Lecture 3-cs648 Randomized Algorithms
Lecture 3-cs648 Randomized AlgorithmsLecture 3-cs648 Randomized Algorithms
Lecture 3-cs648 Randomized Algorithms
 
Lecture 2-cs648 Randomized Algorithms
Lecture 2-cs648 Randomized AlgorithmsLecture 2-cs648 Randomized Algorithms
Lecture 2-cs648 Randomized Algorithms
 
Lecture 7-cs648 Randomized Algorithms
Lecture 7-cs648 Randomized AlgorithmsLecture 7-cs648 Randomized Algorithms
Lecture 7-cs648 Randomized Algorithms
 

Recently uploaded

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 

Recently uploaded (20)

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 

Lecture 1-cs648

  • 2. Overview of the lecture • What is a randomized algorithm ? • Motivation • The structure of the course 2
  • 3. What is a randomized algorithm ? 3
  • 4. Deterministic Algorithm • The output as well as the running time are functions only of the input. 4 Algorithm Input Output
  • 5. Randomized Algorithm • The output or the running time are functions of the input and random bits chosen . 5 Algorithm Input Output Random bits
  • 6. EXAMPLE 1 : APPROXIMATE MEDIAN 6
  • 8. EXAMPLE 2 : RANDOMIZED QUICK SORT 8
  • 9. 9
  • 10. 10
  • 11. 11
  • 12. Types of Randomized Algorithms Randomized Las Vegas Algorithms: • Output is always correct • Running time is a random variable Example: Randomized Quick Sort Randomized Monte Carlo Algorithms: • Output may be incorrect with some probability • Running time is deterministic. Example: Randomized algorithm for approximate median 12
  • 14. “Randomized algorithm for a problem is usually simpler and more efficient than its deterministic counterpart.” 14
  • 16. Example 2: Smallest Enclosing circle Problem definition: Given n points in a plane, compute the smallest radius circle that encloses all n point. Applications: Facility location problem Best deterministic algorithm : [Megiddo, 1983] • O(n) time complexity, too complex, uses advanced geometry Randomized Las Vegas algorithm: [Welzl, 1991] • Expected O(n) time complexity, too simple, uses elementary geometry 16
  • 18. Example 4: Primality Testing 18
  • 19. UNCERTAINTY ASSOCIATED WITH RANDOMIZED ALGORITHMS IS IT REALLY A SERIOUS ISSUE ? 19
  • 20. A real Fact [A study by Microsoft in 2008] 20 Compare this probability with the failure (or exceeding the running time) probability of various randomized algorithms mentioned earlier.
  • 22. Prerequisites • Fundamentals of Data structures • Fundamentals of the design and analysis of Algorithms • Adequate programming skills (in C++) • Elementary probability (12th standard) • Ability to work hard • Commitment to attend classes 22
  • 23. Marks Breakup Assignments: 40% • Programming as well as theoretical. • To be done in groups of 2. Mid Semester Exam: 30% End Semester Exam: 30% Passing criteria: • At least 25% marks in both the exam (Total 15 out of 60) • If a student scores less than 50% marks in first mid semester exam, he/she must attend all classes for the rest of the course. 23
  • 24. Contact Details Office: 307, Department of CSE Office Hours: – Every week day 12:30PM-1:00PM and 5:30PM-6:00PM Course website will be maintained at moodle.cse.iitk.ac.in 24