SlideShare a Scribd company logo
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

Output

Input

Algorithm

• The output as well as the running time are functions only of the input.

4
Randomized Algorithm
Random bits
Output

Input

Algorithm

• The output or the running time are functions of the input and random
bits chosen .
5
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]

Compare this probability with the failure (or exceeding
the running time) probability of various randomized
algorithms mentioned earlier.

20
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

PPTX
Data structures - unit 1
PPT
Heapsort ppt
PPT
Design and Analysis of Algorithms
PPTX
Church Turing Thesis
PPTX
Mathematics Foundation Course for Machine Learning & AI By Eduonix
PPT
DESIGN AND ANALYSIS OF ALGORITHMS
PPT
Divide and conquer
PDF
Optimal binary search tree
Data structures - unit 1
Heapsort ppt
Design and Analysis of Algorithms
Church Turing Thesis
Mathematics Foundation Course for Machine Learning & AI By Eduonix
DESIGN AND ANALYSIS OF ALGORITHMS
Divide and conquer
Optimal binary search tree

What's hot (20)

PPT
Data Structure and Algorithms Heaps and Trees
PPT
Pattern matching
PPTX
Data Structure and Algorithms
PPTX
Feedforward neural network
PDF
Parse Tree
PDF
Lecture 2 role of algorithms in computing
PPT
Data Structures- Part5 recursion
PPT
Turing Machine
PDF
String matching, naive,
PPTX
resolution in the propositional calculus
PPTX
Pointers in C Language
PDF
Computer Fundamentals & Intro to C Programming module i
PPTX
Greedy Algorithms
PPT
Turing Machine
PDF
MERGE SORT ALGORITHMS DIVIDE AND CONQUER
PPTX
Algorithm Introduction
PPT
1 xml fundamentals
PPT
Normal-forms-for-Context-Free-Grammars.ppt
PPTX
Chomsky classification of Language
PPTX
Linear search-and-binary-search
Data Structure and Algorithms Heaps and Trees
Pattern matching
Data Structure and Algorithms
Feedforward neural network
Parse Tree
Lecture 2 role of algorithms in computing
Data Structures- Part5 recursion
Turing Machine
String matching, naive,
resolution in the propositional calculus
Pointers in C Language
Computer Fundamentals & Intro to C Programming module i
Greedy Algorithms
Turing Machine
MERGE SORT ALGORITHMS DIVIDE AND CONQUER
Algorithm Introduction
1 xml fundamentals
Normal-forms-for-Context-Free-Grammars.ppt
Chomsky classification of Language
Linear search-and-binary-search
Ad

Viewers also liked (20)

PPSX
Plate tectonics the oceans part iiic no text
PDF
Maharaja express brochure english
PDF
W1 bharrison wearabletechnology
PPTX
Lecture 20-cs648
PDF
الفتح العرفاني
PPT
PPSX
Plate tectonics part ii paleogeography promotional
PDF
Fidelity Life e-App: Quick Start Guide
PPSX
Plate tectonics the oceans part iiib pacific ocean
DOC
1. email template (doc version)
PDF
PPTX
Top soft chalk
PDF
PDF
Math code no_1
PPSX
Energy
PPTX
Digi-pack deconstruction
PPTX
music video deconstruction
PDF
Documentar
PPTX
Slide Presentasi Stars United Network
Plate tectonics the oceans part iiic no text
Maharaja express brochure english
W1 bharrison wearabletechnology
Lecture 20-cs648
الفتح العرفاني
Plate tectonics part ii paleogeography promotional
Fidelity Life e-App: Quick Start Guide
Plate tectonics the oceans part iiib pacific ocean
1. email template (doc version)
Top soft chalk
Math code no_1
Energy
Digi-pack deconstruction
music video deconstruction
Documentar
Slide Presentasi Stars United Network
Ad

Similar to Lecture 1-cs648 (20)

PPTX
Lecture 1-cs648
PDF
Randomized Algorithm
PPTX
Randomized Algorithm- Advanced Algorithm
PPT
44 randomized-algorithms
PPTX
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
PPT
Types of Algorithms.ppt
PDF
Analysis of Algorithms Syllabus
PDF
Algorithms
PDF
Design and analysis of computer algorithms
PPT
Randomized Algorithms
PPT
l01-intro (3).ppt
PPT
L01 intro-daa - ppt1
PPTX
a581a6a2cb5778045788f0b1d7da1c0236f.pptx
PPT
35 algorithm-types
PPT
35-algorithm-types.ppt
PPT
35 algorithm-types
PPT
algorithm-types.ppt
PPTX
CS8451 DAA Unit-I.pptx
PPTX
Types of algorithms
PPT
Algorithm types
Lecture 1-cs648
Randomized Algorithm
Randomized Algorithm- Advanced Algorithm
44 randomized-algorithms
Overview of Approximation and Randomized Algorithms KARAN 461.pptx
Types of Algorithms.ppt
Analysis of Algorithms Syllabus
Algorithms
Design and analysis of computer algorithms
Randomized Algorithms
l01-intro (3).ppt
L01 intro-daa - ppt1
a581a6a2cb5778045788f0b1d7da1c0236f.pptx
35 algorithm-types
35-algorithm-types.ppt
35 algorithm-types
algorithm-types.ppt
CS8451 DAA Unit-I.pptx
Types of algorithms
Algorithm types

More from Rajiv Omar (20)

PPTX
Lecture 6-cs345-2014
PPTX
Lecture 7-cs345-2014
PPTX
Lecture 14-2013
ODP
Lecture 2-cs648
PPTX
Lecture 15
PPTX
Lecture 16
PPTX
Lecture 13-cs648
PPTX
Lecture 14-cs648-2013
PPTX
Lecture 17-cs648
PPTX
Lecture 18-cs648
PPTX
Lecture 19-cs648
PPTX
Lecture 22-cs648
PPTX
Lecture 3-cs648
PPTX
Lecture 4-cs648
PPTX
Lecture 5-cs648
PPTX
Lecture 6-cs648
PPTX
Lecture 7-cs648
PPTX
Lecture 8-cs648-2013
PPTX
Lecture 9-cs648-2013
PPTX
Lecture 10-cs648=2013
Lecture 6-cs345-2014
Lecture 7-cs345-2014
Lecture 14-2013
Lecture 2-cs648
Lecture 15
Lecture 16
Lecture 13-cs648
Lecture 14-cs648-2013
Lecture 17-cs648
Lecture 18-cs648
Lecture 19-cs648
Lecture 22-cs648
Lecture 3-cs648
Lecture 4-cs648
Lecture 5-cs648
Lecture 6-cs648
Lecture 7-cs648
Lecture 8-cs648-2013
Lecture 9-cs648-2013
Lecture 10-cs648=2013

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Big Data Technologies - Introduction.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Electronic commerce courselecture one. Pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
A Presentation on Artificial Intelligence
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Group 1 Presentation -Planning and Decision Making .pptx
Assigned Numbers - 2025 - Bluetooth® Document
Big Data Technologies - Introduction.pptx
Unlocking AI with Model Context Protocol (MCP)
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectral efficient network and resource selection model in 5G networks
A comparative analysis of optical character recognition models for extracting...
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
Programs and apps: productivity, graphics, security and other tools
SOPHOS-XG Firewall Administrator PPT.pptx
Electronic commerce courselecture one. Pdf
Spectroscopy.pptx food analysis technology
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25-Week II
A Presentation on Artificial Intelligence
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Lecture 1-cs648