SlideShare a Scribd company logo
1 of 32
Randomized Algorithms
CS648

Lecture 10
Random Sampling
part-II
(To find a subset with desired property)
1
Overview
•
•
•
•

There is a huge list (1 million) of blood donors.
Unfortunately the blood group information is missing at present.
We need a donor with blood group O+.
What to do ?

Solution: (Select a random subset of donors.)
Repeat until we get a donor of blood group O+.
{ Pick phone number of a donor randomly uniformly
Call him to ask his Blood group.
}
Random Sampling

• Suppose there is a computational problem where we require to find a
subset with some desired properties.
• Unfortunately, computing such a set deterministically may take huge time.
• Random sampling carried out suitably may produce a subset with the
desired property with some probability.
RANDOMIZED ALGORITHM FOR
BPWM PROBLEM
Integer Product of Matrices
1

0

0

1

0

1

0

1

0

0

2

1

2

0

0

1

0

0

0

1

0

1

1

0

1

2

0

1

0

0

0

0

1

0

0

1

1

1

1

0

1

1

1

1

0

0

1

0

1

0

1

1

1

0

0

1

2

2

0

1

1

1

0

1

0

1

0

0

1

0

2

2

3 0
D

1

A

B
Boolean Product of Matrices
1

0

0

1

0

1

0

1

0

0

1

1

1

0

0

1

0

0

0

1

0

1

1

0

1

1

0

1

0

0

0

0

1

0

0

1

1

1

1

0

1

1

1

1

0

0

1

0

1

0

1

1

1

0

0

1

1

1

0

1

1

1

0

1

0

1

0

0

1

0

1

1

1
C

0

1

A

B
Boolean Product of Matrices
1

0

0

1

0

1

0

1

0

0

1

1

1

0

0

1

0

0

0

1

0

1

1

0

1

1

0

1

0

0

0

0

1

0

0

1

1

1

1

0

1

1

1

1

0

0

1

0

1

0

1

1

1

0

0

1

1

1

0

1

1

1

0

1

0

1

0

0

1

0

1

1

1
C

0

1

A

B
Boolean Product Witness Matrix (BPWM)
MOTIVATION FOR BPWM
All Pairs Shortest Paths (APSP)
All Pairs Shortest Paths (APSP)
Students having interest in algorithms are
strongly advised to study this novel
algorithm from Motwani-Raghwan book
or the original journal version. (This is, of
course, not part of the syllabus for CS648)
RANDOMIZED ALGORITHM FOR
BPWM
Boolean Product Witness Matrix (BPWM)
Boolean Product of Matrices
1

0

0

1

0

1

0

1

0

0

1

1

1

0

0

1

0

0

0

1

0

1

1

0

1

1

0

1

0

0

0

0

1

0

0

1

1

1

1

0

1

1

1

1

0

0

1

0

1

0

1

1

1

0

0

1

1

1

0

1

1

1

0

1

0

1

0

0

1

0

1

1

1
C

0

1

2

1

2

0

0

2

0

1

0

0

1

1

1

1

0

1

2

2

0

1

2

2

3

0

1

A
Look carefully at the integer
product matrix D. Does it
have any thing to do with
witnesses.

B

D
Boolean Product of Matrices
1

0

0

1

0

1

0

1

0

0

2

1

2

0

0

1

0

0

0

1

0

1

1

0

1

2

0

1

0

0

0

0

1

0

0

1

1

1

1

0

1

1

1

1

0

0

1

0

1

0

1

1

1

0

0

1

2

2

0

1

1

1

0

1

0

1

0

0

1

0

2

2

3 0
D

1

A

B
Boolean Product of Matrices
1 2 3 4 5
⨯ ⨯ ⨯ ⨯ ⨯
1

0

0

1

0

1

0

1

0

0

2

1

2

0

0

1

0

0

0

1

0

1

1

0

1

2

0

1

0

0

0

0

1

0

0

1

1

1

1

0

1

1

1

1

0

0

1

0

1

0

1

1

1

0

0

1

2

2

0

1

1

1

0

1

0

1

0

0

1

0

2

2

3 0
D

1

A
There is a way to manipulate A so
that D will store a witness for all
those pairs which have singleton
witness. Can you guess ?

B
Boolean Product of Matrices
1 2 3 4 5
⨯ ⨯ ⨯ ⨯ ⨯
1

0

0

1

0

1

0

1

0

0

2

4

2

0

0

1

0

0

0

1

0

1

1

0

1

2

0

1

0

0

0

0

1

0

0

1

1

1

1

0

3

3

3

3

0

0

1

0

1

0

1

1

1

0

0

2

2

2

0

2

1

1

0

1

0

1

0

0

1

0

2

2

3 0
D

2

A

B
Boolean Product of Matrices
1 2 3 4 5
⨯ ⨯ ⨯ ⨯ ⨯
1

0

0

1

0

1

0

1

0

0

5

4

5

0

0

1

0

0

0

1

0

1

1

0

1

6

0

1

0

0

0

0

1

0

0

1

1

1

1

0

3

3

3

3

0

0

1

0

1

0

1

1

1

0

0

2

6

6

0

2

1

1

0

1

0

1

0

0

1

0

5

6

7 0
D

2

A

B
Algorithm for Computing Singleton Witnesses
Algorithm Design for BPWM
1 2 3 4

…

n

⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯
1
1
0
1
1

0

1

1

1

0

0

1

0

1

1

0
1
1
0
0

A

B
1 2 3 4

…

n

⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯
1
1
0
1
1

0

1

1

1

0

0

1

0

1

1

0
1
1
0
0

A

B
1 2 3 4 5

…

n-1 n

⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯
1
1
0
1
1

0

1

1

1

0

0

1

0

1

1

0
1
1
0
0

A

B
0 2 3 0 5

…

n-1 0

⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯
1
1
0
1
1

0

1

1

1

0

0

1

0

1

1

0
1
1
0
0

A

B
No idea!
Let us ask the following related but easier
question.
Conclusion

A sketch of the solution for Question 1 was given in the class. The
students are encouraged to work out the exact details. The solution
will be presented in the beginning of next lecture class.

More Related Content

Viewers also liked

โครงงานคอมพิวเตอร์
โครงงานคอมพิวเตอร์โครงงานคอมพิวเตอร์
โครงงานคอมพิวเตอร์Sudarat Houiluek
 
be quran walking among people
 be quran walking among people be quran walking among people
be quran walking among peopleHassan Elagouz
 
Convenio de colaboracion para la ejecucion del programa de reforestacion en ...
Convenio  de colaboracion para la ejecucion del programa de reforestacion en ...Convenio  de colaboracion para la ejecucion del programa de reforestacion en ...
Convenio de colaboracion para la ejecucion del programa de reforestacion en ...Federico De Palma Medrano
 
رسالة الصالحين للشيخ فوزى محمد أبوزيد
 رسالة الصالحين للشيخ فوزى محمد أبوزيد رسالة الصالحين للشيخ فوزى محمد أبوزيد
رسالة الصالحين للشيخ فوزى محمد أبوزيدHassan Elagouz
 
Prezi -bulldogs
Prezi -bulldogsPrezi -bulldogs
Prezi -bulldogshbrown5018
 
Presentation1
Presentation1Presentation1
Presentation1Sanusia1
 
نوافل المقربين
نوافل المقربيننوافل المقربين
نوافل المقربينHassan Elagouz
 
الولاية والأولياء لفضيلة الشيخ فوزى محمد أبوزيد
الولاية والأولياء لفضيلة الشيخ فوزى محمد أبوزيد الولاية والأولياء لفضيلة الشيخ فوزى محمد أبوزيد
الولاية والأولياء لفضيلة الشيخ فوزى محمد أبوزيد Hassan Elagouz
 
كيف تكون داعيا إلى الله على بصيرة
كيف تكون داعيا إلى الله على بصيرةكيف تكون داعيا إلى الله على بصيرة
كيف تكون داعيا إلى الله على بصيرةHassan Elagouz
 
Handbag hangers-wholesale
Handbag hangers-wholesaleHandbag hangers-wholesale
Handbag hangers-wholesalemybaghanger
 
الصيام شريعة وحقيقة للشيخ فوزي محمد أبوزيد
الصيام شريعة وحقيقة للشيخ فوزي محمد أبوزيدالصيام شريعة وحقيقة للشيخ فوزي محمد أبوزيد
الصيام شريعة وحقيقة للشيخ فوزي محمد أبوزيدHassan Elagouz
 

Viewers also liked (18)

โครงงานคอมพิวเตอร์
โครงงานคอมพิวเตอร์โครงงานคอมพิวเตอร์
โครงงานคอมพิวเตอร์
 
be quran walking among people
 be quran walking among people be quran walking among people
be quran walking among people
 
Convenio de colaboracion para la ejecucion del programa de reforestacion en ...
Convenio  de colaboracion para la ejecucion del programa de reforestacion en ...Convenio  de colaboracion para la ejecucion del programa de reforestacion en ...
Convenio de colaboracion para la ejecucion del programa de reforestacion en ...
 
رسالة الصالحين للشيخ فوزى محمد أبوزيد
 رسالة الصالحين للشيخ فوزى محمد أبوزيد رسالة الصالحين للشيخ فوزى محمد أبوزيد
رسالة الصالحين للشيخ فوزى محمد أبوزيد
 
Prezi -bulldogs
Prezi -bulldogsPrezi -bulldogs
Prezi -bulldogs
 
Proposal ptk
Proposal ptkProposal ptk
Proposal ptk
 
Presentation1
Presentation1Presentation1
Presentation1
 
Micai13 turdus migratorius (2)
Micai13   turdus migratorius (2)Micai13   turdus migratorius (2)
Micai13 turdus migratorius (2)
 
نوافل المقربين
نوافل المقربيننوافل المقربين
نوافل المقربين
 
Ghid util
Ghid utilGhid util
Ghid util
 
الولاية والأولياء لفضيلة الشيخ فوزى محمد أبوزيد
الولاية والأولياء لفضيلة الشيخ فوزى محمد أبوزيد الولاية والأولياء لفضيلة الشيخ فوزى محمد أبوزيد
الولاية والأولياء لفضيلة الشيخ فوزى محمد أبوزيد
 
Biodiesel no Brasil
Biodiesel no BrasilBiodiesel no Brasil
Biodiesel no Brasil
 
كيف تكون داعيا إلى الله على بصيرة
كيف تكون داعيا إلى الله على بصيرةكيف تكون داعيا إلى الله على بصيرة
كيف تكون داعيا إلى الله على بصيرة
 
Tabel accize oug 8
Tabel accize oug 8Tabel accize oug 8
Tabel accize oug 8
 
Physics 1
Physics 1Physics 1
Physics 1
 
Social media project
Social media projectSocial media project
Social media project
 
Handbag hangers-wholesale
Handbag hangers-wholesaleHandbag hangers-wholesale
Handbag hangers-wholesale
 
الصيام شريعة وحقيقة للشيخ فوزي محمد أبوزيد
الصيام شريعة وحقيقة للشيخ فوزي محمد أبوزيدالصيام شريعة وحقيقة للشيخ فوزي محمد أبوزيد
الصيام شريعة وحقيقة للشيخ فوزي محمد أبوزيد
 

Similar to Lecture 10-cs648=2013

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 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptxLecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptxNatKell
 
Transformers ASR.pdf
Transformers ASR.pdfTransformers ASR.pdf
Transformers ASR.pdfssuser8025b21
 
Exploiting Worker Correlation for Label Aggregation in Crowdsourcing
Exploiting Worker Correlation for Label Aggregation in CrowdsourcingExploiting Worker Correlation for Label Aggregation in Crowdsourcing
Exploiting Worker Correlation for Label Aggregation in CrowdsourcingYuanLi589586
 
Digital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdfDigital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdf022BELEHemant
 
Tutorial 9 (bloom filters)
Tutorial 9 (bloom filters)Tutorial 9 (bloom filters)
Tutorial 9 (bloom filters)Kira
 
SPIE Conference V3.0
SPIE Conference V3.0SPIE Conference V3.0
SPIE Conference V3.0Robert Fry
 
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational CircuitsCOMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational CircuitsVanitha Chandru
 
OpenCL applications in genomics
OpenCL applications in genomicsOpenCL applications in genomics
OpenCL applications in genomicsUSC
 
Quantum computing for CS students: the unitary circuit model
Quantum computing for CS students: the unitary circuit modelQuantum computing for CS students: the unitary circuit model
Quantum computing for CS students: the unitary circuit modelBruno Fedrici, PhD
 
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.pptArtificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.pptAnonymous9etQKwW
 
Deep learning study 2
Deep learning study 2Deep learning study 2
Deep learning study 2San Kim
 
Lecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxLecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxAzeenShahid
 
A new approach to ward off error propagation effect of aes –
A new approach to ward off error propagation effect of aes –A new approach to ward off error propagation effect of aes –
A new approach to ward off error propagation effect of aes –Alexander Decker
 
Encrypting with entanglement matthias christandl
Encrypting with entanglement matthias christandlEncrypting with entanglement matthias christandl
Encrypting with entanglement matthias christandlwtyru1989
 

Similar to Lecture 10-cs648=2013 (20)

Lecture 10-cs648=2013 Randomized Algorithms
Lecture 10-cs648=2013 Randomized AlgorithmsLecture 10-cs648=2013 Randomized Algorithms
Lecture 10-cs648=2013 Randomized Algorithms
 
Data Mining Lecture_4.pptx
Data Mining Lecture_4.pptxData Mining Lecture_4.pptx
Data Mining Lecture_4.pptx
 
Lecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptxLecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptx
 
Transformers ASR.pdf
Transformers ASR.pdfTransformers ASR.pdf
Transformers ASR.pdf
 
Exploiting Worker Correlation for Label Aggregation in Crowdsourcing
Exploiting Worker Correlation for Label Aggregation in CrowdsourcingExploiting Worker Correlation for Label Aggregation in Crowdsourcing
Exploiting Worker Correlation for Label Aggregation in Crowdsourcing
 
Elisa basics[2]
Elisa basics[2]Elisa basics[2]
Elisa basics[2]
 
Digital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdfDigital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdf
 
Tutorial 9 (bloom filters)
Tutorial 9 (bloom filters)Tutorial 9 (bloom filters)
Tutorial 9 (bloom filters)
 
02-gates-w.pptx
02-gates-w.pptx02-gates-w.pptx
02-gates-w.pptx
 
SPIE Conference V3.0
SPIE Conference V3.0SPIE Conference V3.0
SPIE Conference V3.0
 
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational CircuitsCOMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
 
23 gray codes
23 gray codes23 gray codes
23 gray codes
 
23 gray codes
23 gray codes23 gray codes
23 gray codes
 
OpenCL applications in genomics
OpenCL applications in genomicsOpenCL applications in genomics
OpenCL applications in genomics
 
Quantum computing for CS students: the unitary circuit model
Quantum computing for CS students: the unitary circuit modelQuantum computing for CS students: the unitary circuit model
Quantum computing for CS students: the unitary circuit model
 
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.pptArtificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
 
Deep learning study 2
Deep learning study 2Deep learning study 2
Deep learning study 2
 
Lecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxLecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptx
 
A new approach to ward off error propagation effect of aes –
A new approach to ward off error propagation effect of aes –A new approach to ward off error propagation effect of aes –
A new approach to ward off error propagation effect of aes –
 
Encrypting with entanglement matthias christandl
Encrypting with entanglement matthias christandlEncrypting with entanglement matthias christandl
Encrypting with entanglement matthias christandl
 

More from Rajiv Omar

Lecture 6-cs345-2014
Lecture 6-cs345-2014Lecture 6-cs345-2014
Lecture 6-cs345-2014Rajiv Omar
 
Lecture 7-cs345-2014
Lecture 7-cs345-2014Lecture 7-cs345-2014
Lecture 7-cs345-2014Rajiv Omar
 
Lecture 14-2013
Lecture 14-2013Lecture 14-2013
Lecture 14-2013Rajiv Omar
 
Lecture 2-cs648
Lecture 2-cs648Lecture 2-cs648
Lecture 2-cs648Rajiv Omar
 
Lecture 13-cs648
Lecture 13-cs648Lecture 13-cs648
Lecture 13-cs648Rajiv Omar
 
Lecture 14-cs648-2013
Lecture 14-cs648-2013Lecture 14-cs648-2013
Lecture 14-cs648-2013Rajiv Omar
 
Lecture 17-cs648
Lecture 17-cs648Lecture 17-cs648
Lecture 17-cs648Rajiv Omar
 
Lecture 18-cs648
Lecture 18-cs648Lecture 18-cs648
Lecture 18-cs648Rajiv Omar
 
Lecture 19-cs648
Lecture 19-cs648Lecture 19-cs648
Lecture 19-cs648Rajiv Omar
 
Lecture 20-cs648
Lecture 20-cs648Lecture 20-cs648
Lecture 20-cs648Rajiv Omar
 
Lecture 22-cs648
Lecture 22-cs648Lecture 22-cs648
Lecture 22-cs648Rajiv Omar
 
Lecture 3-cs648
Lecture 3-cs648Lecture 3-cs648
Lecture 3-cs648Rajiv Omar
 
Lecture 4-cs648
Lecture 4-cs648Lecture 4-cs648
Lecture 4-cs648Rajiv Omar
 
Lecture 5-cs648
Lecture 5-cs648Lecture 5-cs648
Lecture 5-cs648Rajiv Omar
 
Lecture 6-cs648
Lecture 6-cs648Lecture 6-cs648
Lecture 6-cs648Rajiv Omar
 
Lecture 7-cs648
Lecture 7-cs648Lecture 7-cs648
Lecture 7-cs648Rajiv Omar
 
Lecture 8-cs648-2013
Lecture 8-cs648-2013Lecture 8-cs648-2013
Lecture 8-cs648-2013Rajiv Omar
 
Lecture 9-cs648-2013
Lecture 9-cs648-2013Lecture 9-cs648-2013
Lecture 9-cs648-2013Rajiv Omar
 

More from Rajiv Omar (20)

Lecture 6-cs345-2014
Lecture 6-cs345-2014Lecture 6-cs345-2014
Lecture 6-cs345-2014
 
Lecture 7-cs345-2014
Lecture 7-cs345-2014Lecture 7-cs345-2014
Lecture 7-cs345-2014
 
Lecture 14-2013
Lecture 14-2013Lecture 14-2013
Lecture 14-2013
 
Lecture 2-cs648
Lecture 2-cs648Lecture 2-cs648
Lecture 2-cs648
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
Lecture 13-cs648
Lecture 13-cs648Lecture 13-cs648
Lecture 13-cs648
 
Lecture 14-cs648-2013
Lecture 14-cs648-2013Lecture 14-cs648-2013
Lecture 14-cs648-2013
 
Lecture 17-cs648
Lecture 17-cs648Lecture 17-cs648
Lecture 17-cs648
 
Lecture 18-cs648
Lecture 18-cs648Lecture 18-cs648
Lecture 18-cs648
 
Lecture 19-cs648
Lecture 19-cs648Lecture 19-cs648
Lecture 19-cs648
 
Lecture 20-cs648
Lecture 20-cs648Lecture 20-cs648
Lecture 20-cs648
 
Lecture 22-cs648
Lecture 22-cs648Lecture 22-cs648
Lecture 22-cs648
 
Lecture 3-cs648
Lecture 3-cs648Lecture 3-cs648
Lecture 3-cs648
 
Lecture 4-cs648
Lecture 4-cs648Lecture 4-cs648
Lecture 4-cs648
 
Lecture 5-cs648
Lecture 5-cs648Lecture 5-cs648
Lecture 5-cs648
 
Lecture 6-cs648
Lecture 6-cs648Lecture 6-cs648
Lecture 6-cs648
 
Lecture 7-cs648
Lecture 7-cs648Lecture 7-cs648
Lecture 7-cs648
 
Lecture 8-cs648-2013
Lecture 8-cs648-2013Lecture 8-cs648-2013
Lecture 8-cs648-2013
 
Lecture 9-cs648-2013
Lecture 9-cs648-2013Lecture 9-cs648-2013
Lecture 9-cs648-2013
 

Recently uploaded

Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesKeppelCorporation
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Servicecallgirls2057
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCRashishs7044
 
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...ictsugar
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedKaiNexus
 
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCRashishs7044
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMintel Group
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaoncallgirls2057
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Serviceankitnayak356677
 
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxMarkAnthonyAurellano
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCRashishs7044
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menzaictsugar
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechNewman George Leech
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Roomdivyansh0kumar0
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckHajeJanKamps
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607dollysharma2066
 

Recently uploaded (20)

Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation Slides
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR
 
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
 
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 Edition
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
 
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman Leech
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
 

Lecture 10-cs648=2013

  • 1. Randomized Algorithms CS648 Lecture 10 Random Sampling part-II (To find a subset with desired property) 1
  • 2. Overview • • • • There is a huge list (1 million) of blood donors. Unfortunately the blood group information is missing at present. We need a donor with blood group O+. What to do ? Solution: (Select a random subset of donors.) Repeat until we get a donor of blood group O+. { Pick phone number of a donor randomly uniformly Call him to ask his Blood group. }
  • 3. Random Sampling • Suppose there is a computational problem where we require to find a subset with some desired properties. • Unfortunately, computing such a set deterministically may take huge time. • Random sampling carried out suitably may produce a subset with the desired property with some probability.
  • 5. Integer Product of Matrices 1 0 0 1 0 1 0 1 0 0 2 1 2 0 0 1 0 0 0 1 0 1 1 0 1 2 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 2 2 0 1 1 1 0 1 0 1 0 0 1 0 2 2 3 0 D 1 A B
  • 6. Boolean Product of Matrices 1 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 1 1 1 C 0 1 A B
  • 7. Boolean Product of Matrices 1 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 1 1 1 C 0 1 A B
  • 8. Boolean Product Witness Matrix (BPWM)
  • 10. All Pairs Shortest Paths (APSP)
  • 11. All Pairs Shortest Paths (APSP) Students having interest in algorithms are strongly advised to study this novel algorithm from Motwani-Raghwan book or the original journal version. (This is, of course, not part of the syllabus for CS648)
  • 13. Boolean Product Witness Matrix (BPWM)
  • 14. Boolean Product of Matrices 1 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 1 1 1 C 0 1 2 1 2 0 0 2 0 1 0 0 1 1 1 1 0 1 2 2 0 1 2 2 3 0 1 A Look carefully at the integer product matrix D. Does it have any thing to do with witnesses. B D
  • 15. Boolean Product of Matrices 1 0 0 1 0 1 0 1 0 0 2 1 2 0 0 1 0 0 0 1 0 1 1 0 1 2 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 2 2 0 1 1 1 0 1 0 1 0 0 1 0 2 2 3 0 D 1 A B
  • 16. Boolean Product of Matrices 1 2 3 4 5 ⨯ ⨯ ⨯ ⨯ ⨯ 1 0 0 1 0 1 0 1 0 0 2 1 2 0 0 1 0 0 0 1 0 1 1 0 1 2 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 2 2 0 1 1 1 0 1 0 1 0 0 1 0 2 2 3 0 D 1 A There is a way to manipulate A so that D will store a witness for all those pairs which have singleton witness. Can you guess ? B
  • 17. Boolean Product of Matrices 1 2 3 4 5 ⨯ ⨯ ⨯ ⨯ ⨯ 1 0 0 1 0 1 0 1 0 0 2 4 2 0 0 1 0 0 0 1 0 1 1 0 1 2 0 1 0 0 0 0 1 0 0 1 1 1 1 0 3 3 3 3 0 0 1 0 1 0 1 1 1 0 0 2 2 2 0 2 1 1 0 1 0 1 0 0 1 0 2 2 3 0 D 2 A B
  • 18. Boolean Product of Matrices 1 2 3 4 5 ⨯ ⨯ ⨯ ⨯ ⨯ 1 0 0 1 0 1 0 1 0 0 5 4 5 0 0 1 0 0 0 1 0 1 1 0 1 6 0 1 0 0 0 0 1 0 0 1 1 1 1 0 3 3 3 3 0 0 1 0 1 0 1 1 1 0 0 2 6 6 0 2 1 1 0 1 0 1 0 0 1 0 5 6 7 0 D 2 A B
  • 19. Algorithm for Computing Singleton Witnesses
  • 21.
  • 22. 1 2 3 4 … n ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 0 0 A B
  • 23. 1 2 3 4 … n ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 0 0 A B
  • 24. 1 2 3 4 5 … n-1 n ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 0 0 A B
  • 25. 0 2 3 0 5 … n-1 0 ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 0 0 A B
  • 26. No idea! Let us ask the following related but easier question.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. Conclusion A sketch of the solution for Question 1 was given in the class. The students are encouraged to work out the exact details. The solution will be presented in the beginning of next lecture class.