SlideShare une entreprise Scribd logo
1  sur  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 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
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 B D
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
1 1 1 0 0
1 0 1 0 0
1 1 1 1 0
1 1 1 0 1
1 1 1 0 1
A B C
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
1 1 1 0 0
1 0 1 0 0
1 1 1 1 0
1 1 1 0 1
1 1 1 0 1
A B C
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 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
1 1 1 0 0
1 0 1 0 0
1 1 1 1 0
1 1 1 0 1
1 1 1 0 1
A B C
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
D
Look carefully at the integer
product matrix D. Does it
have any thing to do with
witnesses.
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
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 B D
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
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 B D
1 2 3 4 5
⨯ ⨯ ⨯ ⨯ ⨯
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 ?
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
2 4 2 0 0
2 0 1 0 0
3 3 3 3 0
2 2 2 0 2
2 2 3 0 2
A B D
1 2 3 4 5
⨯ ⨯ ⨯ ⨯ ⨯
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
5 4 5 0 0
6 0 1 0 0
3 3 3 3 0
2 6 6 0 2
5 6 7 0 2
A B D
1 2 3 4 5
⨯ ⨯ ⨯ ⨯ ⨯
Algorithm for Computing Singleton Witnesses
Algorithm Design for BPWM
1 0 1 1 1 0 0 1 0 1
1
1
0
1
1
0
1
1
0
0
1 2 3 4 … n
⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯
A B
1 0 1 1 1 0 0 1 0 1
1
1
0
1
1
0
1
1
0
0
1 2 3 4 … n
⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯
A B
1 0 1 1 1 0 0 1 0 1
1
1
0
1
1
0
1
1
0
0
1 2 3 4 5 … n-1 n
⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯
A B
1 0 1 1 1 0 0 1 0 1
1
1
0
1
1
0
1
1
0
0
0 2 3 0 5 … n-1 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.

Contenu connexe

Similaire à Lecture 10-cs648=2013 Randomized Algorithms

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
 
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
 
Lecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptxLecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptxNatKell
 
2015 bioinformatics score_matrices_wim_vancriekinge
2015 bioinformatics score_matrices_wim_vancriekinge2015 bioinformatics score_matrices_wim_vancriekinge
2015 bioinformatics score_matrices_wim_vancriekingeProf. Wim Van Criekinge
 
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
 
2016 bioinformatics i_score_matrices_wim_vancriekinge
2016 bioinformatics i_score_matrices_wim_vancriekinge2016 bioinformatics i_score_matrices_wim_vancriekinge
2016 bioinformatics i_score_matrices_wim_vancriekingeProf. Wim Van Criekinge
 
SPIE Conference V3.0
SPIE Conference V3.0SPIE Conference V3.0
SPIE Conference V3.0Robert Fry
 
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013Prof. Wim Van Criekinge
 
Neural Collaborative Filtering Explanation & Implementation
Neural Collaborative Filtering Explanation & ImplementationNeural Collaborative Filtering Explanation & Implementation
Neural Collaborative Filtering Explanation & ImplementationKung-hsiang (Steeve) Huang
 
Two Pseudo-random Number Generators, an Overview
Two Pseudo-random Number Generators, an Overview Two Pseudo-random Number Generators, an Overview
Two Pseudo-random Number Generators, an Overview Kato Mivule
 
Quantum Computing: The Why and How
Quantum Computing: The Why and HowQuantum Computing: The Why and How
Quantum Computing: The Why and Howinside-BigData.com
 
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...Lietuvos kompiuterininkų sąjunga
 
Deep learning in E-Commerce Applications and Challenges (CNN)
Deep learning in E-Commerce Applications and Challenges (CNN) Deep learning in E-Commerce Applications and Challenges (CNN)
Deep learning in E-Commerce Applications and Challenges (CNN) Houda Bakir
 
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...Matthieu Macret
 
Binary images and Morphology - Computer Vision
Binary images and Morphology - Computer VisionBinary images and Morphology - Computer Vision
Binary images and Morphology - Computer Visionothersk46
 
OpenCL applications in genomics
OpenCL applications in genomicsOpenCL applications in genomics
OpenCL applications in genomicsUSC
 
Christian Hennig- Assessing the quality of a clustering
Christian Hennig- Assessing the quality of a clusteringChristian Hennig- Assessing the quality of a clustering
Christian Hennig- Assessing the quality of a clusteringPyData
 

Similaire à Lecture 10-cs648=2013 Randomized Algorithms (20)

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
 
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
 
Lecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptxLecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptx
 
2015 bioinformatics score_matrices_wim_vancriekinge
2015 bioinformatics score_matrices_wim_vancriekinge2015 bioinformatics score_matrices_wim_vancriekinge
2015 bioinformatics score_matrices_wim_vancriekinge
 
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
 
2016 bioinformatics i_score_matrices_wim_vancriekinge
2016 bioinformatics i_score_matrices_wim_vancriekinge2016 bioinformatics i_score_matrices_wim_vancriekinge
2016 bioinformatics i_score_matrices_wim_vancriekinge
 
SPIE Conference V3.0
SPIE Conference V3.0SPIE Conference V3.0
SPIE Conference V3.0
 
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
 
Neural Collaborative Filtering Explanation & Implementation
Neural Collaborative Filtering Explanation & ImplementationNeural Collaborative Filtering Explanation & Implementation
Neural Collaborative Filtering Explanation & Implementation
 
Two Pseudo-random Number Generators, an Overview
Two Pseudo-random Number Generators, an Overview Two Pseudo-random Number Generators, an Overview
Two Pseudo-random Number Generators, an Overview
 
Quantum Computing: The Why and How
Quantum Computing: The Why and HowQuantum Computing: The Why and How
Quantum Computing: The Why and How
 
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
 
Deep learning in E-Commerce Applications and Challenges (CNN)
Deep learning in E-Commerce Applications and Challenges (CNN) Deep learning in E-Commerce Applications and Challenges (CNN)
Deep learning in E-Commerce Applications and Challenges (CNN)
 
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
 
Binary images and Morphology - Computer Vision
Binary images and Morphology - Computer VisionBinary images and Morphology - Computer Vision
Binary images and Morphology - Computer Vision
 
02-gates-w.pptx
02-gates-w.pptx02-gates-w.pptx
02-gates-w.pptx
 
Ch06 alignment
Ch06 alignmentCh06 alignment
Ch06 alignment
 
OpenCL applications in genomics
OpenCL applications in genomicsOpenCL applications in genomics
OpenCL applications in genomics
 
Christian Hennig- Assessing the quality of a clustering
Christian Hennig- Assessing the quality of a clusteringChristian Hennig- Assessing the quality of a clustering
Christian Hennig- Assessing the quality of a clustering
 
Project lfsr
Project lfsrProject lfsr
Project lfsr
 

Plus de 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 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized AlgorithmsLecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized AlgorithmsAnshul Yadav
 
Lecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized AlgorithmsLecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 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
 

Plus de Anshul Yadav (17)

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 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized AlgorithmsLecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized Algorithms
 
Lecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized AlgorithmsLecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 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
 
Lecture 1-cs648
Lecture 1-cs648Lecture 1-cs648
Lecture 1-cs648
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Lecture 10-cs648=2013 Randomized Algorithms

  • 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 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 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 B D
  • 6. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 A B C
  • 7. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 A B C
  • 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 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 A B C 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 D Look carefully at the integer product matrix D. Does it have any thing to do with witnesses.
  • 15. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 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 B D
  • 16. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 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 B D 1 2 3 4 5 ⨯ ⨯ ⨯ ⨯ ⨯ 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 ?
  • 17. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 2 4 2 0 0 2 0 1 0 0 3 3 3 3 0 2 2 2 0 2 2 2 3 0 2 A B D 1 2 3 4 5 ⨯ ⨯ ⨯ ⨯ ⨯
  • 18. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 5 4 5 0 0 6 0 1 0 0 3 3 3 3 0 2 6 6 0 2 5 6 7 0 2 A B D 1 2 3 4 5 ⨯ ⨯ ⨯ ⨯ ⨯
  • 19. Algorithm for Computing Singleton Witnesses
  • 21.
  • 22. 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 2 3 4 … n ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ A B
  • 23. 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 2 3 4 … n ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ A B
  • 24. 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 2 3 4 5 … n-1 n ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ A B
  • 25. 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 0 2 3 0 5 … n-1 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.